From b1716fa5e64b88bb81c95aa3c158b5c697c091fc Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 23 Sep 2015 09:45:14 +0200 Subject: [PATCH] firefox: update to 41.0. - Re-enable jemalloc on native builds with glibc; matches other known distros. - Add another patch required by musl. - Remove obsolete patch required by musl. --- common/shlibs | 2 +- .../firefox/patches/fix-linux-include.patch | 10 --- srcpkgs/firefox/patches/fix-seccomp-bpf.patch | 14 +++++ srcpkgs/firefox/template | 62 +++++++++---------- 4 files changed, 46 insertions(+), 42 deletions(-) delete mode 100644 srcpkgs/firefox/patches/fix-linux-include.patch create mode 100644 srcpkgs/firefox/patches/fix-seccomp-bpf.patch diff --git a/common/shlibs b/common/shlibs index 6fd1b9441e4..34dc1f6d211 100644 --- a/common/shlibs +++ b/common/shlibs @@ -364,7 +364,7 @@ libpoppler-qt4.so.4 poppler-qt4-0.22.3_1 libpoppler-qt5.so.1 poppler-qt5-0.31.0_1 libtcl8.6.so tcl-8.6.0_1 libtk8.6.so tk-8.6.1_3 -libsqlite3.so.0 sqlite-3.6.13_1 +libsqlite3.so.0 sqlite-3.8.11.1_3 libIDL-2.so.0 libIDL-0.8.13_1 libnspr4.so nspr-4.8_1 libplc4.so nspr-4.8_1 diff --git a/srcpkgs/firefox/patches/fix-linux-include.patch b/srcpkgs/firefox/patches/fix-linux-include.patch deleted file mode 100644 index 0a57d3a3136..00000000000 --- a/srcpkgs/firefox/patches/fix-linux-include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- xpcom/io/nsLocalFileUnix.cpp.orig -+++ xpcom/io/nsLocalFileUnix.cpp -@@ -28,6 +28,7 @@ - #define USE_LINUX_QUOTACTL - #include - #include -+#include - #endif - - #include "xpcom-private.h" diff --git a/srcpkgs/firefox/patches/fix-seccomp-bpf.patch b/srcpkgs/firefox/patches/fix-seccomp-bpf.patch new file mode 100644 index 00000000000..ed94fc39ed0 --- /dev/null +++ b/srcpkgs/firefox/patches/fix-seccomp-bpf.patch @@ -0,0 +1,14 @@ +--- security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc.orig 2015-09-23 09:10:08.812740571 +0200 ++++ security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-09-23 09:11:38.404746155 +0200 +@@ -23,6 +23,11 @@ + #include "sandbox/linux/services/android_ucontext.h" + #endif + ++// musl libc defines siginfo_t __si_fields instead of _sifields ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#define _sifields __si_fields ++#endif ++ + namespace { + + struct arch_sigsys { diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index b2ca689dd06..e8c419017d0 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -1,14 +1,14 @@ # Template build file for 'firefox'. pkgname=firefox -version=40.0.3 -revision=3 +version=41.0 +revision=1 wrksrc="mozilla-release" short_desc="Lightweight gecko-based web browser" maintainer="Juan RP " homepage="https://www.mozilla.org/firefox/" license="MPL-1.1, GPL-2, LGPL-2.1" -distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.bz2" -checksum=56ab32bfa070a1d86d356ad14ce74252b38dab9307948de8e4a3a2b7f3f22634 +distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" +checksum=18abb95e93770ab1cc0794349125aacf073eb04fd8b8a93c7a58312c94bf16fd lib32disabled=yes @@ -22,17 +22,6 @@ makedepends="nss-devel libjpeg-turbo-devel libpng-devel depends="desktop-file-utils hicolor-icon-theme" conflicts="firefox-esr>=0" -if [ "$CROSS_BUILD" ]; then - # Make config/system_wrappers/alsa/alsalib.h and pulse/pulse.h find - # the required includes. Set system nspr and nss include paths. - CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/alsa \ - -I${XBPS_CROSS_BASE}/usr/include/pulse \ - -I${XBPS_CROSS_BASE}/usr/include/nspr \ - -I${XBPS_CROSS_BASE}/usr/include/nss" - CXXFLAGS="${CFLAGS}" - LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib" -fi - pre_configure() { case "$XBPS_TARGET_MACHINE" in *-musl) @@ -51,28 +40,39 @@ pre_configure() { [ ! -d xbps-build ] && mkdir -p xbps-build } do_configure() { - if [ "$CROSS_BUILD" ]; then - export HOST_CFLAGS="${XBPS_CFLAGS}" - export HOST_CXXFLAGS="${XBPS_CXXFLAGS}" - export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nspr -I${XBPS_CROSS_BASE}/usr/include/nss" - export CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nspr -I${XBPS_CROSS_BASE}/usr/include/nss" - - cross_args+=" --target=$XBPS_CROSS_TRIPLET" - fi - - export ac_cv_sqlite_secure_delete=yes - export ac_cv_sqlite_threadsafe=yes - export ac_cv_sqlite_enable_fts3=yes - export ac_cv_sqlite_enable_unlock_notify=yes - export ac_cv_prog_hostcxx_works=1 + local cross_args case "$XBPS_TARGET_MACHINE" in *-musl) # XXX gold linking with --hash-style=sysv results in unhidden symbols # XXX see https://sourceware.org/ml/binutils/2014-09/msg00230.html - cross_args+=" --enable-gold=no" + # + # XXX disable jemalloc. + cross_args+=" --disable-jemalloc --enable-gold=no" ;; esac + if [ "$CROSS_BUILD" ]; then + cross_args+=" --target=$XBPS_CROSS_TRIPLET --disable-jemalloc" + + # Make config/system_wrappers/alsa/alsalib.h and pulse/pulse.h find + # the required includes. Set system nspr and nss include paths. + export HOST_CFLAGS="${XBPS_CFLAGS}" + export HOST_CXXFLAGS="${XBPS_CXXFLAGS}" + export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/alsa \ + -I${XBPS_CROSS_BASE}/usr/include/pulse \ + -I${XBPS_CROSS_BASE}/usr/include/nspr \ + -I${XBPS_CROSS_BASE}/usr/include/nss" + export CXXFLAGS+=" ${CFLAGS}" + export LDFLAGS+=" -L${XBPS_CROSS_BASE}/usr/lib" + + 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 + fi + mkdir -p /usr/lib/firefox export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox" @@ -96,7 +96,7 @@ do_configure() { --with-nss-prefix=${XBPS_CROSS_BASE}/usr ${cross_args} \ --with-google-api-keyfile="${wrksrc}/google-api-key" \ --enable-optimize="$CFLAGS" --disable-strip --disable-install-strip \ - --disable-static --disable-jemalloc --enable-pie \ + --disable-static --enable-pie \ --disable-profiling --disable-profilelocking } do_build() {