summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-10-22 23:30:58 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-10-22 23:30:58 +0000
commitdaf63c3be016f8177a14acd13ae0ad75482e18a5 (patch)
treed09ca20d3629d290aeb86baa3bd4f3751c67a301
parentfd4ce488b375774f8a11f81af831ab075405d64e (diff)
downloadpackages-daf63c3be016f8177a14acd13ae0ad75482e18a5.tar.gz
packages-daf63c3be016f8177a14acd13ae0ad75482e18a5.tar.bz2
packages-daf63c3be016f8177a14acd13ae0ad75482e18a5.tar.xz
packages-daf63c3be016f8177a14acd13ae0ad75482e18a5.zip
experimental/thunderbird: is servo's issue a musl one or ppc64 one?
-rw-r--r--experimental/thunderbird/APKBUILD119
-rw-r--r--experimental/thunderbird/bad-google-code.patch49
-rw-r--r--experimental/thunderbird/cmsghdr.patch11
-rw-r--r--experimental/thunderbird/endianness-js.patch144
-rw-r--r--experimental/thunderbird/fix-seccomp-bpf.patch14
-rw-r--r--experimental/thunderbird/mozconfig30
-rw-r--r--experimental/thunderbird/proper-system-hunspell.patch22
-rw-r--r--experimental/thunderbird/rust-config.patch20
-rw-r--r--experimental/thunderbird/skia.patch132
-rw-r--r--experimental/thunderbird/stackwalk-x86-ppc.patch16
-rw-r--r--experimental/thunderbird/webrtc-broken.patch30
11 files changed, 587 insertions, 0 deletions
diff --git a/experimental/thunderbird/APKBUILD b/experimental/thunderbird/APKBUILD
new file mode 100644
index 000000000..d947c08a0
--- /dev/null
+++ b/experimental/thunderbird/APKBUILD
@@ -0,0 +1,119 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=thunderbird
+pkgver=60.2.1
+pkgrel=0
+pkgdesc="Email client from Mozilla"
+url="https://www.mozilla.org/thunderbird/"
+arch="all"
+options="!check" # X11 required
+license="MPL"
+depends=""
+# moz build system stuff
+# python deps
+# system-libs
+# actual deps
+makedepends="
+ autoconf2.13 ncurses-dev perl cmd:which
+
+ ncurses-dev openssl-dev
+
+ alsa-lib-dev bzip2-dev icu-dev libevent-dev libffi-dev libpng-dev
+ libjpeg-turbo-dev nspr-dev nss-dev pulseaudio-dev zlib-dev
+
+ cargo clang fts-dev llvm6-dev rust
+ dbus-glib-dev gconf-dev gtk+2.0-dev gtk+3.0-dev hunspell-dev libsm-dev
+ libnotify-dev libxcomposite-dev libxdamage-dev libxrender-dev libxt-dev
+ nss-static sqlite-dev startup-notification-dev unzip yasm zip
+ "
+install=""
+subpackages=""
+source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
+ mozconfig
+ bad-google-code.patch
+ cmsghdr.patch
+ endianness-js.patch
+ fix-seccomp-bpf.patch
+ proper-system-hunspell.patch
+ rust-config.patch
+ skia.patch
+ stab.h
+ stackwalk-x86-ppc.patch
+ thunderbird.desktop
+ webrtc-broken.patch
+ "
+somask="liblgpllibs.so
+ libmozgtk.so
+ libmozsandbox.so
+ libxul.so"
+_tbirddir=/usr/lib/${pkgname}
+
+unpack() {
+ default_unpack
+ # just ripped from Firefox's APKBUILD...
+ [ -z $SKIP_PYTHON ] || return 0
+ msg "Killing all remaining hope for humanity and building Python 2..."
+ cd "$srcdir"
+ [ -d python ] && rm -r python
+ mkdir python
+ cd python
+ # 19:39 <+solar> just make the firefox build process build its own py2 copy
+ curl -O https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz
+ tar xJf Python-2.7.15.tar.xz
+ cd Python-2.7.15
+ # 20:03 <calvin> TheWilfox: there's always violence
+ ./configure --prefix="$srcdir/python"
+ make -j $JOBS
+ # 6 tests failed:
+ # test__locale test_os test_posix test_re test_strptime test_time
+ # make test
+ make -j $JOBS install
+}
+
+prepare() {
+ default_prepare
+ cp "$srcdir"/stab.h "$builddir"/toolkit/crashreporter/google-breakpad/src/
+ cp "$srcdir"/mozconfig "$builddir"/mozconfig
+ echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig
+ echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig
+ echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig
+ # too much memory
+ if [ -z "$JOBS" -o $JOBS -gt 32 ]; then
+ echo "mk_add_options MOZ_MAKE_FLAGS=\"-j32\"" >> "$builddir"/mozconfig
+ fi
+}
+
+build() {
+ cd "$builddir"
+
+ # reportedly needed for gcc6; confirm this?
+ export CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-schedule-insns2"
+
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,${_tbirddir}"
+ export USE_SHORT_LIBNAME=1
+
+ export PATH="$srcdir/python/bin:$PATH"
+ ./mach build
+}
+
+package() {
+ cd "$builddir"
+ export PATH="$srcdir/python/bin:$PATH"
+ DESTDIR="$pkgdir" ./mach install
+ install -D -m644 "$srcdir"/thunderbird.desktop \
+ "$pkgdir"/usr/share/applications/thunderbird.desktop
+}
+
+sha512sums="d74da3c90658c5baf09c22760cad31594524c09f2cd5aba81c5b15bb6db64d78f613562cb015d8a725b4902caa4a57a2d1dafce28284533747faed00f8268a02 thunderbird-60.2.1.source.tar.xz
+d7912b6a951aaeab9e212b66af612e0a76c5a523a50dcb4d7d7385002075970e2d16adeb85a2fa5a111e3c2e5e42b9fff1d8c193541237ac3d668300516430e5 mozconfig
+dce2523e9dc10719eae77cc1607de094e34526b3ff8694fb51a5116c118c89bb1c1b8b192c03b976663b3afab8e9fdbff79007b3ba0344186a7783b3dc597ebc bad-google-code.patch
+61c7117345b4bcb045ce0287aa368d90dffd7331347021ff345d5a7c46097ffd2575f38711309ce7bdbbbec15561e03fdabcb16235ed8a325ccc8c9d5bba35a6 cmsghdr.patch
+31f0cf9663443410a996002ed0357c2ea21692ce965a30d8bfb65d0f1827173da8d8b5c831ccbc199ecbe7a577613be0dd54a09db08e620fe37e1ce977a7afb0 endianness-js.patch
+70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch
+1a88c21c39d5878e2018463fe08dd3a960cdf10e650e06ef3e4f089a431800b50267d8749a7acde196bb47c45aa66058a6ed4fb4d60de2ab69e8a48cd5a109bc proper-system-hunspell.patch
+fd3b165e26ab931dd7eaf220d578c30b8772eab0a870710d59403c9823c2233ef941cd7eb25d1625d705de9e8a7138d0e8c4e227a185e9b687553132da96d81a rust-config.patch
+8ef2bc4404601f66c7505f3e0a2f6d1d11e8f11e5a888dce4942cf27c86fbdbcdd66cb3d98738b7d9e25538793986140e75d51a893d22c70714ed98ef50a9894 skia.patch
+0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
+d12ce112b97cbdba0748c5734a024b13032c5e0696efbd499764246e031d477b0f0a966aedc7b3bedd166bcdc2cc24d45bb9da5f678de9cff547bc6aa231cd16 stackwalk-x86-ppc.patch
+95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop
+76409619464259e3ba52e38d640c5b6210a7fecdc75cf124c185ef356507d4d266a845e9fcdeb7766dcd547f70748123c4fa1670f6e52aadd001a3c866dc2d51 webrtc-broken.patch"
diff --git a/experimental/thunderbird/bad-google-code.patch b/experimental/thunderbird/bad-google-code.patch
new file mode 100644
index 000000000..7c77a5edc
--- /dev/null
+++ b/experimental/thunderbird/bad-google-code.patch
@@ -0,0 +1,49 @@
+--- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
++++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
+@@ -45,6 +45,7 @@
+ #include <sys/mman.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <libgen.h>
+
+ #include <iostream>
+ #include <set>
+--- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
++++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
+@@ -41,6 +41,10 @@
+
+ #include "common/using_std_string.h"
+
++#ifndef N_UNDF
++#define N_UNDF 0
++#endif
++
+ using std::vector;
+
+ namespace google_breakpad {
+--- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
++++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
+@@ -55,7 +55,7 @@
+
+ #ifdef HAVE_MACH_O_NLIST_H
+ #include <mach-o/nlist.h>
+-#elif defined(HAVE_A_OUT_H)
++#elif 0
+ #include <a.out.h>
+ #endif
+
+--- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
++++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+@@ -1134,6 +1134,12 @@ struct kernel_statfs {
+ #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
diff --git a/experimental/thunderbird/cmsghdr.patch b/experimental/thunderbird/cmsghdr.patch
new file mode 100644
index 000000000..5fdc38353
--- /dev/null
+++ b/experimental/thunderbird/cmsghdr.patch
@@ -0,0 +1,11 @@
+diff -Naur firefox-60.0.orig/media/audioipc/audioipc/src/cmsg.rs firefox-60.0/media/audioipc/audioipc/src/cmsg.rs
+--- firefox-60.0.orig/media/audioipc/audioipc/src/cmsg.rs 2018-05-13 18:05:51.713781232 -0700
++++ firefox-60.0/media/audioipc/audioipc/src/cmsg.rs 2018-05-13 17:33:39.536856530 -0700
+@@ -108,6 +108,7 @@
+
+ let cmsghdr = cmsghdr {
+ cmsg_len: cmsg_len as _,
++ __pad1: 0,
+ cmsg_level: level,
+ cmsg_type: kind,
+ };
diff --git a/experimental/thunderbird/endianness-js.patch b/experimental/thunderbird/endianness-js.patch
new file mode 100644
index 000000000..98e1bd092
--- /dev/null
+++ b/experimental/thunderbird/endianness-js.patch
@@ -0,0 +1,144 @@
+# HG changeset patch
+# User Steve Fink <sfink@mozilla.com>
+# Date 1536603384 25200
+# Mon Sep 10 11:16:24 2018 -0700
+# Node ID f598dceb588d1adf503d30acf4e0915d07d34006
+# Parent b7dd3969261896020d7a9449d22f350a97e3517a
+# EXP-Topic b1488552.enD
+Bug 1488552 - JSString flags bit must alias the low 32 bits of JSObject.group_, not the high 32. r=tcampbell
+
+diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h
+--- a/js/src/gc/RelocationOverlay.h
++++ b/js/src/gc/RelocationOverlay.h
+@@ -29,24 +29,35 @@ struct Cell;
+ * This structure overlays a Cell that has been moved and provides a way to find
+ * its new location. It's used during generational and compacting GC.
+ */
+ class RelocationOverlay
+ {
+ /* See comment in js/public/HeapAPI.h. */
+ static const uint32_t Relocated = js::gc::Relocated;
+
++#if MOZ_LITTLE_ENDIAN
+ /*
+- * Keep the low 32 bits untouched. Use them to distinguish strings from
++ * Keep the first 32 bits untouched. Use them to distinguish strings from
+ * objects in the nursery.
+ */
+ uint32_t preserve_;
+
+ /* Set to Relocated when moved. */
+ uint32_t magic_;
++#elif JS_BITS_PER_WORD == 64
++ /*
++ * On big-endian, we need to reorder to keep preserve_ lined up with the
++ * low 32 bits of the aligned group_ pointer in JSObject.
++ */
++ uint32_t magic_;
++ uint32_t preserve_;
++#else
++# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
++#endif
+
+ /* The location |this| was moved to. */
+ Cell* newLocation_;
+
+ /* A list entry to track all relocated things. */
+ RelocationOverlay* next_;
+
+ public:
+diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h
+--- a/js/src/vm/StringType.h
++++ b/js/src/vm/StringType.h
+@@ -2,16 +2,17 @@
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+ #ifndef vm_StringType_h
+ #define vm_StringType_h
+
++#include "mozilla/EndianUtils.h"
+ #include "mozilla/MemoryReporting.h"
+ #include "mozilla/PodOperations.h"
+ #include "mozilla/Range.h"
+
+ #include "jsapi.h"
+ #include "jsfriendapi.h"
+
+ #include "builtin/String.h"
+@@ -161,18 +162,30 @@ class JSString : public js::gc::Cell
+ static const size_t NUM_INLINE_CHARS_LATIN1 = 2 * sizeof(void*) / sizeof(JS::Latin1Char);
+ static const size_t NUM_INLINE_CHARS_TWO_BYTE = 2 * sizeof(void*) / sizeof(char16_t);
+
+ /* Fields only apply to string types commented on the right. */
+ struct Data
+ {
+ union {
+ struct {
++#if MOZ_LITTLE_ENDIAN
+ uint32_t flags; /* JSString */
+ uint32_t length; /* JSString */
++#elif JS_BITS_PER_WORD == 64
++ /*
++ * On big-endian, we need to reorder to keep flags lined up
++ * with the low 32 bits of the aligned group_ pointer in
++ * JSObject.
++ */
++ uint32_t length; /* JSString */
++ uint32_t flags; /* JSString */
++#else
++# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
++#endif
+ };
+ uintptr_t flattenData; /* JSRope (temporary while flattening) */
+ } u1;
+ union {
+ union {
+ /* JS(Fat)InlineString */
+ JS::Latin1Char inlineStorageLatin1[NUM_INLINE_CHARS_LATIN1];
+ char16_t inlineStorageTwoByte[NUM_INLINE_CHARS_TWO_BYTE];
+--- thunderbird-60.2.1/js/src/gc/Marking-inl.h.old 2018-10-01 14:51:12.000000000 +0000
++++ thunderbird-60.2.1/js/src/gc/Marking-inl.h 2018-10-12 19:08:28.260000000 +0000
+@@ -92,10 +92,10 @@
+ MOZ_ASSERT(!isForwarded());
+ // The location of magic_ is important because it must never be valid to see
+ // the value Relocated there in a GC thing that has not been moved.
+- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t),
+- "RelocationOverlay::magic_ is in the wrong location");
+- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t),
+- "RelocationOverlay::magic_ is in the wrong location");
++ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t),
++ // "RelocationOverlay::magic_ is in the wrong location");
++ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t),
++ // "RelocationOverlay::magic_ is in the wrong location");
+ static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length),
+ "RelocationOverlay::magic_ is in the wrong location");
+ magic_ = Relocated;
+--- thunderbird-60.2.1/js/src/jsfriendapi.h.old 2018-10-01 14:51:13.000000000 +0000
++++ thunderbird-60.2.1/js/src/jsfriendapi.h 2018-10-12 19:12:06.190000000 +0000
+@@ -9,6 +9,7 @@
+
+ #include "mozilla/Atomics.h"
+ #include "mozilla/Casting.h"
++#include "mozilla/EndianUtils.h"
+ #include "mozilla/Maybe.h"
+ #include "mozilla/MemoryReporting.h"
+ #include "mozilla/UniquePtr.h"
+@@ -640,8 +641,15 @@
+ static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6);
+ static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5);
+ static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1;
++#if MOZ_LITTLE_ENDIAN
+ uint32_t flags;
+ uint32_t length;
++#elif JS_BITS_PER_WORD == 64
++ uint32_t length;
++ uint32_t flags;
++#else
++# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
++#endif
+ union {
+ const JS::Latin1Char* nonInlineCharsLatin1;
+ const char16_t* nonInlineCharsTwoByte;
diff --git a/experimental/thunderbird/fix-seccomp-bpf.patch b/experimental/thunderbird/fix-seccomp-bpf.patch
new file mode 100644
index 000000000..47cde56c7
--- /dev/null
+++ b/experimental/thunderbird/fix-seccomp-bpf.patch
@@ -0,0 +1,14 @@
+--- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc.orig 2015-09-23 09:10:08.812740571 +0200
++++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-09-23 09:11:38.404746155 +0200
+@@ -23,6 +23,11 @@
+ #include "sandbox/linux/services/android_ucontext.h"
+ #endif
+
++// musl libc defines siginfo_t __si_fields instead of _sifields
++#if defined(OS_LINUX) && !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ namespace {
+
+ struct arch_sigsys {
diff --git a/experimental/thunderbird/mozconfig b/experimental/thunderbird/mozconfig
new file mode 100644
index 000000000..491d27e47
--- /dev/null
+++ b/experimental/thunderbird/mozconfig
@@ -0,0 +1,30 @@
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+ac_add_options --disable-crashreporter
+ac_add_options --disable-install-strip
+ac_add_options --disable-jemalloc
+ac_add_options --disable-profiling
+ac_add_options --disable-strip
+ac_add_options --disable-tests
+ac_add_options --enable-application=comm/mail
+ac_add_options --enable-alsa
+ac_add_options --enable-calendar
+ac_add_options --enable-dbus
+ac_add_options --enable-debug
+ac_add_options --enable-default-toolkit=cairo-gtk3
+ac_add_options --enable-official-branding
+ac_add_options --enable-pie
+ac_add_options --enable-pulseaudio
+ac_add_options --enable-startup-notification
+ac_add_options --enable-system-ffi
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-updater
+ac_add_options --with-pthreads
+ac_add_options --with-system-bz2
+ac_add_options --with-system-icu
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-libevent
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-png
+ac_add_options --with-system-zlib
diff --git a/experimental/thunderbird/proper-system-hunspell.patch b/experimental/thunderbird/proper-system-hunspell.patch
new file mode 100644
index 000000000..056dacce6
--- /dev/null
+++ b/experimental/thunderbird/proper-system-hunspell.patch
@@ -0,0 +1,22 @@
+moz seem to have no idea what their own damn build system is doing...
+
+--- thunderbird-52.6.0/extensions/spellcheck/hunspell/glue/moz.build 2018-01-24 03:06:15.000000000 +0000
++++ thunderbird-52.6.0/extensions/spellcheck/hunspell/glue/moz.build 2018-03-12 09:17:05.386773708 +0000
+@@ -16,6 +16,9 @@
+ if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+ CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
+ else:
++ # This variable is referenced in configure.in. Make sure to change that file
++ # too if you need to change this variable.
++ DEFINES['HUNSPELL_STATIC'] = True
+ LOCAL_INCLUDES += ['../src']
+
+ LOCAL_INCLUDES += [
+@@ -33,7 +36,3 @@
+ 'RemoteSpellCheckEngineChild.h',
+ 'RemoteSpellCheckEngineParent.h',
+ ]
+-
+-# This variable is referenced in configure.in. Make sure to change that file
+-# too if you need to change this variable.
+-DEFINES['HUNSPELL_STATIC'] = True
diff --git a/experimental/thunderbird/rust-config.patch b/experimental/thunderbird/rust-config.patch
new file mode 100644
index 000000000..4dbddc2a9
--- /dev/null
+++ b/experimental/thunderbird/rust-config.patch
@@ -0,0 +1,20 @@
+look, another reason to hate google: fuchsia's triplets confuse the hell out of poor mozconfig
+
+meanwhile, make -foxkit- more important than -unknown-
+
+--- thunderbird-60.2.1/build/moz.configure/rust.configure.old 2018-10-01 14:51:04.000000000 +0000
++++ thunderbird-60.2.1/build/moz.configure/rust.configure 2018-10-11 23:13:15.370000000 +0000
+@@ -119,9 +119,13 @@
+ ambiguous = set()
+ per_raw_os = {}
+ for t in out:
++ if 'fuchsia' in t: continue
+ t = split_triplet(t, allow_unknown=True)
+ key = (t.cpu, t.endianness, t.os)
+ if key in per_os:
++ # hax to allow Adélie toolchains to work
++ if 'foxkit' in per_os[key].alias:
++ continue
+ previous = per_os[key]
+ per_raw_os[(previous.cpu, previous.endianness,
+ previous.raw_os)] = previous
diff --git a/experimental/thunderbird/skia.patch b/experimental/thunderbird/skia.patch
new file mode 100644
index 000000000..a44ef76ed
--- /dev/null
+++ b/experimental/thunderbird/skia.patch
@@ -0,0 +1,132 @@
+# HG changeset patch
+# User Lee Salzman <lsalzman@mozilla.com>
+# Date 1527131721 14400
+# Wed May 23 23:15:21 2018 -0400
+# Node ID a8d83bebeab4c07a850711aa2c241a56f784613e
+# Parent 50fbb3e601fef35e2a673895cb0b3bc05374458a
+fix big-endian Skia builds
+
+MozReview-Commit-ID: JQivGBE45qy
+
+diff --git a/gfx/skia/skia/include/core/SkColorPriv.h b/gfx/skia/skia/include/core/SkColorPriv.h
+--- a/gfx/skia/skia/include/core/SkColorPriv.h
++++ b/gfx/skia/skia/include/core/SkColorPriv.h
+@@ -50,27 +50,20 @@ static inline U8CPU SkUnitScalarClampToB
+ * For easier compatibility with Skia's GPU backend, we further restrict these
+ * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does
+ * not directly correspond to the same shift-order, since we have to take endianess
+ * into account.
+ *
+ * Here we enforce this constraint.
+ */
+
+-#ifdef SK_CPU_BENDIAN
+- #define SK_RGBA_R32_SHIFT 24
+- #define SK_RGBA_G32_SHIFT 16
+- #define SK_RGBA_B32_SHIFT 8
+- #define SK_RGBA_A32_SHIFT 0
+-#else
+- #define SK_RGBA_R32_SHIFT 0
+- #define SK_RGBA_G32_SHIFT 8
+- #define SK_RGBA_B32_SHIFT 16
+- #define SK_RGBA_A32_SHIFT 24
+-#endif
++#define SK_RGBA_R32_SHIFT 0
++#define SK_RGBA_G32_SHIFT 8
++#define SK_RGBA_B32_SHIFT 16
++#define SK_RGBA_A32_SHIFT 24
+
+ #define SkGetPackedA32(packed) ((uint32_t)((packed) << (24 - SK_A32_SHIFT)) >> 24)
+ #define SkGetPackedR32(packed) ((uint32_t)((packed) << (24 - SK_R32_SHIFT)) >> 24)
+ #define SkGetPackedG32(packed) ((uint32_t)((packed) << (24 - SK_G32_SHIFT)) >> 24)
+ #define SkGetPackedB32(packed) ((uint32_t)((packed) << (24 - SK_B32_SHIFT)) >> 24)
+
+ #define SkA32Assert(a) SkASSERT((unsigned)(a) <= SK_A32_MASK)
+ #define SkR32Assert(r) SkASSERT((unsigned)(r) <= SK_R32_MASK)
+diff --git a/gfx/skia/skia/include/core/SkImageInfo.h b/gfx/skia/skia/include/core/SkImageInfo.h
+--- a/gfx/skia/skia/include/core/SkImageInfo.h
++++ b/gfx/skia/skia/include/core/SkImageInfo.h
+@@ -79,17 +79,17 @@ enum SkColorType {
+
+ kLastEnum_SkColorType = kRGBA_F16_SkColorType,
+
+ #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
+ kN32_SkColorType = kBGRA_8888_SkColorType,
+ #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
+ kN32_SkColorType = kRGBA_8888_SkColorType,
+ #else
+- #error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order"
++ kN32_SkColorType = kBGRA_8888_SkColorType,
+ #endif
+ };
+
+ /**
+ * Returns the number of bytes-per-pixel for the specified colortype, or 0 if invalid.
+ */
+ SK_API int SkColorTypeBytesPerPixel(SkColorType ct);
+
+diff --git a/gfx/skia/skia/include/gpu/GrTypes.h b/gfx/skia/skia/include/gpu/GrTypes.h
+--- a/gfx/skia/skia/include/gpu/GrTypes.h
++++ b/gfx/skia/skia/include/gpu/GrTypes.h
+@@ -339,25 +339,22 @@ enum GrPixelConfig {
+ kPrivateConfig4_GrPixelConfig,
+ kPrivateConfig5_GrPixelConfig,
+
+ kLast_GrPixelConfig = kPrivateConfig5_GrPixelConfig
+ };
+ static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
+
+ // Aliases for pixel configs that match skia's byte order.
+-#ifndef SK_CPU_LENDIAN
+- #error "Skia gpu currently assumes little endian"
+-#endif
+ #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
+ #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
+ static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig;
+ #else
+- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format."
++ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
+ #endif
+
+ /**
+ * Optional bitfield flags that can be set on GrSurfaceDesc (below).
+ */
+ enum GrSurfaceFlags {
+ kNone_GrSurfaceFlags = 0x0,
+ /**
+diff --git a/gfx/skia/skia/src/core/SkColorData.h b/gfx/skia/skia/src/core/SkColorData.h
+--- a/gfx/skia/skia/src/core/SkColorData.h
++++ b/gfx/skia/skia/src/core/SkColorData.h
+@@ -27,27 +27,20 @@
+ * For easier compatibility with Skia's GPU backend, we further restrict these
+ * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does
+ * not directly correspond to the same shift-order, since we have to take endianess
+ * into account.
+ *
+ * Here we enforce this constraint.
+ */
+
+-#ifdef SK_CPU_BENDIAN
+- #define SK_BGRA_B32_SHIFT 24
+- #define SK_BGRA_G32_SHIFT 16
+- #define SK_BGRA_R32_SHIFT 8
+- #define SK_BGRA_A32_SHIFT 0
+-#else
+- #define SK_BGRA_B32_SHIFT 0
+- #define SK_BGRA_G32_SHIFT 8
+- #define SK_BGRA_R32_SHIFT 16
+- #define SK_BGRA_A32_SHIFT 24
+-#endif
++#define SK_BGRA_B32_SHIFT 0
++#define SK_BGRA_G32_SHIFT 8
++#define SK_BGRA_R32_SHIFT 16
++#define SK_BGRA_A32_SHIFT 24
+
+ #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA)
+ #error "can't define PMCOLOR to be RGBA and BGRA"
+ #endif
+
+ #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \
+ (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \
+ SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \
diff --git a/experimental/thunderbird/stackwalk-x86-ppc.patch b/experimental/thunderbird/stackwalk-x86-ppc.patch
new file mode 100644
index 000000000..5a4189847
--- /dev/null
+++ b/experimental/thunderbird/stackwalk-x86-ppc.patch
@@ -0,0 +1,16 @@
+--- thunderbird-52.6.0/mozglue/misc/StackWalk.cpp
++++ thunderbird-52.6.0/mozglue/misc/StackWalk.cpp
+@@ -41,13 +41,7 @@ static CriticalAddress gCriticalAddress;
+ #define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+ #endif
+
+-#if (defined(linux) && \
+- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
+- defined(HAVE__UNWIND_BACKTRACE)))
+-#define MOZ_STACKWALK_SUPPORTS_LINUX 1
+-#else
+ #define MOZ_STACKWALK_SUPPORTS_LINUX 0
+-#endif
+
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ #define HAVE___LIBC_STACK_END 1
diff --git a/experimental/thunderbird/webrtc-broken.patch b/experimental/thunderbird/webrtc-broken.patch
new file mode 100644
index 000000000..593942fef
--- /dev/null
+++ b/experimental/thunderbird/webrtc-broken.patch
@@ -0,0 +1,30 @@
+diff -Naur firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c
+--- firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 17:33:55.266855917 -0700
++++ firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 20:21:08.158464933 -0700
+@@ -11,7 +11,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <features.h>
+-#if __GLIBC_PREREQ(2, 16)
++#if __linux__
+ #include <sys/auxv.h>
+ #else
+ #include <fcntl.h>
+@@ -29,7 +29,7 @@
+ int architecture = 0;
+ unsigned long hwcap = 0;
+ const char* platform = NULL;
+-#if __GLIBC_PREREQ(2, 16)
++#if __linux__
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
+@@ -53,7 +53,7 @@
+ }
+ close(fd);
+ }
+-#endif // __GLIBC_PREREQ(2,16)
++#endif // __linux__
+ #if defined(__aarch64__)
+ architecture = 8;
+ if ((hwcap & HWCAP_FP) != 0)