diff --git a/srcpkgs/firefox/patches/fix-double-include.patch b/srcpkgs/firefox/patches/fix-double-include.patch deleted file mode 100644 index 5adfc209985..00000000000 --- a/srcpkgs/firefox/patches/fix-double-include.patch +++ /dev/null @@ -1,68 +0,0 @@ -Fixes a cross compilation error on aarch64 (possible others too): - - /builddir/firefox-62.0.3/media/webrtc/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse.c:20:22: error: redefinition of 'index_7' - ---- media/webrtc/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse.c.orig 2018-10-27 21:12:37.895516483 +0200 -+++ media/webrtc/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse.c 2018-10-27 21:13:49.208516829 +0200 -@@ -16,6 +16,8 @@ - * operation. Same for index_8. - */ - -+#ifndef __COMPLEX_BIT_REVERSE_C -+#define __COMPLEX_BIT_REVERSE_C - /* Indexes for the case of stages == 7. */ - static const int16_t index_7[112] = { - 1, 64, 2, 32, 3, 96, 4, 16, 5, 80, 6, 48, 7, 112, 9, 72, 10, 40, 11, 104, -@@ -106,3 +108,4 @@ void WebRtcSpl_ComplexBitReverse(int16_t - } - } - } -+#endif /* __COMPLEX_BIT_REVERSE_C */ ---- media/webrtc/trunk/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c.orig 2018-10-27 22:51:02.032543685 +0200 -+++ media/webrtc/trunk/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c 2018-10-27 22:50:50.567543631 +0200 -@@ -8,6 +8,8 @@ - * be found in the AUTHORS file in the root of the source tree. - */ - -+#ifndef __FILTER_AR_FAST_Q12 -+#define __FILTER_AR_FAST_Q12 - #include "webrtc/base/checks.h" - #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" - -@@ -40,3 +42,4 @@ void webrtcspl_filterarfastq12(const int - data_out[i] = (int16_t)((output + 2048) >> 12); - } - } -+#endif /* __FILTER_AR_FAST_Q12 */ ---- ./media/webrtc/trunk/webrtc/common_audio/signal_processing/spl_sqrt_floor.c.orig 2018-10-27 23:03:30.592547144 +0200 -+++ ./media/webrtc/trunk/webrtc/common_audio/signal_processing/spl_sqrt_floor.c 2018-10-27 23:04:29.741547419 +0200 -@@ -28,6 +28,8 @@ - - // Minor modifications in code style for WebRTC, 2012. - -+#ifndef __SPL_SQRT_FLOOR -+#define __SPL_SQRT_FLOOR - #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" - - /* -@@ -75,3 +77,4 @@ int32_t WebRtcSpl_SqrtFloor(int32_t valu - - return root >> 1; - } -+#endif /* __SPL_SQRT_FLOOR */ ---- ./media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c.orig 2018-10-27 23:20:58.921551910 +0200 -+++ ./media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c 2018-10-27 23:21:34.043552068 +0200 -@@ -14,6 +14,8 @@ - * - */ - -+#ifndef __LATTICE_C -+#define __LATTICE_C - #include "settings.h" - #include "signal_processing_library.h" - #include "webrtc/typedefs.h" -@@ -47,3 +49,4 @@ void WebRtcIsacfix_FilterArLoop(int16_t* - ar_g_Q0[0] = tmpAR; - } - } -+#endif /* __LATTICE_C */ diff --git a/srcpkgs/firefox/patches/fix-rust-libc-ppc64-musl.patch b/srcpkgs/firefox/patches/fix-rust-libc-ppc64-musl.patch index f16be1b307c..8b741a19791 100644 --- a/srcpkgs/firefox/patches/fix-rust-libc-ppc64-musl.patch +++ b/srcpkgs/firefox/patches/fix-rust-libc-ppc64-musl.patch @@ -1,7 +1,7 @@ ---- Cargo.toml.orig 2019-01-16 20:11:57.372185694 +0100 -+++ Cargo.toml 2019-01-16 20:13:37.474282852 +0100 -@@ -63,3 +63,4 @@ - [patch.crates-io] +--- Cargo.toml.orig 2019-01-29 11:31:40.149513234 +0100 ++++ Cargo.toml 2019-01-29 11:31:54.473374380 +0100 +@@ -59,3 +59,4 @@ libudev-sys = { path = "dom/webauthn/libudev-sys" } - serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums8" } + serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums9" } + winapi = { git = "https://github.com/froydnj/winapi-rs", branch = "aarch64" } +libc = { git = "https://github.com/rust-lang/libc", rev = "914eba137b25ece7ade3986f1e34df9cf439af22" } diff --git a/srcpkgs/firefox/patches/fix-toolkit.patch b/srcpkgs/firefox/patches/fix-toolkit.patch index 7d79879862d..a66f04bc4fc 100644 --- a/srcpkgs/firefox/patches/fix-toolkit.patch +++ b/srcpkgs/firefox/patches/fix-toolkit.patch @@ -47,18 +47,17 @@ #include #endif +--- toolkit.orig/mozapps/update/common/updatedefines.h 2019-01-29 11:34:36.416804577 +0100 ++++ toolkit/mozapps/update/common/updatedefines.h 2019-01-29 11:34:59.193583777 +0100 +@@ -102,7 +102,7 @@ ---- toolkit.orig/mozapps/update/common/updatedefines.h 2014-03-15 05:19:37.000000000 +0000 -+++ toolkit/mozapps/update/common/updatedefines.h 2014-04-17 10:24:33.793431933 +0000 -@@ -105,7 +105,7 @@ - #ifdef SOLARIS - # include + #include -#else +#elif !defined(__linux__) || defined(__GLIBC__) - # include + #include #endif - # include + #include --- toolkit.orig/mozapps/update/updater/updater.cpp 2014-03-15 05:19:37.000000000 +0000 +++ toolkit/mozapps/update/updater/updater.cpp 2014-04-17 10:24:33.796765327 +0000 @@ -3432,6 +3432,7 @@ diff --git a/srcpkgs/firefox/patches/fix-tools.patch b/srcpkgs/firefox/patches/fix-tools.patch index c3809e9a781..78abde1bd4f 100644 --- a/srcpkgs/firefox/patches/fix-tools.patch +++ b/srcpkgs/firefox/patches/fix-tools.patch @@ -9,14 +9,14 @@ #include #include #include "MainThreadUtils.h" ---- tools/profiler/lul/LulElf.cpp -+++ tools/profiler/lul/LulElf.cpp -@@ -579,10 +579,10 @@ +--- tools/profiler/lul/LulElf.cpp.orig 2019-01-29 12:05:34.223834130 +0100 ++++ tools/profiler/lul/LulElf.cpp 2019-01-29 12:08:02.480400845 +0100 +@@ -469,10 +469,10 @@ // Return the non-directory portion of FILENAME: the portion after the // last slash, or the whole filename if there are no slashes. - string BaseFileName(const string &filename) { + string BaseFileName(const string& filename) { - // Lots of copies! basename's behavior is less than ideal. -- char *c_filename = strdup(filename.c_str()); +- char* c_filename = strdup(filename.c_str()); - string base = basename(c_filename); - free(c_filename); + // basename's behavior is less than ideal so avoid it @@ -25,11 +25,11 @@ + string base = p ? p+1 : c_filename; return base; } - ---- tools/profiler/core/platform-linux-android.cpp.orig -+++ tools/profiler/core/platform-linux-android.cpp -@@ -277,7 +277,11 @@ - + +--- tools/profiler/core/platform-linux-android.cpp.orig 2019-01-29 12:09:40.980448579 +0100 ++++ tools/profiler/core/platform-linux-android.cpp 2019-01-29 12:11:09.689590967 +0100 +@@ -253,7 +253,11 @@ + // Request profiling signals. struct sigaction sa; +#if defined(GP_ARCH_arm) @@ -40,10 +40,10 @@ sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART | SA_SIGINFO; if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) { -@@ -546,9 +550,11 @@ - void - Registers::SyncPopulate() - { +@@ -497,8 +501,10 @@ + ucontext_t sSyncUContext; + + void Registers::SyncPopulate() { +#if defined(__GLIBC__) if (!getcontext(&sSyncUContext)) { PopulateRegsFromContext(*this, &sSyncUContext); @@ -51,4 +51,3 @@ +#endif } #endif - diff --git a/srcpkgs/firefox/patches/fix-webrtc-arm.patch b/srcpkgs/firefox/patches/fix-webrtc-arm.patch index 033d03d8603..541566648dc 100644 --- a/srcpkgs/firefox/patches/fix-webrtc-arm.patch +++ b/srcpkgs/firefox/patches/fix-webrtc-arm.patch @@ -1,122 +1,3 @@ ---- media/webrtc/trunk/moz.build.orig 2019-01-16 14:48:37.361278044 +0100 -+++ media/webrtc/trunk/moz.build 2019-01-16 14:49:21.637924835 +0100 -@@ -242,6 +242,18 @@ - "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn" - ] - -+ -+if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -+ -+ DIRS += [ -+ "/media/webrtc/trunk/webrtc/common_audio/common_audio_neon_c_gn", -+ "/media/webrtc/trunk/webrtc/common_audio/common_audio_neon_gn", -+ "/media/webrtc/trunk/webrtc/modules/audio_coding/isac_neon_gn", -+ "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_c_gn", -+ "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_gn", -+ "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn" -+ ] -+ - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": - - DIRS += [ - ---- media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_c_gn/moz.build.orig 2019-01-16 14:58:54.713353133 +0100 -+++ media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_c_gn/moz.build 2019-01-08 19:56:53.000000000 +0100 -@@ -71,7 +71,10 @@ - DEFINES["NO_TCMALLOC"] = True - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_X11"] = "1" -+ -+ if CONFIG["CPU_ARCH"] == "aarch64": -+ DEFINES["WEBRTC_ARCH_ARM64"] = True -+ -- DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_LINUX"] = True - - OS_LIBS += [ - ---- media/webrtc/trunk/webrtc/common_audio/common_audio_neon_c_gn/moz.build.orig 2019-01-16 15:16:36.947747240 +0100 -+++ media/webrtc/trunk/webrtc/common_audio/common_audio_neon_c_gn/moz.build 2019-01-16 15:17:22.168379111 +0100 -@@ -69,7 +69,10 @@ - DEFINES["NO_TCMALLOC"] = True - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_ARCH_ARM64"] = True -+ -+ if CONFIG["CPU_ARCH"] == "aarch64": -+ DEFINES["WEBRTC_ARCH_ARM64"] = True -+ - DEFINES["WEBRTC_LINUX"] = True - - if CONFIG["OS_TARGET"] == "NetBSD": - ---- media/webrtc/trunk/webrtc/modules/audio_coding/isac_neon_gn/moz.build.orig 2019-01-16 15:28:38.302731713 +0100 -+++ media/webrtc/trunk/webrtc/modules/audio_coding/isac_neon_gn/moz.build 2019-01-16 15:29:20.174378505 +0100 -@@ -80,7 +80,10 @@ - DEFINES["NO_TCMALLOC"] = True - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_ARCH_ARM64"] = True -+ -+ if CONFIG["CPU_ARCH"] == "aarch64": -+ DEFINES["WEBRTC_ARCH_ARM64"] = True -+ - DEFINES["WEBRTC_LINUX"] = True - - OS_LIBS += [ - ---- media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_gn/moz.build.orig 2019-01-16 15:31:28.281297859 +0100 -+++ media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_neon_gn/moz.build 2019-01-16 15:31:06.724479707 +0100 -@@ -77,7 +77,10 @@ - DEFINES["NO_TCMALLOC"] = True - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_ARCH_ARM64"] = True -+ -+ if CONFIG["CPU_ARCH"] == "aarch64": -+ DEFINES["WEBRTC_ARCH_ARM64"] = True -+ - DEFINES["WEBRTC_LINUX"] = True - - OS_LIBS += [ - ---- media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn/moz.build.orig 2019-01-16 15:32:36.700720723 +0100 -+++ media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn/moz.build 2019-01-16 15:33:08.188455104 +0100 -@@ -67,7 +67,10 @@ - DEFINES["NO_TCMALLOC"] = True - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_ARCH_ARM64"] = True -+ -+ if CONFIG["CPU_ARCH"] == "aarch64": -+ DEFINES["WEBRTC_ARCH_ARM64"] = True -+ - DEFINES["WEBRTC_LINUX"] = True - - if CONFIG["OS_TARGET"] == "NetBSD": - ---- media/webrtc/trunk/webrtc/common_audio/common_audio_c_gn/moz.build.orig 2019-01-16 16:09:33.670752803 +0100 -+++ media/webrtc/trunk/webrtc/common_audio/common_audio_c_gn/moz.build 2019-01-16 16:11:13.266888242 +0100 -@@ -140,6 +140,7 @@ - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - -+if CONFIG["OS_TARGET"] == "Linux" and CONFIG["CPU_ARCH"] != "arm": - UNIFIED_SOURCES += [ - "/media/webrtc/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/media/webrtc/trunk/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c", ---- media/webrtc/trunk/webrtc/modules/audio_coding/isac_fix_c_gn/moz.build.orig 2019-01-16 16:31:03.781907299 +0100 -+++ media/webrtc/trunk/webrtc/modules/audio_coding/isac_fix_c_gn/moz.build 2019-01-16 16:30:44.106080812 +0100 -@@ -142,6 +142,8 @@ - "rt" - ] - -+if CONFIG["OS_TARGET"] == "Linux" and CONFIG["CPU_ARCH"] != "arm": -+ - SOURCES += [ - "/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c" - ] - --- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features.cc.orig 2019-01-16 16:52:42.676473795 +0100 +++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features.cc 2019-01-16 16:54:22.595598235 +0100 @@ -67,7 +67,7 @@ diff --git a/srcpkgs/firefox/patches/fix-webrtc-glibcisms.patch b/srcpkgs/firefox/patches/fix-webrtc-glibcisms.patch index 0249ce58803..cf895dd8448 100644 --- a/srcpkgs/firefox/patches/fix-webrtc-glibcisms.patch +++ b/srcpkgs/firefox/patches/fix-webrtc-glibcisms.patch @@ -1,25 +1,20 @@ ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2018-12-07 03:57:04.000000000 +0100 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2019-01-06 19:39:01.798166351 +0100 -@@ -11,7 +11,9 @@ - #include - #include - #include +--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2019-01-29 11:20:52.298793223 +0100 ++++ media/webrtc/trunk/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 + #endif -#if __GLIBC_PREREQ(2, 16) -+#if !__GLIBC__ -+#include -+#elif __GLIBC_PREREQ(2, 16) ++#if !__GLIBC__ || __GLIBC_PREREQ(2, 16) #include #else #include -@@ -29,7 +31,10 @@ +@@ -32,7 +32,7 @@ int architecture = 0; unsigned long hwcap = 0; const char* platform = NULL; -#if __GLIBC_PREREQ(2, 16) -+#if !__GLIBC__ -+ hwcap = getauxval(AT_HWCAP); -+ platform = (const char*)getauxval(AT_PLATFORM); -+#elif __GLIBC_PREREQ(2, 16) ++#if !__GLIBC__ || __GLIBC_PREREQ(2, 16) hwcap = getauxval(AT_HWCAP); platform = (const char*)getauxval(AT_PLATFORM); #else diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index 2e0c11083df..93214ae5165 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -3,14 +3,15 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n". # pkgname=firefox -version=64.0.2 -revision=3 +version=65.0 +revision=1 +build_helper="rust" short_desc="Mozilla Firefox web browser" maintainer="Juan RP " license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://www.mozilla.org/firefox/" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" -checksum=34cf115a4eeb4d73f7199396bb3a5d5843c8c455eae4213bf451c4db88768f1f +checksum=75b1b14605d63e8c83b60e0a4020cdb75b8671fb646959da865cbead0c2b466d lib32disabled=yes @@ -62,13 +63,6 @@ do_build() { ;; esac - case "$XBPS_TARGET_MACHINE" in - x86_64-musl|i686-musl) - echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig - echo "ac_add_options --target=${XBPS_TRIPLET}" >>.mozconfig - ;; - esac - case "$XBPS_TARGET_MACHINE" in x86_64*|i686*|arm*) echo "ac_add_options --disable-elf-hack" >>.mozconfig @@ -76,16 +70,6 @@ do_build() { esac if [ "$CROSS_BUILD" ]; then - cat >> .cargo/config.in <&1 | \ sed -n '/#include <...> search starts here:/,/End of search list./p' | \ sed '1,1d;$d' | sed 's/^ /-I/' | paste -s ) @@ -102,7 +86,17 @@ EOF ac_cv_sqlite_dbstat_vtab=yes \ ac_cv_sqlite_enable_unlock_notify=yes \ ac_cv_prog_hostcxx_works=1 + + case "$XBPS_TARGET_MACHINE" in + *-musl) _host_triplet=${XBPS_MACHINE%-musl}-unknown-linux-musl;; + *) _host_triplet=${XBPS_MACHINE}-unknwon-linux-gnu;; + esac + echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig + echo "ac_add_options --host=$_host_triplet" >>.mozconfig + else + echo "ac_add_options --target=$XBPS_TRIPLET" >>.mozconfig + echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig fi mkdir -p third_party/rust/libloading/.deps @@ -118,6 +112,13 @@ EOF ;; esac + case "$XBPS_MACHINE" in + i686*) + # ENOMEM + echo "ac_add_options --disable-debug-symbols" >>.mozconfig + ;; + esac + export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox" if [ "$SOURCE_DATE_EPOCH" ]; then