[3.20] backports/electron: upgrade to 30.5.2 #612

Closed
forge wants to merge 2 commits from electron/upgrade-30.5.2-320 into v3.20
3 changed files with 43 additions and 38 deletions

View file

@ -1,7 +1,7 @@
# Contributor: lauren n. liberda <lauren@selfisekai.rocks> # Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks> # Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=electron-tasje pkgname=electron-tasje
pkgver=0.7.1 pkgver=0.7.3
pkgrel=0 pkgrel=0
pkgdesc="Tiny replacement for electron-builder" pkgdesc="Tiny replacement for electron-builder"
url="https://codeberg.org/selfisekai/electron_tasje/" url="https://codeberg.org/selfisekai/electron_tasje/"
@ -31,5 +31,5 @@ package() {
} }
sha512sums=" sha512sums="
665ccbd6cb357c25d55daed4ad3b3ce008da258054951d9d069a5b12e72dd5812d534f906868e6b18e78949f058069a961c394c6f21ab3b3fab5393c330445e5 electron_tasje-0.7.1.tar.gz 251b7eabe74acdb5c7394f9d4d735b736acf555352785a9896ddaeed37632b238e823e1bb639e1f5a44a50455957ec41e1a585a3b2a9919b5818bb40843bd877 electron_tasje-0.7.3.tar.gz
" "

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