summaryrefslogtreecommitdiff
path: root/user/thunderbird
diff options
context:
space:
mode:
Diffstat (limited to 'user/thunderbird')
-rw-r--r--user/thunderbird/APKBUILD45
-rw-r--r--user/thunderbird/skia-sucks1.patch84
-rw-r--r--user/thunderbird/skia-sucks2.patch44
-rw-r--r--user/thunderbird/skia-sucks3.patch30
-rw-r--r--user/thunderbird/yuv-be.patch48
5 files changed, 183 insertions, 68 deletions
diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD
index 1e9912cfd..b50a1a7e8 100644
--- a/user/thunderbird/APKBUILD
+++ b/user/thunderbird/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=thunderbird
-pkgver=68.0
+pkgver=68.6.0
pkgrel=0
pkgdesc="Email client from Mozilla"
url="https://www.thunderbird.net/"
@@ -13,8 +13,8 @@ depends=""
# system-libs
# actual deps
makedepends="
- autoconf2.13 cargo cbindgen clang llvm8-dev node ncurses-dev
- perl rust rust-stdlib cmd:which
+ autoconf2.13 cargo cbindgen clang llvm8-dev node ncurses-dev
+ perl rust cmd:which
ncurses-dev openssl-dev
@@ -27,7 +27,7 @@ makedepends="
startup-notification-dev unzip yasm zip gtk+2.0-dev
"
_py2ver="2.7.16"
-source="https://archive.mozilla.org/pub/thunderbird/candidates/$pkgver-candidates/build2/source/thunderbird-$pkgver.source.tar.xz
+source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
https://www.python.org/ftp/python/$_py2ver/Python-$_py2ver.tar.xz
mozconfig
@@ -38,9 +38,11 @@ source="https://archive.mozilla.org/pub/thunderbird/candidates/$pkgver-candidate
mozilla-build-arm.patch
rust-config.patch
shut-up-warning.patch
+ skia-sucks1.patch
+ skia-sucks2.patch
+ skia-sucks3.patch
stackwalk-x86-ppc.patch
webrtc-broken.patch
- yuv-be.patch
thunderbird.desktop
"
@@ -53,6 +55,16 @@ somask="liblgpllibs.so
_mozappdir=/usr/lib/thunderbird
ldpath="$_mozappdir"
+# secfixes:
+# 68.6.0-r0:
+# - CVE-2020-6805
+# - CVE-2020-6806
+# - CVE-2020-6807
+# - CVE-2020-6811
+# - CVE-2019-20503
+# - CVE-2020-6812
+# - CVE-2020-6814
+
unpack() {
default_unpack
[ -z $SKIP_PYTHON ] || return 0
@@ -81,22 +93,20 @@ unpack() {
}
prepare() {
- cd "$builddir"
default_prepare
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" ] || [ $JOBS -ge 16 ]; then
- JOBS=16
- fi
echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$JOBS\"" >> "$builddir"/mozconfig
case "$CARCH" in
pmmx|x86*)
echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig
;;
+ s390x)
+ echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig
+ ;;
esac
rm "$builddir"/third_party/python/virtualenv/virtualenv_support/pip*.whl
@@ -106,8 +116,6 @@ prepare() {
}
build() {
- cd "$builddir"
-
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
@@ -120,9 +128,6 @@ build() {
export UNIXCONFDIR="$srcdir"
- local extra_flags=""
- [ "$CARCH" = "s390x" ] && extra_flags="--disable-startupcache"
-
export PATH="$srcdir/python/bin:$PATH"
./mach build
}
@@ -130,18 +135,16 @@ build() {
run() {
cd "$builddir"/obj-$CHOST/dist/bin
export LD_LIBRARY_PATH=.
- ./firefox -no-remote -profile "$builddir"/obj-$CHOST/tmp/profile-default
+ ./thunderbird -no-remote -profile "$builddir"/obj-$CHOST/tmp/profile-default
}
package() {
- cd "$builddir"
export PATH="$srcdir/python/bin:$PATH"
DESTDIR="$pkgdir" ./mach install
install -m755 -d ${pkgdir}/usr/share/applications
install -m755 -d ${pkgdir}/usr/share/pixmaps
- local png
for png in comm/mail/branding/thunderbird/default*.png; do
local i="${_png%.png}"
i=${i##*/default}
@@ -155,7 +158,7 @@ package() {
${pkgdir}/usr/share/applications/thunderbird.desktop
}
-sha512sums="5177c11e841f6aa704634ce66fa9f1af02703d8c04dfeabf19829551f997cd80b60e8fa32af71ea64cf27af2be3956971bb6b75645dfc68417bb257a41872e3e thunderbird-68.0.source.tar.xz
+sha512sums="3502cc42b594eebf3511219ae8e7fb8a13594534abfe7a40ec32e5a3f60343cfab7c652b161a5f33af46bd5e6f096e3abd4a407c8b307ce4693089b471a42c3e thunderbird-68.6.0.source.tar.xz
16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0 Python-2.7.16.tar.xz
5519234df2934ac2f3d76c8cad7e4f0fe15cf83ea4beb32c6489d8b7839b3ebea88bdb342e0d2a9c1c7c95e9455d234b0a5aa0e73446fd8027b520f080a2bb5b mozconfig
ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613 bad-google-code.patch
@@ -165,7 +168,9 @@ c0b2bf43206c2a5154e560ef30189a1062ae856861b39f52ce69002390ff9972d43e387bfd2bf8d2
e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18 mozilla-build-arm.patch
45613d476e85fe333ef8091acce4806803953c1a99de4f03ff577cf20c5a1a3d635d0589e1490da104ef80721f4f1b1d35045af3c6892c1a468fa84095f27ad8 rust-config.patch
39ddb15d1453a8412275c36fc8db3befc69dffd4a362e932d280fb7fd1190db595a2af9b468ee49e0714f5e9df6e48eb5794122a64fa9f30d689de8693acbb15 shut-up-warning.patch
+e751ffab263f03d4c74feebc617e3af115b1b53cf54fe16c3acc585eec67773f37aa8de4c19599fa6478179b01439025112ef2b759aa9923c9900e7081cb65a9 skia-sucks1.patch
+9152bd3e6dc446337e6a2ed602279c620aedecc796ba28e777854c4f41fcf3067f9ebd086a4b63a6b76c2e69ec599ac6435b8eeda4f7488b1c45f69113facba4 skia-sucks2.patch
+7a1fa27e060b2f025eaebbd39fb5c62960b62450241437e6d057d58cef9faf1cd1a85efe3b6a37b865d686ff18e90605ebea3089b26243f2d14876c2107106a6 skia-sucks3.patch
452b47b825294779f98ed46bc1065dad76b79ff453521ef049934a120f349c84a1c863b16af1828fe053059823da9690ec917c055ae02dcc5c80c54cad732448 stackwalk-x86-ppc.patch
be68f1387aa6677875a67106e2d6a9db470c934c943056d3b53391a63034235108e41945c53957db427d9cdc59f0aa2f9e6f2f8cd862e090e512a3ab9cbcc9a8 webrtc-broken.patch
-2dfb986089c9afcd6a895302c8a5a1d299cffa4cc3c73fce784c29d348f362c1e7570109c4f09d328275d8549a96531736dd976411c15956b385d7fb211b8af2 yuv-be.patch
95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop"
diff --git a/user/thunderbird/skia-sucks1.patch b/user/thunderbird/skia-sucks1.patch
new file mode 100644
index 000000000..a02c3b775
--- /dev/null
+++ b/user/thunderbird/skia-sucks1.patch
@@ -0,0 +1,84 @@
+# HG changeset patch
+# Parent 548d0a2f3a22bfac32ec0c3921c6c969c8bf32a9
+
+diff -r 548d0a2f3a22 gfx/2d/ConvolutionFilter.cpp
+--- a/gfx/2d/ConvolutionFilter.cpp Mon Jul 22 16:57:54 2019 +0200
++++ b/gfx/2d/ConvolutionFilter.cpp Thu Jul 25 14:27:59 2019 +0200
+@@ -35,9 +35,38 @@
+ return true;
+ }
+
++static void ByteSwapArray(uint8_t *u8Array, int32_t size) {
++ uint32_t *array = reinterpret_cast<uint32_t*>(u8Array);
++ for (int pxl = 0; pxl < size; ++pxl) {
++ // Use an endian swap to move the bytes, i.e. BGRA -> ARGB.
++ uint32_t rgba = array[pxl];
++ array[pxl] = NativeEndian::swapToLittleEndian(rgba);
++ }
++}
++
+ void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst,
+ bool aHasAlpha) {
++#ifdef MOZ_BIG_ENDIAN
++ int outputSize = mFilter->numValues();
++
++ // Input size isn't handed in, so we have to calculate it quickly
++ int inputSize = 0;
++ for (int xx = 0; xx < outputSize; ++xx) {
++ // Get the filter that determines the current output pixel.
++ int filterOffset, filterLength;
++ mFilter->FilterForValue(xx, &filterOffset, &filterLength);
++ inputSize = std::max(inputSize, filterOffset + filterLength);
++ }
++
++ ByteSwapArray((uint8_t*)aSrc, inputSize);
++#endif
++
+ SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha);
++
++#ifdef MOZ_BIG_ENDIAN
++ ByteSwapArray((uint8_t*)aSrc, inputSize);
++ ByteSwapArray(aDst, outputSize);
++#endif
+ }
+
+ void ConvolutionFilter::ConvolveVertically(uint8_t* const* aSrc, uint8_t* aDst,
+@@ -49,8 +78,26 @@
+ int32_t filterLength;
+ auto filterValues =
+ mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength);
++
++#ifdef MOZ_BIG_ENDIAN
++ for (int filterY = 0; filterY < filterLength; filterY++) {
++ // Skia only knows LE, so we have to swizzle the input
++ ByteSwapArray(aSrc[filterY], aRowSize);
++ }
++#endif
++
+ SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst,
+ aHasAlpha);
++
++#ifdef MOZ_BIG_ENDIAN
++ // After skia is finished, we swizzle back to BE, in case
++ // the input is used again somewhere else
++ for (int filterY = 0; filterY < filterLength; filterY++) {
++ ByteSwapArray(aSrc[filterY], aRowSize);
++ }
++ // The destination array as well
++ ByteSwapArray(aDst, aRowSize);
++#endif
+ }
+
+ /* ConvolutionFilter::ComputeResizeFactor is derived from Skia's
+diff -r 548d0a2f3a22 gfx/skia/skia/include/core/SkPreConfig.h
+--- a/gfx/skia/skia/include/core/SkPreConfig.h Mon Jul 22 16:57:54 2019 +0200
++++ b/gfx/skia/skia/include/core/SkPreConfig.h Thu Jul 25 14:27:59 2019 +0200
+@@ -73,7 +73,7 @@
+ defined(__ppc__) || defined(__hppa) || \
+ defined(__PPC__) || defined(__PPC64__) || \
+ defined(_MIPSEB) || defined(__ARMEB__) || \
+- defined(__s390__) || \
++ defined(__s390__) || defined(__s390x__) || \
+ (defined(__sh__) && defined(__BIG_ENDIAN__)) || \
+ (defined(__ia64) && defined(__BIG_ENDIAN__))
+ #define SK_CPU_BENDIAN
diff --git a/user/thunderbird/skia-sucks2.patch b/user/thunderbird/skia-sucks2.patch
new file mode 100644
index 000000000..1a498f871
--- /dev/null
+++ b/user/thunderbird/skia-sucks2.patch
@@ -0,0 +1,44 @@
+# HG changeset patch
+# Parent aecb4600e5da17443b224c79eee178c1d8e155e3
+For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
+right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
+
+diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
+--- a/gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200
++++ b/gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200
+@@ -238,7 +238,18 @@
+ AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
+ AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
+
++ // On Big endian the commented out variant doesn't work,
++ // and honestly, I have no idea why it exists in the first place.
++ // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
++ // which gets a 64-bit integer, and FromBits returns 32-bit,
++ // cutting off the wrong half again.
++ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
++ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
++#ifdef SK_CPU_BENDIAN
++ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
++#else
+ AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
++#endif
+ AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
+ AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
+
+diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
+--- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200
++++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200
+@@ -203,7 +203,13 @@
+ // ~~~>
+ // a = 1*aa + d(1-1*aa) = aa + d(1-aa)
+ // c = 0*aa + d(1-1*aa) = d(1-aa)
++
++ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
++#ifdef SK_CPU_BENDIAN
++ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
++#else
+ return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
++#endif
+ + d.approxMulDiv255(aa.inv());
+ };
+ while (h --> 0) {
diff --git a/user/thunderbird/skia-sucks3.patch b/user/thunderbird/skia-sucks3.patch
new file mode 100644
index 000000000..9d2ffc410
--- /dev/null
+++ b/user/thunderbird/skia-sucks3.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# Parent 46ea866ca3acb8bb5e1709ceb799b9c94f591dec
+Problem description: Tab-titles that are too long to fit into a tab get faded out.
+ On big endian this is broken and instead of fading out, the
+ tab gets white and the font transparent, leading to an unreadable
+ tab-title
+Solution: This is not a real solution, but a hack. The real solution would have been
+ to byte-swap the correct buffer, but I could not find it.
+ So the next best thing is to deactivate the fading-effect. Now all tab-titles
+ are readable, albeit not as pretty to look at as they could be.
+Side-effects: I have not yet found an unwanted side-effect.
+
+diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
+--- a/gfx/2d/DrawTargetSkia.cpp Tue Oct 22 12:27:22 2019 +0200
++++ b/gfx/2d/DrawTargetSkia.cpp Thu Oct 31 09:11:56 2019 +0100
+@@ -1861,6 +1861,14 @@
+ SkCanvas::kPreserveLCDText_SaveLayerFlag |
+ (aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0));
+
++#if MOZ_BIG_ENDIAN
++ // Pushing a layer where an aMask is defined produces wrong output.
++ // We _should_ endian swap the data, but I couldn't find a workable way to do so
++ // Therefore I deactivate those layers in the meantime.
++ // The result is: Tab-titles that are longer than the available space should be faded out.
++ // The fading doesn't work, so we deactivate the fading-effect here.
++ if (!aMask)
++#endif
+ mCanvas->saveLayer(saveRec);
+
+ SetPermitSubpixelAA(aOpaque);
diff --git a/user/thunderbird/yuv-be.patch b/user/thunderbird/yuv-be.patch
deleted file mode 100644
index ccb0c2fd8..000000000
--- a/user/thunderbird/yuv-be.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-# 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
---- a/gfx/ycbcr/YCbCrUtils.cpp Wed Nov 07 04:50:21 2018 +0000
-+++ b/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