summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-10-22 21:41:31 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-10-26 22:55:41 -0400
commit2959980b509c4907dd738b2b52d1b090e7513f41 (patch)
tree5da1bd841ef5793a292e5989816335ebd2f4b38c
parentacd84279cd95156aa0ba34c23856763fbfd5b6fb (diff)
[icecat][icewesel]: minimize diffs across PKGBUILDs
-rw-r--r--libre/icecat/PKGBUILD124
-rw-r--r--libre/iceweasel/PKGBUILD10
2 files changed, 79 insertions, 55 deletions
diff --git a/libre/icecat/PKGBUILD b/libre/icecat/PKGBUILD
index a76574613..dc8c9064b 100644
--- a/libre/icecat/PKGBUILD
+++ b/libre/icecat/PKGBUILD
@@ -131,7 +131,6 @@ source+=(
vendor.js.in
zstandard-0.21.0.diff
)
-source_armv7h=(build-arm-libopus.patch)
source_i686=(
avoid-libxul-OOM-python-check.patch
rust-static-disable-network-test-on-static-libraries.patch
@@ -147,7 +146,6 @@ sha256sums+=('e00dbf01803cdd36fd9e1c0c018c19bb6f97e43016ea87062e6134bdc172bc7d'
'33dd309eeb99ec730c97ba844bf6ce6c7840f7d27da19c82389cdefee8c20208'
'8e113fd2730be3fd11b2a24918dd62e8741513cf4dce9819d8eae358c5411adc'
'aa663d899e924f4979114584cad671dad3b93dd9b0dfe28bb1cf11ddf92e6d47') # zstandard-0.21.0.diff
-sha256sums_armv7h=('2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')
sha256sums_i686=('2f0c81a38c4578f68f5456b618fe84a78974072821488173eb55e0e72287e353'
'10c5276eab2e87f400a6ec15d7ffbef3b0407ee888dea36f1128927ca55b9041'
'ed3bb281697af7c4353a34067ffb4b18a971d40757bef2d6af3c8bf2d28d42d1'
@@ -157,15 +155,25 @@ sha256sums_i686=('2f0c81a38c4578f68f5456b618fe84a78974072821488173eb55e0e72287e3
## compiler and optimization tweaks ##
-# disable PGO for 32-bit arches, 64-bit optionally
-# try '1' if the build hangs indefinitely - known past causes:
+# disable PGO
+# try this if the build hangs indefinitely - known past causes:
# * resource exhaustion
# * a test which misbehaves in environments without networking
-readonly _SHOULD_SKIP_PGO=$(case "${CARCH}" in armv7h|i686) echo 1 ;; *) echo 0 ;; esac)
+readonly _SKIP_PGO=$(case "${CARCH}" in armv7h|i686) echo 1 ;; *) echo 0 ;; esac)
-# use GCC vs LLVM for 32-bit arches, 64-bit optionally
-# trying one or the other, may resolve rolling compiler/linker discrepancies
-readonly _SHOULD_USE_GCC=$(case "${CARCH}" in armv7h) echo 1 ;; *) echo 0 ;; esac)
+# use GCC vs LLVM
+# trying one or the other, may resolve sporadic compiler/linker discrepancies
+readonly _USE_ALT_COMPILER=$(case "${CARCH}" in armv7h) echo 1 ;; *) echo 0 ;; esac)
+
+# use 'bfd' linker vs 'lld'
+# most significantly, this also disables LTO and debugging
+# try this if the build freezes or crashes due to resource exhaustion
+# FIXME: x86_64 FTBS with LTO due to resource exhaustion
+# luke added a swapfile to beefcake, because this build crashed the server
+# apparently, a measly 32GB RAM is no longer sufficient to contain this beast
+# the system no longer crashes now; but the build process gets killed instead
+# > clang-15: error: unable to execute command: Killed
+readonly _USE_ALT_LINKER=$(case "${CARCH}" in i686|x86_64) echo 1 ;; *) echo 0 ;; esac)
## dependency tweaks ##
@@ -173,16 +181,14 @@ readonly _SHOULD_USE_GCC=$(case "${CARCH}" in armv7h) echo 1 ;; *) echo 0 ;; esa
case "${CARCH}" in
armv7h)
makedepends=( ${makedepends[*]/wasi-*/} ) # armv7h has no wasi compiler
+
+ depends+=( libicudata.so libicui18n.so libicuuc.so ) # --with-system-icu
;;
i686)
# checking for nodejs... /usr/bin/node: error while loading shared libraries: libicui18n.so.72
makedepends+=( icu72 )
-
# wasm-ld: error: cannot open /usr/lib/clang/15.0.7/lib/wasi/libclang_rt.builtins-wasm32.a: No such file or directory
- makedepends=( ${makedepends[*]/wasi-*/} )
- makedepends+=( 'wasi-libc++>=15' 'wasi-libc++<16' ) # dustbin
- makedepends+=( 'wasi-libc++abi>=15' 'wasi-libc++abi<16' ) # dustbin
- makedepends+=( 'wasi-compiler-rt>=15' 'wasi-compiler-rt<16' ) # dustbin
+ makedepends=( ${makedepends[*]/wasi-compiler-rt/wasi-compiler-rt=15.0.7} ) # dustbin
;;
esac
@@ -262,7 +268,20 @@ prepare() {
sed -i "s|# 'LIBYUV_DISABLE_NEON',|'LIBYUV_DISABLE_NEON',|" media/libyuv/libyuv/libyuv.gyp
! grep "# 'LIBYUV_DISABLE_NEON'," media/libyuv/libyuv/libyuv.gyp || ! echo "error patching media/libyuv/libyuv/libyuv.gyp" || exit 1
- patch -p1 -i ../build-arm-libopus.patch
+ # FIXME: armv7h FTBS
+ # ld.lld: error: undefined hidden symbol: I422ToARGBRow_Any_NEON
+ # also: I422ToARGBRow_NEON I444ToARGBRow_Any_NEON I444ToARGBRow_NEON
+ # referenced by Unified_cpp_gfx_ycbcr0.cpp
+ # toolkit/library/build/../../../gfx/ycbcr/Unified_cpp_gfx_ycbcr0.o:(YUVBuferIter_Init)
+ # ld.lld: error: undefined hidden symbol: ScaleARGBCols_NEON
+ # also: InterpolateRow_NEON ScaleARGBFilterCols_NEON ScaleARGBRowDownEven_NEON
+ # ScaleARGBCols_Any_NEON InterpolateRow_Any_NEON ScaleARGBFilterCols_Any_NEON
+ # ScaleARGBRowDown2_Any_NEON ScaleARGBRowDownEvenBox_NEON
+ # ScaleARGBRowDownEven_Any_NEON ScaleARGBRowDown2Box_NEON
+ # ScaleARGBRowDownEvenBox_Any_NEON ScaleARGBRowDown2_NEON
+ # ScaleARGBRowDown2Box_Any_NEON ScaleARGBRowDown2Linear_Any_NEON
+ # ScaleARGBRowDown2Linear_NEON
+ # obj/toolkit/library/build/../../../gfx/ycbcr/Unified_cpp_gfx_ycbcr0.o:(YUVToARGBScale)
;;
i686)
# readelf: Error: Unable to seek to 0x801db328 for section headers
@@ -353,18 +372,31 @@ END
## [ARCH-SPECIFIC CONFIG] ##
- case ${CARCH} in
- aarch64|armv7h)
- # experimental/version-specific hacks #
-
- (( ! _SHOULD_USE_GCC )) ||
- cat >> ../mozconfig <<EOF
+ if (( _USE_ALT_COMPILER ))
+ then cat >> ../mozconfig <<END
export CC=gcc
export CXX=g++
export AR=gcc-ar
export NM=gcc-nm
export RANLIB=gcc-ranlib
-EOF
+END
+ fi
+
+ if (( _USE_ALT_LINKER ))
+ then sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk
+ cat >> ../mozconfig <<END
+ac_add_options --disable-linker=lld
+ac_add_options --enable-linker=bfd
+ac_add_options --disable-lto
+ac_add_options --disable-rust-simd
+ac_add_options --disable-debug
+ac_add_options --disable-debug-symbols
+END
+ fi
+
+ case ${CARCH} in
+ aarch64|armv7h)
+ # experimental/version-specific hacks #
# ld.lld: error: undefined hidden symbol: std::type_info::operator==(std::type_info const&) const
echo 'ac_add_options --with-system-icu' >> ../mozconfig
@@ -372,7 +404,7 @@ EOF
# archarm configuration #
- # archarm has these over-rides in ## general configuration ## above
+ # archarm recipe has mozconfig over-rides under the 'general configuration' section
# NOTE: '--disable-eme' is currently an invalid option for armv7h.
# It must be deleted in order to compile.
# If ever it becomes valid, it should not be deleted below.
@@ -400,6 +432,7 @@ EOF
elif [[ $CARCH == "aarch64" ]]; then
echo 'ac_add_options --enable-rust-simd' >> .mozconfig
fi
+
echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig
echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig
@@ -407,8 +440,8 @@ EOF
# archarm patching is under the 'technical patching' section
- # At this point in the recipe (this `case` block), the arch, arch32, and parabola
- # PKGBUILDs have prepared a temporary ${srcdir}/mozconfig; but the archarm PKGBUILD
+ # At this point in the recipe, the arch, arch32, and parabola PKGBUILDs
+ # have prepared a temporary ${srcdir}/mozconfig; but the archarm PKGBUILD
# writes directly to the final firefox-$pkgver/.mozconfig.
# We allowed .mozconfig to be written above, only to minimize the diff against archarm.
# For consistency across arches, we append those changes to ${srcdir}/mozconfig now.
@@ -418,37 +451,17 @@ EOF
i686)
# experimental/version-specific hacks #
- (( ! _SHOULD_USE_GCC )) ||
- cat >>../mozconfig <<END
-export CC=gcc
-export CXX=g++
-export AR=gcc-ar
-export NM=gcc-nm
-export RANLIB=gcc-ranlib
-END
-
# arch32 configuration #
# arch32 `export` commands are under the '[ARCH-SPECIFIC BUILD ENV]' section
- # NOTE: arch32 has these over-rides and the compiler flags above, in mozconfig-i686.patch
- # disable LTO as it has little benefit and uses too many resources
- # don't compile with clang, use gcc toolchain (clang has issues on IA32)
- # disable SIMD (SSE2 for i686)
- # set correct compiler and toochain tools
+ # arch32 recipe has mozconfig over-rides in mozconfig-i686.patch
+ # in this recipe, the '_USE_ALT_LINKER' block includes most of them
cat >>../mozconfig <<END
-ac_add_options --disable-linker=lld
-ac_add_options --enable-linker=bfd
-ac_add_options --disable-lto
-ac_add_options --disable-rust-simd
-ac_add_options --disable-debug
-ac_add_options --disable-debug-symbols
ac_add_options --disable-webrtc
END
- sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk # FIXME: is this needed?
-
# arch32 patching is under the 'technical patching' section
;;
x86_64)
@@ -542,7 +555,7 @@ build() {
## PGO build ##
- if (( _SHOULD_SKIP_PGO ))
+ if (( _SKIP_PGO ))
then
# skipping "3-tier PGO" "instrumented browser"; so the final .mozconfig is ready now
cp ../mozconfig .mozconfig
@@ -578,7 +591,7 @@ ac_add_options --enable-profile-use=cross
ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
END
- fi # _SHOULD_SKIP_PGO
+ fi # _SKIP_PGO
## sanity checks ##
@@ -588,7 +601,7 @@ END
## main build ##
- (( ! _SHOULD_SKIP_PGO )) || echo "Building optimized browser..."
+ (( ! _SKIP_PGO )) || echo "Building optimized browser..."
./mach build
# echo "Building symbol archive..." # anti-feature
@@ -615,6 +628,9 @@ pref("browser.shell.checkDefaultBrowser", false);
// Don't disable extensions in the application directory
pref("extensions.autoDisableScopes", 11);
+
+// Enable GNOME Shell search provider
+pref("browser.gnome-search-provider.enabled", true);
END
# Parabola additions to vendor.js
@@ -690,6 +706,16 @@ END
ln -srfv "$pkgdir/usr/lib/libnssckbi.so" "$nssckbi"
fi
+ # Configure GNOME Shell search provider
+ local sprovider="$pkgdir/usr/share/gnome-shell/search-providers/$pkgname.search-provider.ini"
+ install -Dvm644 /dev/stdin "$sprovider" <<END
+[Shell Search Provider]
+DesktopId=$pkgname.desktop
+BusName=org.mozilla.${pkgname//-/}.SearchProvider
+ObjectPath=/org/mozilla/${pkgname//-/}/SearchProvider
+Version=2
+END
+
# export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE="$startdir/.crash-stats-api.token" # anti-feature
# if [[ -f $SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE ]]; then # anti-feature
# make -C obj uploadsymbols # anti-feature
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index 500f97540..ebcc871d3 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -165,7 +165,6 @@ source+=(
vendor.js.in
zstandard-0.21.0.diff
)
-source_armv7h=(build-arm-libopus.patch)
source_i686=(
avoid-libxul-OOM-python-check.patch
rust-static-disable-network-test-on-static-libraries.patch
@@ -192,7 +191,6 @@ sha256sums+=('b701b4c47fca2661feeabe172e398c76c8015ee08ff4cc3cc2f7c3ef2ed692a7'
'00cb44a91b42942f17258ad165810866ff123777b667a5691ea0745ba72f4332' # process-json-files.py
'86bd54db6026ff65bd24ac4f05d0679a645ff447e2f81b0ee44037c0c4285e06' # vendor.js.in
'aa663d899e924f4979114584cad671dad3b93dd9b0dfe28bb1cf11ddf92e6d47') # zstandard-0.21.0.diff
-sha256sums_armv7h=('2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')
sha256sums_i686=('a8786bb747ae8a12d28268f6731621810e13f405b664373b23a3070d5ed21302' # avoid-libxul-OOM-python-check.patch
'b25d9fb901afc5447bcd87416741f705eb7188502e10097387d5b0c86417fd01' # rust-static-disable-network-test-on-static-libraries.patch
'ed3bb281697af7c4353a34067ffb4b18a971d40757bef2d6af3c8bf2d28d42d1' # firefox-111.0.1-fdlibm.patch
@@ -210,7 +208,6 @@ b2sums+=('a22044292e464b3922eb2e4a8cf0993524d232eeb4a8602707589d00f690498d3b76e5
'085c4631ec8cfdf5842068d882185c783e976b1fde74167bb71ef4d7db8c70c12844177b17e76f858ba3ce2a402848ac8fc19910dcbefd29887abfaf5faac5e4' # process-json-files.py
'f3f344196d03499f3f0392d5dfc5310e131d8c85772edd340faf1df3f04ebf2931eb1dda1b7fe6870d61d498618f4d8ae9f1dd446acbe83e0ce324e04b38f3f9' # vendor.js.in
'2e568bb28f23f0f9225ca68a5084e3e835f6bd15046eea9d615d3462146da649c1b6b7439b4d768759bda2658d54ca73c9b3479e5e0b6d7a58822664dbe45aa2') # zstandard-0.21.0.diff
-b2sums_armv7h=('6e5980e56343a23bce4fcda58f6abc8f2debca0c278c87b09e53abb17ff15849c26e8df3bbff2388985f8fe5a4e9be9982c602ef7159546f0ae335fca1000a41')
b2sums_i686=('01e1bcb331b6147b822fe4c45dd195f38e670db08bdff16db1c21dc2d529f4f783d5798cde415fec782c8fc9cf79ce70dadcc013be3c9d4f5a09fc3a1ee0744d' # avoid-libxul-OOM-python-check.patch
'32c60a9259f9ab6b950c0a3af81e4c36c14160860d3b9da70aa3fbc3676e5fd2b2705b02d7e6b6ac49f9510577de89ab2334abe3b0a126e3d70e65ac42ba62c9' # rust-static-disable-network-test-on-static-libraries.patch
'05c7c9727201971650df4ca2e00539767fc9e159539835c641fccab5ec9577a7294e8f62f5d0670158316e5467ea121c03a36fd4ba153e1d60f3402f0430548d' # firefox-111.0.1-fdlibm.patch
@@ -259,6 +256,8 @@ readonly _USE_ALT_LINKER=$(case "${CARCH}" in i686|x86_64) echo 1 ;; *) echo 0 ;
case "${CARCH}" in
armv7h)
makedepends=( ${makedepends[*]/wasi-*/} ) # armv7h has no wasi compiler
+
+ depends+=( libicudata.so libicui18n.so libicuuc.so ) # --with-system-icu
;;
esac
@@ -361,8 +360,6 @@ prepare() {
# mozilla #1787405 and #1791267
sed -i "s|# 'LIBYUV_DISABLE_NEON',|'LIBYUV_DISABLE_NEON',|" media/libyuv/libyuv/libyuv.gyp
! grep "# 'LIBYUV_DISABLE_NEON'," media/libyuv/libyuv/libyuv.gyp || ! echo "error patching media/libyuv/libyuv/libyuv.gyp" || exit 1
-
- patch -p1 -i ../build-arm-libopus.patch
;;
i686)
# readelf: Error: Unable to seek to 0x801db328 for section headers
@@ -513,6 +510,7 @@ END
elif [[ $CARCH == "aarch64" ]]; then
echo 'ac_add_options --enable-rust-simd' >> .mozconfig
fi
+
echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig
echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig
@@ -520,7 +518,7 @@ END
# archarm patching is under the 'technical patching' section
- # NOTE: At this point in the recipe, the arch, arch32, and parabola PKGBUILDs
+ # At this point in the recipe, the arch, arch32, and parabola PKGBUILDs
# have prepared a temporary ${srcdir}/mozconfig; but the archarm PKGBUILD
# writes directly to the final firefox-$pkgver/.mozconfig.
# We allowed .mozconfig to be written above, only to minimize the diff against archarm.