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.
This commit is contained in:
q66 2019-08-28 19:17:26 +02:00 committed by Helmut Pozimski
parent 1800c0ad0a
commit 2befab6352
22 changed files with 416 additions and 168 deletions

View File

@ -12,7 +12,6 @@ ac_add_options --with-system-icu
# XXX: the system's libpng doesn't have APNG support # XXX: the system's libpng doesn't have APNG support
ac_add_options --without-system-png ac_add_options --without-system-png
ac_add_options --enable-system-pixman ac_add_options --enable-system-pixman
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi 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-install-strip
ac_add_options --disable-strip ac_add_options --disable-strip
ac_add_options --disable-profiling ac_add_options --disable-profiling
ac_add_options --disable-gold
ac_add_options --enable-optimize="$CFLAGS" ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pie
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
ac_add_options --enable-calendar ac_add_options --enable-calendar

View File

@ -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

View File

@ -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;
}
}

View File

@ -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"

View File

@ -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

View File

@ -1,11 +1,11 @@
--- tools/profiler/core/platform.h.orig --- tools/profiler/core/platform-linux-android.cpp.orig 2019-07-09 22:58:30.039475686 +0200
+++ tools/profiler/core/platform.h +++ tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:39.331437677 +0200
@@ -56,7 +56,7 @@ @@ -73,7 +73,7 @@
// We need a definition of gettid(), but glibc doesn't provide a int profiler_current_thread_id() {
// wrapper for it. // glibc doesn't provide a wrapper for gettid().
-#if defined(__GLIBC__) -#if defined(__GLIBC__)
+#if defined(__linux__) +#if defined(__linux__)
#include <unistd.h> return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
#include <sys/syscall.h> #else
static inline pid_t gettid() return static_cast<int>(gettid());

View File

@ -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]

View File

@ -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_

View File

@ -47,17 +47,28 @@
#include <a.out.h> #include <a.out.h>
#endif #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 <sys/stat.h>
-# else
+# elif !(defined(__linux__)) || defined(__GLIBC__)
# include <fts.h>
# endif
# include <dirent.h>
--- toolkit.orig/mozapps/update/updater/updater.cpp 2014-03-15 05:19:37.000000000 +0000 --- 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 +++ toolkit/mozapps/update/updater/updater.cpp 2014-04-17 10:24:33.796765327 +0000
@@ -3432,6 +3432,7 @@ @@ -3978,6 +3978,7 @@
int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
{ int add_dir_entries(const NS_tchar* dirpath, ActionList* list) {
int rv = OK; int rv = OK;
+#if !defined(__linux__) || defined(__GLIBC__) +#if !defined(__linux__) || defined(__GLIBC__)
FTS *ftsdir; FTS* ftsdir;
FTSENT *ftsdirEntry; FTSENT* ftsdirEntry;
NS_tchar searchpath[MAXPATHLEN]; mozilla::UniquePtr<NS_tchar[]> searchpath(get_full_path(dirpath));
@@ -3534,6 +3535,7 @@ @@ -4085,6 +4086,7 @@
} }
fts_close(ftsdir); fts_close(ftsdir);
@ -65,14 +76,3 @@
return rv; 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 <sys/stat.h>
-#else
+#elif !defined(__linux__) || defined(__GLIBC__)
#include <fts.h>
#endif
#include <dirent.h>

View File

@ -1,17 +1,6 @@
--- tools/profiler/core/platform.h --- tools/profiler/lul/LulElf.cpp.orig 2019-01-29 12:05:34.223834130 +0100
+++ tools/profiler/core/platform.h +++ tools/profiler/lul/LulElf.cpp 2019-01-29 12:08:02.480400845 +0100
@@ -29,6 +29,8 @@ @@ -469,10 +469,10 @@
#ifndef TOOLS_PLATFORM_H_
#define TOOLS_PLATFORM_H_
+#include <sys/types.h>
+
#include <stdint.h>
#include <math.h>
#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 @@
// Return the non-directory portion of FILENAME: the portion after the // Return the non-directory portion of FILENAME: the portion after the
// last slash, or the whole filename if there are no slashes. // last slash, or the whole filename if there are no slashes.
string BaseFileName(const string& filename) { string BaseFileName(const string& filename) {
@ -26,9 +15,21 @@
return base; return base;
} }
--- tools/profiler/core/platform-linux-android.cpp 2019-02-03 14:56:23.607139579 +0100 --- tools/profiler/core/platform-linux-android.cpp.orig 2019-01-29 12:09:40.980448579 +0100
+++ tools/profiler/core/platform-linux-android.cpp 2019-02-03 14:57:03.198587558 +0100 +++ tools/profiler/core/platform-linux-android.cpp 2019-01-29 12:11:09.689590967 +0100
@@ -497,8 +497,10 @@ @@ -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; ucontext_t sSyncUContext;
void Registers::SyncPopulate() { void Registers::SyncPopulate() {

View File

@ -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 <sys/user.h>

View File

@ -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.orig 2019-01-29 11:20:52.298793223 +0100
+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-09 23:48:56.254373557 +0200 +++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2019-01-29 11:21:48.250250850 +0100
@@ -11,7 +11,9 @@ @@ -14,7 +14,7 @@
#include <stdlib.h> #ifndef __GLIBC_PREREQ
#include <string.h> #define __GLIBC_PREREQ(a, b) 0
#include <features.h> #endif
-#if __GLIBC_PREREQ(2, 16) -#if __GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ +#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
+#include <sys/auxv.h>
+#elif __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h> #include <sys/auxv.h>
#else #else
#include <fcntl.h> #include <fcntl.h>
@@ -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

View File

@ -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 <malloc.h>
#include <string.h>

View File

@ -1,18 +1,34 @@
--- xpcom/base/nsMemoryReporterManager.cpp --- xpcom/base/nsMemoryReporterManager.cpp.orig 2019-03-19 17:12:20.844810044 +0100
+++ xpcom/base/nsMemoryReporterManager.cpp +++ xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100
@@ -153,6 +153,7 @@ ResidentUniqueDistinguishedAmount(int64_t* aN) @@ -123,6 +123,7 @@
return GetProcSelfSmapsPrivate(aN); return GetProcSelfSmapsPrivate(aN);
} }
+#ifdef __GLIBC__ +#ifdef __GLIBC__
#define HAVE_SYSTEM_HEAP_REPORTER 1 # ifdef HAVE_MALLINFO
nsresult # define HAVE_SYSTEM_HEAP_REPORTER 1
SystemHeapSize(int64_t* aSizeOut) static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
@@ -172,6 +173,7 @@ SystemHeapSize(int64_t* aSizeOut) @@ -142,6 +143,7 @@
*aSizeOut = size_t(info.hblkhd) + size_t(info.uordblks); return NS_OK;
return NS_OK;
} }
+#endif # endif
+#endif // __GLIBC__
#elif defined(__DragonFly__) || defined(__FreeBSD__) \ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|| defined(__NetBSD__) || defined(__OpenBSD__) \ 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;

View File

@ -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 <int N, typename T> using Vec = T __attribute__((ext_vector_type(N)));
#elif defined(__GNUC__)

View File

@ -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<CallMethodHelper> 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;
}

View File

@ -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)

View File

@ -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::<cmsghdr>())

View File

@ -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;

View File

@ -51,14 +51,14 @@
] ]
--- build/moz.configure/old.configure.orig --- build/moz.configure/old.configure.orig
+++ build/moz.configure/old.configure +++ build/moz.configure/old.configure
@@ -159,6 +159,7 @@ @@ -169,6 +169,7 @@
'--enable-accessibility', @old_configure_options(
'--enable-address-sanitizer', '--cache-file',
'--enable-alsa', '--datadir',
+ '--enable-sndio', + '--enable-sndio',
'--enable-bundled-fonts',
'--enable-clang-plugin',
'--enable-content-sandbox', '--enable-content-sandbox',
'--enable-cookies',
'--enable-cpp-rtti',
--- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig --- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig
+++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp +++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -349,6 +349,21 @@ @@ -349,6 +349,21 @@

View File

@ -0,0 +1,48 @@
# HG changeset patch
# User A. Wilcox <AWilcox@Wilcox-Tech.com>
# 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

View File

@ -3,24 +3,24 @@
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/thunderbird-i18n". # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/thunderbird-i18n".
# #
pkgname=thunderbird pkgname=thunderbird
version=60.8.0 version=68.0
revision=2 revision=1
build_helper="rust"
short_desc="Standalone Mail/News reader" short_desc="Standalone Mail/News reader"
maintainer="Enno Boland <gottox@voidlinux.org>" maintainer="Enno Boland <gottox@voidlinux.org>"
homepage="https://www.thunderbird.net/"
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" 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" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz"
checksum=1e7a13e64b63476d2235aaac6823fdab949af45cfcd5a25ee710cbae08c2f5d1 checksum=f87dade2dd64ef61de842812d3e42d82b8a541988da851077778abfa2ebd95d1
archs="i686* x86_64* ppc64*"
lib32disabled=yes lib32disabled=yes
hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm rust cargo hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo
llvm clang" llvm clang nodejs cbindgen python nasm"
makedepends="nss-devel 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 sqlite-devel libevent-devel libnotify-devel libvpx5-devel pixman-devel sqlite-devel libevent-devel libnotify-devel libvpx5-devel
libXrender-devel libXcomposite-devel libSM-devel libXt-devel libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
libXdamage-devel hunspell-devel $(vopt_if alsa alsa-lib-devel) libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel)
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if startup_notification startup-notification-devel) $(vopt_if startup_notification startup-notification-devel)
$(vopt_if xscreensaver libXScrnSaver-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="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland"
build_options_default="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 case $XBPS_TARGET_MACHINE in
ppc64*) ;; ppc64*) ;;
ppc*) broken="ftbfs in several places" ;; ppc*) broken="ftbfs in several places" ;;
esac esac
case $XBPS_TARGET_MACHINE in
armv6*)
broken="required NEON extensions are not supported on armv6"
;;
ppc64*) ;;
ppc*)
makedepends+=" libatomic-devel"
;;
esac
post_extract() { post_extract() {
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
*-musl) *-musl)
@ -60,7 +66,6 @@ do_build() {
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
*-musl) *-musl)
echo "ac_add_options --disable-jemalloc" >>.mozconfig echo "ac_add_options --disable-jemalloc" >>.mozconfig
echo "ac_add_options --disable-gold" >>.mozconfig
echo "ac_add_options --enable-release" >>.mozconfig echo "ac_add_options --enable-release" >>.mozconfig
;; ;;
esac esac
@ -71,6 +76,16 @@ do_build() {
;; ;;
esac 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 case "$XBPS_TARGET_MACHINE" in
x86_64-musl|i686-musl) x86_64-musl|i686-musl)
echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig
@ -79,6 +94,14 @@ do_build() {
esac esac
if [ "$CROSS_BUILD" ]; then 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_CFLAGS="${XBPS_CFLAGS}"
export HOST_CXXFLAGS="${XBPS_CXXFLAGS}" export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
export ac_cv_sqlite_secure_delete=yes \ export ac_cv_sqlite_secure_delete=yes \
@ -87,18 +110,37 @@ do_build() {
ac_cv_sqlite_dbstat_vtab=yes \ ac_cv_sqlite_dbstat_vtab=yes \
ac_cv_sqlite_enable_unlock_notify=yes \ ac_cv_sqlite_enable_unlock_notify=yes \
ac_cv_prog_hostcxx_works=1 ac_cv_prog_hostcxx_works=1
echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig 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 fi
mkdir -p third_party/rust/libloading/.deps
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
i686*) i686*)
export CFLAGS+=" -D_FILE_OFFSET_BITS=64" export CFLAGS+=" -D_FILE_OFFSET_BITS=64"
export CXXFLAGS+=" -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 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" export LDFLAGS+=" -Wl,-rpath=/usr/lib/thunderbird"
if [ "$SOURCE_DATE_EPOCH" ]; then if [ "$SOURCE_DATE_EPOCH" ]; then
@ -106,6 +148,10 @@ do_build() {
fi fi
export MOZ_MAKE_FLAGS="${makejobs}" 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 cat <<! >>.mozconfig
ac_add_options --with-google-location-service-api-keyfile="${wrksrc}/google-api-key" ac_add_options --with-google-location-service-api-keyfile="${wrksrc}/google-api-key"