From 4e653701de877fe82cf7aefd97489e162344b92a Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 2 Jun 2020 18:51:55 +0200 Subject: [PATCH] firefox: update to 77.0. - switch back to system nss - set enable-release independent of target - enable rust-simd for supported targets --- srcpkgs/firefox/files/mozconfig | 3 +++ .../patches/ppc64-be-authenticator.patch | 23 ----------------- srcpkgs/firefox/patches/rust-glslopt.patch | 13 ++++++++++ .../patches/vendor-nss-ppc64-vsx.patch | 25 ------------------- srcpkgs/firefox/template | 15 +++++++---- 5 files changed, 26 insertions(+), 53 deletions(-) delete mode 100644 srcpkgs/firefox/patches/ppc64-be-authenticator.patch create mode 100644 srcpkgs/firefox/patches/rust-glslopt.patch delete mode 100644 srcpkgs/firefox/patches/vendor-nss-ppc64-vsx.patch diff --git a/srcpkgs/firefox/files/mozconfig b/srcpkgs/firefox/files/mozconfig index e559ca711fc..8ef3d74b2a9 100644 --- a/srcpkgs/firefox/files/mozconfig +++ b/srcpkgs/firefox/files/mozconfig @@ -1,6 +1,8 @@ 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-bz2 ac_add_options --with-system-jpeg ac_add_options --with-system-zlib @@ -30,6 +32,7 @@ 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 diff --git a/srcpkgs/firefox/patches/ppc64-be-authenticator.patch b/srcpkgs/firefox/patches/ppc64-be-authenticator.patch deleted file mode 100644 index 07de244d334..00000000000 --- a/srcpkgs/firefox/patches/ppc64-be-authenticator.patch +++ /dev/null @@ -1,23 +0,0 @@ -From ccc37892133ded64a8715e84b4427d8081ddb73c Mon Sep 17 00:00:00 2001 -From: q66 -Date: Fri, 13 Mar 2020 16:11:27 +0100 -Subject: [PATCH] add ppc64 BE ioctl bindings - -these are the same as the LE ones... ---- - third_party/rust/authenticator/src/linux/ioctl_powerpc64be.rs | 3 +++ - 1 file changed, 3 insertions(+) - create mode 100644 third_party/rust/authenticator/src/linux/ioctl_powerpc64be.rs - -diff --git third_party/rust/authenticator/src/linux/ioctl_powerpc64be.rs third_party/rust/authenticator/src/linux/ioctl_powerpc64be.rs -new file mode 100644 -index 0000000..552d210 ---- /dev/null -+++ third_party/rust/authenticator/src/linux/ioctl_powerpc64be.rs -@@ -0,0 +1,3 @@ -+/* automatically generated by rust-bindgen */ -+ -+pub type __u32 = :: std :: os :: raw :: c_uint ; pub const _HIDIOCGRDESCSIZE : __u32 = 1074022401 ; pub const _HIDIOCGRDESC : __u32 = 1342457858 ; --- -2.25.1 - diff --git a/srcpkgs/firefox/patches/rust-glslopt.patch b/srcpkgs/firefox/patches/rust-glslopt.patch new file mode 100644 index 00000000000..3717caa2290 --- /dev/null +++ b/srcpkgs/firefox/patches/rust-glslopt.patch @@ -0,0 +1,13 @@ +overwrite HOST_* flags to get rid of -MF + +--- third_party/rust/glslopt/build.rs 2020-06-03 01:37:31.000000000 +0200 ++++ third_party/rust/glslopt/build.rs 2020-06-04 10:57:16.418469546 +0200 +@@ -28,6 +28,8 @@ + env::remove_var(format!("CXXFLAGS_{}", &target)); + env::remove_var(format!("CFLAGS_{}", target.replace("-", "_"))); + env::remove_var(format!("CXXFLAGS_{}", target.replace("-", "_"))); ++ env::set_var("HOST_CFLAGS", "-O2"); ++ env::set_var("HOST_CXXFLAGS", "-O2"); + + configure(&mut cc::Build::new()) + .warnings(false) diff --git a/srcpkgs/firefox/patches/vendor-nss-ppc64-vsx.patch b/srcpkgs/firefox/patches/vendor-nss-ppc64-vsx.patch deleted file mode 100644 index af4a7b81782..00000000000 --- a/srcpkgs/firefox/patches/vendor-nss-ppc64-vsx.patch +++ /dev/null @@ -1,25 +0,0 @@ -From bb8c878129e872c8a4cd3534f85486ff6c000ac2 Mon Sep 17 00:00:00 2001 -From: q66 -Date: Thu, 7 May 2020 19:18:18 +0200 -Subject: [PATCH] fix build on non-vsx ppc64 platforms - ---- - security/nss/lib/freebl/gcm.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git security/nss/lib/freebl/gcm.h security/nss/lib/freebl/gcm.h -index b2c30a7..54fb3d0 100644 ---- security/nss/lib/freebl/gcm.h -+++ security/nss/lib/freebl/gcm.h -@@ -30,7 +30,7 @@ - #include - #endif - --#if defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) -+#if defined(__powerpc64__) && defined(__VSX__) && !defined(NSS_DISABLE_ALTIVEC) - #include "altivec-types.h" - - /* The ghash freebl test tries to use this in C++, and gcc defines conflict. */ --- -2.25.1 - diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index d000f9e3c2c..643632a7fff 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -3,7 +3,7 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n". # pkgname=firefox -version=76.0.1 +version=77.0.1 revision=1 build_helper="rust" short_desc="Mozilla Firefox web browser" @@ -11,13 +11,13 @@ maintainer="Johannes " 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=f61761e32774a6bdfedd5937c4992fbe5e24c3df057c2b9a559fcd0d038777c3 +checksum=54256fc5f8e9c2e8129ef84773fae31fcfdaf95da6d4d03151f3939e9f749640 lib32disabled=yes hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo llvm clang nodejs-lts-10 cbindgen python nasm which tar" -makedepends="libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel +makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel pixman-devel libevent-devel libnotify-devel libvpx-devel libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel) @@ -25,7 +25,7 @@ makedepends="libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel $(vopt_if startup_notification startup-notification-devel) $(vopt_if xscreensaver libXScrnSaver-devel) $(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)" -depends="desktop-file-utils hicolor-icon-theme" +depends="nss>=3.47.1 desktop-file-utils hicolor-icon-theme" conflicts="firefox-esr>=0" build_options="alsa jack dbus pulseaudio startup_notification xscreensaver sndio wayland" @@ -67,6 +67,7 @@ post_extract() { post_patch() { _clear_vendor_checksums audio_thread_priority _clear_vendor_checksums num-traits + _clear_vendor_checksums glslopt } do_build() { @@ -76,7 +77,6 @@ do_build() { *-musl) echo "ac_add_options --disable-jemalloc" >>.mozconfig echo "ac_add_options --disable-gold" >>.mozconfig - echo "ac_add_options --enable-release" >>.mozconfig ;; esac @@ -140,6 +140,11 @@ do_build() { 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