2023-09-01 17:03:15 +00:00
|
|
|
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
|
2023-01-11 00:40:45 +00:00
|
|
|
pkgname=electron
|
2023-12-01 01:43:31 +00:00
|
|
|
pkgver=27.1.2
|
2023-11-24 17:56:51 +00:00
|
|
|
_semver="${pkgver/_beta/-beta.}"
|
2023-05-05 05:10:04 +00:00
|
|
|
pkgrel=0
|
2023-12-01 01:43:31 +00:00
|
|
|
_chromium=118.0.5993.162
|
2023-09-01 17:03:15 +00:00
|
|
|
_depot_tools=b5509953468edd0906f2dc297886939abbd2bed5
|
2023-11-24 17:56:51 +00:00
|
|
|
_extra_patches=118.0.5993.11
|
2023-01-11 00:40:45 +00:00
|
|
|
pkgdesc="Electron cross-platform desktop toolkit"
|
|
|
|
url="https://github.com/electron/electron"
|
2023-11-24 17:56:51 +00:00
|
|
|
arch="aarch64 x86_64" # same as chromium
|
2023-01-11 00:40:45 +00:00
|
|
|
license="MIT"
|
|
|
|
depends="gtk+3.0 so:libudev.so.1 xdg-utils"
|
|
|
|
makedepends="
|
|
|
|
alsa-lib-dev
|
|
|
|
aom-dev
|
|
|
|
bash
|
|
|
|
brotli-dev
|
|
|
|
bsd-compat-headers
|
|
|
|
bzip2-dev
|
|
|
|
c-ares-dev
|
|
|
|
cairo-dev
|
2023-11-24 17:56:51 +00:00
|
|
|
clang16-dev
|
2023-01-11 00:40:45 +00:00
|
|
|
clang-extra-tools
|
|
|
|
compiler-rt
|
|
|
|
cups-dev
|
|
|
|
curl-dev
|
|
|
|
dav1d-dev
|
|
|
|
dbus-glib-dev
|
|
|
|
eudev-dev
|
|
|
|
ffmpeg-dev
|
|
|
|
findutils
|
|
|
|
flac-dev
|
|
|
|
flex
|
|
|
|
freetype-dev
|
|
|
|
gperf
|
|
|
|
gtk+3.0-dev
|
|
|
|
gn
|
|
|
|
gzip
|
|
|
|
harfbuzz-dev
|
|
|
|
hunspell-dev
|
|
|
|
http-parser-dev
|
2023-09-01 17:03:15 +00:00
|
|
|
hwdata-dev
|
2023-01-11 00:40:45 +00:00
|
|
|
java-jdk
|
|
|
|
jpeg-dev
|
|
|
|
jsoncpp-dev
|
|
|
|
krb5-dev
|
|
|
|
lcms2-dev
|
|
|
|
libarchive-tools
|
|
|
|
libavif-dev
|
|
|
|
libbsd-dev
|
|
|
|
libcap-dev
|
|
|
|
libevent-dev
|
|
|
|
libexif-dev
|
|
|
|
libgcrypt-dev
|
|
|
|
libjpeg-turbo-dev
|
|
|
|
libnotify-dev
|
|
|
|
libusb-dev
|
|
|
|
libva-dev
|
|
|
|
libwebp-dev
|
|
|
|
libxcomposite-dev
|
|
|
|
libxcursor-dev
|
|
|
|
libxinerama-dev
|
|
|
|
libxml2-dev
|
|
|
|
libxrandr-dev
|
|
|
|
libxscrnsaver-dev
|
|
|
|
libxslt-dev
|
|
|
|
linux-headers
|
|
|
|
lld
|
2023-11-24 17:56:51 +00:00
|
|
|
llvm16
|
2023-01-11 00:40:45 +00:00
|
|
|
mesa-dev
|
|
|
|
minizip-dev
|
|
|
|
nghttp2-dev
|
|
|
|
nodejs
|
|
|
|
npm
|
|
|
|
nss-dev
|
|
|
|
opus-dev
|
|
|
|
pciutils-dev
|
|
|
|
perl
|
|
|
|
pipewire-dev
|
|
|
|
pulseaudio-dev
|
|
|
|
py3-httplib2
|
|
|
|
py3-parsing
|
|
|
|
py3-six
|
|
|
|
python3
|
2023-05-05 05:10:04 +00:00
|
|
|
qt5-qtbase-dev
|
2023-01-11 00:40:45 +00:00
|
|
|
re2-dev
|
2023-05-05 05:10:04 +00:00
|
|
|
rsync
|
2023-11-24 17:56:51 +00:00
|
|
|
rust
|
2023-01-11 00:40:45 +00:00
|
|
|
samurai
|
|
|
|
snappy-dev
|
|
|
|
speex-dev
|
|
|
|
sqlite-dev
|
|
|
|
woff2-dev
|
|
|
|
xcb-proto
|
|
|
|
yarn
|
|
|
|
zlib-dev
|
2023-11-24 17:56:51 +00:00
|
|
|
zstd-dev
|
2023-01-11 00:40:45 +00:00
|
|
|
"
|
|
|
|
subpackages="$pkgname-lang $pkgname-dev"
|
|
|
|
# the lower patches are specific to electron, the top ones are from the equivalent chromium version
|
2023-11-24 17:56:51 +00:00
|
|
|
source="https://s3.sakamoto.pl/lnl-aports-snapshots/electron-$_semver-$_chromium.tar.zst
|
|
|
|
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/$_extra_patches/chromium-patches-$_extra_patches.tar.gz
|
2023-01-11 00:40:45 +00:00
|
|
|
chromium-revert-drop-of-system-java.patch
|
|
|
|
chromium-use-alpine-target.patch
|
|
|
|
fix-missing-cstdint-include-musl.patch
|
|
|
|
gdbinit.patch
|
2023-05-05 05:10:04 +00:00
|
|
|
import-version.patch
|
2023-09-01 17:03:15 +00:00
|
|
|
libstdc++13.patch
|
2023-05-05 05:10:04 +00:00
|
|
|
mman.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
musl-sandbox.patch
|
|
|
|
musl-tid-caching.patch
|
|
|
|
musl-v8-monotonic-pthread-cont_timedwait.patch
|
|
|
|
no-execinfo.patch
|
|
|
|
no-mallinfo.patch
|
2023-11-24 17:56:51 +00:00
|
|
|
no-mte.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
no-res-ninit-nclose.patch
|
2023-09-01 17:03:15 +00:00
|
|
|
no-sandbox-settls.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
temp-failure-retry.patch
|
|
|
|
|
|
|
|
icon.patch
|
|
|
|
python-jinja-3.10.patch
|
2023-09-01 17:03:15 +00:00
|
|
|
vector-const.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
webpack-hash.patch
|
2023-11-24 17:56:51 +00:00
|
|
|
chromium-icu-74.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
|
|
|
|
default.conf
|
|
|
|
electron.desktop
|
|
|
|
electron-launcher.sh
|
|
|
|
"
|
2023-05-05 05:10:04 +00:00
|
|
|
# tests are todo for some base checks
|
|
|
|
options="!check net suid"
|
2023-11-24 17:56:51 +00:00
|
|
|
builddir="$srcdir/electron-$_semver-$_chromium"
|
|
|
|
|
|
|
|
export PATH="$PATH:/usr/lib/qt5/bin"
|
|
|
|
|
|
|
|
# clang uses much less memory (and this doesn't support gcc)
|
|
|
|
export CC=clang-16
|
|
|
|
export CXX=clang++-16
|
|
|
|
|
|
|
|
# required to find the tools
|
|
|
|
export AR=llvm16-ar
|
|
|
|
export NM=llvm16-nm
|
|
|
|
export LD=clang++-16
|
|
|
|
|
|
|
|
# less log spam, reproducible
|
|
|
|
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
|
|
|
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
|
|
|
export CPPFLAGS="${CPPFLAGS/-g/} -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
|
|
|
|
|
|
|
# breaks chromium-based stuff
|
|
|
|
export CXXFLAGS="${CXXFLAGS/-D_GLIBCXX_ASSERTIONS=1}"
|
2023-01-11 00:40:45 +00:00
|
|
|
|
|
|
|
# creates a dist tarball that does not need to git clone everything at build time.
|
|
|
|
snapshot() {
|
2023-05-05 05:10:04 +00:00
|
|
|
deps
|
|
|
|
# vpython3 execs system python3 with this set
|
|
|
|
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
|
2023-01-11 00:40:45 +00:00
|
|
|
export CHROMIUM_BUILDTOOLS_PATH="$srcdir/src/buildtools"
|
|
|
|
mkdir -p "$srcdir"
|
|
|
|
cd "$srcdir"
|
2023-09-01 17:03:15 +00:00
|
|
|
if ! [ -d src ]; then
|
|
|
|
git clone --branch=$_chromium --depth=1 \
|
|
|
|
https://chromium.googlesource.com/chromium/src.git
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -d electron ]; then
|
|
|
|
git clone https://github.com/electron/electron.git
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -d depot_tools ]; then
|
|
|
|
(
|
|
|
|
git clone --depth 1 -b main https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
|
|
cd depot_tools
|
|
|
|
git fetch --depth 1 origin $_depot_tools
|
|
|
|
git checkout $_depot_tools
|
|
|
|
)
|
|
|
|
fi
|
2023-01-11 00:40:45 +00:00
|
|
|
|
|
|
|
export PATH="$PATH:$srcdir/depot_tools"
|
|
|
|
|
|
|
|
echo "solutions = [
|
|
|
|
{
|
|
|
|
\"name\": \"src/electron\",
|
2023-11-24 17:56:51 +00:00
|
|
|
\"url\": \"file://$srcdir/electron@v$_semver\",
|
2023-01-11 00:40:45 +00:00
|
|
|
\"deps_file\": \"DEPS\",
|
|
|
|
\"managed\": False,
|
|
|
|
\"custom_deps\": {
|
|
|
|
\"src\": None,
|
|
|
|
},
|
|
|
|
\"custom_vars\": {},
|
|
|
|
},
|
|
|
|
]" > .gclient
|
|
|
|
|
|
|
|
python3 depot_tools/gclient.py sync \
|
|
|
|
--with_branch_heads \
|
|
|
|
--with_tags \
|
|
|
|
--nohooks
|
|
|
|
|
|
|
|
python3 src/build/landmines.py
|
|
|
|
python3 src/build/util/lastchange.py -o src/build/util/LASTCHANGE
|
|
|
|
python3 src/build/util/lastchange.py -s src/third_party/dawn \
|
|
|
|
--revision src/gpu/webgpu/DAWN_VERSION
|
|
|
|
python3 src/build/util/lastchange.py -m GPU_LISTS_VERSION \
|
|
|
|
--revision-id-only --header src/gpu/config/gpu_lists_version.h
|
|
|
|
python3 src/build/util/lastchange.py -m SKIA_COMMIT_HASH \
|
|
|
|
-s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
|
|
|
|
|
|
|
|
# why?
|
|
|
|
cp -r electron/patches/ffmpeg src/electron/patches/
|
|
|
|
|
|
|
|
python3 electron/script/apply_all_patches.py \
|
|
|
|
electron/patches/config.json
|
2023-03-10 17:38:28 +00:00
|
|
|
|
|
|
|
python3 src/tools/update_pgo_profiles.py \
|
|
|
|
--target=linux \
|
|
|
|
update \
|
|
|
|
--gs-url-base=chromium-optimization-profiles/pgo_profiles
|
|
|
|
|
2023-01-11 00:40:45 +00:00
|
|
|
python3 src/tools/download_optimization_profile.py \
|
|
|
|
--newest_state=src/chrome/android/profiles/newest.txt \
|
|
|
|
--local_state=src/chrome/android/profiles/local.txt \
|
|
|
|
--output_name=src/chrome/android/profiles/afdo.prof \
|
|
|
|
--gs_url_base=chromeos-prebuilt/afdo-job/llvm
|
|
|
|
|
2023-11-24 17:56:51 +00:00
|
|
|
mv src $pkgname-$_semver-$_chromium
|
2023-01-11 00:40:45 +00:00
|
|
|
|
|
|
|
# extra binaries are most likely things we don't want, so nuke them all
|
2023-11-24 17:56:51 +00:00
|
|
|
for elf in $(scanelf -RA -F "%F" $pkgname-$_semver-$_chromium); do
|
2023-01-11 00:40:45 +00:00
|
|
|
rm -f "$elf"
|
|
|
|
done
|
|
|
|
|
|
|
|
msg "generating tarball.. (this takes a while)"
|
2023-11-24 17:56:51 +00:00
|
|
|
tar -cf $pkgname-$_semver-$_chromium.tar \
|
2023-01-11 00:40:45 +00:00
|
|
|
--exclude="ChangeLog*" \
|
2023-05-05 05:10:04 +00:00
|
|
|
--exclude="testdata/*" \
|
|
|
|
--exclude="test_data/*" \
|
|
|
|
--exclude="android_rust_toolchain/*" \
|
2023-01-11 00:40:45 +00:00
|
|
|
--exclude-backups \
|
|
|
|
--exclude-caches-all \
|
|
|
|
--exclude-vcs \
|
2023-11-24 17:56:51 +00:00
|
|
|
$pkgname-$_semver-$_chromium
|
2023-01-11 00:40:45 +00:00
|
|
|
|
2023-11-24 17:56:51 +00:00
|
|
|
zstd --auto-threads=logical --ultra --long -22 -T"${ZSTD_LIMIT:-0}" -vv $pkgname-$_semver-$_chromium.tar
|
2023-09-01 17:03:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_extra_patch() {
|
|
|
|
msg chromium-"$1".patch
|
|
|
|
patch -Np1 < "$srcdir"/chromium-patches-"$_extra_patches"/chromium-"$1".patch
|
2023-01-11 00:40:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2023-09-01 17:03:15 +00:00
|
|
|
dos2unix third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
|
|
|
|
|
2023-01-11 00:40:45 +00:00
|
|
|
default_prepare
|
|
|
|
|
2023-11-24 17:56:51 +00:00
|
|
|
_extra_patch 118-SensorReadingField-include
|
|
|
|
_extra_patch 117-material-color-include
|
|
|
|
_extra_patch 118-system-freetype
|
|
|
|
_extra_patch 117-system-zstd
|
|
|
|
_extra_patch 118-compiler
|
2023-09-01 17:03:15 +00:00
|
|
|
|
|
|
|
git init -q .
|
2023-01-11 00:40:45 +00:00
|
|
|
|
|
|
|
# link to system tools
|
|
|
|
ln -sfv /usr/bin/clang-format buildtools/linux64/clang-format
|
|
|
|
mkdir -p third_party/node/linux/node-linux-x64/bin
|
|
|
|
ln -sfv /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
|
|
|
ln -sfv /usr/bin/java third_party/jdk/current/bin/java
|
|
|
|
|
|
|
|
(
|
|
|
|
cd electron
|
2023-09-01 17:03:15 +00:00
|
|
|
git init -q .
|
2023-01-11 00:40:45 +00:00
|
|
|
git config user.email "example@example.com"
|
|
|
|
git config user.name "example"
|
2023-09-01 17:03:15 +00:00
|
|
|
git config commit.gpgsign false
|
2023-01-11 00:40:45 +00:00
|
|
|
git add LICENSE
|
|
|
|
git commit -m "init"
|
2023-11-24 17:56:51 +00:00
|
|
|
git tag "v$_semver"
|
2023-09-01 17:03:15 +00:00
|
|
|
git pack-refs
|
2023-05-05 05:10:04 +00:00
|
|
|
yarn install --frozen-lockfile --no-scripts
|
2023-01-11 00:40:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
cd third_party/node
|
2023-05-05 05:10:04 +00:00
|
|
|
./update_npm_deps
|
2023-01-11 00:40:45 +00:00
|
|
|
)
|
|
|
|
|
2023-09-01 17:03:15 +00:00
|
|
|
# libaom - https://aomedia.googlesource.com/aom/+/706ee36dcc82%5E%21/
|
2023-01-11 00:40:45 +00:00
|
|
|
local use_system="
|
|
|
|
dav1d
|
|
|
|
ffmpeg
|
|
|
|
flac
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
harfbuzz-ng
|
|
|
|
icu
|
2023-09-01 17:03:15 +00:00
|
|
|
jsoncpp
|
2023-11-24 17:56:51 +00:00
|
|
|
libavif
|
2023-01-11 00:40:45 +00:00
|
|
|
libdrm
|
|
|
|
libevent
|
|
|
|
libjpeg
|
|
|
|
libwebp
|
|
|
|
libxml
|
|
|
|
libxslt
|
|
|
|
opus
|
2023-11-24 17:56:51 +00:00
|
|
|
re2
|
2023-01-11 00:40:45 +00:00
|
|
|
snappy
|
2023-09-01 17:03:15 +00:00
|
|
|
woff2
|
2023-01-11 00:40:45 +00:00
|
|
|
zlib
|
2023-11-24 17:56:51 +00:00
|
|
|
zstd
|
2023-01-11 00:40:45 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
for _lib in $use_system libjpeg_turbo; do
|
|
|
|
msg "Removing buildscripts for system provided $_lib"
|
|
|
|
find . -type f -path "*third_party/$_lib/*" \
|
|
|
|
\! -path "*third_party/$_lib/chromium/*" \
|
|
|
|
\! -path "*third_party/$_lib/google/*" \
|
|
|
|
\! -path './base/third_party/icu/*' \
|
|
|
|
\! -path './third_party/libxml/*' \
|
|
|
|
\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
|
|
|
|
\! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \
|
|
|
|
\! -path './third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h' \
|
|
|
|
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
|
|
|
-delete
|
|
|
|
done
|
|
|
|
|
|
|
|
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
|
|
|
|
touch chrome/test/data/webui/i18n_process_css_test.html
|
|
|
|
# Use the file at run time instead of effectively compiling it in
|
|
|
|
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
|
|
|
-i services/device/public/cpp/usb/BUILD.gn
|
|
|
|
|
2023-05-05 05:10:04 +00:00
|
|
|
msg "Running debundle script"
|
2023-01-11 00:40:45 +00:00
|
|
|
python3 build/linux/unbundle/replace_gn_files.py --system-libraries \
|
|
|
|
$use_system
|
|
|
|
python3 third_party/libaddressinput/chromium/tools/update-strings.py
|
|
|
|
|
|
|
|
# prevent annoying errors when regenerating gni
|
|
|
|
sed -i 's,^update_readme$,#update_readme,' \
|
|
|
|
third_party/libvpx/generate_gni.sh
|
|
|
|
|
|
|
|
# allow system dependencies in "official builds"
|
|
|
|
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
|
|
|
|
tools/generate_shim_headers/generate_shim_headers.py
|
|
|
|
|
|
|
|
# https://crbug.com/893950
|
|
|
|
sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
|
|
|
|
third_party/blink/renderer/core/xml/*.cc \
|
|
|
|
third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
|
|
|
|
third_party/libxml/chromium/*.cc \
|
|
|
|
third_party/maldoca/src/maldoca/ole/oss_utils.h
|
|
|
|
|
2023-05-05 05:10:04 +00:00
|
|
|
_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
_configure() {
|
|
|
|
cd "$builddir"
|
2023-01-11 00:40:45 +00:00
|
|
|
msg "Configuring build"
|
|
|
|
|
2023-05-05 05:10:04 +00:00
|
|
|
# shellcheck disable=2089
|
2023-01-11 00:40:45 +00:00
|
|
|
local gn_config="
|
2023-03-10 17:38:28 +00:00
|
|
|
clang_base_path=\"/usr\"
|
|
|
|
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
|
|
|
host_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
2023-01-11 00:40:45 +00:00
|
|
|
import(\"//electron/build/args/release.gn\")
|
2023-03-10 17:38:28 +00:00
|
|
|
|
2023-01-11 00:40:45 +00:00
|
|
|
blink_enable_generated_code_formatting=false
|
2023-09-01 17:03:15 +00:00
|
|
|
chrome_pgo_phase=0
|
2023-01-11 00:40:45 +00:00
|
|
|
clang_use_chrome_plugins=false
|
|
|
|
fatal_linker_warnings=false
|
|
|
|
ffmpeg_branding=\"Chrome\"
|
|
|
|
icu_use_data_file=true
|
|
|
|
is_cfi=false
|
2023-09-01 17:03:15 +00:00
|
|
|
is_clang=true
|
2023-01-11 00:40:45 +00:00
|
|
|
is_component_ffmpeg=true
|
|
|
|
is_debug=false
|
|
|
|
is_official_build=true
|
2023-03-10 17:38:28 +00:00
|
|
|
symbol_level=0
|
|
|
|
treat_warnings_as_errors=false
|
|
|
|
|
|
|
|
angle_enable_gl_null=false
|
|
|
|
build_tflite_with_xnnpack=false
|
2023-11-24 17:56:51 +00:00
|
|
|
build_with_tflite_lib=true
|
2023-03-10 17:38:28 +00:00
|
|
|
disable_fieldtrial_testing_config=true
|
|
|
|
enable_hangout_services_extension=true
|
|
|
|
enable_library_cdms=false
|
|
|
|
enable_media_remoting=false
|
|
|
|
enable_nacl=false
|
|
|
|
enable_paint_preview=false
|
|
|
|
enable_reading_list=false
|
|
|
|
enable_remoting=false
|
|
|
|
enable_reporting=false
|
2023-09-01 17:03:15 +00:00
|
|
|
enable_rust=false
|
2023-03-10 17:38:28 +00:00
|
|
|
enable_screen_ai_service=false
|
|
|
|
enable_service_discovery=false
|
|
|
|
enable_stripping=false
|
|
|
|
enable_vr=false
|
|
|
|
ozone_platform_headless=false
|
|
|
|
|
2023-01-11 00:40:45 +00:00
|
|
|
link_pulseaudio=true
|
|
|
|
proprietary_codecs=true
|
|
|
|
rtc_link_pipewire=true
|
|
|
|
rtc_use_pipewire=true
|
2023-09-01 17:03:15 +00:00
|
|
|
use_custom_libcxx=false
|
2023-03-10 17:38:28 +00:00
|
|
|
use_dawn=false
|
2023-01-11 00:40:45 +00:00
|
|
|
use_pulseaudio=true
|
|
|
|
use_sysroot=false
|
2023-05-05 05:10:04 +00:00
|
|
|
use_system_cares=true
|
2023-01-11 00:40:45 +00:00
|
|
|
use_system_freetype=true
|
|
|
|
use_system_harfbuzz=true
|
|
|
|
use_system_lcms2=true
|
|
|
|
use_system_libdrm=true
|
2023-05-05 05:10:04 +00:00
|
|
|
use_system_libffi=true
|
2023-01-11 00:40:45 +00:00
|
|
|
use_system_libjpeg=true
|
2023-05-05 05:10:04 +00:00
|
|
|
use_system_nghttp2=true
|
2023-01-11 00:40:45 +00:00
|
|
|
use_vaapi=true
|
2023-03-10 17:38:28 +00:00
|
|
|
"
|
2023-01-11 00:40:45 +00:00
|
|
|
|
2023-05-05 05:10:04 +00:00
|
|
|
# shellcheck disable=2086,2090,2116
|
|
|
|
gn gen out/Release --args="$(echo $gn_config)" \
|
2023-01-11 00:40:45 +00:00
|
|
|
--export-compile-commands
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2023-05-05 05:10:04 +00:00
|
|
|
export PATH="$PATH:/usr/lib/qt5/bin"
|
|
|
|
|
2023-01-11 00:40:45 +00:00
|
|
|
ninja -C out/Release \
|
|
|
|
electron_dist_zip \
|
|
|
|
node_gypi_headers \
|
|
|
|
node_version_header \
|
|
|
|
tar_headers
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p "$pkgdir"/usr/lib/electron "$pkgdir"/usr/bin
|
|
|
|
|
|
|
|
bsdtar -xf out/Release/dist.zip -C "$pkgdir"/usr/lib/electron
|
|
|
|
|
|
|
|
chmod u+s "$pkgdir"/usr/lib/electron/chrome-sandbox
|
|
|
|
|
|
|
|
install -Dm755 "$srcdir"/electron-launcher.sh "$pkgdir"/usr/bin/electron
|
|
|
|
install -Dm755 "$srcdir"/default.conf "$pkgdir"/etc/electron/default.conf
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/usr/include/electron
|
|
|
|
|
|
|
|
mv -v "$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
|
|
|
|
cp -v "$builddir"/third_party/nan/*.h "$pkgdir"/usr/include/electron/node_headers/include/nan
|
|
|
|
ln -sv /usr/include/electron/node_headers/include/nan "$pkgdir"/usr/include/electron/nan
|
|
|
|
|
|
|
|
install -Dm644 electron/default_app/icon.png \
|
|
|
|
"$pkgdir"/usr/share/icons/hicolor/1024x1024/apps/electron.png
|
|
|
|
install -Dm644 "$srcdir"/electron.desktop \
|
|
|
|
-t "$pkgdir"/usr/share/applications/
|
|
|
|
}
|
|
|
|
|
|
|
|
lang() {
|
|
|
|
pkgdesc="$pkgdesc (translations)"
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel lang"
|
|
|
|
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib/electron/locales
|
|
|
|
|
|
|
|
mv "$pkgdir"/usr/lib/electron/locales/*.pak \
|
|
|
|
"$subpkgdir"/usr/lib/electron/locales
|
|
|
|
mv "$subpkgdir"/usr/lib/electron/locales/en-US.pak \
|
|
|
|
"$pkgdir"/usr/lib/electron/locales
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2023-12-01 01:43:31 +00:00
|
|
|
07f653f24e7fe1ef96a0ff676fa3c987fd0826980b5e9611705cb7fc44f00182fa62e67e67c6df5a3b1b4c063d99a3266054a83aa67fb44b11ffffcd8e23c3eb electron-27.1.2-118.0.5993.162.tar.zst
|
2023-11-24 17:56:51 +00:00
|
|
|
194c3a7a0fa03a85df6fe52ece3d53d4d15b9d0cb440b56a2ccb1b5c0d3f6481b6f7287aa705c596ceea92d475677ddaf58926f3b31c03a3c20e80ad7e481ce7 chromium-patches-118.0.5993.11.tar.gz
|
2023-05-05 05:10:04 +00:00
|
|
|
29bb685e03356a77df5fd347cdf55194cc8b3265c421cc76e54d64edefc329dbcb052deb26b22e8f587ce68456876c071de1b7d258dd0fcc6ee66c875ec4a020 chromium-revert-drop-of-system-java.patch
|
|
|
|
fa291e941076146d0edd5b96c088240a44a6e0aca3dfc744929655607182d2dc47e6c35ecb419f7c623fcf7f26dc3c4dd924dbf5ed10c3b986283f5ef2f72573 chromium-use-alpine-target.patch
|
|
|
|
9200f78bad70e95c648a5e8392d50642190600f655c6baa366ff6467ebad52d3b3f305dad58f3610da67136f4b723557653b174ec5c25be8d8737ee04d9ee09f fix-missing-cstdint-include-musl.patch
|
|
|
|
33ee60863cc438ef57ffef92ba4cf67a856a5ffc16138bce241bcf87e47b15154aa86918e793c26f7ec4dc62a445257ad5673ed7001daf22c4043cf6cc57da7f gdbinit.patch
|
|
|
|
8de65109ece27ea63bd469f2220c56b8c752ba0a50fdf390082a2d5ae74b8e010199126175569f6d5084270dd4e0571e68aec32c0bca8211a6699925b3a09124 import-version.patch
|
2023-11-24 17:56:51 +00:00
|
|
|
49851d42ce8ccd533d01d1bb2477930802b0bcebab8dd52f2da292088378c6ed9b74146e7dad55edfe096281fc84b2c55abaf832744fd4553a97c38ed891df3a libstdc++13.patch
|
2023-05-05 05:10:04 +00:00
|
|
|
0e991842e23a4b9133898125eeb39e45e3f86f886eef5d2f0d9a72ee143a3e124b3b4f60be94edd57ce4185bcd69704edb51f76d08fdb6207f5559a08dd41ab0 mman.patch
|
|
|
|
50c274a420bb8a7f14fcb56e40920dac8f708792a4520789b4987facea459bef88113d5a2b60fa8c57bee6e92bff3617d6b73fa305c8c44614c638971cffd440 musl-sandbox.patch
|
|
|
|
e7163ac5810ac85366cef2447412287c856e3d67c6b77f219a6e5a418b1965b98e449c409424ad0704a5bded9355dd0aec3dc4585918ce5a2ab36c079707afe2 musl-tid-caching.patch
|
|
|
|
92eb002718026611f5542362ad69b67f0a398ff71b3fca5c05d55cb5c6f9f29334e5e127bb4860cfaa3fba0f0d4c901e2b98808217e7dc02e254a64a5c9521aa musl-v8-monotonic-pthread-cont_timedwait.patch
|
|
|
|
8cc774e8d84e434960222c0497ad8193ae35c0732f98d3282d5fd4b4930f914809eec97832c199517ca89ca6b9d1d011db5ce533c40c68ce5fa464609d131a23 no-execinfo.patch
|
|
|
|
b5479874d125ee95a311295f227f8881a83023ec34fded7a6160b3ae32ea3ba0f2b833a9fb264c57f3d22746b6d8b00bdc8eb2ff86c43c412d6d3b55ae15b16b no-mallinfo.patch
|
2023-11-24 17:56:51 +00:00
|
|
|
8a52ff52201a5e20344f5497ee2ffef0520f7b2d934be92227e49c3f2c12a94c33650eefc88a0e451a6b81d44ce197db421aaec7388e6bb1cb525a43628779d3 no-mte.patch
|
2023-05-05 05:10:04 +00:00
|
|
|
e4c4e5bc6f828f9c883dd418c0ba01887949c29c311f76206a1ec29f620b0c0ba0452949dc2778a9c46ea066405857536964a36436a68eecf7da7952736333cf no-res-ninit-nclose.patch
|
2023-09-01 17:03:15 +00:00
|
|
|
6dc4d8dc92e685dace62265a1ddb3aebc558aed54d20ff6d36b030be0c48d7e84662326c31363612492574d9a03c62653cdc21a60995b97dee1d75cae86a9f9b no-sandbox-settls.patch
|
2023-05-05 05:10:04 +00:00
|
|
|
e48693e6b7aeebf69a5acbf80d9a35defe4c23835121dfeb58b051ac7c527e758a41004f4d193274fe1b01c0bfb1dbc77b09cb6a404a3fdee507a2918afb0edb temp-failure-retry.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
905565c10f5e5600e7d4db965c892cc45009a258e9995da958974d838ace469e1db1019195307e8807860d5b55ba6bfeea478b1f39a9b99e82c619b2816a1a22 icon.patch
|
|
|
|
e05180199ee1d559e4e577cedd3e589844ecf40d98a86321bf1bea5607b02eeb5feb486deddae40e1005b644550331f6b8500177aa7e79bcb3750d3c1ceb76c3 python-jinja-3.10.patch
|
2023-09-01 17:03:15 +00:00
|
|
|
71571b15cf8bd6259b7fd22bea0e46b64890f3db776365de33fe539f26ce9ef99459e05c3dde9434c3657225bc67160abc915acd93033cb487c770c6a2a5975f vector-const.patch
|
2023-01-11 00:40:45 +00:00
|
|
|
2aa340854316f1284217c0ca17cbf44953684ad6c7da90815117df30928612eb9fb9ffb734b948dfc309cd25d1a67cd57f77aac2d052a3dd9aca07a3a58cbb30 webpack-hash.patch
|
2023-11-24 17:56:51 +00:00
|
|
|
4c540972fa12acd9f0aafb8dc7e9987c3d6e4f28ff679dde522ebcec2dc5ae1a62d9d255bed0a30b9c79ae3b90ab0f5b9ae1ef5b7bf338612e28d9ef70250ca3 chromium-icu-74.patch
|
|
|
|
07e9203b05402f81c0ded5871a845e37bdc4c09b7bb2839312396f298a9ce8196e2c24508675e3d6f695f1e2b0ff1c2c64f4e9dfff3ff5359a87cb7b9b972393 default.conf
|
2023-01-11 00:40:45 +00:00
|
|
|
191559fc7aa1ea0353c6fb0cc321ee1d5803a0e44848c8be941cfab96277b0de6a59962d373e2a2a1686c8f9be2bcf2d2f33706759a339a959e297d3f7fda463 electron.desktop
|
2023-09-01 17:03:15 +00:00
|
|
|
ff1844036c8ae0a0a57a16211a816bc0ad550ccf6ea1cf718e228b8c95b9c4f5c9772d1a1a23638c0e140703a7b52874371e27a0d9d54a7b9468e5c384759be5 electron-launcher.sh
|
2023-01-11 00:40:45 +00:00
|
|
|
"
|