backports/electron: upgrade to 30.5.2

This commit is contained in:
Antoine Martin 2024-10-10 20:10:13 -04:00
parent 82e19a3d4a
commit 520f293e04
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 41 additions and 36 deletions

View file

@ -1,9 +1,10 @@
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=electron
pkgver=30.0.9
_semver="${pkgver/_beta/-beta.}"
pkgver=30.5.2
_gittag=v"${pkgver/_beta/-beta.}"
pkgrel=0
_chromium=124.0.6367.233
_chromium=124.0.6367.243
_copium_tag=124.5
_depot_tools=495b23b39aaba2ca3b55dd27cadc523f1cb17ee6
pkgdesc="Electron cross-platform desktop toolkit"
@ -11,6 +12,7 @@ url="https://github.com/electron/electron"
arch="aarch64 x86_64" # same as chromium
license="MIT"
depends="gtk+3.0 so:libudev.so.1 xdg-utils"
_llvmver=17
makedepends="
ada-dev
alsa-lib-dev
@ -22,7 +24,7 @@ makedepends="
bzip2-dev
c-ares-dev
cairo-dev
clang-dev
clang$_llvmver-dev
clang-extra-tools
compiler-rt
crc32c-dev
@ -75,7 +77,7 @@ makedepends="
libxslt-dev
linux-headers
lld
llvm
llvm$_llvmver
mesa-dev
minizip-dev
nghttp2-dev
@ -107,7 +109,8 @@ makedepends="
"
subpackages="$pkgname-lang $pkgname-dev"
# the lower patches are specific to electron, the top ones are from the equivalent chromium version
source="https://ab-sn.lnl.gay/electron-$_semver-$_chromium.tar.zst
source="
https://ayakael.net/api/packages/mirrors/generic/electron/$_gittag/electron-$_gittag-$_chromium.tar.zst
copium-$_copium_tag.tar.gz::https://codeberg.org/selfisekai/copium/archive/$_copium_tag.tar.gz
chromium-revert-drop-of-system-java.patch
compiler.patch
@ -143,6 +146,7 @@ source="https://ab-sn.lnl.gay/electron-$_semver-$_chromium.tar.zst
python-jinja-3.10.patch
webpack-hash.patch
unbundle-node.patch
system-zlib-headers.patch
default.conf
electron.desktop
@ -154,17 +158,17 @@ _copium_patches="
"
# tests are todo for some base checks
options="!check net suid"
builddir="$srcdir/electron-$_semver-$_chromium"
builddir="$srcdir/electron-$_gittag-$_chromium"
export PATH="$PATH:/usr/lib/qt5/bin"
export CC=clang
export CXX=clang++
export CC=clang-$_llvmver
export CXX=clang++-$_llvmver
# required to find the tools
export AR=llvm-ar
export NM=llvm-nm
export LD=clang++
export LD=clang++-$_llvmver
# less log spam, reproducible
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-shift-count-overflow -Wno-ignored-attributes"
@ -188,6 +192,7 @@ snapshot() {
# vpython3 execs system python3 with this set
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
export CHROMIUM_BUILDTOOLS_PATH="$srcdir/src/buildtools"
export DEPOT_TOOLS_UPDATE=0
mkdir -p "$srcdir"
cd "$srcdir"
@ -205,7 +210,7 @@ snapshot() {
echo "solutions = [
{
\"name\": \"src/electron\",
\"url\": \"https://github.com/electron/electron.git@v$_semver\",
\"url\": \"https://github.com/electron/electron.git@$_gittag\",
\"deps_file\": \"DEPS\",
\"managed\": False,
\"custom_deps\": {
@ -234,15 +239,15 @@ snapshot() {
python3 src/electron/script/apply_all_patches.py \
src/electron/patches/config.json
mv src $pkgname-$_semver-$_chromium
mv src $pkgname-$_gittag-$_chromium
# extra binaries are most likely things we don't want, so nuke them all
for elf in $(scanelf -RA -F "%F" $pkgname-$_semver-$_chromium); do
for elf in $(scanelf -RA -F "%F" $pkgname-$_gittag-$_chromium); do
rm -f "$elf"
done
msg "generating tarball.. (this takes a while)"
tar -cf $pkgname-$_semver-$_chromium.tar \
tar -cf $pkgname-$_gittag-$_chromium.tar \
--exclude="ChangeLog*" \
--exclude="testdata/*" \
--exclude="test_data/*" \
@ -250,10 +255,10 @@ snapshot() {
--exclude-backups \
--exclude-caches-all \
--exclude-vcs \
$pkgname-$_semver-$_chromium
$pkgname-$_gittag-$_chromium
zstd --auto-threads=logical --ultra --long -22 -T"${ZSTD_LIMIT:-0}" -vv $pkgname-$_semver-$_chromium.tar -o "$SRCDEST"/$pkgname-$_semver-$_chromium.tar.zst
mcli cp "$SRCDEST"/$pkgname-$_semver-$_chromium.tar.zst "$_distbucket"
zstd --auto-threads=logical --ultra --long -22 -T"${ZSTD_LIMIT:-0}" -vv $pkgname-$_gittag-$_chromium.tar -o "$SRCDEST"/$pkgname-$_gittag-$_chromium.tar.zst
mcli cp "$SRCDEST"/$pkgname-$_gittag-$_chromium.tar.zst "$_distbucket"
}
prepare() {
@ -267,7 +272,7 @@ prepare() {
;;
esac
done
if [ ! -z "$failed" ]; then
if [ -n "$failed" ]; then
error "The following patches failed to apply:"
for i in $failed; do
printf " %s\n" "$i" >&2
@ -291,7 +296,7 @@ prepare() {
git config commit.gpgsign false
git add LICENSE
git commit -m "init"
git tag "v$_semver"
git tag "$_gittag"
git pack-refs
yarn install --frozen-lockfile --no-scripts
)
@ -409,8 +414,6 @@ _configure() {
cd "$builddir"
msg "Configuring build"
local clang_ver="$(clang -dumpversion)"
case "$USE_CCACHE" in
1)
local cc_wrapper="ccache"
@ -433,7 +436,7 @@ _configure() {
chrome_pgo_phase=0
clang_base_path=\"/usr\"
clang_use_chrome_plugins=false
clang_version=\"${clang_ver%%.*}\"
clang_version=\"$_llvmver\"
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
disable_fieldtrial_testing_config=true
enable_hangout_services_extension=true
@ -490,15 +493,12 @@ _configure() {
build() {
export PATH="$PATH:/usr/lib/qt5/bin"
# ~1 GB per concurrent job is not enough with gcc
_njobs="${NJOBS:-"$(python3 -c 'import os; print(max((os.cpu_count() - (10 if os.uname().machine == "aarch64" else 8), 1)))')"}"
ninja -C out/Release -j$_njobs \
ninja -C out/Release \
copy_node_headers \
electron_dist_zip \
node_gypi_headers \
node_version_header
cp -vf out/Release/gen/node_headers/include/node/config.gypi third_party/electron_node/config.gypi
}
package() {
@ -512,13 +512,7 @@ package() {
install -Dm755 "$srcdir"/default.conf "$pkgdir"/etc/electron/default.conf
mkdir -p "$pkgdir"/usr/include/electron
(
cd third_party/electron_node/
HEADERS_ONLY=1 python3 ./tools/install.py install "$pkgdir" "/usr/include/electron/node_headers"
)
# required overrides
install -Dm644 out/Release/gen/node_headers/include/node/* -t "$pkgdir"/usr/include/electron/node_headers/include/node
cp -rv "$builddir"/out/Release/gen/node_headers "$pkgdir"/usr/include/electron
ln -sv /usr/include/electron/node_headers/include/node "$pkgdir"/usr/include/electron/node
mkdir -p "$pkgdir"/usr/include/electron/node_headers/include/nan
@ -544,7 +538,7 @@ lang() {
}
sha512sums="
97024407a16fb41ec56fcc6df5552165ce4eea34fc51b17ecbf30a7e35406baccf8a3001a795a06d1e92d32e134d9d7a18d59fa74eda1b1bc23b59bc4947929b electron-30.0.9-124.0.6367.233.tar.zst
ef4c5facfdbe3478baf90bc4bdc8c35bf0deb4e88cd36bedc737fe8a5b5fccc8d6e257ec53afe6727293c170a1a347da2485ad6ce0b8acbdfa8e22c9b64360a1 electron-v30.5.2-124.0.6367.243.tar.zst
13c647dc2024e27ae8a4d7e8f1202037a342f4a7054477226665c332029e1b6f1d8b99004c2b2809bcf1e6c19b1359ef5e1c971552d7ced59c5b43d5a836af88 copium-124.5.tar.gz
29bb685e03356a77df5fd347cdf55194cc8b3265c421cc76e54d64edefc329dbcb052deb26b22e8f587ce68456876c071de1b7d258dd0fcc6ee66c875ec4a020 chromium-revert-drop-of-system-java.patch
54eb147c0af2ba096d1df375a289b339ee855ab1a9114e7c747753f0274a6bafb7212c1859b7885454c4529d9a5e3bd9559fc14e8e006f23ccd381895fa68d15 compiler.patch
@ -579,6 +573,7 @@ e48693e6b7aeebf69a5acbf80d9a35defe4c23835121dfeb58b051ac7c527e758a41004f4d193274
e05180199ee1d559e4e577cedd3e589844ecf40d98a86321bf1bea5607b02eeb5feb486deddae40e1005b644550331f6b8500177aa7e79bcb3750d3c1ceb76c3 python-jinja-3.10.patch
2aa340854316f1284217c0ca17cbf44953684ad6c7da90815117df30928612eb9fb9ffb734b948dfc309cd25d1a67cd57f77aac2d052a3dd9aca07a3a58cbb30 webpack-hash.patch
ebb18a0e2eba4b4606e900fa82f4b57fe91dcbdc943e17544bccb3c9a011a49b4331cdbee59629e44b80184bad4ea54ec887c0bfcd00cda8d5686060dbf365e3 unbundle-node.patch
1b35edcf0b41e39e20c4d64dbb978bcaab8036f2fe839930709b269c50cb1321458a15b4d0013246f9e03f58f250a1e3a57ea910db1aa0adbd602a6a11ad33b9 system-zlib-headers.patch
e8ea87c547546011c4c8fc2de30e4f443b85cd4cfcff92808e2521d2f9ada03feefb8e1b0cf0f6b460919c146e56ef8d5ad4bb5e2461cc5247c30d92eb4d068e default.conf
191559fc7aa1ea0353c6fb0cc321ee1d5803a0e44848c8be941cfab96277b0de6a59962d373e2a2a1686c8f9be2bcf2d2f33706759a339a959e297d3f7fda463 electron.desktop
5f7ba5ad005f196facec1c0f26108356b64cafb1e5cfa462ff714a33b8a4c757ac00bfcb080da09eb5b65032f8eb245d9676a61ec554515d125ed63912708648 electron-launcher.sh

View file

@ -0,0 +1,10 @@
--- ./electron/BUILD.gn.orig
+++ ./electron/BUILD.gn
@@ -1565,7 +1565,6 @@
public_deps = header_groups + [
":node_gypi_headers",
":node_version_header",
- ":zlib_headers",
]
}