From 6bdf393fcae493171dfb62251b3dca75db4916e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Thu, 20 Apr 2017 08:12:11 +0200 Subject: [PATCH] icecat: update to 52.0.2 --- srcpkgs/icecat/files/mozconfig | 48 +++++ .../patches/disable-hunspell_hooks.patch | 11 + srcpkgs/icecat/patches/fix-gcc-tests.patch | 26 --- .../patches/fix-gcc6-cpluplus_scope.patch | 15 -- srcpkgs/icecat/patches/fix-python-foo.patch | 23 ++ srcpkgs/icecat/patches/fix-toolkit.patch | 42 ++-- srcpkgs/icecat/patches/fix-tools.patch | 38 ---- srcpkgs/icecat/patches/libevent.patch | 34 --- srcpkgs/icecat/patches/mallinfo.patch | 18 ++ .../patches/patch-xpcom_components_Module.h | 15 -- srcpkgs/icecat/patches/stat.patch | 25 --- srcpkgs/icecat/template | 198 ++++++------------ 12 files changed, 184 insertions(+), 309 deletions(-) create mode 100644 srcpkgs/icecat/files/mozconfig create mode 100644 srcpkgs/icecat/patches/disable-hunspell_hooks.patch delete mode 100644 srcpkgs/icecat/patches/fix-gcc-tests.patch delete mode 100644 srcpkgs/icecat/patches/fix-gcc6-cpluplus_scope.patch create mode 100644 srcpkgs/icecat/patches/fix-python-foo.patch delete mode 100644 srcpkgs/icecat/patches/libevent.patch create mode 100644 srcpkgs/icecat/patches/mallinfo.patch delete mode 100644 srcpkgs/icecat/patches/patch-xpcom_components_Module.h delete mode 100644 srcpkgs/icecat/patches/stat.patch diff --git a/srcpkgs/icecat/files/mozconfig b/srcpkgs/icecat/files/mozconfig new file mode 100644 index 00000000000..ac3ab4f26d9 --- /dev/null +++ b/srcpkgs/icecat/files/mozconfig @@ -0,0 +1,48 @@ +ac_add_options --prefix=/usr +ac_add_options --libdir=/usr/lib + +ac_add_options --with-pthreads +# XXX build without system cairo see: +# - https://github.com/voidlinux/void-packages/issues/2308#issuecomment-135426813 +# - https://bugs.gentoo.org/show_bug.cgi?id=558150 +# ac_add_options --with-system-cairo +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 +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-hunspell +ac_add_options --enable-system-sqlite +ac_add_options --enable-system-ffi + +ac_add_options --with-nspr-prefix=${XBPS_CROSS_BASE}/usr +ac_add_options --with-nss-prefix=${XBPS_CROSS_BASE}/usr + +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-gconf +ac_add_options --disable-tests +ac_add_options --disable-crashreporter +ac_add_options --disable-updater +ac_add_options --disable-elf-hack +ac_add_options --disable-install-strip +ac_add_options --disable-strip +ac_add_options --disable-profiling +ac_add_options --enable-optimize="$CFLAGS" +ac_add_options --enable-pie + +ac_add_options --enable-official-branding +ac_add_options --enable-safe-browsing +ac_add_options --enable-application=browser diff --git a/srcpkgs/icecat/patches/disable-hunspell_hooks.patch b/srcpkgs/icecat/patches/disable-hunspell_hooks.patch new file mode 100644 index 00000000000..a5f7c29f2bd --- /dev/null +++ b/srcpkgs/icecat/patches/disable-hunspell_hooks.patch @@ -0,0 +1,11 @@ +--- mozilla-config.h.in 2016-07-06 15:16:06.621880293 +0200 ++++ mozilla-config.h.in 2016-07-06 15:16:42.958428126 +0200 +@@ -54,7 +54,7 @@ + * HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/Makefile.in, + * unless --enable-system-hunspell is defined. + */ +-#if defined(HUNSPELL_STATIC) ++#if 0 + #include "hunspell_alloc_hooks.h" + #include "hunspell_fopen_hooks.h" + #endif diff --git a/srcpkgs/icecat/patches/fix-gcc-tests.patch b/srcpkgs/icecat/patches/fix-gcc-tests.patch deleted file mode 100644 index 90856346bea..00000000000 --- a/srcpkgs/icecat/patches/fix-gcc-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- configure.orig 2015-05-29 18:30:41.474423097 +0200 -+++ configure 2015-05-29 18:30:53.451550589 +0200 -@@ -10966,8 +10966,8 @@ ac_have_llvm_pr8927="no" - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. - ac_cpp='$CPP $CPPFLAGS' --ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -+ac_compile='${CC-cc} -c conftest.$ac_ext 1>&5' -+ac_link='${CC-cc} -o conftest${ac_exeext} conftest.$ac_ext $LIBS 1>&5' - cross_compiling=$ac_cv_prog_cc_cross - - ---- js/src/configure.orig 2015-05-29 18:31:25.049874012 +0200 -+++ js/src/configure 2015-05-29 18:31:36.898995291 +0200 -@@ -9820,8 +9820,8 @@ ac_have_llvm_pr8927="no" - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. - ac_cpp='$CPP $CPPFLAGS' --ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -+ac_compile='${CC-cc} -c conftest.$ac_ext 1>&5' -+ac_link='${CC-cc} -o conftest${ac_exeext} conftest.$ac_ext $LIBS 1>&5' - cross_compiling=$ac_cv_prog_cc_cross - - diff --git a/srcpkgs/icecat/patches/fix-gcc6-cpluplus_scope.patch b/srcpkgs/icecat/patches/fix-gcc6-cpluplus_scope.patch deleted file mode 100644 index f472be6e1eb..00000000000 --- a/srcpkgs/icecat/patches/fix-gcc6-cpluplus_scope.patch +++ /dev/null @@ -1,15 +0,0 @@ -Add patch to to correct the source to be compatible with gcc6 by -preventing c++ scope errors. - ---- nsprpub/config/make-system-wrappers.pl 2016-05-12 19:10:05.000000000 +0200 -+++ nsprpub/config/make-system-wrappers.pl 2016-09-17 15:03:53.901400739 +0200 -@@ -19,7 +19,9 @@ - open OUT, ">$output_dir/$_"; - print OUT "#pragma GCC system_header\n"; # suppress include_next warning - print OUT "#pragma GCC visibility push(default)\n"; -+ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#include_next \<$_\>\n"; -+ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#pragma GCC visibility pop\n"; - close OUT; - } diff --git a/srcpkgs/icecat/patches/fix-python-foo.patch b/srcpkgs/icecat/patches/fix-python-foo.patch new file mode 100644 index 00000000000..58505775f23 --- /dev/null +++ b/srcpkgs/icecat/patches/fix-python-foo.patch @@ -0,0 +1,23 @@ +reverted from https://hg.mozilla.org/mozilla-central/rev/aa63a2a40325 +--- dom/bindings/GenerateCSS2PropertiesWebIDL.py.orig ++++ dom/bindings/GenerateCSS2PropertiesWebIDL.py +@@ -16,7 +16,7 @@ + return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs), + propName) + def generate(output, idlFilename, preprocessorHeader): +- cpp = list(buildconfig.substs['CPP']) ++ cpp = shellutil.split(buildconfig.substs['CPP']) + cpp += shellutil.split(buildconfig.substs['ACDEFINES']) + cpp.append(preprocessorHeader) + preprocessed = subprocess.check_output(cpp) +--- layout/style/GenerateCSSPropsGenerated.py.orig ++++ layout/style/GenerateCSSPropsGenerated.py +@@ -10,7 +10,7 @@ + from mozbuild import shellutil + + def get_properties(preprocessorHeader): +- cpp = list(buildconfig.substs['CPP']) ++ cpp = shellutil.split(buildconfig.substs['CPP']) + cpp += shellutil.split(buildconfig.substs['ACDEFINES']) + cpp.append(preprocessorHeader) + preprocessed = subprocess.check_output(cpp) diff --git a/srcpkgs/icecat/patches/fix-toolkit.patch b/srcpkgs/icecat/patches/fix-toolkit.patch index b5575335374..7d79879862d 100644 --- a/srcpkgs/icecat/patches/fix-toolkit.patch +++ b/srcpkgs/icecat/patches/fix-toolkit.patch @@ -1,3 +1,18 @@ +--- toolkit.orig/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h.orig 2016-07-05 21:00:03.672000517 +0200 ++++ toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2016-07-05 21:05:37.347806230 +0200 +@@ -1134,6 +1134,12 @@ + #ifndef __NR_fallocate + #define __NR_fallocate 285 + #endif ++ ++#undef __NR_pread ++#define __NR_pread __NR_pread64 ++#undef __NR_pwrite ++#define __NR_pwrite __NR_pwrite64 ++ + /* End of x86-64 definitions */ + #elif defined(__mips__) + #if _MIPS_SIM == _MIPS_SIM_ABI32 --- toolkit.orig/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2014-03-15 05:19:36.000000000 +0000 +++ toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2014-04-17 10:24:33.793431933 +0000 @@ -45,6 +45,7 @@ @@ -23,29 +38,16 @@ namespace google_breakpad { --- toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.h 2014-03-15 05:19:36.000000000 +0000 +++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h 2014-04-17 10:24:33.793431933 +0000 -@@ -53,9 +53,10 @@ - #include - #endif - --#ifdef HAVE_A_OUT_H -+#if 0 - #include - #endif -+ +@@ -55,7 +55,7 @@ + #ifdef HAVE_MACH_O_NLIST_H #include +-#elif defined(HAVE_A_OUT_H) ++#elif 0 + #include #endif ---- toolkit.orig/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2014-03-15 05:19:37.000000000 +0000 -+++ toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2014-04-17 10:24:33.793431933 +0000 -@@ -2813,7 +2813,7 @@ - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off_t, o) - - LSS_INLINE _syscall4(int, newfstatat, int, d, - const char *, p, + + --- 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 @@ diff --git a/srcpkgs/icecat/patches/fix-tools.patch b/srcpkgs/icecat/patches/fix-tools.patch index a44f4068afe..1f6df6d9214 100644 --- a/srcpkgs/icecat/patches/fix-tools.patch +++ b/srcpkgs/icecat/patches/fix-tools.patch @@ -1,13 +1,3 @@ ---- tools/profiler/gecko/local_debug_info_symbolizer.cc -+++ tools/profiler/gecko/local_debug_info_symbolizer.cc -@@ -3,6 +3,7 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -+#include - #include "PlatformMacros.h" - #include "nsAutoPtr.h" - --- tools/profiler/core/platform.h +++ tools/profiler/core/platform.h @@ -29,6 +29,8 @@ @@ -52,31 +42,3 @@ } void OS::SleepMicro(int microseconds) ---- tools/profiler/core/platform.h.orig 2015-11-04 18:27:58.170732586 +0100 -+++ tools/profiler/core/platform.h 2015-11-04 18:29:11.898478051 +0100 -@@ -60,9 +60,9 @@ - #include "v8-support.h" - #include - --// We need a definition of gettid(), but glibc doesn't provide a -+// We need a definition of gettid(), but glibc nor musl don't provide a - // wrapper for it. --#if defined(__GLIBC__) -+#if defined(__linux__) - #include - #include - static inline pid_t gettid() ---- media/libav/config_unix.h.orig 2015-11-04 18:38:46.660289503 +0100 -+++ media/libav/config_unix.h 2015-11-04 18:39:38.620814879 +0100 -@@ -223,7 +223,11 @@ - #define HAVE_STRERROR_R 1 - #define HAVE_STRPTIME 1 - #define HAVE_SYSCONF 1 -+#if !defined(__linux__) || defined(__GLIBC__) - #define HAVE_SYSCTL 1 -+#else -+#define HAVE_SYSCTL 0 -+#endif - #define HAVE_USLEEP 1 - #define HAVE_VIRTUALALLOC 0 - #define HAVE_PTHREADS 0 diff --git a/srcpkgs/icecat/patches/libevent.patch b/srcpkgs/icecat/patches/libevent.patch deleted file mode 100644 index 6c2a7f661c6..00000000000 --- a/srcpkgs/icecat/patches/libevent.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 6dbb1148210e -Author: Mike Hommey -Date: Sun Nov 20 17:51:17 2016 +0900 - - Bug 1318914 - Fix --with-system-libevent build against libevent 2.1. r=billm - - --HG-- - extra : rebase_source : da25767f6045507447f90ab03291c60a4f2c6b3d ---- - ipc/chromium/src/base/message_pump_libevent.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git ipc/chromium/src/base/message_pump_libevent.cc ipc/chromium/src/base/message_pump_libevent.cc -index 2db827e5bade..3cca238c1e7c 100644 ---- ipc/chromium/src/base/message_pump_libevent.cc -+++ ipc/chromium/src/base/message_pump_libevent.cc -@@ -22,9 +22,17 @@ - - // This macro checks that the _EVENT_SIZEOF_* constants defined in - // ipc/chromiume/src/third_party//event2/event-config.h are correct. -+#if defined(_EVENT_SIZEOF_SHORT) - #define CHECK_EVENT_SIZEOF(TYPE, type) \ - static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \ - "bad _EVENT_SIZEOF_"#TYPE); -+#elif defined(EVENT__SIZEOF_SHORT) -+#define CHECK_EVENT_SIZEOF(TYPE, type) \ -+ static_assert(EVENT__SIZEOF_##TYPE == sizeof(type), \ -+ "bad EVENT__SIZEOF_"#TYPE); -+#else -+#error Cannot find libevent type sizes -+#endif - - CHECK_EVENT_SIZEOF(LONG, long); - CHECK_EVENT_SIZEOF(LONG_LONG, long long); diff --git a/srcpkgs/icecat/patches/mallinfo.patch b/srcpkgs/icecat/patches/mallinfo.patch new file mode 100644 index 00000000000..c9a38d45bdf --- /dev/null +++ b/srcpkgs/icecat/patches/mallinfo.patch @@ -0,0 +1,18 @@ +--- xpcom/base/nsMemoryReporterManager.cpp ++++ xpcom/base/nsMemoryReporterManager.cpp +@@ -153,6 +153,7 @@ ResidentUniqueDistinguishedAmount(int64_t* aN) + return GetProcSelfSmapsPrivate(aN); + } + ++#ifdef __GLIBC__ + #define HAVE_SYSTEM_HEAP_REPORTER 1 + nsresult + SystemHeapSize(int64_t* aSizeOut) +@@ -172,6 +173,7 @@ SystemHeapSize(int64_t* aSizeOut) + *aSizeOut = size_t(info.hblkhd) + size_t(info.uordblks); + return NS_OK; + } ++#endif + + #elif defined(__DragonFly__) || defined(__FreeBSD__) \ + || defined(__NetBSD__) || defined(__OpenBSD__) \ diff --git a/srcpkgs/icecat/patches/patch-xpcom_components_Module.h b/srcpkgs/icecat/patches/patch-xpcom_components_Module.h deleted file mode 100644 index 866c7b4a585..00000000000 --- a/srcpkgs/icecat/patches/patch-xpcom_components_Module.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-xpcom_components_Module.h,v 1.1 2016/02/06 22:13:22 ryoon Exp $ - -* Workaround for binutils/GNU ld 2.26 from NetBSD/amd64 7.99.26 - ---- xpcom/components/Module.h.orig 2016-01-23 23:23:51.000000000 +0000 -+++ xpcom/components/Module.h -@@ -125,7 +125,7 @@ struct Module - # define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$M"), dllexport) - # elif defined(__GNUC__) - # if defined(__ELF__) --# define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("protected"))) -+# define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("default"))) - # elif defined(__MACH__) - # define NSMODULE_SECTION __attribute__((section("__DATA, .kPStaticModules"), visibility("default"))) - # elif defined (_WIN32) diff --git a/srcpkgs/icecat/patches/stat.patch b/srcpkgs/icecat/patches/stat.patch deleted file mode 100644 index 34672a21012..00000000000 --- a/srcpkgs/icecat/patches/stat.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- dom/system/OSFileConstants.cpp.orig 2013-04-17 06:17:29.798371189 +0000 -+++ dom/system/OSFileConstants.cpp 2013-04-17 06:30:30.032285977 +0000 -@@ -509,6 +509,11 @@ - INT_CONSTANT(_STAT_VER), - #endif // defined(_STAT_VER) - -+ // glibc's stat/lstat/fstat are macros while uclibc's are not -+#if defined(__GLIBC__) && !defined(__UCLIBC__) -+ { "OSFILE_STAT_MACROS", JS::Int32Value(1) }, -+#endif // defined(stat) -+ - PROP_END - }; - ---- toolkit/components/osfile/modules/osfile_unix_back.jsm.orig 2014-04-03 13:08:26.686409787 +0000 -+++ toolkit/components/osfile/modules/osfile_unix_back.jsm 2014-04-03 13:34:14.101716259 +0000 -@@ -512,7 +512,7 @@ - /*path*/ Type.fd, - /*buf*/ Type.stat.out_ptr - ); -- } else if (Const._STAT_VER != undefined) { -+ } else if (Const.OSFILE_STAT_MACROS != undefined) { - const ver = Const._STAT_VER; - let xstat_name, lxstat_name, fxstat_name; - if (OS.Constants.Sys.Name == "SunOS") { diff --git a/srcpkgs/icecat/template b/srcpkgs/icecat/template index 2a329a0b5e8..4fe00efd17b 100644 --- a/srcpkgs/icecat/template +++ b/srcpkgs/icecat/template @@ -1,166 +1,92 @@ # Template build file for 'icecat'. pkgname=icecat -version=45.7.0 -revision=2 +version=52.0.2 +revision=1 short_desc="GNU version of the Firefox browser" maintainer="Jürgen Buchmüller " homepage="https://www.gnu.org/software/${pkgname}/" license="MPL-1.1, GPL-2, LGPL-2.1" distfiles="${GNU_SITE}/${pkgname}/${version}/${pkgname}-${version}-gnu1.tar.bz2" -checksum=635b2d458b22221dcaff4463ce3ed2983e6fc4981c09170899fd63ea231dc7d6 +checksum=8901a4ab7f2b87d5516c77cbdec6d276cdde64421725d4ed613c1b4f805a4a2b +only_for_archs="i686 i686-musl x86_64 x86_64-musl" nopie=yes lib32disabled=yes -hostmakedepends="unzip zip pkg-config perl python yasm" -makedepends="nss-devel libjpeg-turbo-devel icu-devel - pixman-devel sqlite-devel gst-plugins-base1-devel gtk+-devel - libevent-devel libnotify-devel libvpx-devel libXrender-devel - startup-notification-devel dbus-glib-devel alsa-lib-devel pulseaudio-devel - hunspell-devel libXcomposite-devel libSM-devel libXScrnSaver-devel - libXt-devel libXdamage-devel" -depends="desktop-file-utils hicolor-icon-theme" +hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm" +makedepends=" + nss-devel libjpeg-turbo-devel gtk+-devel icu-devel pixman-devel + sqlite-devel libevent-devel libnotify-devel libvpx-devel libXrender-devel + hunspell-devel libXcomposite-devel libSM-devel libXt-devel libXdamage-devel + $(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel) + $(vopt_if gtk3 gtk+3-devel) $(vopt_if pulseaudio pulseaudio-devel) + $(vopt_if startup_notification startup-notification-devel) + $(vopt_if xscreensaver libXScrnSaver-devel)" +depends="nss>=3.27 desktop-file-utils hicolor-icon-theme" -nocross="https://build.voidlinux.eu/builders/armv7l_builder/builds/29602/steps/shell_3/logs/stdio" +build_options="alsa dbus gtk3 pulseaudio startup_notification xscreensaver" +build_options_default="alsa dbus gtk3 pulseaudio startup_notification xscreensaver" -# Make config/system_wrappers/alsa/alsalib.h and pulse/pulse.h find -# the required includes -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}" +desc_option_gtk3="Build the GTK+3 toolkit UI" -if [ ${XBPS_GCC_VERSION_MAJOR} -gt 5 ]; then - # Append CFLAGS and CXXFLAGS to set work around code which gcc6 would - # otherwise regard as out-of-specification and allow it to produce a - # working program. - CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" - CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" -fi +# CFLAGS and CXXFLAGS to set work around code which gcc6 would +# otherwise regard as out-of-specification and allow it to produce a +# working program. +CFLAGS="-fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" +CXXFLAGS="-fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" -if [ -n "$CROSS_BUILD" ]; then - # Void's system-sqlite is compiled with SQLITE_ENABLE_DBSTAT_VTAB, - # but the test fails when cross compiling - export ac_cv_sqlite_dbstat_vtab=yes -fi - -pre_configure() { +post_extract() { case "$XBPS_TARGET_MACHINE" in *-musl) - $XBPS_FETCH_CMD http://git.alpinelinux.org/cgit/aports/plain/community/firefox-esr/stab.h - mv stab.h toolkit/crashreporter/google-breakpad/src/ + # fix musl rust triplet + sed -i "s/\(x86_64-unknown-linux\)-gnu/\1-musl/" build/moz.configure/rust.configure + cp "${FILESDIR}/stab.h" toolkit/crashreporter/google-breakpad/src/ + ;; + esac + # Google API key (see http://www.chromium.org/developers/how-tos/api-keys) + # Note: This is for Void Linux use ONLY. + echo -n "AIzaSyCIFdBA7eQP43R6kXRwTq7j6Mvj1ITze90" > google-api-key +} +do_build() { + cp ${FILESDIR}/mozconfig .mozconfig + + case "$XBPS_TARGET_MACHINE" in + *-musl) + echo "ac_cv_header_execinfo_h=no" >> .mozconfig + echo "ac_add_options --disable-jemalloc" >> .mozconfig + echo "ac_add_options --enable-gold=no" >> .mozconfig ;; esac - # configure script misdetects the preprocessor without an optimization level - sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure - - # Google API key (see http://www.chromium.org/developers/how-tos/api-keys) - # Note: This is for Void Linux use ONLY. - _google_api_key="AIzaSyCIFdBA7eQP43R6kXRwTq7j6Mvj1ITze90" - echo -n "$_google_api_key" > google-api-key - [ ! -d xbps-build ] && mkdir -p xbps-build -} -do_configure() { - local _args - if [ "$CROSS_BUILD" ]; then - export HOST_CFLAGS="${XBPS_CFLAGS}" - export HOST_CXXFLAGS="${XBPS_CXXFLAGS}" - - cross_args+=" --target=$XBPS_CROSS_TRIPLET" - 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 - # Fix wrong assignment of (modified) $HOST_CXXFLAGS in js/src/configure - sed -i js/src/configure \ - -e "s;CFLAGS=\"\$HOST_CXXFLAGS\";CFLAGS=\"${XBPS_CXXFLAGS}\";" - fi - case "$XBPS_TARGET_MACHINE" in - *-musl) export ac_cv_header_execinfo_h=no; _args="--disable-gold";; - *) _args="--enable-gold";; - esac - - 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 + # echo "ac_cv_sqlite_threadsafe=yes" >> .mozconfig + # echo "ac_cv_sqlite_enable_fts3=yes" >> .mozconfig + # echo "ac_cv_sqlite_enable_unlock_notify=yes" >> .mozconfig + # echo "ac_cv_prog_hostcxx_works=1" >> .mozconfig mkdir -p /usr/lib/icecat export LDFLAGS+=" -Wl,-rpath=/usr/lib/icecat" - # Patch to use /usr/lib/icecat instead of /usr/lib/icecat-${version} - sed -i config/baseconfig.mk \ - -e 's;$(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME);g' \ - -e 's;$(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME)-devel;g' + if [ -n "$SOURCE_DATE_EPOCH" ]; then + export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S") + fi + + cat >>.mozconfig <