From 2befab6352adadce5aa95ffa39f53a805b17a87e Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 28 Aug 2019 19:17:26 +0200 Subject: [PATCH] thunderbird: update to 68.0 This also attempts to enable at least some degree of debug info on 32-bit hosts as well as prepare for future ppc32 support. It also synchronizes patches with firefox. --- srcpkgs/thunderbird/files/mozconfig | 3 +- .../patches/disable-hunspell_hooks.patch | 11 --- .../disable-image-format-warning.patch | 15 ++++ .../patches/fix-arm-opus-include.patch | 11 +++ .../patches/fix-i686-ppc-musl.patch | 11 +++ srcpkgs/thunderbird/patches/fix-musl.patch | 18 ++--- .../thunderbird/patches/fix-rust-1.29.patch | 14 ---- .../patches/fix-sandbox-membarrier.patch | 52 +++++++++++++ srcpkgs/thunderbird/patches/fix-toolkit.patch | 36 ++++----- srcpkgs/thunderbird/patches/fix-tools.patch | 35 +++++---- .../thunderbird/patches/fix-wasm-arm.patch | 15 ++++ .../patches/fix-webrtc-glibcisms.patch | 25 +++--- srcpkgs/thunderbird/patches/fix-xpcom.patch | 11 --- srcpkgs/thunderbird/patches/mallinfo.patch | 40 +++++++--- .../patches/ppc32-skia-portable.patch | 14 ++++ .../patches/ppc64le-bug-1512162.patch | 50 ++++++++++++ .../thunderbird/patches/rust-configure.patch | 42 ++++++++++ .../patches/rust-unitialized-field.patch | 19 ----- srcpkgs/thunderbird/patches/rust133.patch | 24 ------ srcpkgs/thunderbird/patches/sndio.patch | 12 +-- srcpkgs/thunderbird/patches/yuv-be.patch | 48 ++++++++++++ srcpkgs/thunderbird/template | 78 +++++++++++++++---- 22 files changed, 416 insertions(+), 168 deletions(-) delete mode 100644 srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch create mode 100644 srcpkgs/thunderbird/patches/disable-image-format-warning.patch create mode 100644 srcpkgs/thunderbird/patches/fix-arm-opus-include.patch create mode 100644 srcpkgs/thunderbird/patches/fix-i686-ppc-musl.patch delete mode 100644 srcpkgs/thunderbird/patches/fix-rust-1.29.patch create mode 100644 srcpkgs/thunderbird/patches/fix-sandbox-membarrier.patch create mode 100644 srcpkgs/thunderbird/patches/fix-wasm-arm.patch delete mode 100644 srcpkgs/thunderbird/patches/fix-xpcom.patch create mode 100644 srcpkgs/thunderbird/patches/ppc32-skia-portable.patch create mode 100644 srcpkgs/thunderbird/patches/ppc64le-bug-1512162.patch create mode 100644 srcpkgs/thunderbird/patches/rust-configure.patch delete mode 100644 srcpkgs/thunderbird/patches/rust-unitialized-field.patch delete mode 100644 srcpkgs/thunderbird/patches/rust133.patch create mode 100644 srcpkgs/thunderbird/patches/yuv-be.patch diff --git a/srcpkgs/thunderbird/files/mozconfig b/srcpkgs/thunderbird/files/mozconfig index 4d1267b2351..334846e9a64 100644 --- a/srcpkgs/thunderbird/files/mozconfig +++ b/srcpkgs/thunderbird/files/mozconfig @@ -12,7 +12,6 @@ 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 @@ -34,8 +33,8 @@ ac_add_options --disable-updater ac_add_options --disable-install-strip ac_add_options --disable-strip ac_add_options --disable-profiling +ac_add_options --disable-gold ac_add_options --enable-optimize="$CFLAGS" -ac_add_options --enable-pie ac_add_options --enable-official-branding ac_add_options --enable-calendar diff --git a/srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch b/srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch deleted file mode 100644 index a5f7c29f2bd..00000000000 --- a/srcpkgs/thunderbird/patches/disable-hunspell_hooks.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/thunderbird/patches/disable-image-format-warning.patch b/srcpkgs/thunderbird/patches/disable-image-format-warning.patch new file mode 100644 index 00000000000..bd56e6bc37c --- /dev/null +++ b/srcpkgs/thunderbird/patches/disable-image-format-warning.patch @@ -0,0 +1,15 @@ +Imported from Adélie. Firefox is prone to this warning on BE and +it leads to huge .xsession-errors, and the warning is not very +important or meaningful, so just disable it. + +--- gfx/2d/HelpersCairo.h ++++ gfx/2d/HelpersCairo.h +@@ -147,7 +147,7 @@ + case SurfaceFormat::R5G6B5_UINT16: + return CAIRO_FORMAT_RGB16_565; + default: +- gfxCriticalError() << "Unknown image format " << (int)format; ++ //gfxCriticalError() << "Unknown image format " << (int)format; + return CAIRO_FORMAT_ARGB32; + } + } diff --git a/srcpkgs/thunderbird/patches/fix-arm-opus-include.patch b/srcpkgs/thunderbird/patches/fix-arm-opus-include.patch new file mode 100644 index 00000000000..6e0c5875da3 --- /dev/null +++ b/srcpkgs/thunderbird/patches/fix-arm-opus-include.patch @@ -0,0 +1,11 @@ +--- media/libopus/silk/arm/arm_silk_map.c.orig 2019-03-19 20:55:01.249609964 +0100 ++++ media/libopus/silk/arm/arm_silk_map.c 2019-03-19 20:55:25.769400255 +0100 +@@ -28,7 +28,7 @@ + # include "config.h" + #endif + +-#include "main_FIX.h" ++#include "../fixed/main_FIX.h" + #include "NSQ.h" + #include "SigProc_FIX.h" + diff --git a/srcpkgs/thunderbird/patches/fix-i686-ppc-musl.patch b/srcpkgs/thunderbird/patches/fix-i686-ppc-musl.patch new file mode 100644 index 00000000000..40aab43ae86 --- /dev/null +++ b/srcpkgs/thunderbird/patches/fix-i686-ppc-musl.patch @@ -0,0 +1,11 @@ +--- mozglue/misc/StackWalk.cpp 2017-04-11 04:13:21.000000000 +0200 ++++ mozglue/misc/StackWalk.cpp 2017-11-29 15:23:07.218649970 +0100 +@@ -33,7 +33,7 @@ using namespace mozilla; + # define MOZ_STACKWALK_SUPPORTS_MACOSX 0 + #endif + +-#if (defined(linux) && \ ++#if defined(__GLIBC__) && (defined(linux) && \ + ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ + defined(HAVE__UNWIND_BACKTRACE))) + # define MOZ_STACKWALK_SUPPORTS_LINUX 1 diff --git a/srcpkgs/thunderbird/patches/fix-musl.patch b/srcpkgs/thunderbird/patches/fix-musl.patch index c32921d39e1..c1cb99bf651 100644 --- a/srcpkgs/thunderbird/patches/fix-musl.patch +++ b/srcpkgs/thunderbird/patches/fix-musl.patch @@ -1,11 +1,11 @@ ---- tools/profiler/core/platform.h.orig -+++ tools/profiler/core/platform.h -@@ -56,7 +56,7 @@ - - // We need a definition of gettid(), but glibc doesn't provide a - // wrapper for it. +--- tools/profiler/core/platform-linux-android.cpp.orig 2019-07-09 22:58:30.039475686 +0200 ++++ tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:39.331437677 +0200 +@@ -73,7 +73,7 @@ + + int profiler_current_thread_id() { + // glibc doesn't provide a wrapper for gettid(). -#if defined(__GLIBC__) +#if defined(__linux__) - #include - #include - static inline pid_t gettid() + return static_cast(static_cast(syscall(SYS_gettid))); + #else + return static_cast(gettid()); diff --git a/srcpkgs/thunderbird/patches/fix-rust-1.29.patch b/srcpkgs/thunderbird/patches/fix-rust-1.29.patch deleted file mode 100644 index e48c93a9dce..00000000000 --- a/srcpkgs/thunderbird/patches/fix-rust-1.29.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- build/moz.configure/rust.configure.orig 2018-10-26 15:02:30.276600157 +0200 -+++ build/moz.configure/rust.configure 2018-10-26 15:02:14.081581242 +0200 -@@ -119,7 +119,10 @@ def rust_supported_targets(rustc): - ambiguous = set() - per_raw_os = {} - for t in out: -- t = split_triplet(t, allow_unknown=True) -+ try: -+ t = split_triplet(t, allow_unknown=True) -+ except: -+ continue - key = (t.cpu, t.endianness, t.os) - if key in per_os: - previous = per_os[key] diff --git a/srcpkgs/thunderbird/patches/fix-sandbox-membarrier.patch b/srcpkgs/thunderbird/patches/fix-sandbox-membarrier.patch new file mode 100644 index 00000000000..caffd83cf67 --- /dev/null +++ b/srcpkgs/thunderbird/patches/fix-sandbox-membarrier.patch @@ -0,0 +1,52 @@ +allow usage of SYS_membarrier, needed since musl-1.1.22 + +--- security/sandbox/linux/SandboxFilter.cpp ++++ security/sandbox/linux/SandboxFilter.cpp +@@ -283,6 +283,8 @@ + case __NR_set_tid_address: + return Allow(); + #endif ++ case __NR_membarrier: ++ return Allow(); + + // prctl + case __NR_prctl: { + +--- security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h ++++ security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +@@ -1385,6 +1385,10 @@ + #define __NR_memfd_create (__NR_SYSCALL_BASE+385) + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier (__NR_SYSCALL_BASE+389) ++#endif ++ + // ARM private syscalls. + #if !defined(__ARM_NR_BASE) + #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) + +--- security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h ++++ security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h +@@ -1290,5 +1290,9 @@ + #define __NR_memfd_create 319 + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 324 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ + +--- security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h ++++ security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h +@@ -1490,5 +1490,9 @@ + #define __NR_shutdown 373 + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 375 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ + diff --git a/srcpkgs/thunderbird/patches/fix-toolkit.patch b/srcpkgs/thunderbird/patches/fix-toolkit.patch index 120ea8561e9..86e8ef47855 100644 --- a/srcpkgs/thunderbird/patches/fix-toolkit.patch +++ b/srcpkgs/thunderbird/patches/fix-toolkit.patch @@ -47,17 +47,28 @@ #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 @@ + + # ifdef SOLARIS + # include +-# else ++# elif !(defined(__linux__)) || defined(__GLIBC__) + # include + # endif + # 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 @@ - int add_dir_entries(const NS_tchar *dirpath, ActionList *list) - { +@@ -3978,6 +3978,7 @@ + + int add_dir_entries(const NS_tchar* dirpath, ActionList* list) { int rv = OK; +#if !defined(__linux__) || defined(__GLIBC__) - FTS *ftsdir; - FTSENT *ftsdirEntry; - NS_tchar searchpath[MAXPATHLEN]; -@@ -3534,6 +3535,7 @@ + FTS* ftsdir; + FTSENT* ftsdirEntry; + mozilla::UniquePtr searchpath(get_full_path(dirpath)); +@@ -4085,6 +4086,7 @@ } fts_close(ftsdir); @@ -65,14 +76,3 @@ return rv; } ---- toolkit/mozapps/update/common/updatedefines.h 2019-02-03 14:48:50.526625890 +0100 -+++ toolkit/mozapps/update/common/updatedefines.h 2019-02-03 14:49:51.466743641 +0100 -@@ -100,7 +100,7 @@ - - #ifdef SOLARIS - #include --#else -+#elif !defined(__linux__) || defined(__GLIBC__) - #include - #endif - #include diff --git a/srcpkgs/thunderbird/patches/fix-tools.patch b/srcpkgs/thunderbird/patches/fix-tools.patch index 97e77307cea..0ed043fb5b5 100644 --- a/srcpkgs/thunderbird/patches/fix-tools.patch +++ b/srcpkgs/thunderbird/patches/fix-tools.patch @@ -1,17 +1,6 @@ ---- tools/profiler/core/platform.h -+++ tools/profiler/core/platform.h -@@ -29,6 +29,8 @@ - #ifndef TOOLS_PLATFORM_H_ - #define TOOLS_PLATFORM_H_ - -+#include -+ - #include - #include - #include "MainThreadUtils.h" ---- tools/profiler/lul/LulElf.cpp 2019-02-03 14:54:15.727928668 +0100 -+++ tools/profiler/lul/LulElf.cpp 2019-02-03 14:55:54.342546975 +0100 -@@ -459,10 +459,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) { @@ -26,9 +15,21 @@ return base; } ---- tools/profiler/core/platform-linux-android.cpp 2019-02-03 14:56:23.607139579 +0100 -+++ tools/profiler/core/platform-linux-android.cpp 2019-02-03 14:57:03.198587558 +0100 -@@ -497,8 +497,10 @@ +--- 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) ++ sa.sa_sigaction = SigprofHandler; ++#else + sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler); ++#endif + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART | SA_SIGINFO; + if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) { +@@ -497,8 +501,10 @@ ucontext_t sSyncUContext; void Registers::SyncPopulate() { diff --git a/srcpkgs/thunderbird/patches/fix-wasm-arm.patch b/srcpkgs/thunderbird/patches/fix-wasm-arm.patch new file mode 100644 index 00000000000..e6ad61c9f44 --- /dev/null +++ b/srcpkgs/thunderbird/patches/fix-wasm-arm.patch @@ -0,0 +1,15 @@ +--- js/src/wasm/WasmSignalHandlers.cpp ++++ js/src/wasm/WasmSignalHandlers.cpp +@@ -243,9 +243,9 @@ + // If you run into compile problems on a tier-3 platform, you can disable the + // emulation here. + +-#if defined(__linux__) && defined(__arm__) +-# define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS +-#endif ++// #if defined(__linux__) && defined(__arm__) ++// # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS ++// #endif + + #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS + # include diff --git a/srcpkgs/thunderbird/patches/fix-webrtc-glibcisms.patch b/srcpkgs/thunderbird/patches/fix-webrtc-glibcisms.patch index 0a9304430b2..cf895dd8448 100644 --- a/srcpkgs/thunderbird/patches/fix-webrtc-glibcisms.patch +++ b/srcpkgs/thunderbird/patches/fix-webrtc-glibcisms.patch @@ -1,13 +1,20 @@ ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2018-05-09 23:48:44.677389171 +0200 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-09 23:48:56.254373557 +0200 -@@ -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 +@@ -32,7 +32,7 @@ + int architecture = 0; + unsigned long hwcap = 0; + const char* platform = NULL; +-#if __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/thunderbird/patches/fix-xpcom.patch b/srcpkgs/thunderbird/patches/fix-xpcom.patch deleted file mode 100644 index 38dd582d96b..00000000000 --- a/srcpkgs/thunderbird/patches/fix-xpcom.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xpcom/base/nsMemoryReporterManager.cpp.orig 2015-12-16 11:53:14.211144456 +0100 -+++ xpcom/base/nsMemoryReporterManager.cpp 2015-12-16 11:55:26.859476381 +0100 -@@ -46,7 +46,7 @@ using namespace mozilla; - # include "mozmemory.h" - #endif // MOZ_MEMORY - --#if defined(XP_LINUX) -+#if defined(XP_LINUX) && defined(__GLIBC__) - - #include - #include diff --git a/srcpkgs/thunderbird/patches/mallinfo.patch b/srcpkgs/thunderbird/patches/mallinfo.patch index c9a38d45bdf..afea86c0a2c 100644 --- a/srcpkgs/thunderbird/patches/mallinfo.patch +++ b/srcpkgs/thunderbird/patches/mallinfo.patch @@ -1,18 +1,34 @@ ---- xpcom/base/nsMemoryReporterManager.cpp -+++ xpcom/base/nsMemoryReporterManager.cpp -@@ -153,6 +153,7 @@ ResidentUniqueDistinguishedAmount(int64_t* aN) +--- xpcom/base/nsMemoryReporterManager.cpp.orig 2019-03-19 17:12:20.844810044 +0100 ++++ xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100 +@@ -123,6 +123,7 @@ 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; + # ifdef HAVE_MALLINFO + # define HAVE_SYSTEM_HEAP_REPORTER 1 + static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) { +@@ -142,6 +143,7 @@ + return NS_OK; } -+#endif + # endif ++#endif // __GLIBC__ - #elif defined(__DragonFly__) || defined(__FreeBSD__) \ - || defined(__NetBSD__) || defined(__OpenBSD__) \ + #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__OpenBSD__) || defined(__FreeBSD_kernel__) +@@ -642,6 +644,7 @@ + return NS_OK; + } + ++#ifdef __GLIBC__ + # define HAVE_SYSTEM_HEAP_REPORTER 1 + // Windows can have multiple separate heaps. During testing there were multiple + // heaps present but the non-default ones had sizes no more than a few 10s of +@@ -698,6 +701,7 @@ + *aSizeOut = heapsSize; + return NS_OK; + } ++#endif // __GLIBC__ + + struct SegmentKind { + DWORD mState; diff --git a/srcpkgs/thunderbird/patches/ppc32-skia-portable.patch b/srcpkgs/thunderbird/patches/ppc32-skia-portable.patch new file mode 100644 index 00000000000..93c625a861e --- /dev/null +++ b/srcpkgs/thunderbird/patches/ppc32-skia-portable.patch @@ -0,0 +1,14 @@ +--- gfx/skia/skia/third_party/skcms/skcms.cc ++++ gfx/skia/skia/third_party/skcms/skcms.cc +@@ -1806,6 +1806,11 @@ typedef enum { + Op_store_ffff, + } Op; + ++// work around ICE on 32-bit ppc ++#if defined(__powerpc__) && !defined(__powerpc64__) ++# define SKCMS_PORTABLE ++#endif ++ + #if defined(__clang__) + template using Vec = T __attribute__((ext_vector_type(N))); + #elif defined(__GNUC__) diff --git a/srcpkgs/thunderbird/patches/ppc64le-bug-1512162.patch b/srcpkgs/thunderbird/patches/ppc64le-bug-1512162.patch new file mode 100644 index 00000000000..ec38f2262be --- /dev/null +++ b/srcpkgs/thunderbird/patches/ppc64le-bug-1512162.patch @@ -0,0 +1,50 @@ + +diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp +--- js/xpconnect/src/XPCWrappedNative.cpp ++++ js/xpconnect/src/XPCWrappedNative.cpp +@@ -1152,16 +1152,20 @@ bool XPCWrappedNative::CallMethod(XPCCal + if (NS_FAILED(rv)) { + return Throw(rv, ccx); + } + + JS::Rooted helper(ccx, /* init = */ ccx); + return helper.get().Call(); + } + ++#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) ++// Work around a compiler bug on ppc64le (bug 1512162). ++__attribute__ ((noinline,noclone)) ++#endif + bool CallMethodHelper::Call() { + mCallContext.SetRetVal(JS::UndefinedValue()); + + mCallContext.GetContext()->SetPendingException(nullptr); + + if (mVTableIndex == 0) { + return QueryInterfaceFastPath(); + } +@@ -1310,16 +1314,20 @@ bool CallMethodHelper::GetOutParamSource + return false; + } + } + } + + return true; + } + ++#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) ++// Work around a compiler bug on ppc64le (bug 1512162). ++__attribute__ ((noinline,noclone)) ++#endif + bool CallMethodHelper::GatherAndConvertResults() { + // now we iterate through the native params to gather and convert results + uint8_t paramCount = mMethodInfo->GetParamCount(); + for (uint8_t i = 0; i < paramCount; i++) { + const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i); + if (!paramInfo.IsOut()) { + continue; + } + + + + diff --git a/srcpkgs/thunderbird/patches/rust-configure.patch b/srcpkgs/thunderbird/patches/rust-configure.patch new file mode 100644 index 00000000000..84077f4fc88 --- /dev/null +++ b/srcpkgs/thunderbird/patches/rust-configure.patch @@ -0,0 +1,42 @@ +Mozilla rustc check does not support crossbuild: let's remove it +Remove calls to unwrap_rustup, they fail if rustup isn't present + +--- build/moz.configure/rust.configure 2019-07-06 03:48:30.000000000 +0200 ++++ build/moz.configure/rust.configure 2019-07-09 22:35:23.326851798 +0200 +@@ -79,9 +79,6 @@ + + return unwrap + +-rustc = unwrap_rustup(rustc, 'rustc') +-cargo = unwrap_rustup(cargo, 'cargo') +- + + set_config('CARGO', cargo) + set_config('RUSTC', rustc) +@@ -294,26 +291,6 @@ + + os.write(in_fd, source) + os.close(in_fd) +- +- cmd = [ +- rustc, +- '--crate-type', 'staticlib', +- target_arg, +- '-o', out_path, +- in_path, +- ] +- +- def failed(): +- die(dedent('''\ +- Cannot compile for {} with {} +- The target may be unsupported, or you may not have +- a rust std library for that target installed. Try: +- +- rustup target add {} +- '''.format(host_or_target.alias, rustc, rustc_target.alias))) +- check_cmd_output(*cmd, onerror=failed) +- if not os.path.exists(out_path) or os.path.getsize(out_path) == 0: +- failed() + finally: + os.remove(in_path) + os.remove(out_path) diff --git a/srcpkgs/thunderbird/patches/rust-unitialized-field.patch b/srcpkgs/thunderbird/patches/rust-unitialized-field.patch deleted file mode 100644 index 67ef3a02ab8..00000000000 --- a/srcpkgs/thunderbird/patches/rust-unitialized-field.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- ./media/audioipc/audioipc/src/cmsg.rs.orig 2018-05-09 22:19:14.748631939 +0200 -+++ ./media/audioipc/audioipc/src/cmsg.rs 2018-05-09 22:19:22.961620862 +0200 -@@ -106,11 +106,11 @@ impl ControlMsgBuilder { - return Err(Error::NoSpace); - } - -- let cmsghdr = cmsghdr { -- cmsg_len: cmsg_len as _, -- cmsg_level: level, -- cmsg_type: kind, -- }; -+ use std::mem; -+ let mut cmsghdr: cmsghdr = unsafe { mem::zeroed() }; -+ cmsghdr.cmsg_len = cmsg_len as _; -+ cmsghdr.cmsg_level = level; -+ cmsghdr.cmsg_type = kind; - - let cmsghdr = unsafe { - slice::from_raw_parts(&cmsghdr as *const _ as *const _, mem::size_of::()) diff --git a/srcpkgs/thunderbird/patches/rust133.patch b/srcpkgs/thunderbird/patches/rust133.patch deleted file mode 100644 index ebdcac7e3a3..00000000000 --- a/srcpkgs/thunderbird/patches/rust133.patch +++ /dev/null @@ -1,24 +0,0 @@ -This fixes build errors under recent Rust. - ---- servo/components/style_traits/lib.rs -+++ servo/components/style_traits/lib.rs -@@ -9,7 +9,7 @@ - #![crate_name = "style_traits"] - #![crate_type = "rlib"] - --#![deny(unsafe_code, missing_docs)] -+#![deny(unsafe_code)] - - extern crate app_units; - #[macro_use] extern crate bitflags; ---- servo/components/style/lib.rs -+++ servo/components/style/lib.rs -@@ -23,8 +23,6 @@ - //! [cssparser]: ../cssparser/index.html - //! [selectors]: ../selectors/index.html - --#![deny(missing_docs)] -- - extern crate app_units; - extern crate arrayvec; - extern crate atomic_refcell; diff --git a/srcpkgs/thunderbird/patches/sndio.patch b/srcpkgs/thunderbird/patches/sndio.patch index 097b313e90b..6c72284c19b 100644 --- a/srcpkgs/thunderbird/patches/sndio.patch +++ b/srcpkgs/thunderbird/patches/sndio.patch @@ -51,14 +51,14 @@ ] --- build/moz.configure/old.configure.orig +++ build/moz.configure/old.configure -@@ -159,6 +159,7 @@ - '--enable-accessibility', - '--enable-address-sanitizer', - '--enable-alsa', +@@ -169,6 +169,7 @@ + @old_configure_options( + '--cache-file', + '--datadir', + '--enable-sndio', - '--enable-bundled-fonts', - '--enable-clang-plugin', '--enable-content-sandbox', + '--enable-cookies', + '--enable-cpp-rtti', --- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig +++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp @@ -349,6 +349,21 @@ diff --git a/srcpkgs/thunderbird/patches/yuv-be.patch b/srcpkgs/thunderbird/patches/yuv-be.patch new file mode 100644 index 00000000000..1c26f2ecced --- /dev/null +++ b/srcpkgs/thunderbird/patches/yuv-be.patch @@ -0,0 +1,48 @@ +# HG changeset patch +# User A. Wilcox +# Date 1543674229 0 +# Sat Dec 01 14:23:49 2018 +0000 +# Node ID 0309ff19e46b126c527e633518d7de8570442114 +# Parent 53107afbc21ec78e7ac46d37af212505f2032d5d +Bug 1511604 - Swizzle YCbCr->RGB data on big-endian machines + +diff -r 53107afbc21e -r 0309ff19e46b gfx/ycbcr/YCbCrUtils.cpp +--- gfx/ycbcr/YCbCrUtils.cpp Wed Nov 07 04:50:21 2018 +0000 ++++ gfx/ycbcr/YCbCrUtils.cpp Sat Dec 01 14:23:49 2018 +0000 +@@ -3,7 +3,9 @@ + * 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 "mozilla/EndianUtils.h" + #include "gfx2DGlue.h" ++#include "mozilla/gfx/Swizzle.h" + + #include "YCbCrUtils.h" + #include "yuv_convert.h" +@@ -236,6 +238,13 @@ + yuvtype, + srcData.mYUVColorSpace); + } ++#if MOZ_BIG_ENDIAN ++ // libyuv makes endian-correct result, which needs to be swapped to BGRX ++ if (aDestFormat != SurfaceFormat::R5G6B5_UINT16) ++ gfx::SwizzleData(aDestBuffer, aStride, gfx::SurfaceFormat::X8R8G8B8, ++ aDestBuffer, aStride, gfx::SurfaceFormat::B8G8R8X8, ++ srcData.mPicSize); ++#endif + } + + void +@@ -257,6 +266,12 @@ + aSrcStrideYA, + aSrcStrideUV, + aDstStrideARGB); ++#if MOZ_BIG_ENDIAN ++ // libyuv makes endian-correct result, which needs to be swapped to BGRA ++ gfx::SwizzleData(aDstARGB, aDstStrideARGB, gfx::SurfaceFormat::A8R8G8B8, ++ aDstARGB, aDstStrideARGB, gfx::SurfaceFormat::B8G8R8A8, ++ IntSize(aWidth, aHeight)); ++#endif + } + + } // namespace gfx diff --git a/srcpkgs/thunderbird/template b/srcpkgs/thunderbird/template index 0048d50de61..ff0abe944b6 100644 --- a/srcpkgs/thunderbird/template +++ b/srcpkgs/thunderbird/template @@ -3,24 +3,24 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/thunderbird-i18n". # pkgname=thunderbird -version=60.8.0 -revision=2 +version=68.0 +revision=1 +build_helper="rust" short_desc="Standalone Mail/News reader" maintainer="Enno Boland " -homepage="https://www.thunderbird.net/" license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" +homepage="https://www.thunderbird.net/" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" -checksum=1e7a13e64b63476d2235aaac6823fdab949af45cfcd5a25ee710cbae08c2f5d1 +checksum=f87dade2dd64ef61de842812d3e42d82b8a541988da851077778abfa2ebd95d1 -archs="i686* x86_64* ppc64*" lib32disabled=yes -hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm rust cargo - llvm clang" +hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo + llvm clang nodejs cbindgen python nasm" makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel pixman-devel sqlite-devel libevent-devel libnotify-devel libvpx5-devel - libXrender-devel libXcomposite-devel libSM-devel libXt-devel - libXdamage-devel hunspell-devel $(vopt_if alsa alsa-lib-devel) + libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std + libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if startup_notification startup-notification-devel) $(vopt_if xscreensaver libXScrnSaver-devel) @@ -30,15 +30,21 @@ depends="nss>=3.37.3 desktop-file-utils hicolor-icon-theme" build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland" build_options_default="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland" -if [ "$XBPS_WORDSIZE" -eq 32 ]; then - nodebug=yes -fi - case $XBPS_TARGET_MACHINE in ppc64*) ;; ppc*) broken="ftbfs in several places" ;; esac +case $XBPS_TARGET_MACHINE in + armv6*) + broken="required NEON extensions are not supported on armv6" + ;; + ppc64*) ;; + ppc*) + makedepends+=" libatomic-devel" + ;; +esac + post_extract() { case "$XBPS_TARGET_MACHINE" in *-musl) @@ -60,7 +66,6 @@ do_build() { case "$XBPS_TARGET_MACHINE" in *-musl) echo "ac_add_options --disable-jemalloc" >>.mozconfig - echo "ac_add_options --disable-gold" >>.mozconfig echo "ac_add_options --enable-release" >>.mozconfig ;; esac @@ -71,6 +76,16 @@ do_build() { ;; esac + # webrtc currently fails to build on 32-bit ppc... + # also need explicit libatomic + case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + ppc*) + echo "ac_add_options --disable-webrtc" >>.mozconfig + export LDFLAGS+=" -latomic" + ;; + esac + case "$XBPS_TARGET_MACHINE" in x86_64-musl|i686-musl) echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig @@ -79,6 +94,14 @@ do_build() { esac if [ "$CROSS_BUILD" ]; then + BINDGEN_INCLUDE_FLAGS=$( $CPP -x c++ -v /dev/null -o /dev/null 2>&1 | \ + sed -n '/#include <...> search starts here:/,/End of search list./p' | \ + sed '1,1d;$d' | sed 's/^ /-I/' | paste -s ) + + export BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \ + --sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}" + export HOST_CC=cc + export TARGET_CC="${CC}" export HOST_CFLAGS="${XBPS_CFLAGS}" export HOST_CXXFLAGS="${XBPS_CXXFLAGS}" export ac_cv_sqlite_secure_delete=yes \ @@ -87,18 +110,37 @@ do_build() { 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 + echo "ac_add_options --host=$XBPS_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 + case "$XBPS_TARGET_MACHINE" in i686*) export CFLAGS+=" -D_FILE_OFFSET_BITS=64" export CXXFLAGS+=" -D_FILE_OFFSET_BITS=64" - # ENOMEM - echo "ac_add_options --disable-debug-symbols" >>.mozconfig + ;; + armv7*) + export CFLAGS+=" -mfpu=neon -Wno-psabi" + export CXXFLAGS+=" -mfpu=neon -Wno-psabi" ;; esac + # work around large debug symbols on 32-bit hosts + if [ "$XBPS_WORDSIZE" = "32" ]; then + export CFLAGS="${CFLAGS/-g/-g1}" + export CXXFLAGS="${CXXFLAGS/-g/-g1}" + export LDFLAGS+=" -Wl,--no-keep-memory" + # patch the rust debug level, this is hardcoded + sed -i "s/debug_info = '2'/debug_info = '1'/" \ + build/moz.configure/toolchain.configure + fi + export LDFLAGS+=" -Wl,-rpath=/usr/lib/thunderbird" if [ "$SOURCE_DATE_EPOCH" ]; then @@ -106,6 +148,10 @@ do_build() { fi export MOZ_MAKE_FLAGS="${makejobs}" + export MOZ_NOSPAM=1 + export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild" + # avoid error: /usr/bin/as: invalid option -- 'N' + unset AS cat <>.mozconfig ac_add_options --with-google-location-service-api-keyfile="${wrksrc}/google-api-key"