mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
firefox: update to 105.0.
This commit is contained in:
parent
79d9e56687
commit
55af8bb86c
2 changed files with 148 additions and 152 deletions
|
@ -1,37 +0,0 @@
|
||||||
ac_add_options --prefix=/usr
|
|
||||||
ac_add_options --libdir=/usr/lib
|
|
||||||
|
|
||||||
ac_add_options --with-system-nspr
|
|
||||||
ac_add_options --with-system-nss
|
|
||||||
ac_add_options --with-system-jpeg
|
|
||||||
ac_add_options --with-system-zlib
|
|
||||||
ac_add_options --with-system-libevent
|
|
||||||
ac_add_options --with-system-libvpx
|
|
||||||
ac_add_options --with-system-icu
|
|
||||||
# XXX: the system's libpng doesn't have APNG support
|
|
||||||
ac_add_options --without-system-png
|
|
||||||
ac_add_options --enable-system-pixman
|
|
||||||
ac_add_options --enable-system-ffi
|
|
||||||
|
|
||||||
nspr_config_args="
|
|
||||||
--libdir=${XBPS_CROSS_BASE}/usr/lib
|
|
||||||
--includedir=${XBPS_CROSS_BASE}/usr/include/nspr"
|
|
||||||
|
|
||||||
nss_config_args="
|
|
||||||
--libdir=${XBPS_CROSS_BASE}/usr/lib
|
|
||||||
--includedir=${XBPS_CROSS_BASE}/usr/include/nss"
|
|
||||||
|
|
||||||
ac_add_options --disable-tests
|
|
||||||
ac_add_options --disable-crashreporter
|
|
||||||
ac_add_options --disable-updater
|
|
||||||
ac_add_options --disable-install-strip
|
|
||||||
ac_add_options --disable-strip
|
|
||||||
ac_add_options --disable-profiling
|
|
||||||
ac_add_options --enable-release
|
|
||||||
ac_add_options --enable-optimize="$CFLAGS"
|
|
||||||
|
|
||||||
ac_add_options --enable-official-branding
|
|
||||||
ac_add_options --enable-application=browser
|
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
|
||||||
ac_add_options --allow-addon-sideload
|
|
|
@ -3,7 +3,7 @@
|
||||||
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n".
|
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n".
|
||||||
#
|
#
|
||||||
pkgname=firefox
|
pkgname=firefox
|
||||||
version=104.0.2
|
version=105.0
|
||||||
revision=1
|
revision=1
|
||||||
build_helper="rust"
|
build_helper="rust"
|
||||||
short_desc="Mozilla Firefox web browser"
|
short_desc="Mozilla Firefox web browser"
|
||||||
|
@ -11,42 +11,34 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||||
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
|
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
|
||||||
homepage="https://www.mozilla.org/firefox/"
|
homepage="https://www.mozilla.org/firefox/"
|
||||||
distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz"
|
distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz"
|
||||||
checksum=72bba06f04e7745f6b02951906413eb1c15a7e253e06e373302162c6219f286a
|
checksum=2b5becbb89aa2b2007ba8c86ad517aeae1b54904d007d9d3acbf054be6a0ed62
|
||||||
|
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
|
|
||||||
hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo
|
hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo
|
||||||
llvm clang nodejs-lts cbindgen python nasm which tar"
|
llvm clang lld nodejs cbindgen nasm which tar"
|
||||||
makedepends="nss-devel libjpeg-turbo-devel gtk+3-devel icu-devel
|
makedepends="nss-devel libjpeg-turbo-devel gtk+3-devel icu-devel
|
||||||
pixman-devel libevent-devel libnotify-devel libvpx-devel
|
pixman-devel libevent-devel libnotify-devel libvpx-devel libwebp-devel
|
||||||
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
|
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
|
||||||
libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel)
|
libXdamage-devel freetype-devel libatomic-devel
|
||||||
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
$(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel)
|
||||||
$(vopt_if xscreensaver libXScrnSaver-devel)
|
$(vopt_if pulseaudio pulseaudio-devel) $(vopt_if xscreensaver libXScrnSaver-devel)
|
||||||
$(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)"
|
$(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)"
|
||||||
depends="nss>=3.72 nspr>=4.32 desktop-file-utils hicolor-icon-theme"
|
depends="nss>=3.72 nspr>=4.32 desktop-file-utils hicolor-icon-theme"
|
||||||
conflicts="firefox-esr>=0"
|
conflicts="firefox-esr>=0"
|
||||||
|
|
||||||
build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland"
|
build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland lto"
|
||||||
build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland"
|
build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland"
|
||||||
|
|
||||||
|
desc_option_lto="Enable Link Time Optimization"
|
||||||
|
|
||||||
case $XBPS_TARGET_MACHINE in
|
case $XBPS_TARGET_MACHINE in
|
||||||
armv[56]*) broken="required NEON extensions are not supported on armv6" ;;
|
armv[56]*) broken="required NEON extensions are not supported on armv6" ;;
|
||||||
ppc64*) ;;
|
ppc64*) ;;
|
||||||
ppc*) broken="xptcall bitrot" ;;
|
ppc*) broken="xptcall bitrot" ;;
|
||||||
armv7*) broken="https://build.voidlinux.org/builders/armv7l_builder/builds/39410/steps/shell_3/logs/stdio" ;;
|
# armv7*) broken="https://build.voidlinux.org/builders/armv7l_builder/builds/39410/steps/shell_3/logs/stdio" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
||||||
makedepends+=" libatomic-devel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# work around large debug symbols on 32-bit hosts
|
|
||||||
# cargo:warning=cc1plus: out of memory allocating 65536 bytes after a total of 1010126848 bytes
|
|
||||||
if [ "$XBPS_WORDSIZE" = "32" ]; then
|
|
||||||
nodebug=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
# we need this because cargo verifies checksums of all files in vendor
|
# 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
|
# crates when it builds and gives us no way to override or update the
|
||||||
# file sanely... so just clear out the file list
|
# file sanely... so just clear out the file list
|
||||||
|
@ -67,33 +59,79 @@ post_extract() {
|
||||||
}
|
}
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
_clear_vendor_checksums num-traits
|
: # _clear_vendor_checksums num-traits
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
cp "${FILESDIR}/mozconfig" "${wrksrc}/.mozconfig"
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
|
||||||
echo "MOZ_APP_REMOTINGNAME=Firefox" >>.mozconfig
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
mkdir -p wrapper
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
local gcc_version=$(gcc -dumpversion)
|
||||||
*-musl)
|
local clang_version=$(clang -dumpversion)
|
||||||
echo "ac_add_options --disable-jemalloc" >>.mozconfig
|
|
||||||
echo "ac_add_options --enable-linker=bfd" >>.mozconfig
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
cat <<-! >"wrapper/${XBPS_TARGET_MACHINE}-clang"
|
||||||
x86_64*|i686*|arm*|aarch64*)
|
#!/bin/sh
|
||||||
echo "ac_add_options --disable-elf-hack" >>.mozconfig
|
exec clang \
|
||||||
;;
|
--target="${XBPS_CROSS_TRIPLET}" \
|
||||||
esac
|
--gcc-toolchain=/usr \
|
||||||
|
--sysroot="${XBPS_CROSS_BASE}" \
|
||||||
|
-nostdinc \
|
||||||
|
-isystem "${XBPS_CROSS_BASE}/usr/include" \
|
||||||
|
-isystem "/usr/lib/clang/${clang_version}/include" \
|
||||||
|
"\$@"
|
||||||
|
!
|
||||||
|
|
||||||
# third_party/libwebrtc/common_audio/wav_file.cc:93:2: error:
|
cat <<-! >"wrapper/${XBPS_TARGET_MACHINE}-clang++"
|
||||||
# #error "Need to convert samples to big-endian when reading from WAV file"
|
#!/bin/sh
|
||||||
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
exec clang++ \
|
||||||
echo "ac_add_options --disable-webrtc" >>.mozconfig
|
--target="${XBPS_CROSS_TRIPLET}" \
|
||||||
|
--gcc-toolchain=/usr \
|
||||||
|
--sysroot="${XBPS_CROSS_BASE}" \
|
||||||
|
-nostdinc++ \
|
||||||
|
-isystem "${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}" \
|
||||||
|
-isystem "${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/${XBPS_CROSS_TRIPLET}" \
|
||||||
|
-isystem "${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/backward" \
|
||||||
|
-nostdinc \
|
||||||
|
-isystem "${XBPS_CROSS_BASE}/usr/include" \
|
||||||
|
-isystem "/usr/lib/clang/${clang_version}/include" \
|
||||||
|
"\$@"
|
||||||
|
!
|
||||||
|
|
||||||
|
chmod +x wrapper/*
|
||||||
|
|
||||||
|
export PATH="${wrksrc}/wrapper:$PATH"
|
||||||
|
export CC=${XBPS_TARGET_MACHINE}-clang
|
||||||
|
export CXX=${XBPS_TARGET_MACHINE}-clang++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export AR=llvm-ar
|
||||||
|
export NM=llvm-nm
|
||||||
|
export AS="${CC}"
|
||||||
|
export CFLAGS="-O2 -fno-plt"
|
||||||
|
export CXXFLAGS="-O2 -fno-plt"
|
||||||
|
export HOST_CC=clang
|
||||||
|
export HOST_CXX=clang++
|
||||||
|
export HOST_CFLAGS=""
|
||||||
|
export HOST_CXXFLAGS=""
|
||||||
|
export LDFLAGS="-Wl,-rpath=/usr/lib/firefox"
|
||||||
|
# export LDFLAGS+="-Wl,--threads=${XBPS_MAKEJOBS}"
|
||||||
|
|
||||||
|
disable_jemalloc() {
|
||||||
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||||
|
echo "ac_add_options --disable-jemalloc"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_elfhack() {
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
x86_64*|i686*|arm*|aarch64*) echo "ac_add_options --disable-elf-hack" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_webrtc() {
|
||||||
# it seems mozilla has started catching up with google's webrtc
|
# it seems mozilla has started catching up with google's webrtc
|
||||||
# and this newly involves introducing several megabytes of generated
|
# and this newly involves introducing several megabytes of generated
|
||||||
# json junk that we just cannot maintain in-tree, additionally they
|
# json junk that we just cannot maintain in-tree, additionally they
|
||||||
|
@ -104,67 +142,74 @@ do_build() {
|
||||||
# https://phabricator.services.mozilla.com/D134738
|
# https://phabricator.services.mozilla.com/D134738
|
||||||
#
|
#
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
ppc64le*|armv7l*) echo "ac_add_options --disable-webrtc" >>.mozconfig ;;
|
ppc64le*|armv7l*) echo "ac_add_options --disable-webrtc" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
# third_party/libwebrtc/common_audio/wav_file.cc:93:2: error:
|
||||||
export LDFLAGS+=" -latomic"
|
# #error "Need to convert samples to big-endian when reading from WAV file"
|
||||||
|
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||||
|
echo "ac_add_options --disable-webrtc"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
cat <<-! >.mozconfig
|
||||||
BINDGEN_INCLUDE_FLAGS=$( $CPP -x c++ -v /dev/null -o /dev/null 2>&1 | \
|
ac_add_options --prefix=/usr
|
||||||
sed -n '/#include <...> search starts here:/,/End of search list./p' | \
|
ac_add_options --libdir=/usr/lib
|
||||||
sed '1,1d;$d' | sed 's/^ /-I/' | paste -s )
|
ac_add_options --host=${XBPS_TRIPLET}
|
||||||
|
ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}
|
||||||
|
ac_add_options --enable-linker=lld
|
||||||
|
$(vopt_if lto 'ac_add_options --enable-lto=cross')
|
||||||
|
ac_add_options --with-libclang-path=/usr/lib
|
||||||
|
|
||||||
export BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
|
ac_add_options --enable-official-branding
|
||||||
--sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
|
ac_add_options --enable-application=browser
|
||||||
export HOST_CC=cc
|
ac_add_options --enable-release
|
||||||
export TARGET_CC="${CC}"
|
ac_add_options --enable-hardening
|
||||||
export HOST_CFLAGS="${XBPS_CFLAGS}"
|
ac_add_options --enable-optimize="\${CFLAGS}"
|
||||||
export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
|
ac_add_options --enable-path-remapping=c,rust
|
||||||
export ac_cv_sqlite_secure_delete=yes \
|
ac_add_options --disable-tests
|
||||||
ac_cv_sqlite_threadsafe=yes \
|
ac_add_options --disable-crashreporter
|
||||||
ac_cv_sqlite_enable_fts3=yes \
|
ac_add_options --disable-updater
|
||||||
ac_cv_sqlite_dbstat_vtab=yes \
|
ac_add_options --disable-install-strip
|
||||||
ac_cv_sqlite_enable_unlock_notify=yes \
|
ac_add_options --disable-strip
|
||||||
ac_cv_prog_hostcxx_works=1
|
ac_add_options --disable-profiling
|
||||||
|
$(disable_jemalloc)
|
||||||
echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig
|
$(disable_elfhack)
|
||||||
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
|
$(disable_webrtc)
|
||||||
else
|
|
||||||
echo "ac_add_options --target=$XBPS_TRIPLET" >>.mozconfig
|
|
||||||
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XXX: wasi currently not ready
|
# XXX: wasi currently not ready
|
||||||
# echo "ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot" >>.mozconfig
|
# ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
|
||||||
echo "ac_add_options --without-wasm-sandboxed-libraries" >>.mozconfig
|
ac_add_options --without-wasm-sandboxed-libraries
|
||||||
|
|
||||||
mkdir -p third_party/rust/libloading/.deps
|
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
ac_add_options --enable-system-pixman
|
||||||
armv7*)
|
ac_add_options --with-system-ffi
|
||||||
export CFLAGS+=" -mfpu=neon -Wno-psabi"
|
ac_add_options --with-system-icu
|
||||||
export CXXFLAGS+=" -mfpu=neon -Wno-psabi"
|
ac_add_options --with-system-jpeg
|
||||||
;;
|
ac_add_options --with-system-libevent
|
||||||
esac
|
ac_add_options --with-system-libvpx
|
||||||
|
ac_add_options --with-system-nspr
|
||||||
|
ac_add_options --with-system-nss
|
||||||
|
ac_add_options --with-system-webp
|
||||||
|
ac_add_options --with-system-zlib
|
||||||
|
# XXX: the system's libpng doesn't have APNG support
|
||||||
|
ac_add_options --without-system-png
|
||||||
|
|
||||||
# work around large debug symbols on 32-bit hosts
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
if [ "$XBPS_WORDSIZE" = "32" ]; then
|
ac_add_options --allow-addon-sideload
|
||||||
echo "ac_add_options --disable-debug-symbols" >>.mozconfig
|
|
||||||
echo "ac_add_options --disable-debug" >>.mozconfig
|
|
||||||
export LDFLAGS+=" -Wl,--no-keep-memory"
|
|
||||||
# patch the rust debug level, this is hardcoded
|
|
||||||
vsed -i 's/debug_info = "2"/debug_info = "0"/' \
|
|
||||||
build/moz.configure/toolchain.configure
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
ac_add_options $(vopt_enable dbus)
|
||||||
aarch64*|i686*|x86_64*)
|
ac_add_options $(vopt_enable dbus necko-wifi)
|
||||||
echo "ac_add_options --enable-rust-simd" >>.mozconfig ;;
|
ac_add_options --disable-audio-backends
|
||||||
esac
|
ac_add_options $(vopt_enable alsa)
|
||||||
|
ac_add_options $(vopt_enable jack)
|
||||||
|
ac_add_options $(vopt_enable pulseaudio)
|
||||||
|
ac_add_options $(vopt_enable sndio)
|
||||||
|
ac_add_options --enable-default-toolkit=$(vopt_if wayland 'cairo-gtk3-wayland' 'cairo-gtk3')
|
||||||
|
|
||||||
export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox"
|
MOZ_APP_REMOTINGNAME=Firefox
|
||||||
|
!
|
||||||
|
|
||||||
if [ "$SOURCE_DATE_EPOCH" ]; then
|
if [ "$SOURCE_DATE_EPOCH" ]; then
|
||||||
export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")
|
export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")
|
||||||
|
@ -175,22 +220,10 @@ do_build() {
|
||||||
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
||||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
||||||
|
|
||||||
export AS=$CC
|
|
||||||
|
|
||||||
cat <<! >>.mozconfig
|
|
||||||
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
|
|
||||||
ac_add_options $(vopt_enable alsa)
|
|
||||||
ac_add_options $(vopt_enable jack)
|
|
||||||
ac_add_options $(vopt_enable sndio)
|
|
||||||
ac_add_options $(vopt_enable dbus)
|
|
||||||
ac_add_options $(vopt_enable dbus necko-wifi)
|
|
||||||
ac_add_options $(vopt_enable pulseaudio)
|
|
||||||
ac_add_options --enable-default-toolkit=$(vopt_if wayland 'cairo-gtk3-wayland' 'cairo-gtk3')
|
|
||||||
!
|
|
||||||
|
|
||||||
rm -f old-configure
|
rm -f old-configure
|
||||||
./mach build
|
./mach build
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
||||||
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
||||||
|
|
Loading…
Add table
Reference in a new issue