diff --git a/srcpkgs/thunderbird/files/mozconfig b/srcpkgs/thunderbird/files/mozconfig new file mode 100644 index 00000000000..2a4d81bf293 --- /dev/null +++ b/srcpkgs/thunderbird/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=mail diff --git a/srcpkgs/thunderbird/fix-python-foo.patch b/srcpkgs/thunderbird/fix-python-foo.patch new file mode 100644 index 00000000000..cf05f73046c --- /dev/null +++ b/srcpkgs/thunderbird/fix-python-foo.patch @@ -0,0 +1,23 @@ +reverted from https://hg.mozilla.org/mozilla-central/rev/aa63a2a40325 +--- mozilla/dom/bindings/GenerateCSS2PropertiesWebIDL.py.orig ++++ mozilla/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) +--- mozilla/layout/style/GenerateCSSPropsGenerated.py.orig ++++ mozilla/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/thunderbird/patches/disable-hunspell_hooks.patch b/srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch new file mode 100644 index 00000000000..de93efe65b1 --- /dev/null +++ b/srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch @@ -0,0 +1,11 @@ +--- mozilla/mozilla-config.h.in 2016-07-06 15:16:06.621880293 +0200 ++++ mozilla/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/thunderbird/patches/fix-gcc-tests.patch b/srcpkgs/thunderbird/patches/fix-gcc-tests.patch deleted file mode 100644 index 43cbd665cce..00000000000 --- a/srcpkgs/thunderbird/patches/fix-gcc-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- mozilla/configure.orig 2015-05-29 18:30:41.474423097 +0200 -+++ mozilla/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 - - ---- mozilla/js/src/configure.orig 2015-05-29 18:31:25.049874012 +0200 -+++ mozilla/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/thunderbird/patches/fix-gcc6-cpluplus_scope.patch b/srcpkgs/thunderbird/patches/fix-gcc6-cpluplus_scope.patch deleted file mode 100644 index 096acd8323d..00000000000 --- a/srcpkgs/thunderbird/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. - ---- mozilla/nsprpub/config/make-system-wrappers.pl 2016-05-12 19:10:05.000000000 +0200 -+++ mozilla/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/thunderbird/patches/fix-stack-overflow.patch b/srcpkgs/thunderbird/patches/fix-stack-overflow.patch deleted file mode 100644 index 0b0d74daa87..00000000000 --- a/srcpkgs/thunderbird/patches/fix-stack-overflow.patch +++ /dev/null @@ -1,43 +0,0 @@ -https://bugs.alpinelinux.org/issues/5559 -https://bugzilla.mozilla.org/show_bug.cgi?id=1274732 - ---- mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp -+++ mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp -@@ -165,9 +165,8 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c - nsHTTPCompressConv *self = static_cast(closure); - *countRead = 0; - -- const uint32_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop -- unsigned char outBuffer[kOutSize]; -- unsigned char *outPtr; -+ const size_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop -+ uint8_t *outPtr; - size_t outSize; - size_t avail = aAvail; - BrotliResult res; -@@ -177,9 +176,15 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c - return NS_OK; - } - -+ auto outBuffer = MakeUniqueFallible(kOutSize); -+ if (outBuffer == nullptr) { -+ self->mBrotli->mStatus = NS_ERROR_OUT_OF_MEMORY; -+ return self->mBrotli->mStatus; -+ } -+ - do { - outSize = kOutSize; -- outPtr = outBuffer; -+ outPtr = outBuffer.get(); - - // brotli api is documented in brotli/dec/decode.h and brotli/dec/decode.c - LOG(("nsHttpCompresssConv %p brotlihandler decompress %d\n", self, avail)); -@@ -210,7 +215,7 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c - nsresult rv = self->do_OnDataAvailable(self->mBrotli->mRequest, - self->mBrotli->mContext, - self->mBrotli->mSourceOffset, -- reinterpret_cast(outBuffer), -+ reinterpret_cast(outBuffer.get()), - outSize); - LOG(("nsHttpCompressConv %p BrotliHandler ODA rv=%x", self, rv)); - if (NS_FAILED(rv)) { diff --git a/srcpkgs/thunderbird/patches/fix-toolkit.patch b/srcpkgs/thunderbird/patches/fix-toolkit.patch index 90e2c5aaa5a..b7ad8b4f510 100644 --- a/srcpkgs/thunderbird/patches/fix-toolkit.patch +++ b/srcpkgs/thunderbird/patches/fix-toolkit.patch @@ -1,3 +1,18 @@ +--- mozilla/toolkit.orig/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h.orig 2016-07-05 21:00:03.672000517 +0200 ++++ mozilla/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 --- mozilla/toolkit.orig/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2014-03-15 05:19:36.000000000 +0000 +++ mozilla/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 { --- mozilla/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.h 2014-03-15 05:19:36.000000000 +0000 +++ mozilla/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 ---- mozilla/toolkit.orig/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2014-03-15 05:19:37.000000000 +0000 -+++ mozilla/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, + + --- mozilla/toolkit.orig/mozapps/update/common/updatedefines.h 2014-03-15 05:19:37.000000000 +0000 +++ mozilla/toolkit/mozapps/update/common/updatedefines.h 2014-04-17 10:24:33.793431933 +0000 @@ -105,7 +105,7 @@ diff --git a/srcpkgs/thunderbird/patches/fix-tools.patch b/srcpkgs/thunderbird/patches/fix-tools.patch index 5fcfff919b9..5bb06ef1721 100644 --- a/srcpkgs/thunderbird/patches/fix-tools.patch +++ b/srcpkgs/thunderbird/patches/fix-tools.patch @@ -1,13 +1,3 @@ ---- mozilla/tools/profiler/gecko/local_debug_info_symbolizer.cc -+++ mozilla/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" - --- mozilla/tools/profiler/core/platform.h +++ mozilla/tools/profiler/core/platform.h @@ -29,6 +29,8 @@ @@ -52,31 +42,3 @@ } void OS::SleepMicro(int microseconds) ---- mozilla/tools/profiler/core/platform.h.orig 2015-11-04 18:27:58.170732586 +0100 -+++ mozilla/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() ---- mozilla/media/libav/config_unix.h.orig 2015-11-04 18:38:46.660289503 +0100 -+++ mozilla/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/thunderbird/patches/patch-mozilla_xpcom_components_Module.h b/srcpkgs/thunderbird/patches/patch-mozilla_xpcom_components_Module.h deleted file mode 100644 index 718bc6468c8..00000000000 --- a/srcpkgs/thunderbird/patches/patch-mozilla_xpcom_components_Module.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_components_Module.h,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/components/Module.h.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/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/thunderbird/template b/srcpkgs/thunderbird/template index 07cccda7b2a..7707f4619b6 100644 --- a/srcpkgs/thunderbird/template +++ b/srcpkgs/thunderbird/template @@ -1,137 +1,120 @@ # Template build file for 'thunderbird'. pkgname=thunderbird -version=45.8.0 +version=52.0.1 revision=1 short_desc="Standalone Mail/News reader" maintainer="Enno Boland " homepage="http://www.mozilla.org/thunderbird/" license="MPL-2.0, GPL-2, LGPL-2.1" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" -checksum=743cbf4856ad460a791f6b17bff175053fccec2af1edd8e8295ac6fda2634c28 +checksum=a1cede97e836c728d3157b9e043f3724f7aff83f92ba1f3796e9cc7299402cab +only_for_archs="i686 i686-musl x86_64 x86_64-musl" nopie=yes lib32disabled=yes -only_for_archs="i686 i686-musl x86_64 x86_64-musl" -hostmakedepends="unzip zip pkg-config perl python yasm autoconf" +hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm + $(vopt_if rust 'rust cargo')" makedepends=" nss-devel libjpeg-turbo-devel gtk+-devel icu-devel pixman-devel - sqlite-devel pulseaudio-devel libevent-devel libnotify-devel - libvpx-devel libXrender-devel startup-notification-devel - dbus-glib-devel alsa-lib-devel hunspell-devel libXcomposite-devel - libSM-devel libXScrnSaver-devel libXt-devel libXdamage-devel" -depends="desktop-file-utils hicolor-icon-theme" + 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" -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 +build_options="alsa dbus gtk3 rust pulseaudio startup_notification xscreensaver" +build_options_default="alsa dbus gtk3 pulseaudio startup_notification xscreensaver" -pre_configure() { +desc_option_gtk3="Build the GTK+3 toolkit UI" +desc_option_rust="Build rust components" + +case "$XBPS_TARGET_MACHINE" in + x86_64*) build_options_default+=" rust" ;; +esac + +post_extract() { case "$XBPS_TARGET_MACHINE" in *-musl) - # http://git.alpinelinux.org/cgit/aports/plain/community/firefox-esr/stab.h - cp $FILESDIR/stab.h mozilla/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 - # 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 + echo -n "AIzaSyCIFdBA7eQP43R6kXRwTq7j6Mvj1ITze90" >google-api-key } -do_configure() { - local _args +do_build() { + cp "${FILESDIR}/mozconfig" "${wrksrc}/.mozconfig" 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 - # - # XXX disable jemalloc. - _args+=" --disable-jemalloc --enable-gold=no" + *-musl) + echo "ac_add_options --disable-jemalloc" >>.mozconfig + echo "ac_add_options --enable-gold=no" >>.mozconfig ;; esac if [ "$CROSS_BUILD" ]; then - _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 + echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig + fi + + 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. + export CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" + export CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" fi - mkdir -p /usr/lib/thunderbird export LDFLAGS+=" -Wl,-rpath=/usr/lib/thunderbird" - cd xbps-build - # 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 - # Use bundled libpng, our does not have the apng patch. - SHELL=/bin/bash ../configure --prefix=/usr --libdir=/usr/lib \ - --enable-application=mail \ - --with-system-nspr --with-system-nss --with-system-bz2 \ - --with-system-jpeg --with-system-zlib --without-system-png \ - --with-system-libevent --with-system-libvpx \ - --enable-system-pixman --enable-system-hunspell --enable-system-sqlite \ - --enable-system-ffi --enable-startup-notification --disable-gio \ - --with-pthreads --enable-official-branding --enable-safe-browsing \ - --disable-skia --disable-debug --disable-gnomevfs --disable-gconf \ - --disable-crashreporter --disable-updater --disable-xprint --disable-tests \ - --disable-mochitest --disable-installer --disable-elf-hack \ - --with-system-icu --enable-pulseaudio --disable-gstreamer \ - --disable-cpp-exceptions --disable-javaxpcom \ - --with-nspr-prefix=${XBPS_CROSS_BASE}/usr \ - --with-nss-prefix=${XBPS_CROSS_BASE}/usr \ - --with-google-api-keyfile="${wrksrc}/google-api-key" \ - --enable-optimize="$CFLAGS" --disable-strip --disable-install-strip \ - --disable-static --enable-pie --disable-profiling \ - --disable-profilelocking ${_args} -} -do_build() { if [ "$SOURCE_DATE_EPOCH" ]; then - mozdate="MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")" + export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S") fi - cd xbps-build - SHELL=/bin/bash make ${mozdate} ${makejobs} + + export MOZ_MAKE_FLAGS="${makejobs}" + + cat <>.mozconfig +ac_add_options --with-google-api-keyfile="${wrksrc}/google-api-key" +ac_add_options --enable-default-toolkit=cairo-gtk$(vopt_if gtk3 '3' '2') +ac_add_options $(vopt_enable alsa) +ac_add_options $(vopt_enable dbus) +ac_add_options $(vopt_enable dbus necko-wifi) +ac_add_options $(vopt_enable pulseaudio) +ac_add_options $(vopt_enable rust) +ac_add_options $(vopt_enable startup_notification startup-notification) +! + + make -f client.mk build } do_install() { - cd xbps-build - make DESTDIR=${DESTDIR} install + make -f client.mk DESTDIR="$DESTDIR" install vinstall ${FILESDIR}/vendor.js 644 usr/lib/thunderbird/defaults/preferences vinstall ${FILESDIR}/thunderbird.desktop 644 usr/share/applications - for i in 16 22 24 32 48 256; do + for i in 16x16 22x22 24x24 32x32 48x48 256x256; do vinstall ../other-licenses/branding/thunderbird/mailicon${i}.png 644 \ usr/share/icons/hicolor/${i}x${i}/apps thunderbird.png + done # Use system-provided dictionaries rm -rf ${DESTDIR}/usr/lib/thunderbird/{dictionaries,hyphenation} - ln -sf /usr/share/hunspell ${DESTDIR}/usr/lib/thunderbird/dictionaries - ln -sf /usr/share/hyphen ${DESTDIR}/usr/lib/thunderbird/hyphenation + ln -s /usr/share/hunspell ${DESTDIR}/usr/lib/thunderbird/dictionaries + ln -s /usr/share/hyphen ${DESTDIR}/usr/lib/thunderbird/hyphenation # We don't want the development stuff rm -rf ${DESTDIR}/usr/{include,lib/thunderbird-devel,share/idl}