firefox-esr: update to 102.3.0.
Co-authored-by: Duncaen <duncaen@voidlinux.org>
This commit is contained in:
parent
27254c70cd
commit
4f1daf96be
|
@ -0,0 +1,22 @@
|
|||
Fix error with new cbindgen:
|
||||
|
||||
/builddir/firefox-102.1.0/obj-x86_64-unknown-linux-gnu/dist/include/mozilla/webrender/webrender_ffi_generated.h:24:33: error: redefinition of 'constexpr const uint64_t mozilla::wr::ROOT_CLIP_CHAIN'
|
||||
24 | constexpr static const uint64_t ROOT_CLIP_CHAIN = ~0;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
/builddir/firefox-102.1.0/obj-x86_64-unknown-linux-gnu/dist/include/mozilla/webrender/webrender_ffi.h:76:16: note: 'const uint64_t mozilla::wr::ROOT_CLIP_CHAIN' previously defined here
|
||||
76 | const uint64_t ROOT_CLIP_CHAIN = ~0;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
|
||||
diff --git a/gfx/webrender_bindings/webrender_ffi.h b/gfx/webrender_bindings/webrender_ffi.h
|
||||
index b1d67b17a4bde..eb79974bdf434 100644
|
||||
--- a/gfx/webrender_bindings/webrender_ffi.h
|
||||
+++ b/gfx/webrender_bindings/webrender_ffi.h
|
||||
@@ -73,8 +73,6 @@ struct WrPipelineInfo;
|
||||
struct WrPipelineIdAndEpoch;
|
||||
using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
|
||||
|
||||
-const uint64_t ROOT_CLIP_CHAIN = ~0;
|
||||
-
|
||||
} // namespace wr
|
||||
} // namespace mozilla
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/taskcluster/docker/firefox-snap/firefox.desktop 2019-01-18 19:31:39.428839442 +0100
|
||||
+++ b/taskcluster/docker/firefox-snap/firefox.desktop 2019-01-18 19:32:20.689063456 +0100
|
||||
@@ -154,7 +154,7 @@
|
||||
--- a/taskcluster/docker/firefox-snap/firefox.desktop
|
||||
+++ b/taskcluster/docker/firefox-snap/firefox.desktop
|
||||
@@ -154,11 +154,12 @@
|
||||
Terminal=false
|
||||
X-MultipleArgs=false
|
||||
Type=Application
|
||||
|
@ -9,3 +9,8 @@
|
|||
Categories=GNOME;GTK;Network;WebBrowser;
|
||||
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
|
||||
StartupNotify=true
|
||||
Actions=NewWindow;NewPrivateWindow;
|
||||
+StartupWMClass=Firefox
|
||||
|
||||
[Desktop Action NewWindow]
|
||||
Name=Open a New Window
|
|
@ -7,7 +7,7 @@
|
|||
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
|
||||
*/
|
||||
|
||||
+#if defined(__linux__) && defined(__i386__)
|
||||
+#if defined(__linux__) && defined(__i386__) && !defined(__clang__)
|
||||
+// rely on glibc's double_t
|
||||
+typedef long double __double_t;
|
||||
+#else
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
--- a/tools/profiler/core/platform-linux-android.cpp 2019-01-29 12:09:40.980448579 +0100
|
||||
+++ b/tools/profiler/core/platform-linux-android.cpp 2019-01-29 12:11:09.689590967 +0100
|
||||
@@ -497,8 +501,10 @@
|
||||
ucontext_t sSyncUContext;
|
||||
|
||||
void Registers::SyncPopulate() {
|
||||
+#if defined(__GLIBC__)
|
||||
if (!getcontext(&sSyncUContext)) {
|
||||
PopulateRegsFromContext(*this, &sSyncUContext);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
#endif
|
|
@ -1,20 +1,20 @@
|
|||
--- a/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c 2019-01-29 11:20:52.298793223 +0100
|
||||
+++ b/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c 2019-01-29 11:21:48.250250850 +0100
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef __GLIBC_PREREQ
|
||||
#define __GLIBC_PREREQ(a, b) 0
|
||||
--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
+++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
@@ -18,7 +18,7 @@
|
||||
#define WEBRTC_GLIBC_PREREQ(a, b) 0
|
||||
#endif
|
||||
-#if __GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
|
||||
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
#include <sys/auxv.h>
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <errno.h>
|
||||
@@ -40,7 +40,7 @@
|
||||
int architecture = 0;
|
||||
unsigned long hwcap = 0;
|
||||
uint64_t hwcap = 0;
|
||||
const char* platform = NULL;
|
||||
-#if __GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
hwcap = getauxval(AT_HWCAP);
|
||||
platform = (const char*)getauxval(AT_PLATFORM);
|
||||
#else
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -30,27 +30,3 @@ diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
|
|||
mCanvas->saveLayer(saveRec);
|
||||
|
||||
SetPermitSubpixelAA(aOpaque);
|
||||
--- a/gfx/layers/composite/CompositableHost.cpp
|
||||
+++ b/gfx/layers/composite/CompositableHost.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "ImageHost.h" // for ImageHostBuffered, etc
|
||||
#include "Layers.h"
|
||||
#include "TiledContentHost.h" // for TiledContentHost
|
||||
+#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/gfx/gfxVars.h"
|
||||
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
|
||||
#include "mozilla/layers/TextureHost.h" // for TextureHost, etc
|
||||
@@ -92,9 +93,13 @@ bool CompositableHost::AddMaskEffect(EffectChain& aEffects,
|
||||
}
|
||||
MOZ_ASSERT(source);
|
||||
|
||||
+ // Setting an alpha-mask here breaks the URL-bar on big endian (s390x)
|
||||
+ // if the typed URL is too long for the textbox (automatic scrolling needed)
|
||||
+#if MOZ_LITTLE_ENDIAN()
|
||||
RefPtr<EffectMask> effect =
|
||||
new EffectMask(source, source->GetSize(), aTransform);
|
||||
aEffects.mSecondaryEffects[EffectTypes::MASK] = effect;
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
--- a/old-configure.in
|
||||
+++ b/old-configure.in
|
||||
@@ -2818,6 +2818,22 @@
|
||||
_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
|
||||
fi
|
||||
|
||||
+dnl ==================================
|
||||
+dnl = Check sndio availability
|
||||
+dnl ==================================
|
||||
+
|
||||
+MOZ_ARG_ENABLE_BOOL(sndio,
|
||||
+[ --enable-sndio Enable sndio support],
|
||||
+ MOZ_SNDIO=1,
|
||||
+ MOZ_SNDIO=)
|
||||
+
|
||||
+if test -n "$MOZ_SNDIO"; then
|
||||
+ MOZ_SNDIO_LIBS="-lsndio"
|
||||
+ AC_SUBST_LIST(MOZ_SNDIO_LIBS)
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST(MOZ_SNDIO)
|
||||
+
|
||||
dnl ========================================================
|
||||
dnl =
|
||||
dnl = Maintainer debug option (no --enable equivalent)
|
||||
--- a/media/libcubeb/src/moz.build
|
||||
+++ b/media/libcubeb/src/moz.build
|
||||
@@ -44,11 +44,13 @@
|
||||
]
|
||||
DEFINES['USE_JACK'] = True
|
||||
|
||||
-if CONFIG['OS_ARCH'] == 'OpenBSD':
|
||||
+if CONFIG['MOZ_SNDIO']:
|
||||
SOURCES += [
|
||||
'cubeb_sndio.c',
|
||||
]
|
||||
DEFINES['USE_SNDIO'] = True
|
||||
+
|
||||
+if CONFIG['OS_ARCH'] == 'OpenBSD':
|
||||
DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Darwin':
|
||||
--- a/build/moz.configure/old.configure 2020-06-30 12:17:04.087609070 +0200
|
||||
+++ b/build/moz.configure/old.configure 2020-06-30 12:17:04.087609070 +0200
|
||||
@@ -88,6 +88,7 @@
|
||||
@old_configure_options(
|
||||
"--cache-file",
|
||||
"--datadir",
|
||||
+ "--enable-sndio",
|
||||
"--enable-crashreporter",
|
||||
"--enable-dbus",
|
||||
"--enable-debug-js-modules",
|
|
@ -0,0 +1,55 @@
|
|||
From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Fri, 23 Sep 2022 02:38:29 +0200
|
||||
Subject: [PATCH] fix sqlite3 on ppc with clang
|
||||
|
||||
The __ppc__ macro is always defined on clang but not gcc, which
|
||||
results in sqlite mistakenly thinking that ppc64le with clang
|
||||
is big endian.
|
||||
|
||||
Also disable some inline assembly stuff on ppc that is never used
|
||||
with gcc and probably was never tested with modern machines.
|
||||
---
|
||||
third_party/sqlite3/src/sqlite3.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/third_party/sqlite3/src/sqlite3.c b/third_party/sqlite3/src/sqlite3.c
|
||||
index 4f3dc68..9017062 100644
|
||||
--- a/third_party/sqlite3/src/sqlite3.c
|
||||
+++ b/third_party/sqlite3/src/sqlite3.c
|
||||
@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
|
||||
# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
|
||||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
|
||||
- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
|
||||
+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(__LITTLE_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 1234
|
||||
-# elif defined(sparc) || defined(__ppc__) || \
|
||||
+# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
|
||||
defined(__ARMEB__) || defined(__AARCH64EB__)
|
||||
# define SQLITE_BYTEORDER 4321
|
||||
# else
|
||||
@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt);
|
||||
return val;
|
||||
}
|
||||
|
||||
-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
|
||||
+#elif 0
|
||||
|
||||
__inline__ sqlite_uint64 sqlite3Hwtime(void){
|
||||
unsigned long long retval;
|
||||
@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
|
||||
#if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
|
||||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
|
||||
- defined(__arm__)
|
||||
+ defined(__arm__) || defined(__LITTLE_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 1234
|
||||
-#elif defined(sparc) || defined(__ppc__)
|
||||
+#elif defined(sparc) || defined(__BIG_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 4321
|
||||
#else
|
||||
# define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
|
||||
--
|
||||
2.37.3
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-esr-i18n".
|
||||
#
|
||||
pkgname=firefox-esr
|
||||
version=91.10.0
|
||||
version=102.3.0
|
||||
revision=1
|
||||
wrksrc="firefox-${version}"
|
||||
build_helper="rust"
|
||||
|
@ -11,27 +11,28 @@ short_desc="Mozilla Firefox web browser - Extended Support Release"
|
|||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
|
||||
homepage="https://www.mozilla.org/firefox/"
|
||||
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz
|
||||
https://github.com/chmeeedalf/gecko-dev/files/7729086/esrppcjit.tar.gz"
|
||||
checksum="825a8cb38bb5da9821ef87cc6de64af007cf0faef07c4ed0651283b56a0ee1bb
|
||||
5e926a8be5d6d4949c3bc3eb98e2103692eaa26a98928db432b1d44b535f7241"
|
||||
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
|
||||
checksum=308e23b6dcf964e342cf95fd0c8a386127371b620a489ae26e537d728341b55a
|
||||
|
||||
lib32disabled=yes
|
||||
|
||||
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
|
||||
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
|
||||
libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel)
|
||||
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
||||
$(vopt_if xscreensaver libXScrnSaver-devel)
|
||||
libXdamage-devel freetype-devel libatomic-devel
|
||||
$(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel)
|
||||
$(vopt_if pulseaudio pulseaudio-devel) $(vopt_if xscreensaver libXScrnSaver-devel)
|
||||
$(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)"
|
||||
depends="nss>=3.66 nspr>=4.32 desktop-file-utils hicolor-icon-theme"
|
||||
depends="nss>=3.72 nspr>=4.32 desktop-file-utils hicolor-icon-theme"
|
||||
conflicts="firefox>=0"
|
||||
|
||||
build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland"
|
||||
build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland"
|
||||
build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland lto clang"
|
||||
build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland clang"
|
||||
|
||||
desc_option_lto="Enable Link Time Optimization"
|
||||
desc_option_clang="Build with clang"
|
||||
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
armv[56]*) broken="required NEON extensions are not supported on armv6" ;;
|
||||
|
@ -39,16 +40,6 @@ case $XBPS_TARGET_MACHINE in
|
|||
ppc*) broken="xptcall bitrot" ;;
|
||||
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
|
||||
# crates when it builds and gives us no way to override or update the
|
||||
# file sanely... so just clear out the file list
|
||||
|
@ -63,101 +54,174 @@ post_extract() {
|
|||
;;
|
||||
esac
|
||||
|
||||
# ppc64le jit, see --enable-jit later
|
||||
mv ../js/src/jit/ppc64 js/src/jit
|
||||
|
||||
# Mozilla API keys (see https://location.services.mozilla.com/api)
|
||||
# Note: This is for Void Linux use ONLY.
|
||||
echo -n "cd894504-7a2a-4263-abff-ff73ee89ffca" > mozilla-api-key
|
||||
}
|
||||
|
||||
post_patch() {
|
||||
_clear_vendor_checksums num-traits
|
||||
: # _clear_vendor_checksums num-traits
|
||||
}
|
||||
|
||||
do_build() {
|
||||
cp "${FILESDIR}/mozconfig" "${wrksrc}/.mozconfig"
|
||||
if [ "$build_option_clang" ]; then
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
echo "ac_add_options --disable-jemalloc" >>.mozconfig
|
||||
echo "ac_add_options --disable-gold" >>.mozconfig
|
||||
;;
|
||||
esac
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
mkdir -p wrapper
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|i686*|arm*)
|
||||
echo "ac_add_options --disable-elf-hack" >>.mozconfig
|
||||
;;
|
||||
esac
|
||||
local gcc_version=$(gcc -dumpversion)
|
||||
local clang_version=$(clang -dumpversion)
|
||||
|
||||
# webrtc currently fails to build on 32-bit ppc...
|
||||
# also enable jit on ppc64le, which is patched in earlier
|
||||
# https://www.talospace.com/2021/12/91esr-with-baseline-compilerbaseline.html
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*) echo "ac_add_options --enable-jit" >>.mozconfig ;;
|
||||
ppc64*) echo "ac_add_options --disable-jit" >>.mozconfig ;;
|
||||
ppc*)
|
||||
echo "ac_add_options --disable-jit" >>.mozconfig
|
||||
echo "ac_add_options --disable-webrtc" >>.mozconfig
|
||||
;;
|
||||
esac
|
||||
cat <<-! >"wrapper/${XBPS_TARGET_MACHINE}-clang"
|
||||
#!/bin/sh
|
||||
exec clang \
|
||||
--target="${XBPS_CROSS_TRIPLET}" \
|
||||
--gcc-toolchain=/usr \
|
||||
--sysroot="${XBPS_CROSS_BASE}" \
|
||||
-nostdinc \
|
||||
-isystem "${XBPS_CROSS_BASE}/usr/include" \
|
||||
-isystem "/usr/lib/clang/${clang_version}/include" \
|
||||
"\$@"
|
||||
!
|
||||
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
export LDFLAGS+=" -latomic"
|
||||
cat <<-! >"wrapper/${XBPS_TARGET_MACHINE}-clang++"
|
||||
#!/bin/sh
|
||||
exec clang++ \
|
||||
--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
|
||||
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
export HOST_CC=clang
|
||||
export HOST_CXX=clang++
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
BINDGEN_INCLUDE_FLAGS=$( $CPP -x c++ -v /dev/null -o /dev/null 2>&1 | \
|
||||
sed -n '/#include <...> search starts here:/,/End of search list./p' | \
|
||||
sed '1,1d;$d' | sed 's/^ /-I/' | paste -s )
|
||||
export AS="${CC}"
|
||||
export CFLAGS="-O2"
|
||||
export CXXFLAGS="-O2"
|
||||
export HOST_CFLAGS=""
|
||||
export HOST_CXXFLAGS=""
|
||||
export LDFLAGS="-Wl,-rpath=/usr/lib/firefox"
|
||||
# export LDFLAGS+="-Wl,--threads=${XBPS_MAKEJOBS}"
|
||||
|
||||
export BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
|
||||
--sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
|
||||
export HOST_CC=cc
|
||||
export TARGET_CC="${CC}"
|
||||
export HOST_CFLAGS="${XBPS_CFLAGS}"
|
||||
export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
|
||||
export ac_cv_sqlite_secure_delete=yes \
|
||||
ac_cv_sqlite_threadsafe=yes \
|
||||
ac_cv_sqlite_enable_fts3=yes \
|
||||
ac_cv_sqlite_dbstat_vtab=yes \
|
||||
ac_cv_sqlite_enable_unlock_notify=yes \
|
||||
ac_cv_prog_hostcxx_works=1
|
||||
disable_jemalloc() {
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
echo "ac_add_options --disable-jemalloc"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig
|
||||
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
|
||||
else
|
||||
echo "ac_add_options --target=$XBPS_TRIPLET" >>.mozconfig
|
||||
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
|
||||
fi
|
||||
disable_elfhack() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|i686*|arm*|aarch64*) echo "ac_add_options --disable-elf-hack" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
mkdir -p third_party/rust/libloading/.deps
|
||||
disable_webrtc() {
|
||||
# it seems mozilla has started catching up with google's webrtc
|
||||
# and this newly involves introducing several megabytes of generated
|
||||
# json junk that we just cannot maintain in-tree, additionally they
|
||||
# have indicated that they will be re-generating these frequently
|
||||
#
|
||||
# it is unacceptable to keep a 7MB patch downstream, so disable it
|
||||
#
|
||||
# https://phabricator.services.mozilla.com/D134738
|
||||
#
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*|armv7l*) echo "ac_add_options --disable-webrtc" ;;
|
||||
esac
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv7*)
|
||||
export CFLAGS+=" -mfpu=neon -Wno-psabi"
|
||||
export CXXFLAGS+=" -mfpu=neon -Wno-psabi"
|
||||
;;
|
||||
esac
|
||||
# third_party/libwebrtc/common_audio/wav_file.cc:93:2: error:
|
||||
# #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
|
||||
}
|
||||
|
||||
cat <<-! >.mozconfig
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --libdir=/usr/lib
|
||||
ac_add_options --host=${XBPS_TRIPLET}
|
||||
ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}
|
||||
ac_add_options --enable-linker=$(vopt_if clang lld bfd)
|
||||
$(vopt_if lto 'ac_add_options --enable-lto=cross')
|
||||
$(vopt_if clang 'ac_add_options --with-libclang-path=/usr/lib')
|
||||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-release
|
||||
ac_add_options --enable-hardening
|
||||
ac_add_options --enable-optimize="\${CFLAGS}"
|
||||
ac_add_options --enable-path-remapping=c,rust
|
||||
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
|
||||
$(disable_jemalloc)
|
||||
$(disable_elfhack)
|
||||
$(disable_webrtc)
|
||||
|
||||
# XXX: wasi currently not ready
|
||||
# ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
|
||||
ac_add_options --without-wasm-sandboxed-libraries
|
||||
|
||||
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
|
||||
|
||||
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-webp
|
||||
ac_add_options --with-system-zlib
|
||||
# XXX: the system's libpng doesn't have APNG support
|
||||
ac_add_options --without-system-png
|
||||
|
||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||
ac_add_options --allow-addon-sideload
|
||||
|
||||
ac_add_options $(vopt_enable dbus)
|
||||
ac_add_options $(vopt_enable dbus necko-wifi)
|
||||
ac_add_options --disable-audio-backends
|
||||
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')
|
||||
|
||||
MOZ_APP_REMOTINGNAME=Firefox
|
||||
!
|
||||
|
||||
# work around large debug symbols on 32-bit hosts
|
||||
if [ "$XBPS_WORDSIZE" = "32" ]; then
|
||||
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
|
||||
aarch64*|i686*|x86_64*)
|
||||
echo "ac_add_options --enable-rust-simd" >>.mozconfig ;;
|
||||
esac
|
||||
|
||||
export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox"
|
||||
|
||||
if [ "$SOURCE_DATE_EPOCH" ]; then
|
||||
export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")
|
||||
fi
|
||||
|
@ -165,26 +229,15 @@ do_build() {
|
|||
export MOZ_MAKE_FLAGS="${makejobs}"
|
||||
export MOZ_NOSPAM=1
|
||||
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
||||
export MACH_USE_SYSTEM_PYTHON=1
|
||||
|
||||
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')
|
||||
!
|
||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
||||
|
||||
rm -f old-configure
|
||||
./mach build
|
||||
}
|
||||
|
||||
do_install() {
|
||||
export MACH_USE_SYSTEM_PYTHON=1
|
||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
|
||||
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
|
||||
DESTDIR="$DESTDIR" ./mach install
|
||||
|
||||
vinstall ${FILESDIR}/vendor.js 644 usr/lib/firefox/browser/defaults/preferences
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
commit 214967e5cea61ff49fb21810e8d8c755db84f682
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Tue Oct 4 11:53:06 2022 +0200
|
||||
|
||||
fix libwebrtc on ppc64
|
||||
|
||||
diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build
|
||||
index 8579f8b..d9ca79d 100644
|
||||
--- a/third_party/libwebrtc/moz.build
|
||||
+++ b/third_party/libwebrtc/moz.build
|
||||
@@ -520,7 +520,10 @@ if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
|
||||
"/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
|
||||
"/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn",
|
||||
"/third_party/libwebrtc/modules/audio_coding/isac_c_gn",
|
||||
- "/third_party/libwebrtc/modules/audio_coding/isac_gn"
|
||||
+ "/third_party/libwebrtc/modules/audio_coding/isac_gn",
|
||||
+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn",
|
||||
+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
|
||||
+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
|
||||
]
|
||||
|
||||
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
|
|
@ -145,7 +145,7 @@ do_build() {
|
|||
# https://phabricator.services.mozilla.com/D134738
|
||||
#
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*|armv7l*) echo "ac_add_options --disable-webrtc" ;;
|
||||
armv7l*) echo "ac_add_options --disable-webrtc" ;;
|
||||
esac
|
||||
|
||||
# third_party/libwebrtc/common_audio/wav_file.cc:93:2: error:
|
||||
|
|
Loading…
Reference in New Issue