mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 05:17:07 +02:00
736 lines
20 KiB
Plaintext
736 lines
20 KiB
Plaintext
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
|
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
|
|
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
|
|
# Maintainer: psykose <alice@ayaya.dev>
|
|
pkgname=firefox
|
|
pkgver=113.0
|
|
_releasedate=2023-05-09
|
|
pkgrel=1
|
|
pkgdesc="Firefox web browser"
|
|
url="https://www.firefox.com/"
|
|
# s390x blocked by lld
|
|
# armhf: https://bugzilla.mozilla.org/show_bug.cgi?id=1680495
|
|
# ppc64le: ld.lld: error: undefined hidden symbol: something about video
|
|
arch="x86_64 armv7 aarch64 x86 riscv64"
|
|
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
|
|
# ffmpeg 6 -> 112
|
|
depends="
|
|
ffmpeg-libavcodec
|
|
mesa-egl
|
|
mesa-gl
|
|
pciutils-libs
|
|
"
|
|
makedepends="
|
|
alsa-lib-dev
|
|
automake
|
|
bsd-compat-headers
|
|
cargo
|
|
cbindgen
|
|
clang
|
|
compiler-rt
|
|
dbus
|
|
dbus-glib-dev
|
|
gettext
|
|
gtk+3.0-dev
|
|
hunspell-dev
|
|
icu-dev
|
|
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
|
|
mesa-dri-gallium
|
|
nasm
|
|
nodejs
|
|
nspr-dev
|
|
nss-dev
|
|
pciutils
|
|
pipewire-dev
|
|
pulseaudio-dev
|
|
py3-zstandard
|
|
python3
|
|
sed
|
|
wasi-sdk
|
|
wireless-tools-dev
|
|
xvfb-run
|
|
zip
|
|
"
|
|
source="$pkgname-$pkgver.tar.xz::https://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
|
0001-Bug-1831691-Use-the-vendored-glean_parser-for-all-of.patch
|
|
avoid-redefinition.patch
|
|
disable-moz-stackwalk.patch
|
|
fix-fortify-system-wrappers.patch
|
|
fix-neon-aom.patch
|
|
fix-rust-target.patch
|
|
fix-webrtc-glibcisms.patch
|
|
no-ccache-stats.patch
|
|
python-deps.patch
|
|
rust-lto-thin.patch
|
|
riscv64-no-lto.patch
|
|
sandbox-fork.patch
|
|
sandbox-largefile.patch
|
|
sandbox-sched_setscheduler.patch
|
|
|
|
stab.h
|
|
|
|
firefox.desktop
|
|
distribution.ini
|
|
mozilla-location.keys
|
|
vendor-prefs.js
|
|
"
|
|
# tests are hard to run
|
|
# have to strip manually since binutils cannot strip llvm output on riscv64
|
|
options="!strip !check"
|
|
|
|
_mozappdir=/usr/lib/firefox
|
|
|
|
# help our shared-object scanner to find the libs
|
|
ldpath="$_mozappdir"
|
|
sonameprefix="$pkgname:"
|
|
|
|
# secfixes:
|
|
# 103.0-r0:
|
|
# - CVE-2022-2505
|
|
# - CVE-2022-36314
|
|
# - CVE-2022-36315
|
|
# - CVE-2022-36316
|
|
# - CVE-2022-36317
|
|
# - CVE-2022-36318
|
|
# - CVE-2022-36319
|
|
# - CVE-2022-36320
|
|
# 102.0-r0:
|
|
# - CVE-2022-2200
|
|
# - CVE-2022-34468
|
|
# - CVE-2022-34469
|
|
# - CVE-2022-34470
|
|
# - CVE-2022-34471
|
|
# - CVE-2022-34472
|
|
# - CVE-2022-34473
|
|
# - CVE-2022-34474
|
|
# - CVE-2022-34475
|
|
# - CVE-2022-34476
|
|
# - CVE-2022-34477
|
|
# - CVE-2022-34478
|
|
# - CVE-2022-34479
|
|
# - CVE-2022-34480
|
|
# - CVE-2022-34481
|
|
# - CVE-2022-34482
|
|
# - CVE-2022-34483
|
|
# - CVE-2022-34484
|
|
# - CVE-2022-34485
|
|
# 101.0-r0:
|
|
# - CVE-2022-1919
|
|
# - CVE-2022-31736
|
|
# - CVE-2022-31737
|
|
# - CVE-2022-31738
|
|
# - CVE-2022-31739
|
|
# - CVE-2022-31740
|
|
# - CVE-2022-31741
|
|
# - CVE-2022-31742
|
|
# - CVE-2022-31743
|
|
# - CVE-2022-31744
|
|
# - CVE-2022-31745
|
|
# - CVE-2022-31747
|
|
# - CVE-2022-31748
|
|
# 100.0.2-r0:
|
|
# - CVE-2022-1529
|
|
# - CVE-2022-1802
|
|
# 100.0-r0:
|
|
# - CVE-2022-29909
|
|
# - CVE-2022-29910
|
|
# - CVE-2022-29911
|
|
# - CVE-2022-29912
|
|
# - CVE-2022-29914
|
|
# - CVE-2022-29915
|
|
# - CVE-2022-29916
|
|
# - CVE-2022-29917
|
|
# - CVE-2022-29918
|
|
# 99.0-r0:
|
|
# - CVE-2022-1097
|
|
# - CVE-2022-24713
|
|
# - CVE-2022-28281
|
|
# - CVE-2022-28282
|
|
# - CVE-2022-28283
|
|
# - CVE-2022-28284
|
|
# - CVE-2022-28285
|
|
# - CVE-2022-28286
|
|
# - CVE-2022-28287
|
|
# - CVE-2022-28288
|
|
# - CVE-2022-28289
|
|
# 98.0-r0:
|
|
# - CVE-2022-0843
|
|
# - CVE-2022-26381
|
|
# - CVE-2022-26382
|
|
# - CVE-2022-26383
|
|
# - CVE-2022-26384
|
|
# - CVE-2022-26385
|
|
# - CVE-2022-26387
|
|
# 97.0.2-r0:
|
|
# - CVE-2022-26485
|
|
# - CVE-2022-26486
|
|
# 97.0-r0:
|
|
# - CVE-2021-4140
|
|
# - CVE-2022-0511
|
|
# - CVE-2022-22736
|
|
# - 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-22749
|
|
# - CVE-2022-22750
|
|
# - CVE-2022-22751
|
|
# - CVE-2022-22752
|
|
# - CVE-2022-22753
|
|
# - CVE-2022-22754
|
|
# - CVE-2022-22755
|
|
# - CVE-2022-22756
|
|
# - CVE-2022-22757
|
|
# - CVE-2022-22758
|
|
# - CVE-2022-22759
|
|
# - CVE-2022-22760
|
|
# - CVE-2022-22761
|
|
# - CVE-2022-22762
|
|
# - CVE-2022-22764
|
|
# 95.0-r0:
|
|
# - CVE-2021-43536
|
|
# - CVE-2021-43537
|
|
# - CVE-2021-43538
|
|
# - CVE-2021-43539
|
|
# - CVE-2021-43540
|
|
# - CVE-2021-43541
|
|
# - CVE-2021-43542
|
|
# - CVE-2021-43543
|
|
# - CVE-2021-43544
|
|
# - CVE-2021-43545
|
|
# - CVE-2021-43546
|
|
# 94.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
|
|
# 93.0-r0:
|
|
# - CVE-2021-32810
|
|
# - CVE-2021-38496
|
|
# - CVE-2021-38497
|
|
# - CVE-2021-38498
|
|
# - CVE-2021-38499
|
|
# - CVE-2021-38500
|
|
# - CVE-2021-38501
|
|
# 92.0.1-r0:
|
|
# - CVE-2021-29980
|
|
# - CVE-2021-29981
|
|
# - CVE-2021-29982
|
|
# - CVE-2021-29983
|
|
# - CVE-2021-29984
|
|
# - CVE-2021-29985
|
|
# - CVE-2021-29986
|
|
# - CVE-2021-29987
|
|
# - CVE-2021-29988
|
|
# - CVE-2021-29989
|
|
# - CVE-2021-29990
|
|
# - CVE-2021-29991
|
|
# - CVE-2021-29993
|
|
# - CVE-2021-38491
|
|
# - CVE-2021-38492
|
|
# - CVE-2021-38493
|
|
# - CVE-2021-38494
|
|
# 90.0-r0:
|
|
# - CVE-2021-29970
|
|
# - CVE-2021-29972
|
|
# - CVE-2021-29974
|
|
# - CVE-2021-29975
|
|
# - CVE-2021-29976
|
|
# - CVE-2021-29977
|
|
# - CVE-2021-30547
|
|
# 89.0-r0:
|
|
# - CVE-2021-29959
|
|
# - CVE-2021-29960
|
|
# - CVE-2021-29961
|
|
# - CVE-2021-29962
|
|
# - CVE-2021-29963
|
|
# - CVE-2021-29965
|
|
# - CVE-2021-29966
|
|
# - CVE-2021-29967
|
|
# 88.0.1-r0:
|
|
# - CVE-2021-29952
|
|
# 88.0-r0:
|
|
# - CVE-2021-23994
|
|
# - CVE-2021-23995
|
|
# - CVE-2021-23996
|
|
# - CVE-2021-23997
|
|
# - CVE-2021-23998
|
|
# - CVE-2021-23999
|
|
# - CVE-2021-24000
|
|
# - CVE-2021-24001
|
|
# - CVE-2021-24002
|
|
# - CVE-2021-29944
|
|
# - CVE-2021-29945
|
|
# - CVE-2021-29946
|
|
# - CVE-2021-29947
|
|
# 87.0-r0:
|
|
# - CVE-2021-23968
|
|
# - CVE-2021-23969
|
|
# - CVE-2021-23970
|
|
# - CVE-2021-23971
|
|
# - CVE-2021-23972
|
|
# - CVE-2021-23973
|
|
# - CVE-2021-23974
|
|
# - CVE-2021-23975
|
|
# - CVE-2021-23976
|
|
# - CVE-2021-23977
|
|
# - CVE-2021-23978
|
|
# - CVE-2021-23979
|
|
# - CVE-2021-23981
|
|
# - CVE-2021-23982
|
|
# - CVE-2021-23983
|
|
# - CVE-2021-23984
|
|
# - CVE-2021-23985
|
|
# - CVE-2021-23986
|
|
# - CVE-2021-23987
|
|
# - CVE-2021-23988
|
|
# 85.0-r0:
|
|
# - CVE-2021-23954
|
|
# - CVE-2021-23955
|
|
# - CVE-2021-23956
|
|
# - CVE-2021-23957
|
|
# - CVE-2021-23958
|
|
# - CVE-2021-23959
|
|
# - CVE-2021-23960
|
|
# - CVE-2021-23961
|
|
# - CVE-2021-23962
|
|
# - CVE-2021-23963
|
|
# - CVE-2021-23964
|
|
# - CVE-2021-23965
|
|
# 84.0.2-r0:
|
|
# - CVE-2020-16044
|
|
# 84.0.1-r0:
|
|
# - CVE-2020-16042
|
|
# - CVE-2020-26971
|
|
# - CVE-2020-26972
|
|
# - CVE-2020-26973
|
|
# - CVE-2020-26974
|
|
# - CVE-2020-26975
|
|
# - CVE-2020-26976
|
|
# - CVE-2020-26977
|
|
# - CVE-2020-26978
|
|
# - CVE-2020-26979
|
|
# - CVE-2020-35111
|
|
# - CVE-2020-35112
|
|
# - CVE-2020-35113
|
|
# - CVE-2020-35114
|
|
# 83.0-r0:
|
|
# - CVE-2020-15999
|
|
# - CVE-2020-16012
|
|
# - CVE-2020-26952
|
|
# - CVE-2020-26953
|
|
# - CVE-2020-26954
|
|
# - CVE-2020-26955
|
|
# - CVE-2020-26956
|
|
# - CVE-2020-26957
|
|
# - CVE-2020-26958
|
|
# - CVE-2020-26959
|
|
# - CVE-2020-26960
|
|
# - CVE-2020-26961
|
|
# - CVE-2020-26962
|
|
# - CVE-2020-26963
|
|
# - CVE-2020-26964
|
|
# - CVE-2020-26965
|
|
# - CVE-2020-26966
|
|
# - CVE-2020-26967
|
|
# - CVE-2020-26968
|
|
# - CVE-2020-26969
|
|
# 82.0.3-r0:
|
|
# - CVE-2020-26950
|
|
# 82.0-r0:
|
|
# - CVE-2020-15254
|
|
# - CVE-2020-15680
|
|
# - CVE-2020-15681
|
|
# - CVE-2020-15682
|
|
# - CVE-2020-15683
|
|
# - CVE-2020-15684
|
|
# - CVE-2020-15969
|
|
# 81.0-r0:
|
|
# - CVE-2020-15673
|
|
# - CVE-2020-15674
|
|
# - CVE-2020-15675
|
|
# - CVE-2020-15676
|
|
# - CVE-2020-15677
|
|
# - CVE-2020-15678
|
|
# 80.0-r0:
|
|
# - CVE-2020-6829
|
|
# - CVE-2020-12400
|
|
# - CVE-2020-12401
|
|
# - CVE-2020-15663
|
|
# - CVE-2020-15664
|
|
# - CVE-2020-15665
|
|
# - CVE-2020-15666
|
|
# - CVE-2020-15667
|
|
# - CVE-2020-15668
|
|
# - CVE-2020-15670
|
|
# 79.0-r0:
|
|
# - CVE-2020-6463
|
|
# - CVE-2020-6514
|
|
# - CVE-2020-15652
|
|
# - CVE-2020-15653
|
|
# - CVE-2020-15654
|
|
# - CVE-2020-15655
|
|
# - CVE-2020-15656
|
|
# - CVE-2020-15657
|
|
# - CVE-2020-15658
|
|
# - CVE-2020-15659
|
|
# 78.0-r0:
|
|
# - CVE-2020-12415
|
|
# - CVE-2020-12416
|
|
# - CVE-2020-12417
|
|
# - CVE-2020-12418
|
|
# - CVE-2020-12419
|
|
# - CVE-2020-12420
|
|
# - CVE-2020-12402
|
|
# - CVE-2020-12421
|
|
# - CVE-2020-12422
|
|
# - CVE-2020-12423
|
|
# - CVE-2020-12424
|
|
# - CVE-2020-12425
|
|
# - CVE-2020-12426
|
|
# 77.0-r0:
|
|
# - CVE-2020-12399
|
|
# - CVE-2020-12405
|
|
# - CVE-2020-12406
|
|
# - CVE-2020-12407
|
|
# - CVE-2020-12408
|
|
# - CVE-2020-12409
|
|
# - CVE-2020-12411
|
|
# 76.0-r0:
|
|
# - CVE-2020-6831
|
|
# - CVE-2020-12387
|
|
# - CVE-2020-12388
|
|
# - CVE-2020-12389
|
|
# - CVE-2020-12390
|
|
# - CVE-2020-12391
|
|
# - CVE-2020-12392
|
|
# - CVE-2020-12393
|
|
# - CVE-2020-12394
|
|
# - CVE-2020-12395
|
|
# - CVE-2020-12396
|
|
# 75.0-r0:
|
|
# - CVE-2020-6821
|
|
# - CVE-2020-6822
|
|
# - CVE-2020-6823
|
|
# - CVE-2020-6824
|
|
# - CVE-2020-6825
|
|
# - CVE-2020-6826
|
|
# 74.0.1-r0:
|
|
# - CVE-2020-6819
|
|
# - CVE-2020-6820
|
|
# 74.0-r0:
|
|
# - CVE-2020-6805
|
|
# - CVE-2020-6806
|
|
# - CVE-2020-6807
|
|
# - CVE-2020-6808
|
|
# - CVE-2020-6809
|
|
# - CVE-2020-6810
|
|
# - CVE-2020-6811
|
|
# - CVE-2019-20503
|
|
# - CVE-2020-6812
|
|
# - CVE-2020-6813
|
|
# - CVE-2020-6814
|
|
# - CVE-2020-6815
|
|
# 71.0.1-r0:
|
|
# - CVE-2019-17016
|
|
# - CVE-2019-17017
|
|
# - CVE-2019-17020
|
|
# - CVE-2019-17022
|
|
# - CVE-2019-17023
|
|
# - CVE-2019-17024
|
|
# - CVE-2019-17025
|
|
# - CVE-2019-17026
|
|
# 70.0-r0:
|
|
# - CVE-2018-6156
|
|
# - CVE-2019-15903
|
|
# - CVE-2019-11757
|
|
# - CVE-2019-11759
|
|
# - CVE-2019-11760
|
|
# - CVE-2019-11761
|
|
# - CVE-2019-11762
|
|
# - CVE-2019-11763
|
|
# - CVE-2019-11764
|
|
# - CVE-2019-11765
|
|
# - CVE-2019-17000
|
|
# - CVE-2019-17001
|
|
# - CVE-2019-17002
|
|
# 68.0.2-r0:
|
|
# - CVE-2019-11733
|
|
|
|
# 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
|
|
}
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
|
|
|
|
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
|
|
|
|
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 -O2"
|
|
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-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"
|
|
EOF
|
|
}
|
|
|
|
build() {
|
|
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 platform, 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"
|
|
|
|
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_REMOTINGNAME=firefox
|
|
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
|
|
# disable desktop notifications
|
|
export MOZ_NOSPAM=1
|
|
# Find our triplet JSON
|
|
export RUST_TARGET="$CTARGET"
|
|
|
|
# has to be same version or older than lld
|
|
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
|
|
|
|
# XXX: LARGEFILE64 fixme
|
|
export CFLAGS="$CFLAGS -O2 -D_LARGEFILE64_SOURCE"
|
|
export CXXFLAGS="$CXXFLAGS -O2 -D_LARGEFILE64_SOURCE"
|
|
|
|
case "$CARCH" in
|
|
aarch64|x86_64)
|
|
msg "building instrumented firefox"
|
|
cat > .mozconfig base-mozconfig - <<-EOF
|
|
ac_add_options --enable-profile-generate=cross
|
|
EOF
|
|
./mach build
|
|
./mach package
|
|
|
|
msg "profiling firefox"
|
|
|
|
LLVM_PROFDATA=llvm-profdata \
|
|
JARLOG_FILE="$PWD"/jarlog \
|
|
GDK_BACKEND=x11 \
|
|
LD_LIBRARY_PATH="$PWD"/obj/dist/firefox \
|
|
XDG_RUNTIME_DIR="$(mktemp -d "$builddir/pgo-runtime-XXXXXX")" \
|
|
MOZ_ENABLE_WAYLAND=0 \
|
|
xvfb-run -a -s "-screen 0 1920x1080x24 -nolisten local" \
|
|
dbus-run-session -- \
|
|
./mach python build/pgo/profileserver.py
|
|
|
|
test -s merged.profdata
|
|
test -s jarlog
|
|
|
|
./mach clobber
|
|
|
|
msg "building optimised firefox"
|
|
cat > .mozconfig base-mozconfig - <<-EOF
|
|
ac_add_options --enable-lto=cross
|
|
ac_add_options --enable-profile-use=cross
|
|
ac_add_options --with-pgo-profile-path="$PWD"/merged.profdata
|
|
ac_add_options --with-pgo-jarlog="$PWD"/jarlog
|
|
EOF
|
|
./mach build
|
|
;;
|
|
armv7|x86|riscv64)
|
|
# no pgo here as it uses too much memory/broken on riscv
|
|
msg "building regular firefox"
|
|
cat > .mozconfig base-mozconfig - <<-EOF
|
|
ac_add_options --disable-profiling
|
|
EOF
|
|
./mach build
|
|
;;
|
|
*)
|
|
msg "implement build for $CARCH"
|
|
exit 1
|
|
esac
|
|
}
|
|
|
|
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.png
|
|
done
|
|
|
|
install -Dm644 browser/branding/official/content/about-logo.png \
|
|
"$pkgdir"/usr/share/icons/hicolor/192x192/apps/$pkgname.png
|
|
install -Dm644 browser/branding/official/content/about-logo@2x.png \
|
|
"$pkgdir"/usr/share/icons/hicolor/384x384/apps/$pkgname.png
|
|
install -Dm644 browser/branding/official/content/about-logo.svg \
|
|
"$pkgdir"/usr/share/icons/hicolor/scalable/apps/$pkgname.svg
|
|
|
|
install -Dm644 "$srcdir"/firefox.desktop \
|
|
"$pkgdir"/usr/share/applications/firefox.desktop
|
|
|
|
install -Dm644 "$srcdir"/distribution.ini \
|
|
"$pkgdir"/$_mozappdir/distribution/distribution.ini
|
|
|
|
# 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.appdata.xml
|
|
|
|
# Replace duplicate binary with wrapper
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
|
install -Dm755 /dev/stdin "$pkgdir"/usr/bin/firefox <<- EOF
|
|
#!/bin/sh
|
|
exec $_mozappdir/firefox "\$@"
|
|
EOF
|
|
rm "$pkgdir"/$_mozappdir/firefox-bin
|
|
ln -sfv /usr/bin/firefox "$pkgdir"/$_mozappdir/firefox-bin
|
|
|
|
# binutils can't strip the binaries on riscv, so use the llvm binutils for
|
|
# it by hand
|
|
scanelf --recursive \
|
|
--nobanner \
|
|
--etype "ET_DYN,ET_EXEC" \
|
|
--format "%F" \
|
|
"$pkgdir" \
|
|
| while read -r file; do
|
|
llvm-strip "$file"
|
|
done
|
|
}
|
|
|
|
sha512sums="
|
|
96b0f0774083270f4fcce06085b177ced25ba05da7291d777f1da1d5bbad30721bc6363b76e06ccb64fc092778c8326a426a8bfdfa3cbaafd4f1169b924744a5 firefox-113.0.tar.xz
|
|
028a723d749b9b0a924a13de3e33ff84829bfab872cf6e41293fe11b7e8f640b5ca45d1323597ac7c9bb093ffcee4c72a83ca9210f6bdd22e12ea5d67ef3d3f3 0001-Bug-1831691-Use-the-vendored-glean_parser-for-all-of.patch
|
|
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
|
|
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
|
|
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
|
|
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
|
|
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
|
|
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
|
|
c0437a6753f3f350968fa12d250efdfe1bea77baf0e4c06b072b5cc9e78c774dbf4506bc536337030d349fb3ba4460097b75b0c7c5b8fb2d39d8b0a392948936 no-ccache-stats.patch
|
|
ff3618223bba2d7b877a16451256e67d973c5f4e24027cb5a7da4c0a6f6a028a1eb51d3cbcddae71bca584a4c13cb485950b86022ea26d4e25ae3fdf3ce5d910 python-deps.patch
|
|
9f433c8051d05efb8b119e0b67b97951837aca6a8c5671646714a24023be11a9d63fa7c4e56a6c7f3911c9d8406b06cd95926de1a82925d02197dfd55daf5642 rust-lto-thin.patch
|
|
b12dbff6513ac8c231d91c257a9accecc034d9ea9c31d99ca0454334ccf80fe7b50d6a356182dc46a9f25064366ea9a177f463cb2544b1cf5368ee6bd71bc095 riscv64-no-lto.patch
|
|
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
|
|
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
|
|
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
|
|
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
|
|
333b9df0c8a7693601245dac13522c9e90632f490b2fe1b852bf85fbd033c111a82fec3cfc302cfdea62d591c51042ae69c2c33a5668afacca11ea1f215188bc firefox.desktop
|
|
9869ef092609af4caed6aa27f3de6ac49b91ef993ccbfd8a2080465def442d3b02745fbe3c71d362f07c3075d46f388a023c0ad8ebb5f6ffd37e601d997b74f7 distribution.ini
|
|
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
|
|
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
|
|
"
|