user/zotero: merge with firefox-esr

This commit is contained in:
Antoine Martin 2024-02-02 17:15:58 -05:00
parent f890ad4479
commit 2de862f68a
Signed by: forge
GPG key ID: D62A472A4AA7D541
31 changed files with 538 additions and 771 deletions

View file

@ -1,669 +0,0 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=firefox-esr
pkgver=102.15.1
# Date of release, YY-MM-DD for metainfo file (see package())
_releasedate=2023-04-11
pkgrel=0
pkgdesc="Firefox web browser - Extended Support Release"
url="https://www.mozilla.org/en-US/firefox/organizations/"
# s390x and riscv64: blocked by rust and cargo
# armhf: build failure on armhf due to wasm
# aarch64: build failure
arch="x86_64 armv7 !aarch64 x86 ppc64le"
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
install="$pkgname.post-upgrade"
depends="
ffmpeg-libavcodec
"
makedepends="
alsa-lib-dev
automake
bsd-compat-headers
cargo
cbindgen
clang
dbus-glib-dev
gettext
gtk+3.0-dev
hunspell-dev
icu-dev>=69.1
libevent-dev
libffi-dev
libjpeg-turbo-dev
libnotify-dev
libogg-dev
libtheora-dev
libtool
libvorbis-dev
libvpx-dev
libwebp-dev
libxcomposite-dev
libxt-dev
lld
llvm-dev
m4
mesa-dev
nasm
nodejs
nspr-dev
nss-dev
pipewire-dev
pulseaudio-dev
py3-psutil
py3-zstandard
python3
sed
wasi-sdk
wireless-tools-dev
zip
"
source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
allow-custom-rust-vendor.patch
avoid-redefinition.patch
disable-moz-stackwalk.patch
esr-metainfo.patch
firefox-esr-ffmpeg6.patch::https://dev.alpinelinux.org/archive/firefoxies/firefox-esr-ffmpeg6.patch
ffmpeg6-fixup.patch
fix-neon-aom.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
fix-webrtc-glibcisms.patch
gcc13.patch
mallinfo.patch
python-deps.patch
sandbox-fork.patch
sandbox-largefile.patch
sandbox-sched_setscheduler.patch
zstandard.patch
stab.h
firefox.desktop
mozilla-location.keys
vendor-prefs.js
"
builddir="$srcdir/firefox-$pkgver"
_mozappdir=/usr/lib/firefox-esr
# help our shared-object scanner to find the libs
ldpath="$_mozappdir"
# secfixes:
# 102.1.0-r0:
# - CVE-2022-2505
# - CVE-2022-36314
# - CVE-2022-36318
# - CVE-2022-36319
# 91.11.0-r0:
# - CVE-2022-2200
# - CVE-2022-31744
# - CVE-2022-34468
# - CVE-2022-34470
# - CVE-2022-34472
# - CVE-2022-34478
# - CVE-2022-34479
# - CVE-2022-34481
# - CVE-2022-34484
# 91.10.0-r0:
# - CVE-2022-31736
# - CVE-2022-31737
# - CVE-2022-31738
# - CVE-2022-31739
# - CVE-2022-31740
# - CVE-2022-31741
# - CVE-2022-31742
# - CVE-2022-31747
# 91.9.1-r0:
# - CVE-2022-1529
# - CVE-2022-1802
# 91.9.0-r0:
# - CVE-2022-29909
# - CVE-2022-29911
# - CVE-2022-29912
# - CVE-2022-29914
# - CVE-2022-29916
# - CVE-2022-29917
# 91.8.0-r0:
# - CVE-2022-1097
# - CVE-2022-1196
# - CVE-2022-24713
# - CVE-2022-28281
# - CVE-2022-28282
# - CVE-2022-28285
# - CVE-2022-28286
# - CVE-2022-28289
# 91.7.0-r0:
# - CVE-2022-26381
# - CVE-2022-26383
# - CVE-2022-26384
# - CVE-2022-26386
# - CVE-2022-26387
# 91.6.1-r0:
# - CVE-2022-26485
# - CVE-2022-26486
# 91.6.0-r0:
# - CVE-2022-22754
# - CVE-2022-22756
# - CVE-2022-22759
# - CVE-2022-22760
# - CVE-2022-22761
# - CVE-2022-22763
# - CVE-2022-22764
# 91.5.0-r0:
# - CVE-2021-4140
# - CVE-2022-22737
# - CVE-2022-22738
# - CVE-2022-22739
# - CVE-2022-22740
# - CVE-2022-22741
# - CVE-2022-22742
# - CVE-2022-22743
# - CVE-2022-22744
# - CVE-2022-22745
# - CVE-2022-22746
# - CVE-2022-22747
# - CVE-2022-22748
# - CVE-2022-22751
# 91.4.0-r0:
# - CVE-2021-43536
# - CVE-2021-43537
# - CVE-2021-43538
# - CVE-2021-43539
# - CVE-2021-43541
# - CVE-2021-43542
# - CVE-2021-43543
# - CVE-2021-43545
# - CVE-2021-43546
# 91.3.0-r0:
# - CVE-2021-38503
# - CVE-2021-38504
# - CVE-2021-38505
# - CVE-2021-38506
# - CVE-2021-38507
# - CVE-2021-38508
# - CVE-2021-38509
# - CVE-2021-38510
# 91.2.0-r0:
# - CVE-2021-32810
# - CVE-2021-38492
# - CVE-2021-38493
# - CVE-2021-38495
# - CVE-2021-38496
# - CVE-2021-38497
# - CVE-2021-38498
# - CVE-2021-38500
# - CVE-2021-38501
# 78.13.0-r0:
# - CVE-2021-29980
# - CVE-2021-29984
# - CVE-2021-29985
# - CVE-2021-29986
# - CVE-2021-29988
# - CVE-2021-29989
# 78.12.0-r0:
# - CVE-2021-29970
# - CVE-2021-29976
# - CVE-2021-30547
# 78.11.0-r0:
# - CVE-2021-29967
# 78.10.0-r0:
# - CVE-2021-23961
# - CVE-2021-23994
# - CVE-2021-23995
# - CVE-2021-23998
# - CVE-2021-23999
# - CVE-2021-24002
# - CVE-2021-29945
# - CVE-2021-29946
# 78.9.0-r0:
# - CVE-2021-23981
# - CVE-2021-23982
# - CVE-2021-23984
# - CVE-2021-23987
# 78.8.0-r0:
# - CVE-2021-23968
# - CVE-2021-23969
# - CVE-2021-23973
# - CVE-2021-23978
# 78.7.0-r0:
# - CVE-2020-26976
# - CVE-2021-23953
# - CVE-2021-23954
# - CVE-2021-23960
# - CVE-2021-23964
# 78.6.1-r0:
# - CVE-2020-16044
# 78.6.0-r0:
# - CVE-2020-16042
# - CVE-2020-26971
# - CVE-2020-26973
# - CVE-2020-26974
# - CVE-2020-26978
# - CVE-2020-35111
# - CVE-2020-35112
# - CVE-2020-35113
# 78.5.0-r0:
# - CVE-2020-15683
# - CVE-2020-15969
# - CVE-2020-15999
# - CVE-2020-16012
# - CVE-2020-26950
# - CVE-2020-26951
# - CVE-2020-26953
# - CVE-2020-26956
# - CVE-2020-26958
# - CVE-2020-26959
# - CVE-2020-26960
# - CVE-2020-26961
# - CVE-2020-26965
# - CVE-2020-26966
# - CVE-2020-26968
# 78.3.0-r0:
# - CVE-2020-15673
# - CVE-2020-15676
# - CVE-2020-15677
# - CVE-2020-15678
# 78.2.0-r0:
# - CVE-2020-15663
# - CVE-2020-15664
# - CVE-2020-15670
# 78.1.0-r0:
# - CVE-2020-15652
# - CVE-2020-15653
# - CVE-2020-15654
# - CVE-2020-15655
# - CVE-2020-15656
# - CVE-2020-15657
# - CVE-2020-15658
# - CVE-2020-15659
# - CVE-2020-6463
# - CVE-2020-6514
# 68.10.0-r0:
# - CVE-2020-12417
# - CVE-2020-12418
# - CVE-2020-12419
# - CVE-2020-12420
# - CVE-2020-12421
# 68.9.0-r0:
# - CVE-2020-12399
# - CVE-2020-12405
# - CVE-2020-12406
# - CVE-2020-12410
# 68.8.0-r0:
# - CVE-2020-12387
# - CVE-2020-12388
# - CVE-2020-12389
# - CVE-2020-12392
# - CVE-2020-12393
# - CVE-2020-12395
# - CVE-2020-6831
# 68.7.0-r0:
# - CVE-2020-6821
# - CVE-2020-6822
# - CVE-2020-6825
# 68.6.1-r0:
# - CVE-2020-6819
# - CVE-2020-6820
# 68.6.0-r0:
# - CVE-2019-20503
# - CVE-2020-6805
# - CVE-2020-6806
# - CVE-2020-6807
# - CVE-2020-6811
# - CVE-2020-6812
# - CVE-2020-6814
# 68.5.0-r0:
# - CVE-2020-6796
# - CVE-2020-6797
# - CVE-2020-6798
# - CVE-2020-6799
# - CVE-2020-6800
# 68.4.1-r0:
# - CVE-2019-17016
# - CVE-2019-17022
# - CVE-2019-17024
# - CVE-2019-17026
# 68.3.0-r0:
# - CVE-2019-17005
# - CVE-2019-17008
# - CVE-2019-17009
# - CVE-2019-17010
# - CVE-2019-17011
# - CVE-2019-17012
# 68.2.0-r0:
# - CVE-2019-11757
# - CVE-2019-11758
# - CVE-2019-11759
# - CVE-2019-11760
# - CVE-2019-11761
# - CVE-2019-11762
# - CVE-2019-11763
# - CVE-2019-11764
# - CVE-2019-15903
# 68.1.0-r0:
# - CVE-2019-9812
# - CVE-2019-11740
# - CVE-2019-11742
# - CVE-2019-11743
# - CVE-2019-11744
# - CVE-2019-11746
# - CVE-2019-11752
# 68.0.2-r0:
# - CVE-2019-11733
# 68.0-r0:
# - CVE-2019-11709
# - CVE-2019-11711
# - CVE-2019-11712
# - CVE-2019-11713
# - CVE-2019-11715
# - CVE-2019-11717
# - CVE-2019-11719
# - CVE-2019-11729
# - CVE-2019-11730
# - CVE-2019-9811
# 60.7.2-r0:
# - CVE-2019-11708
# 60.7.1-r0:
# - CVE-2019-11707
# 60.7.0-r0:
# - CVE-2019-9815
# - CVE-2019-9816
# - CVE-2019-9817
# - CVE-2019-9818
# - CVE-2019-9819
# - CVE-2019-9820
# - CVE-2019-11691
# - CVE-2019-11692
# - CVE-2019-11693
# - CVE-2019-7317
# - CVE-2019-9797
# - CVE-2018-18511
# - CVE-2019-11694
# - CVE-2019-11698
# - CVE-2019-5798
# - CVE-2019-9800
# 60.6.1-r0:
# - CVE-2019-9810
# - CVE-2019-9813
# - CVE-2019-9790
# - CVE-2019-9791
# - CVE-2019-9792
# - CVE-2019-9793
# - CVE-2019-9794
# - CVE-2019-9795
# - CVE-2019-9796
# - CVE-2019-9801
# - CVE-2018-18506
# - CVE-2019-9788
# 60.5.2-r0:
# - CVE-2019-5785
# - CVE-2018-18335
# - CVE-2018-18356
# 60.5.0-r0:
# - CVE-2018-18500
# - CVE-2018-18505
# - CVE-2018-18501
# 52.6.0-r0:
# - CVE-2018-5089
# - CVE-2018-5091
# - CVE-2018-5095
# - CVE-2018-5096
# - CVE-2018-5097
# - CVE-2018-5098
# - CVE-2018-5099
# - CVE-2018-5102
# - CVE-2018-5103
# - CVE-2018-5104
# - CVE-2018-5117
# 52.5.2-r0:
# - CVE-2017-7843
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export MOZ_APP_PROFILE="mozilla/firefox"
export MOZ_APP_REMOTINGNAME=firefox-esr
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
# disable desktop notifications
export MOZ_NOSPAM=1
# Find our triplet JSON
export RUST_TARGET="$CTARGET"
# Build with Clang, takes less RAM
export CC="clang"
export CXX="clang++"
# set rpath so linker finds the libs
export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
# let firefox do this itself.
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_LTO
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2 -Wno-deprecated-builtins"
prepare() {
default_prepare
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
_clear_vendor_checksums audio_thread_priority
_clear_vendor_checksums target-lexicon-0.9.0
_clear_vendor_checksums packed_simd_2
_clear_vendor_checksums bindgen
# webrtc does not build on these
case "$CARCH" in
ppc64le)
local webrtc_config="ac_add_options --disable-webrtc"
;;
esac
case "$CARCH" in
armv7)
# broken here
local rust_simd="ac_add_options --disable-rust-simd"
;;
*)
local rust_simd="ac_add_options --enable-rust-simd"
;;
esac
case "$CARCH" in
aarch64|arm*|x86*)
# disable-elf-hack: exists only on aarch64, arm*, x86, x86_64
local arch_config="ac_add_options --disable-elf-hack"
;;
esac
# sandbox only supported here
case "$CARCH" in
x86*|armv7|aarch64)
local sandbox="ac_add_options --enable-sandbox"
;;
*)
local sandbox="ac_add_options --disable-sandbox"
;;
esac
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
ac_add_options --disable-cargo-incremental
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-updater
# features
ac_add_options --enable-alsa
ac_add_options --enable-dbus
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --enable-ffmpeg
ac_add_options --enable-hardening
ac_add_options --enable-linker=lld
ac_add_options --enable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pulseaudio
ac_add_options --enable-release
ac_add_options --enable-update-channel=release
# system libs
ac_add_options --enable-system-pixman
ac_add_options --with-system-ffi
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-png
ac_add_options --with-system-webp
ac_add_options --with-system-zlib
# misc
ac_add_options --allow-addon-sideload
ac_add_options --prefix=/usr
ac_add_options --with-app-name=firefox-esr
ac_add_options --with-distribution-id=org.alpinelinux
ac_add_options --with-libclang-path=/usr/lib
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
ac_add_options --host=$CHOST
ac_add_options --target=$CTARGET
# objdir
mk_add_options MOZ_OBJDIR="$builddir/obj"
mk_add_options RUSTFLAGS="$RUSTFLAGS"
# keys
# these are for alpine linux use only
ac_add_options --with-mozilla-api-keyfile="$builddir/mozilla-api-key"
$arch_config
$rust_simd
$sandbox
$webrtc_config
EOF
}
build() {
cat > .mozconfig base-mozconfig
export MOZ_BUILD_DATE=$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")
# for lto
ulimit -n 4096
# can't be set here and fail
unset RUSTFLAGS
local thinlto_jobs=${JOBS:-1}
case "$CARCH" in
# on this platforms, lld seems to not utilise >1 threads for thinlto for some reason.
# at the same time, having more than 8 also crashes lld for firefox buildsystems (why?).
aarch64)
if [ $thinlto_jobs -gt 8 ]; then
thinlto_jobs=8
fi
;;
esac
export LDFLAGS="$LDFLAGS -Wl,--thinlto-jobs=$thinlto_jobs"
case "$CARCH" in
# lto for 64-bit systems only
aarch64|x86_64|ppc64le)
cat > .mozconfig base-mozconfig <<-EOF
ac_add_options --enable-lto=cross
EOF
esac
./mach build
}
package() {
DESTDIR="$pkgdir" ./mach install
local _png
for _png in ./browser/branding/official/default*.png; do
local i=${_png%.png}
i=${i##*/default}
install -Dm644 "$_png" \
"$pkgdir"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox-esr.png
done
install -Dm644 browser/branding/official/content/about-logo.png \
"$pkgdir"/usr/share/icons/hicolor/192x192/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo@2x.png \
"$pkgdir"/usr/share/icons/hicolor/384x384/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo.svg \
"$pkgdir"/usr/share/icons/hicolor/scalable/apps/firefox-esr.svg
install -Dm644 "$srcdir"/firefox.desktop \
"$pkgdir"/usr/share/applications/firefox-esr.desktop
# install our vendor prefs
install -Dm644 "$srcdir"/vendor-prefs.js \
"$pkgdir"/$_mozappdir/browser/defaults/preferences/vendor.js
# Generate appdata file
mkdir -p "$pkgdir"/usr/share/metainfo/
export VERSION="$pkgver"
export DATE="$_releasedate"
envsubst < "$builddir"/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in > "$pkgdir"/usr/share/metainfo/org.mozilla.firefox-esr.appdata.xml
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
install -Dm755 /dev/stdin "$pkgdir"/usr/bin/firefox-esr <<- EOF
#!/bin/sh
exec $_mozappdir/firefox-esr "\$@"
EOF
rm "$pkgdir"/$_mozappdir/firefox-esr-bin
ln -sfv /usr/bin/firefox-esr "$pkgdir"/$_mozappdir/firefox-esr-bin
}
sha512sums="
bdb66b4fb5622af3e60580a3bcd464d98ef13cb38d6ac6c9e5fc046e567a003cf080125d7748950c91c442fde5e8024c50c4180d2f551aa3528160a3c05ae187 firefox-102.15.1esr.source.tar.xz
4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
a13dee87adf659423f5b3fa0358cfbde135fa614c85dd170d1a48d32ee080e27aef062d3a8e3c45059c41463fda579f8900988166ccb51568793ee7ef9080d04 firefox-esr-ffmpeg6.patch
c2e17f269070d782154f843b95bf68be25d8c4356825dd436b1877aab63ac023051899371da5c21f6151970b2562376c2dadd2d6a038446e5fa621e2495668e1 ffmpeg6-fixup.patch
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
49aa1dfbe11ed5370e839afb190da7f55ae4887b35645865efe25d398d890563722caedd5696d648ad71448621fbc8bab8def1a3d079e301d6414f0f20e96758 gcc13.patch
a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
f3d419880cc7f043b6eb547894d486457d407640be2bd8b402eb3a534ccea39568f6d506fc44a3b29c94eb0dc6fc2bec6600d161786fd233d26b1dc8970f5ab4 python-deps.patch
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
12fbe50d94624931a581314b8e6e228a1f8a4550704a6ee4f8904184ac4727efd90982e87a8fdd318e15515f9430dfc6cf7455b301e903003027b3f0afa79795 zstandard.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d100fa33d61a9a1a13477687d5eac99e50ae7dbef9882a5808 firefox.desktop
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
"

View file

@ -1,18 +0,0 @@
#!/bin/sh
ver_old=$2
if [ "$(apk version -t "$ver_old" '102.2.0-r4')" = '<' ]; then
# renamed appid, needs profile migration
cat 1>&2 <<-EOF
*
* firefox-esr now has a different appid, so you will see a default new
* profile upon starting it. to use your old profile again, you have to
* first migrate it using 'firefox-esr --ProfileManager'. select the
* previous one (if you didn't rename it, it's probably named
* default-something) to migrate it.
*
EOF
fi
exit 0

View file

@ -1,58 +1,319 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=zotero
pkgver=7.0.0_git20240131
pkgrel=0
pkgrel=1
_fxver=102.15.1
# Date of release, YY-MM-DD for metainfo file (see package())
_releasedate=2024-02-02
pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
arch="x86_64"
url="https://github.com/zotero/zotero"
_giturl="https://lab.ilot.io/mirrors/zotero"
_gittag_client=7.0.0._20240131
license="AGPL3"
_gittag=7.0.0._20240131
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
options="!check" # No test suite
depends="
dbus-glib
gtk+3.0
nss
libxt
ffmpeg-libavcodec
"
makedepends="
npm
grep
zip
unzip
perl
python3
alsa-lib-dev
automake
bsd-compat-headers
cargo
cbindgen
clang
curl
dbus-glib-dev
gettext
grep
gtk+3.0-dev
hunspell-dev
icu-dev>=69.1
libevent-dev
libffi-dev
libjpeg-turbo-dev
libnotify-dev
libogg-dev
libtheora-dev
libtool
libvorbis-dev
libvpx-dev
libwebp-dev
libxcomposite-dev
libxt-dev
lld
llvm-dev
m4
mesa-dev
nasm
nodejs
firefox-esr~=102
npm
nspr-dev
nss-dev
perl
pipewire-dev
pulseaudio-dev
py3-psutil
py3-zstandard
python3
sed
unzip
wasi-sdk
wireless-tools-dev
zip
"
source="
https://ftp.mozilla.org/pub/firefox/releases/${_fxver}esr/source/firefox-${_fxver}esr.source.tar.xz
allow-custom-rust-vendor.patch
avoid-redefinition.patch
disable-moz-stackwalk.patch
esr-metainfo.patch
firefox-esr-ffmpeg6.patch::https://dev.alpinelinux.org/archive/firefoxies/firefox-esr-ffmpeg6.patch
ffmpeg6-fixup.patch
fix-neon-aom.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
fix-webrtc-glibcisms.patch
gcc13.patch
mallinfo.patch
python-deps.patch
sandbox-fork.patch
sandbox-largefile.patch
sandbox-sched_setscheduler.patch
zstandard.patch
stab.h
firefox.desktop
mozilla-location.keys
vendor-prefs.js
zotero.desktop
$_giturl-client/-/releases/$_gittag_client/downloads/tarball/zotero-client-$_gittag_client.tar.gz
xulrunner-get-alpine-firefox.patch
build-sh-fix.patch
https://lab.ilot.io/mirrors/zotero-client/-/releases/$_gittag/downloads/tarball/zotero-client-$_gittag.tar.gz
zotero_build-modifications.diff
"
builddir="$srcdir"/zotero-client-$_gittag_client
options="!check"
builddir="$srcdir"/firefox-$_fxver
_mozappdir=/usr/lib/zotero
_zoterodir="$srcdir"/zotero-client-$_gittag
# help our shared-object scanner to find the libs
ldpath="$_mozappdir"
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export MOZ_APP_PROFILE="mozilla/firefox"
export MOZ_APP_REMOTINGNAME=firefox-esr
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
# disable desktop notifications
export MOZ_NOSPAM=1
# Find our triplet JSON
export RUST_TARGET="$CTARGET"
# Build with Clang, takes less RAM
export CC="clang"
export CXX="clang++"
# set rpath so linker finds the libs
export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
# let firefox do this itself.
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_LTO
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2 -Wno-deprecated-builtins"
prepare() {
default_prepare
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
_clear_vendor_checksums audio_thread_priority
_clear_vendor_checksums target-lexicon-0.9.0
_clear_vendor_checksums packed_simd_2
_clear_vendor_checksums bindgen
# webrtc does not build on these
case "$CARCH" in
ppc64le)
local webrtc_config="ac_add_options --disable-webrtc"
;;
esac
case "$CARCH" in
armv7)
# broken here
local rust_simd="ac_add_options --disable-rust-simd"
;;
*)
local rust_simd="ac_add_options --enable-rust-simd"
;;
esac
case "$CARCH" in
aarch64|arm*|x86*)
# disable-elf-hack: exists only on aarch64, arm*, x86, x86_64
local arch_config="ac_add_options --disable-elf-hack"
;;
esac
# sandbox only supported here
case "$CARCH" in
x86*|armv7|aarch64)
local sandbox="ac_add_options --enable-sandbox"
;;
*)
local sandbox="ac_add_options --disable-sandbox"
;;
esac
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
ac_add_options --disable-cargo-incremental
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-updater
# features
ac_add_options --enable-alsa
ac_add_options --enable-dbus
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --enable-ffmpeg
ac_add_options --enable-hardening
ac_add_options --enable-linker=lld
ac_add_options --enable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pulseaudio
ac_add_options --enable-release
ac_add_options --enable-update-channel=release
# system libs
ac_add_options --enable-system-pixman
ac_add_options --with-system-ffi
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-png
ac_add_options --with-system-webp
ac_add_options --with-system-zlib
# misc
ac_add_options --allow-addon-sideload
ac_add_options --prefix=/usr
ac_add_options --with-app-name=firefox-esr
ac_add_options --with-distribution-id=org.alpinelinux
ac_add_options --with-libclang-path=/usr/lib
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
ac_add_options --host=$CHOST
ac_add_options --target=$CTARGET
# objdir
mk_add_options MOZ_OBJDIR="$builddir/obj"
mk_add_options RUSTFLAGS="$RUSTFLAGS"
# keys
# these are for alpine linux use only
ac_add_options --with-mozilla-api-keyfile="$builddir/mozilla-api-key"
$arch_config
$rust_simd
$sandbox
$webrtc_config
EOF
# zotero prepare
(
cd "$_zoterodir"
# zotero build expects to be in a git repo
git init
git commit --allow-empty -m 'Initial'
# zorero patches
for i in $source; do
case ${i%::*} in
*.diff)
msg ${i%::*}
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)"
;;
esac
done
)
}
build() {
cat > .mozconfig base-mozconfig
export MOZ_BUILD_DATE=$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")
# for lto
ulimit -n 4096
# can't be set here and fail
unset RUSTFLAGS
local thinlto_jobs=${JOBS:-1}
case "$CARCH" in
# on this platforms, lld seems to not utilise >1 threads for thinlto for some reason.
# at the same time, having more than 8 also crashes lld for firefox buildsystems (why?).
aarch64)
if [ $thinlto_jobs -gt 8 ]; then
thinlto_jobs=8
fi
;;
esac
export LDFLAGS="$LDFLAGS -Wl,--thinlto-jobs=$thinlto_jobs"
case "$CARCH" in
# lto for 64-bit systems only
aarch64|x86_64|ppc64le)
cat > .mozconfig base-mozconfig <<-EOF
ac_add_options --enable-lto=cross
EOF
esac
./mach build
DESTDIR="$_zoterodir"/app/xulrunner/firefox-$CARCH ./mach install
# zotero build
(
cd "$_zoterodir"
npm i --legacy-peer-deps
NODE_OPTIONS=--openssl-legacy-provider npm run build
SKIP_32=1 app/scripts/dir_build -p l
)
}
package() {
install -dDm755 "$pkgdir"/usr/bin
install -dDm755 "$pkgdir"/usr/lib/zotero
cp -r "$builddir"/app/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
cp -r "$_zoterodir"/app/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
ln -s /usr/lib/zotero/zotero "$pkgdir/usr/bin/zotero"
install -Dm644 "$srcdir/zotero.desktop" "$pkgdir/usr/share/applications/zotero.desktop"
@ -62,9 +323,31 @@ package() {
# Close shell when launching
sed -i -r 's:^("\$CALLDIR/zotero-bin" -app "\$CALLDIR/application.ini" "\$@"):exec \1:' "$pkgdir/usr/lib/zotero/zotero"
}
sha512sums="
bdb66b4fb5622af3e60580a3bcd464d98ef13cb38d6ac6c9e5fc046e567a003cf080125d7748950c91c442fde5e8024c50c4180d2f551aa3528160a3c05ae187 firefox-102.15.1esr.source.tar.xz
4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
a13dee87adf659423f5b3fa0358cfbde135fa614c85dd170d1a48d32ee080e27aef062d3a8e3c45059c41463fda579f8900988166ccb51568793ee7ef9080d04 firefox-esr-ffmpeg6.patch
c2e17f269070d782154f843b95bf68be25d8c4356825dd436b1877aab63ac023051899371da5c21f6151970b2562376c2dadd2d6a038446e5fa621e2495668e1 ffmpeg6-fixup.patch
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
49aa1dfbe11ed5370e839afb190da7f55ae4887b35645865efe25d398d890563722caedd5696d648ad71448621fbc8bab8def1a3d079e301d6414f0f20e96758 gcc13.patch
a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
f3d419880cc7f043b6eb547894d486457d407640be2bd8b402eb3a534ccea39568f6d506fc44a3b29c94eb0dc6fc2bec6600d161786fd233d26b1dc8970f5ab4 python-deps.patch
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
12fbe50d94624931a581314b8e6e228a1f8a4550704a6ee4f8904184ac4727efd90982e87a8fdd318e15515f9430dfc6cf7455b301e903003027b3f0afa79795 zstandard.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d100fa33d61a9a1a13477687d5eac99e50ae7dbef9882a5808 firefox.desktop
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
27ca570df108cb9ffa48254f7cc5ef133371dcab652a12b2f636b87a2378d51afa6c118533d8b1779071441fa2b26663d2275db9d441f17dc7431dfdc90996ea zotero-client-7.0.0._20240131.tar.gz
74c99ba1dd4b23cb696936e18df9c4f55e178bf578818c1a858788c5ff261f8459f992cf4b59eed40e71d8143b4ee14e0a86ad558c2e376866afed52c1f6d74d xulrunner-get-alpine-firefox.patch
4e897cafc05eefbaf433cc17876d2c8c33f6a244b85418a9dd0e0c6b22528c770f175999ad5deaedeac4d4109496683879ac8420aa489230aad1800571790dfa build-sh-fix.patch
dca620aa9a96c83d7a81cf11a2a1cf84ef94a1c06688cf00e2b03fd3fd671b6bd08094b7f76ef0f92cbfc2a9a97317855e5b39d17d51054ea3c539d2b3ee0ab2 zotero_build-modifications.diff
"

View file

@ -0,0 +1,61 @@
--- a/third_party/rust/audio_thread_priority/src/rt_linux.rs
+++ b/third_party/rust/audio_thread_priority/src/rt_linux.rs
@@ -112,7 +112,7 @@
/// Returns the maximum priority, maximum real-time time slice, and the current real-time time
/// slice for this process.
-fn get_limits() -> Result<(i64, u64, libc::rlimit64), AudioThreadPriorityError> {
+fn get_limits() -> Result<(i64, u64, libc::rlimit), AudioThreadPriorityError> {
let c = Connection::get_private(BusType::System)?;
let p = Props::new(
@@ -122,7 +122,7 @@
"org.freedesktop.RealtimeKit1",
DBUS_SOCKET_TIMEOUT,
);
- let mut current_limit = libc::rlimit64 {
+ let mut current_limit = libc::rlimit {
rlim_cur: 0,
rlim_max: 0,
};
@@ -141,9 +141,9 @@
));
}
- if unsafe { libc::getrlimit64(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
+ if unsafe { libc::getrlimit(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "getrlimit64",
+ "getrlimit",
Box::new(OSError::last_os_error()),
));
}
@@ -154,13 +154,13 @@
fn set_limits(request: u64, max: u64) -> Result<(), AudioThreadPriorityError> {
// Set a soft limit to the limit requested, to be able to handle going over the limit using
// SIGXCPU. Set the hard limit to the maxium slice to prevent getting SIGKILL.
- let new_limit = libc::rlimit64 {
+ let new_limit = libc::rlimit {
rlim_cur: request,
rlim_max: max,
};
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "setrlimit64",
+ "setrlimit",
Box::new(OSError::last_os_error()),
));
}
@@ -296,9 +296,9 @@
match r {
Ok(_) => Ok(handle),
Err(e) => {
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &limits) } < 0 {
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &limits) } < 0 {
return Err(AudioThreadPriorityError::new_with_inner(
- "setrlimit64",
+ "setrlimit",
Box::new(OSError::last_os_error()),
));
}

View file

@ -1,44 +0,0 @@
diff --git a/app/build.sh.orig b/app/build.sh
index 649d629..642ce81 100755
--- a/app/build.sh.orig
+++ b/app/build.sh
@@ -59,10 +59,7 @@ function abspath {
}
function check_lfs_file {
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
- exit 1
- fi
+ return 0
}
SOURCE_DIR=""
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
# Use our own launcher that calls the original Firefox executable with -app
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
# Copy Ubuntu launcher files
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
- chmod 755 "$APPDIR/updater"
-
# Copy app files
rsync -a "$base_dir/" "$APPDIR/"
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
# Copy icons
+ mkdir -p "$APPDIR"/icons
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/symbolic.svg" "$APPDIR/icons/"

35
user/zotero/lfs64.patch Normal file
View file

@ -0,0 +1,35 @@
force stat() instead of stat64() on 32-bit
--
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -21,7 +21,7 @@
// stat64 and lstat64 are deprecated on OS X. Normal stat and lstat are
// 64-bit by default on OS X 10.6+.
-#if defined(HAVE_STAT64) && defined(HAVE_LSTAT64) && !defined(XP_DARWIN)
+#if 0 && defined(HAVE_STAT64) && defined(HAVE_LSTAT64) && !defined(XP_DARWIN)
# if defined(AIX)
# if defined STAT
# undef STAT
--- a/mozglue/baseprofiler/core/shared-libraries-linux.cc
+++ b/mozglue/baseprofiler/core/shared-libraries-linux.cc
@@ -178,7 +178,7 @@
return false;
}
-#if defined(__x86_64__) || defined(__aarch64__) || \
+#if 1 || defined(__x86_64__) || defined(__aarch64__) || \
(defined(__mips__) && _MIPS_SIM == _ABI64) || \
!(defined(GP_OS_linux) || defined(GP_OS_android))
--- a/security/sandbox/linux/broker/SandboxBrokerUtils.h
+++ b/security/sandbox/linux/broker/SandboxBrokerUtils.h
@@ -15,7 +15,7 @@
// calls. We'll intercept those and handle them in the stat functions
// but must be sure to use the right structure layout.
-#if defined(__NR_stat64) || defined(__NR_fstatat64)
+#if 0 && (defined(__NR_stat64) || defined(__NR_fstatat64) )
typedef struct stat64 statstruct;
# define statsyscall stat64
# define lstatsyscall lstat64

View file

@ -0,0 +1,13 @@
prevents a call to ccache
diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
index bf7009a..011c012 100644
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -570,6 +570,7 @@ class BuildMonitor(MozbuildObject):
)
def ccache_stats(self, ccache=None):
+ return None
ccache_stats = None
if ccache is None:

View file

@ -0,0 +1,30 @@
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc-musttail.patch
--
commit 5e66655e1456c9d26637ceaed3f4533b537322c4
Author: Daniel Kolesa <daniel@octaforge.org>
Date: Sat May 13 23:00:04 2023 +0200
disable musttail on ppc
41:38.04 LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
41:38.04 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
41:38.04 Stack dump:
41:38.04 0. Running pass 'Function Pass Manager' on module '/builddir/thunderbird-114.0_beta1/obj-powerpc64le-unknown-linux-musl/toolkit/library/build/../../../gfx/skia/SkOpts.o'.
41:38.04 1. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@_ZN8portableL15init_lane_masksEPNS_6ParamsEP21SkRasterPipelineStageffff'
41:38.95 clang-16: error: unable to execute command: Aborted
To be investigated later.
diff --git a/gfx/skia/skia/src/core/SkRasterPipeline.h b/gfx/skia/skia/src/core/SkRasterPipeline.h
index 766bb0c..88c6cb2 100644
--- a/gfx/skia/skia/src/core/SkRasterPipeline.h
+++ b/gfx/skia/skia/src/core/SkRasterPipeline.h
@@ -24,7 +24,7 @@ enum SkColorType : int;
struct SkImageInfo;
struct skcms_TransferFunction;
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc__)
#define SK_HAS_MUSTTAIL 1
#else
#define SK_HAS_MUSTTAIL 0

View file

@ -0,0 +1,23 @@
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc64-webrtc.patch
--
commit 010bfb0441168d51e0fffe98d1f50e0602e7947f
Author: Daniel Kolesa <daniel@octaforge.org>
Date: Sat May 13 23:40:41 2023 +0200
fix webrtc on ppc64
diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build
index 976cf37..d35d447 100644
--- a/third_party/libwebrtc/moz.build
+++ b/third_party/libwebrtc/moz.build
@@ -643,3 +643,10 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT":
"/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn",
"/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn"
]
+
+if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DIRS += [
+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
+ ]

View file

@ -0,0 +1,12 @@
set rust crate lto to thin to not use fatlto for gkrust which fails sometimes
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -92,7 +92,7 @@
# Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
ifndef MOZ_CODE_COVERAGE
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
+cargo_rustc_flags += -Clto=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes

View file

@ -1,6 +1,50 @@
diff --git a/app/scripts/fetch_xulrunner.orig b/app/scripts/fetch_xulrunner
index 8b3d918..c6a96ff 100755
--- a/app/scripts/fetch_xulrunner.orig
diff --git a/app/build.sh b/app/build.sh
index 649d629..7d078b8 100755
--- a/app/build.sh
+++ b/app/build.sh
@@ -59,10 +59,7 @@ function abspath {
}
function check_lfs_file {
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
- exit 1
- fi
+ return 0
}
SOURCE_DIR=""
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
# Use our own launcher that calls the original Firefox executable with -app
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
# Copy Ubuntu launcher files
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
- chmod 755 "$APPDIR/updater"
-
# Copy app files
rsync -a "$base_dir/" "$APPDIR/"
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
# Copy icons
+ mkdir -p "$APPDIR"/icons
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/symbolic.svg" "$APPDIR/icons/"
diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner
index 8b3d918..120b085 100755
--- a/app/scripts/fetch_xulrunner
+++ b/app/scripts/fetch_xulrunner
@@ -132,15 +132,6 @@ function modify_omni {
# Continue using app.update.auto in prefs.js on Windows
@ -18,13 +62,15 @@ index 8b3d918..c6a96ff 100755
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.jsm
@@ -470,36 +461,15 @@ fi
@@ -470,36 +461,11 @@ fi
if [ $BUILD_LINUX == 1 ]; then
GECKO_VERSION="$GECKO_VERSION_LINUX"
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
+ rm -rf firefox-x86_64
+ pushd firefox-x86_64
+ modify_omni linux64
+ popd
- # Include 32-bit build if not in CI
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
@ -46,12 +92,7 @@ index 8b3d918..c6a96ff 100755
-
- tar xvf firefox-$GECKO_VERSION.tar.bz2
- mv firefox firefox-$arch
+ cp -r /usr/lib/firefox-esr firefox-x86_64
+
+ pushd firefox-x86_64
+ modify_omni linux64
+ popd
-
- pushd firefox-$arch
- modify_omni
- popd