mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
mail/thunderbird-esr: copy thunderbird 128.9.0
in preparation for importing Thunderbird 137.0 Release Notes (soon): https://www.thunderbird.net/en-US/thunderbird/128.9.0esr/releasenotes/
This commit is contained in:
parent
359023517d
commit
a9097e0cd9
38 changed files with 101187 additions and 0 deletions
|
@ -736,6 +736,7 @@
|
|||
SUBDIR += textmail
|
||||
SUBDIR += thunderbird
|
||||
SUBDIR += thunderbird-dictionaries
|
||||
SUBDIR += thunderbird-esr
|
||||
SUBDIR += tlb
|
||||
SUBDIR += tmpmail
|
||||
SUBDIR += tpop3d
|
||||
|
|
72
mail/thunderbird-esr/Makefile
Normal file
72
mail/thunderbird-esr/Makefile
Normal file
|
@ -0,0 +1,72 @@
|
|||
PORTNAME= thunderbird
|
||||
DISTVERSION= 128.9.0
|
||||
CATEGORIES= mail news net-im wayland
|
||||
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
|
||||
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}esr-candidates/build1/source
|
||||
PKGNAMESUFFIX= -esr
|
||||
DISTFILES= ${DISTNAME}esr.source${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= gecko@FreeBSD.org
|
||||
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
|
||||
WWW= https://www.mozilla.com/thunderbird/
|
||||
|
||||
BUILD_DEPENDS= nspr>=4.32:devel/nspr \
|
||||
nss>=3.101:security/nss \
|
||||
libevent>=2.1.8:devel/libevent \
|
||||
harfbuzz>=8.5.0:print/harfbuzz \
|
||||
graphite2>=1.3.14:graphics/graphite2 \
|
||||
png>=1.6.43:graphics/png \
|
||||
dav1d>=1.0.0:multimedia/dav1d \
|
||||
libvpx>=1.14.0:multimedia/libvpx \
|
||||
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
|
||||
v4l_compat>0:multimedia/v4l_compat \
|
||||
autoconf2.13:devel/autoconf2.13 \
|
||||
nasm:devel/nasm \
|
||||
yasm:devel/yasm \
|
||||
zip:archivers/zip \
|
||||
${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \
|
||||
${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc@${LLVM_VERSION} \
|
||||
wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION}
|
||||
LIB_DEPENDS= libjson-c.so:devel/json-c
|
||||
|
||||
USE_GECKO= gecko
|
||||
CPE_PRODUCT= ${PORTNAME}_esr
|
||||
CONFLICTS_INSTALL= thunderbird
|
||||
# cannot use system icu: calendar is completely broken by
|
||||
# https://unicode-org.atlassian.net/browse/ICU-22132 (fix not in 74.1)
|
||||
USE_MOZILLA= -icu -sqlite
|
||||
CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234
|
||||
|
||||
USES= tar:xz
|
||||
|
||||
MOZ_OPTIONS= --enable-application=comm/mail --enable-official-branding
|
||||
MOZ_OPTIONS+= --with-system-bz2 --with-system-jsonc
|
||||
MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot
|
||||
MOZ_MK_OPTIONS= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
|
||||
MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
|
||||
|
||||
PORTNAME_ICON= ${MOZILLA}.png
|
||||
PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
|
||||
|
||||
SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
|
||||
|
||||
OPTIONS_DEFAULT=CANBERRA
|
||||
|
||||
.include "${.CURDIR}/../../www/firefox/Makefile.options"
|
||||
|
||||
post-extract:
|
||||
@${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON:R}|;s|@MOZILLA@|${MOZILLA}|' \
|
||||
<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||
${WRKSRC}/comm/mail/app/nsMailApp.cpp
|
||||
|
||||
port-pre-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/defaults
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${STAGEDIR}${PREFIX}/share/applications
|
||||
${LN} -sf ${PORTNAME_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME_ICON}
|
||||
|
||||
.include <bsd.port.mk>
|
3
mail/thunderbird-esr/distinfo
Normal file
3
mail/thunderbird-esr/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1742857279
|
||||
SHA256 (thunderbird-128.9.0esr.source.tar.xz) = 735579c7fd7018ef16ad3b28ba3f254d957da33435b3b1af945d95fd20f9407b
|
||||
SIZE (thunderbird-128.9.0esr.source.tar.xz) = 676939592
|
29
mail/thunderbird-esr/files/patch-addon-search
Normal file
29
mail/thunderbird-esr/files/patch-addon-search
Normal file
|
@ -0,0 +1,29 @@
|
|||
https://github.com/mozilla/addons/issues/708
|
||||
https://github.com/mozilla/addons-frontend/issues/4610
|
||||
|
||||
diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
index 8d4d178924..500eaef103 100644
|
||||
--- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
+++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
@@ -715,7 +715,7 @@ export var AddonRepository = {
|
||||
addon.version = String(aEntry.current_version.version);
|
||||
if (Array.isArray(aEntry.current_version.files)) {
|
||||
for (let file of aEntry.current_version.files) {
|
||||
- if (file.platform == "all" || file.platform == lazy.PLATFORM) {
|
||||
+ if (file.platform == "all" || file.platform == "linux" || file.platform == lazy.PLATFORM) {
|
||||
if (file.url) {
|
||||
addon.sourceURI = lazy.NetUtil.newURI(file.url);
|
||||
}
|
||||
diff --git toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
|
||||
index 0b81770b94..19669951dc 100644
|
||||
--- toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
|
||||
+++ toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
|
||||
@@ -635,7 +635,7 @@ export class AddonInternal {
|
||||
// Something is causing errors in here
|
||||
try {
|
||||
for (let platform of this.targetPlatforms) {
|
||||
- if (platform.os == Services.appinfo.OS) {
|
||||
+ if (platform.os == "Linux" || platform.os == Services.appinfo.OS) {
|
||||
if (platform.abi) {
|
||||
needsABI = true;
|
||||
if (platform.abi === abi) {
|
|
@ -0,0 +1,14 @@
|
|||
diff --git browser/app/nsBrowserApp.cpp browser/app/nsBrowserApp.cpp
|
||||
index e1f11b9cfd..a15b129402 100644
|
||||
--- browser/app/nsBrowserApp.cpp
|
||||
+++ browser/app/nsBrowserApp.cpp
|
||||
@@ -341,6 +341,9 @@ int main(int argc, char* argv[], char* envp[]) {
|
||||
}
|
||||
# endif
|
||||
|
||||
+ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
|
||||
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
|
||||
+
|
||||
# ifdef HAS_DLL_BLOCKLIST
|
||||
uint32_t initFlags =
|
||||
gBlocklistInitFlags | eDllBlocklistInitFlagIsChildProcess;
|
43
mail/thunderbird-esr/files/patch-bug1269654_comment5
Normal file
43
mail/thunderbird-esr/files/patch-bug1269654_comment5
Normal file
|
@ -0,0 +1,43 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1269654#c5
|
||||
https://bug1269654.bmoattachments.org/attachment.cgi?id=8749234
|
||||
handle big-endian formats in Cairo format conversions
|
||||
|
||||
# HG changeset patch
|
||||
# User Lee Salzman <lsalzman@mozilla.com>
|
||||
# Date 1462463631 14400
|
||||
# Thu May 05 11:53:51 2016 -0400
|
||||
# Node ID 8da374804a09977c8f89af5e6e0cb37cb074595d
|
||||
# Parent 29662e28a9c93ac67ee0b8ddfb65a9f29bbf73f5
|
||||
handle big-endian formats in Cairo format conversions
|
||||
|
||||
--- gfx/2d/HelpersCairo.h.orig 2019-12-02 17:51:16.633474000 +0100
|
||||
+++ gfx/2d/HelpersCairo.h 2019-12-02 17:52:44.939998000 +0100
|
||||
@@ -147,7 +147,14 @@ static inline cairo_format_t GfxFormatToCairoFormat(Su
|
||||
case SurfaceFormat::R5G6B5_UINT16:
|
||||
return CAIRO_FORMAT_RGB16_565;
|
||||
default:
|
||||
- gfxCriticalError() << "Unknown image format " << (int)format;
|
||||
+ // _UINT32 formats don't match B8G8R8[AX]8 on big-endian platforms,
|
||||
+ // and Moz2d uses B8G8R8[AX]8 as if it was _UINT32.
|
||||
+ // See bug 1269654
|
||||
+ if (format == SurfaceFormat::B8G8R8X8) {
|
||||
+ return CAIRO_FORMAT_RGB24;
|
||||
+ } else if (format != SurfaceFormat::B8G8R8A8) {
|
||||
+ gfxCriticalError() << "Unknown image format " << (int)format;
|
||||
+ }
|
||||
return CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +184,11 @@ static inline cairo_content_t GfxFormatToCairoContent(
|
||||
case SurfaceFormat::A8:
|
||||
return CAIRO_CONTENT_ALPHA;
|
||||
default:
|
||||
- gfxCriticalError() << "Unknown image content format " << (int)format;
|
||||
+ if (format == SurfaceFormat::B8G8R8X8) {
|
||||
+ return CAIRO_CONTENT_COLOR;
|
||||
+ } else if (format != SurfaceFormat::B8G8R8A8) {
|
||||
+ gfxCriticalError() << "Unknown image content format " << (int)format;
|
||||
+ }
|
||||
return CAIRO_CONTENT_COLOR_ALPHA;
|
||||
}
|
||||
}
|
36
mail/thunderbird-esr/files/patch-bug1504834_comment10
Normal file
36
mail/thunderbird-esr/files/patch-bug1504834_comment10
Normal file
|
@ -0,0 +1,36 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c10
|
||||
https://bug1504834.bmoattachments.org/attachment.cgi?id=9111147
|
||||
mozilla-bmo1504834-part4.patch
|
||||
|
||||
# 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 --git gfx/2d/DrawTargetSkia.cpp gfx/2d/DrawTargetSkia.cpp
|
||||
index 6bbef8d..161b96f 100644
|
||||
--- gfx/2d/DrawTargetSkia.cpp
|
||||
+++ gfx/2d/DrawTargetSkia.cpp
|
||||
@@ -1903,6 +1903,14 @@ void DrawTargetSkia::PushLayerWithBlend(bool aOpaque, Float aOpacity,
|
||||
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);
|
||||
|
83
mail/thunderbird-esr/files/patch-bug1504834_comment5
Normal file
83
mail/thunderbird-esr/files/patch-bug1504834_comment5
Normal file
|
@ -0,0 +1,83 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c5
|
||||
https://bugzilla.mozilla.org/attachment.cgi?id=9028600
|
||||
Rough progress patch
|
||||
|
||||
|
||||
diff --git gfx/2d/DrawTargetSkia.cpp gfx/2d/DrawTargetSkia.cpp
|
||||
index 6bbef8d..82b04ba 100644
|
||||
--- gfx/2d/DrawTargetSkia.cpp
|
||||
+++ gfx/2d/DrawTargetSkia.cpp
|
||||
@@ -154,8 +154,7 @@ static IntRect CalculateSurfaceBounds(const IntSize& aSize, const Rect* aBounds,
|
||||
return surfaceBounds.Intersect(bounds);
|
||||
}
|
||||
|
||||
-static const int kARGBAlphaOffset =
|
||||
- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
|
||||
+static const int kARGBAlphaOffset = 0;
|
||||
|
||||
static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
|
||||
const int32_t aStride, SurfaceFormat aFormat) {
|
||||
diff --git gfx/2d/Types.h gfx/2d/Types.h
|
||||
index 6b3bdc7..7c6c342 100644
|
||||
--- gfx/2d/Types.h
|
||||
+++ gfx/2d/Types.h
|
||||
@@ -90,15 +90,8 @@ enum class SurfaceFormat : int8_t {
|
||||
// The following values are endian-independent synonyms. The _UINT32 suffix
|
||||
// indicates that the name reflects the layout when viewed as a uint32_t
|
||||
// value.
|
||||
-#if MOZ_LITTLE_ENDIAN()
|
||||
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
|
||||
X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB
|
||||
-#elif MOZ_BIG_ENDIAN()
|
||||
- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
|
||||
- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB
|
||||
-#else
|
||||
-# error "bad endianness"
|
||||
-#endif
|
||||
|
||||
// The following values are OS and endian-independent synonyms.
|
||||
//
|
||||
--- gfx/skia/skia/modules/skcms/skcms.cc.orig
|
||||
+++ gfx/skia/skia/modules/skcms/skcms.cc
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <avx512fintrin.h>
|
||||
#include <avx512dqintrin.h>
|
||||
#endif
|
||||
+#else
|
||||
+ #define SKCMS_PORTABLE
|
||||
#endif
|
||||
|
||||
static bool runtime_cpu_detection = true;
|
||||
@@ -324,20 +326,28 @@
|
||||
static uint16_t read_big_u16(const uint8_t* ptr) {
|
||||
uint16_t be;
|
||||
memcpy(&be, ptr, sizeof(be));
|
||||
-#if defined(_MSC_VER)
|
||||
- return _byteswap_ushort(be);
|
||||
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
+ return be;
|
||||
#else
|
||||
+ #if defined(_MSC_VER)
|
||||
+ return _byteswap_ushort(be);
|
||||
+ #else
|
||||
return __builtin_bswap16(be);
|
||||
+ #endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint32_t read_big_u32(const uint8_t* ptr) {
|
||||
uint32_t be;
|
||||
memcpy(&be, ptr, sizeof(be));
|
||||
-#if defined(_MSC_VER)
|
||||
- return _byteswap_ulong(be);
|
||||
+#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__
|
||||
+ return be;
|
||||
#else
|
||||
+ #if defined(_MSC_VER)
|
||||
+ return _byteswap_ulong(be);
|
||||
+ #else
|
||||
return __builtin_bswap32(be);
|
||||
+ #endif
|
||||
#endif
|
||||
}
|
||||
|
131
mail/thunderbird-esr/files/patch-bug1559213
Normal file
131
mail/thunderbird-esr/files/patch-bug1559213
Normal file
|
@ -0,0 +1,131 @@
|
|||
commit 25a5572d5cd137aa6d893e09a00bd39908a59a18
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
Date: Tue Sep 10 22:23:32 2024 +0200
|
||||
|
||||
based on:
|
||||
commit 717bba28411c
|
||||
Author: Jory A. Pratt <anarchy@gentoo.org>
|
||||
Date: Thu Jun 13 11:53:00 2019 -0700
|
||||
|
||||
Bug 1559213 - Allow to use system av1 libs instead of bundled.
|
||||
|
||||
diff --git config/external/moz.build config/external/moz.build
|
||||
index a24b470396cf..547f5f5c9e04 100644
|
||||
--- config/external/moz.build
|
||||
+++ config/external/moz.build
|
||||
@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
|
||||
external_dirs += ["media/libvpx"]
|
||||
|
||||
if CONFIG["MOZ_AV1"]:
|
||||
- external_dirs += ["media/libaom"]
|
||||
- external_dirs += ["media/libdav1d"]
|
||||
+ if not CONFIG["MOZ_SYSTEM_AV1"]:
|
||||
+ external_dirs += ["media/libaom"]
|
||||
+ external_dirs += ["media/libdav1d"]
|
||||
|
||||
if not CONFIG["MOZ_SYSTEM_PNG"]:
|
||||
external_dirs += ["media/libpng"]
|
||||
diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
|
||||
index 61536cc6e225..29cf635bbb44 100644
|
||||
--- dom/media/platforms/moz.build
|
||||
+++ dom/media/platforms/moz.build
|
||||
@@ -71,6 +71,11 @@ if CONFIG["MOZ_AV1"]:
|
||||
"agnostic/AOMDecoder.cpp",
|
||||
"agnostic/DAV1DDecoder.cpp",
|
||||
]
|
||||
+ if CONFIG['MOZ_SYSTEM_AV1']:
|
||||
+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
|
||||
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
|
||||
+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
|
||||
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
|
||||
|
||||
if CONFIG["MOZ_OMX"]:
|
||||
EXPORTS += [
|
||||
diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
|
||||
index 6f09049a6068..90a82a19a9d1 100644
|
||||
--- media/ffvpx/libavcodec/moz.build
|
||||
+++ media/ffvpx/libavcodec/moz.build
|
||||
@@ -119,10 +119,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
|
||||
'vp9recon.c',
|
||||
'vpx_rac.c',
|
||||
]
|
||||
- USE_LIBS += [
|
||||
- 'dav1d',
|
||||
- 'media_libdav1d_asm',
|
||||
- ]
|
||||
+ if CONFIG["MOZ_SYSTEM_AV1"]:
|
||||
+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
|
||||
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
|
||||
+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
|
||||
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
|
||||
+ else:
|
||||
+ USE_LIBS += [
|
||||
+ 'dav1d',
|
||||
+ 'media_libdav1d_asm',
|
||||
+ ]
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
LOCAL_INCLUDES += ['/media/mozva']
|
||||
SOURCES += [
|
||||
diff --git media/libopus/moz.build media/libopus/moz.build
|
||||
index 943aee79ee99..4ad07e3e98af 100644
|
||||
--- media/libopus/moz.build
|
||||
+++ media/libopus/moz.build
|
||||
@@ -58,7 +58,7 @@ if not CONFIG["MOZ_SAMPLE_TYPE_FLOAT32"]:
|
||||
DEFINES["FIXED_POINT"] = 1
|
||||
DEFINES["DISABLE_FLOAT_API"] = True
|
||||
|
||||
-if CONFIG["OS_ARCH"] == "Linux":
|
||||
+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
|
||||
OS_LIBS += [
|
||||
"m",
|
||||
]
|
||||
diff --git media/libvorbis/moz.build media/libvorbis/moz.build
|
||||
index cd17d4f89759..816edd72a000 100644
|
||||
--- media/libvorbis/moz.build
|
||||
+++ media/libvorbis/moz.build
|
||||
@@ -45,7 +45,7 @@ LOCAL_INCLUDES += ['lib']
|
||||
if CONFIG['OS_ARCH'] == 'SunOS':
|
||||
DEFINES['HAVE_ALLOCA_H'] = True
|
||||
|
||||
-if CONFIG["OS_ARCH"] == "Linux":
|
||||
+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
|
||||
OS_LIBS += [
|
||||
"m",
|
||||
]
|
||||
diff --git toolkit/moz.configure toolkit/moz.configure
|
||||
index 1f85d2831f2f..07294b93f850 100644
|
||||
--- toolkit/moz.configure
|
||||
+++ toolkit/moz.configure
|
||||
@@ -883,7 +883,23 @@ def av1(value):
|
||||
return True
|
||||
|
||||
|
||||
-@depends(target, when=av1 & compile_environment)
|
||||
+option("--with-system-av1",
|
||||
+ help="Use system av1 (located with pkgconfig)")
|
||||
+
|
||||
+system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
|
||||
+ when="--with-system-av1")
|
||||
+
|
||||
+system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1",
|
||||
+ when="--with-system-av1")
|
||||
+
|
||||
+@depends(system_libaom_info, system_libdav1d_info)
|
||||
+def system_av1(system_libaom_info, system_libdav1d_info):
|
||||
+ has_av1_libs = False
|
||||
+ if system_libaom_info and system_libdav1d_info:
|
||||
+ has_av1_libs = True
|
||||
+ return has_av1_libs
|
||||
+
|
||||
+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
|
||||
def dav1d_asm(target):
|
||||
if target.cpu in ("aarch64", "x86", "x86_64"):
|
||||
return True
|
||||
@@ -899,6 +915,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
|
||||
set_define("MOZ_DAV1D_ASM", dav1d_asm)
|
||||
set_config("MOZ_AV1", av1)
|
||||
set_define("MOZ_AV1", av1)
|
||||
+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
|
||||
|
||||
# JXL Image Codec Support
|
||||
# ==============================================================
|
191
mail/thunderbird-esr/files/patch-bug1612181_comment1
Normal file
191
mail/thunderbird-esr/files/patch-bug1612181_comment1
Normal file
|
@ -0,0 +1,191 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1612181
|
||||
https://bug1612181.bmoattachments.org/attachment.cgi?id=9123550
|
||||
|
||||
|
||||
--- xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc64_linux.S.orig 2020-01-29 19:25:30.967574000 +0100
|
||||
+++ xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc64_linux.S 2020-01-29 19:26:50.465737000 +0100
|
||||
@@ -62,11 +62,11 @@ NS_InvokeByIndex:
|
||||
.NS_InvokeByIndex:
|
||||
#endif
|
||||
mflr 0
|
||||
- std 0,16(r1)
|
||||
+ std 0,16(%r1)
|
||||
|
||||
- std r29,-24(r1)
|
||||
- std r30,-16(r1)
|
||||
- std r31,-8(r1)
|
||||
+ std r29,-24(%r1)
|
||||
+ std r30,-16(%r1)
|
||||
+ std r31,-8(%r1)
|
||||
|
||||
mr r29,r3 # Save 'that' in r29
|
||||
mr r30,r4 # Save 'methodIndex' in r30
|
||||
@@ -79,7 +79,7 @@ NS_InvokeByIndex:
|
||||
#
|
||||
# | (fixed area + | | 7 GP | 13 FP | 3 NV |
|
||||
# | param. save) |(params)........| regs | regs | regs |
|
||||
- # (r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(r31)
|
||||
+ # (%r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(%r31)
|
||||
|
||||
# +stack frame, -unused stack params, +regs storage, +1 for alignment
|
||||
addi r7,r5,((STACK_PARAMS/8)-7+7+13+3+1)
|
||||
@@ -105,56 +105,56 @@ NS_InvokeByIndex:
|
||||
|
||||
# Set up to invoke function
|
||||
|
||||
- ld r9,0(r29) # vtable (r29 is 'that')
|
||||
+ ld r9,0(%r29) # vtable (%r29 is 'that')
|
||||
mr r3,r29 # self is first arg, obviously
|
||||
|
||||
sldi r30,r30,3 # Find function descriptor
|
||||
add r9,r9,r30
|
||||
- ld r12,0(r9)
|
||||
+ ld r12,0(%r9)
|
||||
|
||||
- std r2,STACK_TOC(r1) # Save r2 (TOC pointer)
|
||||
+ std r2,STACK_TOC(%r1) # Save r2 (TOC pointer)
|
||||
|
||||
#if _CALL_ELF == 2
|
||||
mtctr r12
|
||||
#else
|
||||
- ld r0,0(r12) # Actual address from fd.
|
||||
+ ld r0,0(%r12) # Actual address from fd.
|
||||
mtctr 0
|
||||
- ld r11,16(r12) # Environment pointer from fd.
|
||||
- ld r2,8(r12) # TOC pointer from fd.
|
||||
+ ld r11,16(%r12) # Environment pointer from fd.
|
||||
+ ld r2,8(%r12) # TOC pointer from fd.
|
||||
#endif
|
||||
|
||||
# Load FP and GP registers as required
|
||||
- ld r4, -(23*8)(r31)
|
||||
- ld r5, -(22*8)(r31)
|
||||
- ld r6, -(21*8)(r31)
|
||||
- ld r7, -(20*8)(r31)
|
||||
- ld r8, -(19*8)(r31)
|
||||
- ld r9, -(18*8)(r31)
|
||||
- ld r10, -(17*8)(r31)
|
||||
+ ld r4, -(23*8)(%r31)
|
||||
+ ld r5, -(22*8)(%r31)
|
||||
+ ld r6, -(21*8)(%r31)
|
||||
+ ld r7, -(20*8)(%r31)
|
||||
+ ld r8, -(19*8)(%r31)
|
||||
+ ld r9, -(18*8)(%r31)
|
||||
+ ld r10, -(17*8)(%r31)
|
||||
|
||||
- lfd f1, -(16*8)(r31)
|
||||
- lfd f2, -(15*8)(r31)
|
||||
- lfd f3, -(14*8)(r31)
|
||||
- lfd f4, -(13*8)(r31)
|
||||
- lfd f5, -(12*8)(r31)
|
||||
- lfd f6, -(11*8)(r31)
|
||||
- lfd f7, -(10*8)(r31)
|
||||
- lfd f8, -(9*8)(r31)
|
||||
- lfd f9, -(8*8)(r31)
|
||||
- lfd f10, -(7*8)(r31)
|
||||
- lfd f11, -(6*8)(r31)
|
||||
- lfd f12, -(5*8)(r31)
|
||||
- lfd f13, -(4*8)(r31)
|
||||
+ lfd f1, -(16*8)(%r31)
|
||||
+ lfd f2, -(15*8)(%r31)
|
||||
+ lfd f3, -(14*8)(%r31)
|
||||
+ lfd f4, -(13*8)(%r31)
|
||||
+ lfd f5, -(12*8)(%r31)
|
||||
+ lfd f6, -(11*8)(%r31)
|
||||
+ lfd f7, -(10*8)(%r31)
|
||||
+ lfd f8, -(9*8)(%r31)
|
||||
+ lfd f9, -(8*8)(%r31)
|
||||
+ lfd f10, -(7*8)(%r31)
|
||||
+ lfd f11, -(6*8)(%r31)
|
||||
+ lfd f12, -(5*8)(%r31)
|
||||
+ lfd f13, -(4*8)(%r31)
|
||||
|
||||
bctrl # Do it
|
||||
|
||||
- ld r2,STACK_TOC(r1) # Load our own TOC pointer
|
||||
- ld r1,0(r1) # Revert stack frame
|
||||
- ld 0,16(r1) # Reload lr
|
||||
+ ld r2,STACK_TOC(%r1) # Load our own TOC pointer
|
||||
+ ld r1,0(%r1) # Revert stack frame
|
||||
+ ld 0,16(%r1) # Reload lr
|
||||
mtlr 0
|
||||
- ld 29,-24(r1) # Restore NVGPRS
|
||||
- ld 30,-16(r1)
|
||||
- ld 31,-8(r1)
|
||||
+ ld 29,-24(%r1) # Restore NVGPRS
|
||||
+ ld 30,-16(%r1)
|
||||
+ ld 31,-8(%r1)
|
||||
blr
|
||||
|
||||
#if _CALL_ELF == 2
|
||||
--- xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc64_linux.S.orig 2020-01-29 19:25:51.465953000 +0100
|
||||
+++ xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc64_linux.S 2020-01-29 19:28:53.055137000 +0100
|
||||
@@ -58,35 +58,35 @@ SharedStub:
|
||||
#endif
|
||||
mflr r0
|
||||
|
||||
- std r4, -56(r1) # Save all GPRS
|
||||
- std r5, -48(r1)
|
||||
- std r6, -40(r1)
|
||||
- std r7, -32(r1)
|
||||
- std r8, -24(r1)
|
||||
- std r9, -16(r1)
|
||||
- std r10, -8(r1)
|
||||
+ std r4, -56(%r1) # Save all GPRS
|
||||
+ std r5, -48(%r1)
|
||||
+ std r6, -40(%r1)
|
||||
+ std r7, -32(%r1)
|
||||
+ std r8, -24(%r1)
|
||||
+ std r9, -16(%r1)
|
||||
+ std r10, -8(%r1)
|
||||
|
||||
- stfd f13, -64(r1) # ... and FPRS
|
||||
- stfd f12, -72(r1)
|
||||
- stfd f11, -80(r1)
|
||||
- stfd f10, -88(r1)
|
||||
- stfd f9, -96(r1)
|
||||
- stfd f8, -104(r1)
|
||||
- stfd f7, -112(r1)
|
||||
- stfd f6, -120(r1)
|
||||
- stfd f5, -128(r1)
|
||||
- stfd f4, -136(r1)
|
||||
- stfd f3, -144(r1)
|
||||
- stfd f2, -152(r1)
|
||||
- stfd f1, -160(r1)
|
||||
+ stfd f13, -64(%r1) # ... and FPRS
|
||||
+ stfd f12, -72(%r1)
|
||||
+ stfd f11, -80(%r1)
|
||||
+ stfd f10, -88(%r1)
|
||||
+ stfd f9, -96(%r1)
|
||||
+ stfd f8, -104(%r1)
|
||||
+ stfd f7, -112(%r1)
|
||||
+ stfd f6, -120(%r1)
|
||||
+ stfd f5, -128(%r1)
|
||||
+ stfd f4, -136(%r1)
|
||||
+ stfd f3, -144(%r1)
|
||||
+ stfd f2, -152(%r1)
|
||||
+ stfd f1, -160(%r1)
|
||||
|
||||
subi r6,r1,56 # r6 --> gprData
|
||||
subi r7,r1,160 # r7 --> fprData
|
||||
addi r5,r1,STACK_PARAMS # r5 --> extra stack args
|
||||
|
||||
- std r0, 16(r1)
|
||||
+ std r0, 16(%r1)
|
||||
|
||||
- stdu r1,-288(r1)
|
||||
+ stdu r1,-288(%r1)
|
||||
# r3 has the 'self' pointer
|
||||
# already
|
||||
|
||||
@@ -97,8 +97,8 @@ SharedStub:
|
||||
bl PrepareAndDispatch
|
||||
nop
|
||||
|
||||
- ld 1,0(r1) # restore stack
|
||||
- ld r0,16(r1) # restore LR
|
||||
+ ld 1,0(%r1) # restore stack
|
||||
+ ld r0,16(%r1) # restore LR
|
||||
mtlr r0
|
||||
blr
|
||||
|
88
mail/thunderbird-esr/files/patch-bug1626236
Normal file
88
mail/thunderbird-esr/files/patch-bug1626236
Normal file
|
@ -0,0 +1,88 @@
|
|||
https://bugzilla.mozilla.org/show_bug.cgi?id=1626236
|
||||
https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096
|
||||
|
||||
# HG changeset patch
|
||||
# User msirringhaus@suse.de
|
||||
# Date 1582805876 -3600
|
||||
# Thu Feb 27 13:17:56 2020 +0100
|
||||
# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
|
||||
# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
|
||||
imported patch decoder_workaround.patch
|
||||
|
||||
diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
|
||||
--- image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -422,6 +422,9 @@
|
||||
MOZ_ASSERT(mSwizzleFn);
|
||||
uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
|
||||
mSwizzleFn(data, data, aColors);
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
|
||||
+#endif
|
||||
}
|
||||
|
||||
LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
|
||||
diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
|
||||
--- image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -263,6 +263,9 @@
|
||||
case JCS_YCbCr:
|
||||
// By default, we will output directly to BGRA. If we need to apply
|
||||
// special color transforms, this may change.
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
|
||||
+#else
|
||||
switch (SurfaceFormat::OS_RGBX) {
|
||||
case SurfaceFormat::B8G8R8X8:
|
||||
mInfo.out_color_space = JCS_EXT_BGRX;
|
||||
@@ -277,6 +280,7 @@
|
||||
mState = JPEG_ERROR;
|
||||
return Transition::TerminateFailure();
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
case JCS_YCCK:
|
||||
diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
|
||||
--- image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -361,7 +361,7 @@
|
||||
IResumable* aOnResume) {
|
||||
MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
|
||||
|
||||
- return mLexer.Lex(aIterator, aOnResume,
|
||||
+ LexerResult res = mLexer.Lex(aIterator, aOnResume,
|
||||
[=](State aState, const char* aData, size_t aLength) {
|
||||
switch (aState) {
|
||||
case State::PNG_DATA:
|
||||
@@ -371,6 +371,14 @@
|
||||
}
|
||||
MOZ_CRASH("Unknown State");
|
||||
});
|
||||
+
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
|
||||
+ NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ return res;
|
||||
}
|
||||
|
||||
LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
|
||||
diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
|
||||
--- image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -237,7 +237,12 @@
|
||||
// WebP doesn't guarantee that the alpha generated matches the hint in the
|
||||
// header, so we always need to claim the input is BGRA. If the output is
|
||||
// BGRX, swizzling will mask off the alpha channel.
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ mBuffer.colorspace = MODE_ARGB;
|
||||
+ SurfaceFormat inFormat = mFormat;
|
||||
+#else
|
||||
SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
|
||||
+#endif
|
||||
|
||||
SurfacePipeFlags pipeFlags = SurfacePipeFlags();
|
||||
if (mFormat == SurfaceFormat::OS_RGBA &&
|
41
mail/thunderbird-esr/files/patch-bug1659612
Normal file
41
mail/thunderbird-esr/files/patch-bug1659612
Normal file
|
@ -0,0 +1,41 @@
|
|||
media/libcubeb/src/cubeb_alsa.c:613:9: error: implicitly declaring library function 'snprintf' with type 'int (char *, unsigned int, const char *, ...)' [-Werror,-Wimplicit-function-declaration]
|
||||
r = snprintf(node_name, sizeof(node_name), "pcm.%s", string);
|
||||
^
|
||||
media/libcubeb/src/cubeb_alsa.c:613:9: note: include the header <stdio.h> or explicitly provide a declaration for 'snprintf'
|
||||
media/libcubeb/src/cubeb_alsa.c:1168:3: error: implicitly declaring library function 'alloca' with type 'void *(unsigned int)' [-Werror,-Wimplicit-function-declaration]
|
||||
snd_pcm_hw_params_alloca(&hw_params);
|
||||
^
|
||||
/usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
|
||||
#define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
|
||||
^
|
||||
/usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
|
||||
#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
|
||||
^
|
||||
media/libcubeb/src/cubeb_alsa.c:1168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'alloca'
|
||||
/usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
|
||||
#define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
|
||||
^
|
||||
/usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
|
||||
#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
|
||||
^
|
||||
2 errors generated.
|
||||
|
||||
--- media/libcubeb/src/cubeb_alsa.c.orig 2023-03-29 20:51:00.139281000 +0200
|
||||
+++ media/libcubeb/src/cubeb_alsa.c 2023-03-29 20:51:46.219013000 +0200
|
||||
@@ -5,12 +5,16 @@
|
||||
* accompanying file LICENSE for details.
|
||||
*/
|
||||
#undef NDEBUG
|
||||
+#if defined(__FreeBSD__)
|
||||
+#define _GNU_SOURCE
|
||||
+#else
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#if defined(__NetBSD__)
|
||||
#define _NETBSD_SOURCE /* timersub() */
|
||||
#endif
|
||||
#define _XOPEN_SOURCE 500
|
||||
+#endif
|
||||
#include "cubeb-internal.h"
|
||||
#include "cubeb/cubeb.h"
|
||||
#include "cubeb_tracing.h"
|
56
mail/thunderbird-esr/files/patch-bug1716707
Normal file
56
mail/thunderbird-esr/files/patch-bug1716707
Normal file
|
@ -0,0 +1,56 @@
|
|||
commit ce7a2f400d4f599c72e32e2635fee7ea94c0848c
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
Date: Wed Apr 13 14:44:46 2022 +0200
|
||||
|
||||
big-endian color fixes, but without breaking little-endian
|
||||
|
||||
as le is what most people actually use
|
||||
|
||||
diff --git gfx/webrender_bindings/RenderCompositorSWGL.cpp gfx/webrender_bindings/RenderCompositorSWGL.cpp
|
||||
index dbf137c849ee..243a01ff9cf3 100644
|
||||
--- gfx/webrender_bindings/RenderCompositorSWGL.cpp
|
||||
+++ gfx/webrender_bindings/RenderCompositorSWGL.cpp
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "RenderCompositorSWGL.h"
|
||||
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
+#include "mozilla/gfx/Swizzle.h"
|
||||
#include "mozilla/widget/CompositorWidget.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
@@ -235,6 +236,13 @@ void RenderCompositorSWGL::CommitMappedBuffer(bool aDirty) {
|
||||
}
|
||||
mDT->Flush();
|
||||
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ // One swizzle to rule them all.
|
||||
+ gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8,
|
||||
+ mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8,
|
||||
+ mDT->GetSize());
|
||||
+#endif
|
||||
+
|
||||
// Done with the DT. Hand it back to the widget and clear out any trace of it.
|
||||
mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion);
|
||||
mDirtyRegion.SetEmpty();
|
||||
diff --git image/imgFrame.cpp image/imgFrame.cpp
|
||||
index e58c3dd5b2d4..c1e7e77c362b 100644
|
||||
--- image/imgFrame.cpp
|
||||
+++ image/imgFrame.cpp
|
||||
@@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxDrawable* aDrawable,
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ if (aBackend == gfx::BackendType::SKIA && canUseDataSurface) {
|
||||
+ // SKIA is lying about what format it returns on big endian
|
||||
+ for (int ii=0; ii < mRawSurface->GetSize().Height()*mRawSurface->Stride() / 4; ++ii) {
|
||||
+ uint32_t *vals = (uint32_t*)(mRawSurface->GetData());
|
||||
+ uint32_t val = ((vals[ii] << 8) & 0xFF00FF00 ) | ((vals[ii] >> 8) & 0xFF00FF );
|
||||
+ vals[ii] = (val << 16) | (val >> 16);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (!canUseDataSurface) {
|
||||
// We used an offscreen surface, which is an "optimized" surface from
|
||||
// imgFrame's perspective.
|
25
mail/thunderbird-esr/files/patch-bug1874059
Normal file
25
mail/thunderbird-esr/files/patch-bug1874059
Normal file
|
@ -0,0 +1,25 @@
|
|||
commit 56c888446600991803fd92d668349101ad4bf160
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
Date: Tue Feb 6 22:51:27 2024 +0100
|
||||
|
||||
switch to -fvisibility flags
|
||||
|
||||
this fixes linkage with llvm18 (which does not like the former
|
||||
approach via the #pragma in gcc_hidden.h
|
||||
|
||||
PR: 276746
|
||||
Submitted by: dim@
|
||||
|
||||
diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure
|
||||
index d08b748db250..4696f69153f6 100644
|
||||
--- build/moz.configure/toolchain.configure
|
||||
+++ build/moz.configure/toolchain.configure
|
||||
@@ -2186,7 +2186,7 @@ set_define("_LIBCPP_HIDE_FROM_ABI", libcxx_override_visibility.hide_from_abi)
|
||||
@depends(target, build_environment)
|
||||
def visibility_flags(target, env):
|
||||
if target.os != "WINNT":
|
||||
- if target.kernel == "Darwin":
|
||||
+ if target.kernel == "Darwin" or target.kernel == "FreeBSD":
|
||||
return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
|
||||
return (
|
||||
"-I%s/system_wrappers" % os.path.join(env.dist),
|
23
mail/thunderbird-esr/files/patch-bug1876366
Normal file
23
mail/thunderbird-esr/files/patch-bug1876366
Normal file
|
@ -0,0 +1,23 @@
|
|||
commit 46a89fb0319d673b3139a068e3d89aed9f44fc16
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
use gdk legacy cursor interface by default
|
||||
|
||||
Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=1876366#c16
|
||||
hints that we could re-test this once we have GTK 3.24.42 (with the
|
||||
now-current gtk3-3.24.41 the original problem is still reproducable,
|
||||
but toggling this flag does fix it for me)
|
||||
|
||||
diff --git modules/libpref/init/StaticPrefList.yaml modules/libpref/init/StaticPrefList.yaml
|
||||
index 835450712a12..f2249006c36d 100644
|
||||
--- modules/libpref/init/StaticPrefList.yaml
|
||||
+++ modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -16070,7 +16070,7 @@
|
||||
# Whether to use gtk legacy cursor API.
|
||||
- name: widget.gtk.legacy-cursors.enabled
|
||||
type: bool
|
||||
- value: false
|
||||
+ value: true
|
||||
mirror: always
|
||||
|
||||
# Whether to use gtk high contrast themes to disable content styling like on
|
260
mail/thunderbird-esr/files/patch-bug847568
Normal file
260
mail/thunderbird-esr/files/patch-bug847568
Normal file
|
@ -0,0 +1,260 @@
|
|||
# Allow building against system-wide graphite2/harfbuzz.
|
||||
|
||||
diff --git config/system-headers.mozbuild config/system-headers.mozbuild
|
||||
index 0c06f581b33b..10f125be25ab 100644
|
||||
--- config/system-headers.mozbuild
|
||||
+++ config/system-headers.mozbuild
|
||||
@@ -1307,6 +1307,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
|
||||
"proxy.h",
|
||||
]
|
||||
|
||||
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
|
||||
+ system_headers += [
|
||||
+ 'graphite2/Font.h',
|
||||
+ 'graphite2/Segment.h',
|
||||
+ ]
|
||||
+
|
||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
|
||||
+ system_headers += [
|
||||
+ 'harfbuzz/hb-glib.h',
|
||||
+ 'harfbuzz/hb-ot.h',
|
||||
+ 'harfbuzz/hb.h',
|
||||
+ ]
|
||||
+
|
||||
if CONFIG["MOZ_SYSTEM_ICU"]:
|
||||
system_headers += [
|
||||
"unicode/calendar.h",
|
||||
diff --git dom/base/moz.build dom/base/moz.build
|
||||
index 14c9f9dd96fb..bd1c8f241e9b 100644
|
||||
--- dom/base/moz.build
|
||||
+++ dom/base/moz.build
|
||||
@@ -606,6 +606,9 @@ FINAL_LIBRARY = "xul"
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
||||
|
||||
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
|
||||
+
|
||||
GeneratedFile(
|
||||
"UseCounterList.h",
|
||||
script="gen-usecounters.py",
|
||||
diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
|
||||
new file mode 100644
|
||||
index 000000000000..24e8d7a03274
|
||||
--- /dev/null
|
||||
+++ gfx/graphite2/geckoextra/moz.build
|
||||
@@ -0,0 +1,21 @@
|
||||
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
+# vim: set filetype=python:
|
||||
+# 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/.
|
||||
+
|
||||
+EXPORTS.graphite2 += [
|
||||
+ 'include/GraphiteExtra.h',
|
||||
+ 'include/GraphiteStructsForRLBox.h',
|
||||
+]
|
||||
+
|
||||
+UNIFIED_SOURCES += [
|
||||
+ '../geckoextra/src/GraphiteExtra.cpp',
|
||||
+]
|
||||
+
|
||||
+CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
|
||||
+
|
||||
+# Match bundled graphite2 configuration
|
||||
+AllowCompilerWarnings()
|
||||
+
|
||||
+FINAL_LIBRARY = 'xul'
|
||||
diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd
|
||||
new file mode 100644
|
||||
index 000000000000..2a10eb1e2b42
|
||||
--- /dev/null
|
||||
+++ gfx/harfbuzz/README-mozilla.fbsd
|
||||
@@ -0,0 +1,4 @@
|
||||
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
|
||||
+Make sure to keep pkg-config version check within toolkit/moz.configure in sync
|
||||
+with checkout version or increment latest tag by one if it's not based
|
||||
+on upstream release.
|
||||
diff --git gfx/moz.build gfx/moz.build
|
||||
index 56ea317bedfc..07dd7f66f1bc 100644
|
||||
--- gfx/moz.build
|
||||
+++ gfx/moz.build
|
||||
@@ -10,6 +10,14 @@ with Files("**"):
|
||||
with Files("wr/**"):
|
||||
BUG_COMPONENT = ("Core", "Graphics: WebRender")
|
||||
|
||||
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
|
||||
+ DIRS += ["graphite2/geckoextra"]
|
||||
+else:
|
||||
+ DIRS += ["graphite2/src" ]
|
||||
+
|
||||
+if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ DIRS += ["harfbuzz/src"]
|
||||
+
|
||||
DIRS += [
|
||||
"cairo",
|
||||
"2d",
|
||||
@@ -19,8 +27,6 @@ DIRS += [
|
||||
"qcms",
|
||||
"gl",
|
||||
"layers",
|
||||
- "graphite2/src",
|
||||
- "harfbuzz/src",
|
||||
"ots/src",
|
||||
"thebes",
|
||||
"ipc",
|
||||
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
|
||||
index c161d24df853..8c7dd395b371 100755
|
||||
--- gfx/skia/generate_mozbuild.py
|
||||
+++ gfx/skia/generate_mozbuild.py
|
||||
@@ -91,6 +91,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
|
||||
'-Wno-unused-private-field',
|
||||
]
|
||||
|
||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
|
||||
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
|
||||
+
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
|
||||
LOCAL_INCLUDES += [
|
||||
"/gfx/cairo/cairo/src",
|
||||
diff --git gfx/skia/moz.build gfx/skia/moz.build
|
||||
index 83aa2957a938..0859316a1f09 100644
|
||||
--- gfx/skia/moz.build
|
||||
+++ gfx/skia/moz.build
|
||||
@@ -601,6 +601,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
|
||||
'-Wno-unused-private-field',
|
||||
]
|
||||
|
||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
|
||||
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
|
||||
+
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
|
||||
LOCAL_INCLUDES += [
|
||||
"/gfx/cairo/cairo/src",
|
||||
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
|
||||
index fd1fcf236d81..958d3f699ffd 100644
|
||||
--- gfx/thebes/moz.build
|
||||
+++ gfx/thebes/moz.build
|
||||
@@ -293,7 +293,13 @@ if CONFIG["MOZ_WAYLAND"]:
|
||||
|
||||
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
|
||||
|
||||
-DEFINES["GRAPHITE2_STATIC"] = True
|
||||
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
|
||||
+ CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
|
||||
+else:
|
||||
+ DEFINES["GRAPHITE2_STATIC"] = True
|
||||
+
|
||||
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
|
||||
|
||||
CXXFLAGS += ["-Werror=switch"]
|
||||
|
||||
diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
|
||||
index 2bbd00415cae..f66bd37695d4 100644
|
||||
--- intl/unicharutil/util/moz.build
|
||||
+++ intl/unicharutil/util/moz.build
|
||||
@@ -24,6 +24,9 @@ UNIFIED_SOURCES += [
|
||||
"nsUnicodeProperties.cpp",
|
||||
]
|
||||
|
||||
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
|
||||
+
|
||||
include("/ipc/chromium/chromium-config.mozbuild")
|
||||
|
||||
GeneratedFile(
|
||||
diff --git netwerk/dns/moz.build netwerk/dns/moz.build
|
||||
index c926d14707d1..35a3f33e2885 100644
|
||||
--- netwerk/dns/moz.build
|
||||
+++ netwerk/dns/moz.build
|
||||
@@ -112,6 +112,9 @@ GeneratedFile(
|
||||
"etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
|
||||
)
|
||||
|
||||
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
|
||||
+
|
||||
# need to include etld_data.inc
|
||||
LOCAL_INCLUDES += [
|
||||
"/netwerk/base",
|
||||
diff --git old-configure.in old-configure.in
|
||||
index 2ca88a20a4b3..88bc9b873eff 100644
|
||||
--- old-configure.in
|
||||
+++ old-configure.in
|
||||
@@ -1067,6 +1067,27 @@ fi
|
||||
AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
|
||||
AC_SUBST(MOZ_MACBUNDLE_ID)
|
||||
|
||||
+dnl ========================================================
|
||||
+dnl Check for graphite2
|
||||
+dnl ========================================================
|
||||
+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
|
||||
+ dnl graphite2.pc has bogus version, check manually
|
||||
+ _SAVE_CFLAGS=$CFLAGS
|
||||
+ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
|
||||
+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
|
||||
+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
|
||||
+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
|
||||
+ * 100 + GR2_VERSION_BUGFIX >= \
|
||||
+ (major) * 10000 + (minor) * 100 + (bugfix) )
|
||||
+ ], [
|
||||
+ #if !GR2_VERSION_REQUIRE(1,3,14)
|
||||
+ #error "Insufficient graphite2 version."
|
||||
+ #endif
|
||||
+ ], [],
|
||||
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
|
||||
+ CFLAGS=$_SAVE_CFLAGS
|
||||
+fi
|
||||
+
|
||||
dnl ========================================================
|
||||
dnl = Child Process Name for IPC
|
||||
dnl ========================================================
|
||||
diff --git toolkit/library/moz.build toolkit/library/moz.build
|
||||
index 76746f308011..f6844f4c400b 100644
|
||||
--- toolkit/library/moz.build
|
||||
+++ toolkit/library/moz.build
|
||||
@@ -292,6 +292,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
|
||||
if CONFIG["MOZ_SYSTEM_WEBP"]:
|
||||
OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
|
||||
|
||||
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
|
||||
+ OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
|
||||
+
|
||||
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
|
||||
+ OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
|
||||
+
|
||||
if CONFIG["MOZ_SYSTEM_LIBEVENT"]:
|
||||
OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
|
||||
|
||||
diff --git toolkit/moz.configure toolkit/moz.configure
|
||||
index a060a59f728f..f0778d1ae2d6 100644
|
||||
--- toolkit/moz.configure
|
||||
+++ toolkit/moz.configure
|
||||
@@ -1218,6 +1218,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info):
|
||||
set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft)
|
||||
set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft)
|
||||
|
||||
+# Graphite2
|
||||
+# ==============================================================
|
||||
+option("--with-system-graphite2",
|
||||
+ help="Use system graphite2 (located with pkgconfig)")
|
||||
+
|
||||
+system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2",
|
||||
+ when="--with-system-graphite2")
|
||||
+
|
||||
+set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True))
|
||||
+
|
||||
+# HarfBuzz
|
||||
+# ==============================================================
|
||||
+option("--with-system-harfbuzz",
|
||||
+ help="Use system harfbuzz (located with pkgconfig)")
|
||||
+
|
||||
+system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4",
|
||||
+ when="--with-system-harfbuzz")
|
||||
+
|
||||
+set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
|
||||
+
|
||||
|
||||
# WebDriver (HTTP / BiDi)
|
||||
# ==============================================================
|
|
@ -0,0 +1,10 @@
|
|||
--- comm/third_party/rnpdefs.mozbuild.orig 2021-08-11 20:13:25.176921000 +0200
|
||||
+++ comm/third_party/rnpdefs.mozbuild 2021-08-11 20:14:08.855374000 +0200
|
||||
@@ -43,6 +43,6 @@
|
||||
OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"]
|
||||
|
||||
|
||||
-if CONFIG["OS_ARCH"] in ("Linux", "SunOS"):
|
||||
+if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly", "SunOS"):
|
||||
CFLAGS += ["-fPIC"]
|
||||
CXXFLAGS += ["-fPIC"]
|
21
mail/thunderbird-esr/files/patch-env-api-keys
Normal file
21
mail/thunderbird-esr/files/patch-env-api-keys
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Accept API keys from environment like before bug 1294585
|
||||
|
||||
--- build/moz.configure/keyfiles.configure
|
||||
+++ build/moz.configure/keyfiles.configure
|
||||
@@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
|
||||
@checking("for the %s key" % desc, lambda x: x and x is not no_key)
|
||||
@imports(_from="__builtin__", _import="open")
|
||||
@imports(_from="__builtin__", _import="IOError")
|
||||
+ @imports(_from="os", _import="environ")
|
||||
def keyfile(value):
|
||||
if value:
|
||||
try:
|
||||
@@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
|
||||
raise FatalCheckError("'%s' is empty." % value[0])
|
||||
except IOError as e:
|
||||
raise FatalCheckError("'%s': %s." % (value[0], e.strerror))
|
||||
- return no_key
|
||||
+ return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key
|
||||
|
||||
return keyfile
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git gfx/skia/skia/src/base/SkEndian.h gfx/skia/skia/src/base/SkEndian.h
|
||||
index d015f8bff2bf..cc390a53f30c 100644
|
||||
--- gfx/skia/skia/src/base/SkEndian.h
|
||||
+++ gfx/skia/skia/src/base/SkEndian.h
|
||||
@@ -140,7 +140,7 @@ static inline void SkEndianSwap64s(uint64_t array[], int count) {
|
||||
#define SkEndian_SwapLE64(n) SkEndianSwap64(n)
|
||||
|
||||
#define SkTEndian_SwapBE16(n) (n)
|
||||
- #define SkTEndian_SwapBE32(n) (n)
|
||||
+ #define SkTEndian_SwapBE32(n) uint32_t(n)
|
||||
#define SkTEndian_SwapBE64(n) (n)
|
||||
#define SkTEndian_SwapLE16(n) SkTEndianSwap16<n>::value
|
||||
#define SkTEndian_SwapLE32(n) SkTEndianSwap32<n>::value
|
|
@ -0,0 +1,13 @@
|
|||
diff --git gfx/skia/skia/src/core/SkRasterPipeline.h gfx/skia/skia/src/core/SkRasterPipeline.h
|
||||
index 2475ea0d398d..67967483656d 100644
|
||||
--- gfx/skia/skia/src/core/SkRasterPipeline.h
|
||||
+++ gfx/skia/skia/src/core/SkRasterPipeline.h
|
||||
@@ -27,7 +27,7 @@ struct SkImageInfo;
|
||||
struct skcms_TransferFunction;
|
||||
|
||||
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
|
||||
- !defined(SK_CPU_LOONGARCH)
|
||||
+ !defined(SK_CPU_LOONGARCH) && !defined(__powerpc__)
|
||||
#define SK_HAS_MUSTTAIL 1
|
||||
#else
|
||||
#define SK_HAS_MUSTTAIL 0
|
15
mail/thunderbird-esr/files/patch-i386-protobuf-alignment
Normal file
15
mail/thunderbird-esr/files/patch-i386-protobuf-alignment
Normal file
|
@ -0,0 +1,15 @@
|
|||
# On FreeBSD/i386's LLVM, actual alignment for atomic types requires
|
||||
# stricter alignment rules, mostly on 8 byte boundaries instead of 4 byte
|
||||
# as indicated by max_align_t.
|
||||
|
||||
--- ./toolkit/components/protobuf/src/google/protobuf/arena_impl.h.orig 2022-08-20 20:07:57.096818000 +0200
|
||||
+++ ./toolkit/components/protobuf/src/google/protobuf/arena_impl.h 2022-08-20 21:40:47.821690000 +0200
|
||||
@@ -640,7 +640,7 @@
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4324)
|
||||
#endif
|
||||
- struct alignas(kCacheAlignment) CacheAlignedLifecycleIdGenerator {
|
||||
+ struct alignas(alignof(std::atomic<LifecycleIdAtomic>)) CacheAlignedLifecycleIdGenerator {
|
||||
std::atomic<LifecycleIdAtomic> id;
|
||||
};
|
||||
static CacheAlignedLifecycleIdGenerator lifecycle_id_generator_;
|
35
mail/thunderbird-esr/files/patch-js_public_Utility.h
Normal file
35
mail/thunderbird-esr/files/patch-js_public_Utility.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
commit 57b30241311091b5a6a5a0bb1c19a8e073860fc3
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
do not assert on alignment when not having the bits
|
||||
|
||||
the underlying issue seemed to be win-only anyways?
|
||||
|
||||
diff --git js/public/Utility.h js/public/Utility.h
|
||||
index 0d745e9df785..f0ca7ea37162 100644
|
||||
--- js/public/Utility.h
|
||||
+++ js/public/Utility.h
|
||||
@@ -480,6 +480,7 @@ static inline void js_free(void* p) {
|
||||
* Note: Do not add a ; at the end of a use of JS_DECLARE_NEW_METHODS,
|
||||
* or the build will break.
|
||||
*/
|
||||
+#if !defined(__i386__)
|
||||
#define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
|
||||
template <class T, typename... Args> \
|
||||
QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \
|
||||
@@ -490,6 +491,15 @@ static inline void js_free(void* p) {
|
||||
return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
|
||||
: nullptr; \
|
||||
}
|
||||
+#else
|
||||
+#define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
|
||||
+ template <class T, typename... Args> \
|
||||
+ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \
|
||||
+ void* memory = ALLOCATOR(sizeof(T)); \
|
||||
+ return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
|
||||
+ : nullptr; \
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Given a class which should provide a 'new' method that takes an arena as
|
98851
mail/thunderbird-esr/files/patch-libwebrtc-generated
Normal file
98851
mail/thunderbird-esr/files/patch-libwebrtc-generated
Normal file
File diff suppressed because it is too large
Load diff
264
mail/thunderbird-esr/files/patch-libwebrtc-powerpc64
Normal file
264
mail/thunderbird-esr/files/patch-libwebrtc-powerpc64
Normal file
|
@ -0,0 +1,264 @@
|
|||
From ebc07ec32002c53702eb6e53ee1532ad2e0dc2bd Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Comstedt <marcus@mc.pp.se>
|
||||
Date: Fri, 12 Mar 2021 23:27:16 +0100
|
||||
Subject: [PATCH 1/2] wav: Swap header fields as needed
|
||||
|
||||
---
|
||||
third_party/webrtc/common_audio/wav_header.cc | 48 +++++++++++++++++--
|
||||
1 file changed, 44 insertions(+), 4 deletions(-)
|
||||
|
||||
--- third_party/libwebrtc/common_audio/wav_header.cc
|
||||
+++ third_party/libwebrtc/common_audio/wav_header.cc
|
||||
@@ -26,10 +26,6 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
-#error "Code not working properly for big endian platforms."
|
||||
-#endif
|
||||
-
|
||||
#pragma pack(2)
|
||||
struct ChunkHeader {
|
||||
uint32_t ID;
|
||||
@@ -111,9 +107,15 @@ static_assert(sizeof(WavHeaderIeeeFloat) == kIeeeFloatWavHeaderSize,
|
||||
"no padding in header");
|
||||
|
||||
uint32_t PackFourCC(char a, char b, char c, char d) {
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ uint32_t packed_value =
|
||||
+ static_cast<uint32_t>(a) << 24 | static_cast<uint32_t>(b) << 16 |
|
||||
+ static_cast<uint32_t>(c) << 8 | static_cast<uint32_t>(d);
|
||||
+#else
|
||||
uint32_t packed_value =
|
||||
static_cast<uint32_t>(a) | static_cast<uint32_t>(b) << 8 |
|
||||
static_cast<uint32_t>(c) << 16 | static_cast<uint32_t>(d) << 24;
|
||||
+#endif
|
||||
return packed_value;
|
||||
}
|
||||
|
||||
@@ -172,6 +174,9 @@ bool FindWaveChunk(ChunkHeader* chunk_header,
|
||||
if (readable->Read(chunk_header, sizeof(*chunk_header)) !=
|
||||
sizeof(*chunk_header))
|
||||
return false; // EOF.
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ chunk_header->Size = __builtin_bswap32(chunk_header->Size);
|
||||
+#endif
|
||||
if (ReadFourCC(chunk_header->ID) == sought_chunk_id)
|
||||
return true; // Sought chunk found.
|
||||
// Ignore current chunk by skipping its payload.
|
||||
@@ -185,6 +190,14 @@ bool ReadFmtChunkData(FmtPcmSubchunk* fmt_subchunk, WavHeaderReader* readable) {
|
||||
if (readable->Read(&(fmt_subchunk->AudioFormat), kFmtPcmSubchunkSize) !=
|
||||
kFmtPcmSubchunkSize)
|
||||
return false;
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ fmt_subchunk->AudioFormat = __builtin_bswap16(fmt_subchunk->AudioFormat);
|
||||
+ fmt_subchunk->NumChannels = __builtin_bswap16(fmt_subchunk->NumChannels);
|
||||
+ fmt_subchunk->SampleRate = __builtin_bswap32(fmt_subchunk->SampleRate);
|
||||
+ fmt_subchunk->ByteRate = __builtin_bswap32(fmt_subchunk->ByteRate);
|
||||
+ fmt_subchunk->BlockAlign = __builtin_bswap16(fmt_subchunk->BlockAlign);
|
||||
+ fmt_subchunk->BitsPerSample = __builtin_bswap16(fmt_subchunk->BitsPerSample);
|
||||
+#endif
|
||||
const uint32_t fmt_size = fmt_subchunk->header.Size;
|
||||
if (fmt_size != kFmtPcmSubchunkSize) {
|
||||
// There is an optional two-byte extension field permitted to be present
|
||||
@@ -225,6 +238,17 @@ void WritePcmWavHeader(size_t num_channels,
|
||||
header.fmt.BitsPerSample = static_cast<uint16_t>(8 * bytes_per_sample);
|
||||
header.data.header.ID = PackFourCC('d', 'a', 't', 'a');
|
||||
header.data.header.Size = static_cast<uint32_t>(bytes_in_payload);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ header.riff.header.Size = __builtin_bswap32(header.riff.header.Size);
|
||||
+ header.fmt.header.Size = __builtin_bswap32(header.fmt.header.Size);
|
||||
+ header.fmt.AudioFormat = __builtin_bswap16(header.fmt.AudioFormat);
|
||||
+ header.fmt.NumChannels = __builtin_bswap16(header.fmt.NumChannels);
|
||||
+ header.fmt.SampleRate = __builtin_bswap32(header.fmt.SampleRate);
|
||||
+ header.fmt.ByteRate = __builtin_bswap32(header.fmt.ByteRate);
|
||||
+ header.fmt.BlockAlign = __builtin_bswap16(header.fmt.BlockAlign);
|
||||
+ header.fmt.BitsPerSample = __builtin_bswap16(header.fmt.BitsPerSample);
|
||||
+ header.data.header.Size = __builtin_bswap32(header.data.header.Size);
|
||||
+#endif
|
||||
|
||||
// Do an extra copy rather than writing everything to buf directly, since buf
|
||||
// might not be correctly aligned.
|
||||
@@ -261,6 +285,19 @@ void WriteIeeeFloatWavHeader(size_t num_channels,
|
||||
header.fact.SampleLength = static_cast<uint32_t>(num_channels * num_samples);
|
||||
header.data.header.ID = PackFourCC('d', 'a', 't', 'a');
|
||||
header.data.header.Size = static_cast<uint32_t>(bytes_in_payload);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ header.riff.header.Size = __builtin_bswap32(header.riff.header.Size);
|
||||
+ header.fmt.header.Size = __builtin_bswap32(header.fmt.header.Size);
|
||||
+ header.fmt.AudioFormat = __builtin_bswap16(header.fmt.AudioFormat);
|
||||
+ header.fmt.NumChannels = __builtin_bswap16(header.fmt.NumChannels);
|
||||
+ header.fmt.SampleRate = __builtin_bswap32(header.fmt.SampleRate);
|
||||
+ header.fmt.ByteRate = __builtin_bswap32(header.fmt.ByteRate);
|
||||
+ header.fmt.BlockAlign = __builtin_bswap16(header.fmt.BlockAlign);
|
||||
+ header.fmt.BitsPerSample = __builtin_bswap16(header.fmt.BitsPerSample);
|
||||
+ header.fact.header.Size = __builtin_bswap32(header.fact.header.Size);
|
||||
+ header.fact.SampleLength = __builtin_bswap32(header.fact.SampleLength);
|
||||
+ header.data.header.Size = __builtin_bswap32(header.data.header.Size);
|
||||
+#endif
|
||||
|
||||
// Do an extra copy rather than writing everything to buf directly, since buf
|
||||
// might not be correctly aligned.
|
||||
@@ -387,6 +424,9 @@ bool ReadWavHeader(WavHeaderReader* readable,
|
||||
return false;
|
||||
if (ReadFourCC(header.riff.Format) != "WAVE")
|
||||
return false;
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ header.riff.header.Size = __builtin_bswap32(header.riff.header.Size);
|
||||
+#endif
|
||||
|
||||
// Find "fmt " and "data" chunks. While the official Wave file specification
|
||||
// does not put requirements on the chunks order, it is uncommon to find the
|
||||
--
|
||||
2.26.3
|
||||
|
||||
|
||||
From 28adaefe12a045a4adf7fdf56eb4e57db46dbe5e Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Comstedt <marcus@mc.pp.se>
|
||||
Date: Fri, 12 Mar 2021 23:28:25 +0100
|
||||
Subject: [PATCH 2/2] wav: Implement sample swapping
|
||||
|
||||
---
|
||||
third_party/webrtc/common_audio/wav_file.cc | 50 ++++++++++++++-------
|
||||
1 file changed, 34 insertions(+), 16 deletions(-)
|
||||
|
||||
--- third_party/libwebrtc/common_audio/wav_file.cc
|
||||
+++ third_party/libwebrtc/common_audio/wav_file.cc
|
||||
@@ -89,10 +89,6 @@ void WavReader::Reset() {
|
||||
|
||||
size_t WavReader::ReadSamples(const size_t num_samples,
|
||||
int16_t* const samples) {
|
||||
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
-#error "Need to convert samples to big-endian when reading from WAV file"
|
||||
-#endif
|
||||
-
|
||||
size_t num_samples_left_to_read = num_samples;
|
||||
size_t next_chunk_start = 0;
|
||||
while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) {
|
||||
@@ -107,6 +103,9 @@ size_t WavReader::ReadSamples(const size_t num_samples,
|
||||
num_samples_read = num_bytes_read / sizeof(samples_to_convert[0]);
|
||||
|
||||
for (size_t j = 0; j < num_samples_read; ++j) {
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ *(uint32_t*)&samples_to_convert[j] = __builtin_bswap32(*(uint32_t*)&samples_to_convert[j]);
|
||||
+#endif
|
||||
samples[next_chunk_start + j] = FloatToS16(samples_to_convert[j]);
|
||||
}
|
||||
} else {
|
||||
@@ -114,6 +113,11 @@ size_t WavReader::ReadSamples(const size_t num_samples,
|
||||
num_bytes_read = file_.Read(&samples[next_chunk_start],
|
||||
chunk_size * sizeof(samples[0]));
|
||||
num_samples_read = num_bytes_read / sizeof(samples[0]);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ for (size_t j = 0; j < num_samples_read; ++j) {
|
||||
+ samples[next_chunk_start + j] = __builtin_bswap16(samples[next_chunk_start + j]);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
RTC_CHECK(num_samples_read == 0 || (num_bytes_read % num_samples_read) == 0)
|
||||
<< "Corrupt file: file ended in the middle of a sample.";
|
||||
@@ -129,10 +133,6 @@ size_t WavReader::ReadSamples(const size_t num_samples,
|
||||
}
|
||||
|
||||
size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) {
|
||||
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
-#error "Need to convert samples to big-endian when reading from WAV file"
|
||||
-#endif
|
||||
-
|
||||
size_t num_samples_left_to_read = num_samples;
|
||||
size_t next_chunk_start = 0;
|
||||
while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) {
|
||||
@@ -147,8 +147,13 @@ size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) {
|
||||
num_samples_read = num_bytes_read / sizeof(samples_to_convert[0]);
|
||||
|
||||
for (size_t j = 0; j < num_samples_read; ++j) {
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ samples[next_chunk_start + j] =
|
||||
+ static_cast<float>(static_cast<int16_t>(__builtin_bswap16(samples_to_convert[j])));
|
||||
+#else
|
||||
samples[next_chunk_start + j] =
|
||||
static_cast<float>(samples_to_convert[j]);
|
||||
+#endif
|
||||
}
|
||||
} else {
|
||||
RTC_CHECK_EQ(format_, WavFormat::kWavFormatIeeeFloat);
|
||||
@@ -157,6 +162,9 @@ size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) {
|
||||
num_samples_read = num_bytes_read / sizeof(samples[0]);
|
||||
|
||||
for (size_t j = 0; j < num_samples_read; ++j) {
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ *(uint32_t*)&samples[next_chunk_start + j] = __builtin_bswap32(*(uint32_t*)&samples[next_chunk_start + j]);
|
||||
+#endif
|
||||
samples[next_chunk_start + j] =
|
||||
FloatToFloatS16(samples[next_chunk_start + j]);
|
||||
}
|
||||
@@ -213,23 +221,31 @@ WavWriter::WavWriter(FileWrapper file,
|
||||
}
|
||||
|
||||
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
|
||||
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
-#error "Need to convert samples to little-endian when writing to WAV file"
|
||||
-#endif
|
||||
-
|
||||
for (size_t i = 0; i < num_samples; i += kMaxChunksize) {
|
||||
const size_t num_remaining_samples = num_samples - i;
|
||||
const size_t num_samples_to_write =
|
||||
std::min(kMaxChunksize, num_remaining_samples);
|
||||
|
||||
if (format_ == WavFormat::kWavFormatPcm) {
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ std::array<int16_t, kMaxChunksize> converted_samples;
|
||||
+ for (size_t j = 0; j < num_samples_to_write; ++j) {
|
||||
+ converted_samples[j] = __builtin_bswap16(samples[i + j]);
|
||||
+ }
|
||||
+ RTC_CHECK(
|
||||
+ file_.Write(converted_samples.data(), num_samples_to_write * sizeof(samples[0])));
|
||||
+#else
|
||||
RTC_CHECK(
|
||||
file_.Write(&samples[i], num_samples_to_write * sizeof(samples[0])));
|
||||
+#endif
|
||||
} else {
|
||||
RTC_CHECK_EQ(format_, WavFormat::kWavFormatIeeeFloat);
|
||||
std::array<float, kMaxChunksize> converted_samples;
|
||||
for (size_t j = 0; j < num_samples_to_write; ++j) {
|
||||
converted_samples[j] = S16ToFloat(samples[i + j]);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ *(uint32_t*)&converted_samples[j] = __builtin_bswap32(*(uint32_t*)&converted_samples[j]);
|
||||
+#endif
|
||||
}
|
||||
RTC_CHECK(
|
||||
file_.Write(converted_samples.data(),
|
||||
@@ -243,10 +259,6 @@ void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
|
||||
}
|
||||
|
||||
void WavWriter::WriteSamples(const float* samples, size_t num_samples) {
|
||||
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
-#error "Need to convert samples to little-endian when writing to WAV file"
|
||||
-#endif
|
||||
-
|
||||
for (size_t i = 0; i < num_samples; i += kMaxChunksize) {
|
||||
const size_t num_remaining_samples = num_samples - i;
|
||||
const size_t num_samples_to_write =
|
||||
@@ -256,6 +268,9 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) {
|
||||
std::array<int16_t, kMaxChunksize> converted_samples;
|
||||
for (size_t j = 0; j < num_samples_to_write; ++j) {
|
||||
converted_samples[j] = FloatS16ToS16(samples[i + j]);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ converted_samples[j] = __builtin_bswap16(converted_samples[j]);
|
||||
+#endif
|
||||
}
|
||||
RTC_CHECK(
|
||||
file_.Write(converted_samples.data(),
|
||||
@@ -265,6 +280,9 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) {
|
||||
std::array<float, kMaxChunksize> converted_samples;
|
||||
for (size_t j = 0; j < num_samples_to_write; ++j) {
|
||||
converted_samples[j] = FloatS16ToFloat(samples[i + j]);
|
||||
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+ *(uint32_t*)&converted_samples[j] = __builtin_bswap32(*(uint32_t*)&converted_samples[j]);
|
||||
+#endif
|
||||
}
|
||||
RTC_CHECK(
|
||||
file_.Write(converted_samples.data(),
|
||||
--
|
||||
2.26.3
|
||||
|
14
mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
Normal file
14
mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff --git comm/mail/app/nsMailApp.cpp comm/mail/app/nsMailApp.cpp
|
||||
index 3db646e89d..2318337f7b 100644
|
||||
--- comm/mail/app/nsMailApp.cpp
|
||||
+++ comm/mail/app/nsMailApp.cpp
|
||||
@@ -280,6 +280,9 @@ int main(int argc, char* argv[], char* envp[]) {
|
||||
|
||||
mozilla::TimeStamp start = mozilla::TimeStamp::Now();
|
||||
|
||||
+ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
|
||||
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
|
||||
+
|
||||
// Make sure we unregister the runtime exception module before returning.
|
||||
// We do this here to cover both registers for child and main processes.
|
||||
auto unregisterRuntimeExceptionModule =
|
|
@ -0,0 +1,69 @@
|
|||
--- memory/mozalloc/throw_gcc.h.orig 2022-03-07 19:34:37 UTC
|
||||
+++ memory/mozalloc/throw_gcc.h
|
||||
@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
|
||||
mozalloc_abort("fatal: STL threw bad_function_call");
|
||||
}
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_logic_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_domain_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_invalid_argument(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_runtime_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_range_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_overflow_error(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_underflow_error(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_ios_failure(
|
||||
const char* msg) {
|
|
@ -0,0 +1,27 @@
|
|||
commit 7a20fbf537ee0867244109d1ea48a8ad9de2e4ea
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
align typedefs with our libm for historical CPUs
|
||||
|
||||
diff --git modules/fdlibm/src/math_private.h modules/fdlibm/src/math_private.h
|
||||
index f4373f27834a..3b898241660f 100644
|
||||
--- modules/fdlibm/src/math_private.h
|
||||
+++ modules/fdlibm/src/math_private.h
|
||||
@@ -30,9 +30,17 @@
|
||||
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
|
||||
*/
|
||||
|
||||
+#ifdef __LP64__
|
||||
typedef double __double_t;
|
||||
+#else
|
||||
+typedef long double __double_t;
|
||||
+#endif
|
||||
typedef __double_t double_t;
|
||||
+#ifdef __LP64__
|
||||
typedef float __float_t;
|
||||
+#else
|
||||
+typedef long double __float_t;
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* The original fdlibm code used statements like:
|
84
mail/thunderbird-esr/files/patch-mozglue_misc_SSE.h
Normal file
84
mail/thunderbird-esr/files/patch-mozglue_misc_SSE.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
commit 70c3be521da1296f7ba47bd07b67927e43634d1b
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
disable SSE and friends in builds for legacy architectures
|
||||
|
||||
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
|
||||
index 71903756ea19..3591cc0f38e8 100644
|
||||
--- gfx/thebes/moz.build
|
||||
+++ gfx/thebes/moz.build
|
||||
@@ -174,7 +174,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
||||
]
|
||||
|
||||
# Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp.
|
||||
-if CONFIG["INTEL_ARCHITECTURE"]:
|
||||
+if CONFIG["INTEL_ARCHITECTURE"] and CONFIG['TARGET_CPU'] == 'x86_64':
|
||||
SOURCES += ["gfxAlphaRecoverySSE2.cpp"]
|
||||
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
||||
# compilers.
|
||||
diff --git mozglue/misc/SSE.h mozglue/misc/SSE.h
|
||||
index 0b87366a8043..af0a0b38d23c 100644
|
||||
--- mozglue/misc/SSE.h
|
||||
+++ mozglue/misc/SSE.h
|
||||
@@ -100,36 +100,50 @@
|
||||
# define MOZILLA_PRESUME_MMX 1
|
||||
# endif
|
||||
# ifdef __SSE__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE instructions based on the -march option (or
|
||||
// the default for x86_64 or for Intel Mac).
|
||||
# define MOZILLA_PRESUME_SSE 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSE2__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE2 instructions based on the -march option (or
|
||||
// the default for x86_64 or for Intel Mac).
|
||||
# define MOZILLA_PRESUME_SSE2 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSE3__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE3 instructions based on the -march option (or the
|
||||
// default for Intel Mac).
|
||||
# define MOZILLA_PRESUME_SSE3 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSSE3__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSSE3 instructions based on the -march option.
|
||||
# define MOZILLA_PRESUME_SSSE3 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSE4A__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE4A instructions based on the -march option.
|
||||
# define MOZILLA_PRESUME_SSE4A 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSE4_1__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE4.1 instructions based on the -march option.
|
||||
# define MOZILLA_PRESUME_SSE4_1 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __SSE4_2__
|
||||
+# if !defined(__386__)
|
||||
// It's ok to use SSE4.2 instructions based on the -march option.
|
||||
# define MOZILLA_PRESUME_SSE4_2 1
|
||||
# endif
|
||||
+# endif
|
||||
# ifdef __AVX__
|
||||
// It's ok to use AVX instructions based on the -march option.
|
||||
# define MOZILLA_PRESUME_AVX 1
|
||||
@@ -144,8 +158,10 @@
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_CPUID_H
|
||||
+# if !defined(__i386__)
|
||||
# define MOZILLA_SSE_HAVE_CPUID_DETECTION
|
||||
# endif
|
||||
+# endif
|
||||
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
|
||||
|
118
mail/thunderbird-esr/files/patch-pipewire_init
Normal file
118
mail/thunderbird-esr/files/patch-pipewire_init
Normal file
|
@ -0,0 +1,118 @@
|
|||
Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init
|
||||
|
||||
Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819
|
||||
|
||||
diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
index ab9054f1a1..c59b030dff 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
@@ -412,7 +412,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream(
|
||||
|
||||
pw_stream_node_id_ = stream_node_id;
|
||||
|
||||
- pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
+ pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
|
||||
pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr);
|
||||
|
||||
diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc
|
||||
index 10551047a9..9ea288ca31 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc
|
||||
@@ -36,7 +36,7 @@ TestScreenCastStreamProvider::TestScreenCastStreamProvider(Observer* observer,
|
||||
return;
|
||||
}
|
||||
|
||||
- pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
+ pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
|
||||
pw_main_loop_ = pw_thread_loop_new("pipewire-test-main-loop", nullptr);
|
||||
|
||||
diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs
|
||||
index c3abf05b38..a994c218f5 100644
|
||||
--- third_party/libwebrtc/modules/portal/pipewire.sigs
|
||||
+++ third_party/libwebrtc/modules/portal/pipewire.sigs
|
||||
@@ -15,7 +15,7 @@ pw_loop * pw_loop_new(const spa_dict *props);
|
||||
|
||||
|
||||
// pipewire.h
|
||||
-void pw_init(int *argc, char **argv[]);
|
||||
+void pipewire_init(int *argc, char **argv[]);
|
||||
const char* pw_get_library_version();
|
||||
|
||||
// properties.h
|
||||
diff --git third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
index d52d6aacc8..6def031d77 100644
|
||||
--- third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
+++ third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
@@ -259,7 +259,7 @@ void PipeWireSession::InitPipeWire(int fd) {
|
||||
}
|
||||
|
||||
bool PipeWireSession::StartPipeWire(int fd) {
|
||||
- pw_init(/*argc=*/nullptr, /*argv=*/nullptr);
|
||||
+ pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr);
|
||||
|
||||
pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr);
|
||||
|
||||
diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp
|
||||
index b806829674..7e8be3dc76 100644
|
||||
--- third_party/pipewire/libpipewire/mozpipewire.cpp
|
||||
+++ third_party/pipewire/libpipewire/mozpipewire.cpp
|
||||
@@ -58,7 +58,7 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop,
|
||||
struct pw_properties *props,
|
||||
size_t user_data_size);
|
||||
static int (*pw_core_disconnect_fn)(struct pw_core *core);
|
||||
-static void (*pw_init_fn)(int *argc, char **argv[]);
|
||||
+static void (*pipewire_init_fn)(int *argc, char **argv[]);
|
||||
static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy);
|
||||
static void (*pw_stream_add_listener_fn)(struct pw_stream *stream,
|
||||
struct spa_hook *listener,
|
||||
@@ -103,7 +103,7 @@ bool IsPwLibraryLoaded() {
|
||||
IS_FUNC_LOADED(pw_context_destroy_fn) &&
|
||||
IS_FUNC_LOADED(pw_context_new_fn) &&
|
||||
IS_FUNC_LOADED(pw_core_disconnect_fn) &&
|
||||
- IS_FUNC_LOADED(pw_init_fn) &&
|
||||
+ IS_FUNC_LOADED(pipewire_init_fn) &&
|
||||
IS_FUNC_LOADED(pw_proxy_destroy_fn) &&
|
||||
IS_FUNC_LOADED(pw_stream_add_listener_fn) &&
|
||||
IS_FUNC_LOADED(pw_stream_connect_fn) &&
|
||||
@@ -146,7 +146,7 @@ bool LoadPWLibrary() {
|
||||
GET_FUNC(pw_context_destroy, pwLib);
|
||||
GET_FUNC(pw_context_new, pwLib);
|
||||
GET_FUNC(pw_core_disconnect, pwLib);
|
||||
- GET_FUNC(pw_init, pwLib);
|
||||
+ GET_FUNC(pipewire_init, pwLib);
|
||||
GET_FUNC(pw_stream_add_listener, pwLib);
|
||||
GET_FUNC(pw_stream_connect, pwLib);
|
||||
GET_FUNC(pw_stream_disconnect, pwLib);
|
||||
@@ -226,12 +226,12 @@ pw_core_disconnect(struct pw_core *core)
|
||||
}
|
||||
|
||||
void
|
||||
-pw_init(int *argc, char **argv[])
|
||||
+pipewire_init(int *argc, char **argv[])
|
||||
{
|
||||
if (!LoadPWLibrary()) {
|
||||
return;
|
||||
}
|
||||
- return pw_init_fn(argc, argv);
|
||||
+ return pipewire_init_fn(argc, argv);
|
||||
}
|
||||
|
||||
void
|
||||
diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h
|
||||
index b932103f46..2c88e28421 100644
|
||||
--- third_party/pipewire/pipewire/pipewire.h
|
||||
+++ third_party/pipewire/pipewire/pipewire.h
|
||||
@@ -69,9 +69,9 @@ extern "C" {
|
||||
* \{
|
||||
*/
|
||||
void
|
||||
-pw_init(int *argc, char **argv[]);
|
||||
+pipewire_init(int *argc, char **argv[]);
|
||||
|
||||
-void pw_deinit(void);
|
||||
+void pipewire_deinit(void);
|
||||
|
||||
bool
|
||||
pw_debug_is_category_enabled(const char *name);
|
|
@ -0,0 +1,49 @@
|
|||
commit cb7967f55ab2f34635a10da523f277083ebd97a5
|
||||
Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
|
||||
|
||||
chase gn_processor.py changes
|
||||
|
||||
diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py
|
||||
index 3a9b9e7f3b..656a28ae6a 100644
|
||||
--- python/mozbuild/mozbuild/gn_processor.py
|
||||
+++ python/mozbuild/mozbuild/gn_processor.py
|
||||
@@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
|
||||
}
|
||||
oses = {
|
||||
"android": "Android",
|
||||
+ "freebsd": "FreeBSD",
|
||||
"linux": "Linux",
|
||||
"mac": "Darwin",
|
||||
"openbsd": "OpenBSD",
|
||||
@@ -742,17 +743,17 @@ def main():
|
||||
|
||||
vars_set = []
|
||||
for is_debug in (True, False):
|
||||
- for target_os in ("android", "linux", "mac", "openbsd", "win"):
|
||||
+ for target_os in ("freebsd",):
|
||||
target_cpus = ["x64"]
|
||||
- if target_os in ("android", "linux", "mac", "win", "openbsd"):
|
||||
+ if target_os in ("android", "freebsd", "linux", "mac", "win", "openbsd"):
|
||||
target_cpus.append("arm64")
|
||||
if target_os in ("android", "linux"):
|
||||
target_cpus.append("arm")
|
||||
- if target_os in ("android", "linux", "win"):
|
||||
+ if target_os in ("android", "freebsd", "linux", "win"):
|
||||
target_cpus.append("x86")
|
||||
- if target_os in ("linux", "openbsd"):
|
||||
+ if target_os in ("freebsd", "linux", "openbsd"):
|
||||
target_cpus.append("riscv64")
|
||||
- if target_os == "linux":
|
||||
+ if target_os in ("freebsd", "linux"):
|
||||
target_cpus.extend(["ppc64", "mipsel", "mips64el"])
|
||||
for target_cpu in target_cpus:
|
||||
vars = {
|
||||
@@ -761,7 +762,7 @@ def main():
|
||||
"target_cpu": target_cpu,
|
||||
"target_os": target_os,
|
||||
}
|
||||
- if target_os == "linux":
|
||||
+ if target_os in ("freebsd", "linux"):
|
||||
for use_x11 in (True, False):
|
||||
vars["use_x11"] = use_x11
|
||||
vars_set.append(vars.copy())
|
200
mail/thunderbird-esr/files/patch-rnp-clang19
Normal file
200
mail/thunderbird-esr/files/patch-rnp-clang19
Normal file
|
@ -0,0 +1,200 @@
|
|||
In clang/libcxx 19, treatment of std::char_traits was tightened
|
||||
down - e.g. no generic (std::char_traits<unsigned char> etc) traits
|
||||
are not implemented anymore - which resulted in fallout in HEAD
|
||||
after the import of llvm/libcxx 19.
|
||||
jkim@ collected the neccessary patches from
|
||||
https://github.com/rnpgp/rnp/commit/20419f739f632fb30666650544f0055e8d4f1afa
|
||||
https://github.com/rnpgp/sexpp/commit/46744a14ffc235330bb99cebfaf294829c31bba4
|
||||
|
||||
--- comm/third_party/rnp/src/lib/types.h.orig 2024-10-25 23:29:32 UTC
|
||||
+++ comm/third_party/rnp/src/lib/types.h
|
||||
@@ -95,9 +95,6 @@ class id_str_pair {
|
||||
static int lookup(const id_str_pair pair[],
|
||||
const std::vector<uint8_t> &bytes,
|
||||
int notfound = 0);
|
||||
- static int lookup(const id_str_pair pair[],
|
||||
- const std::basic_string<uint8_t> &bytes,
|
||||
- int notfound = 0);
|
||||
};
|
||||
|
||||
/** pgp_fingerprint_t */
|
||||
--- comm/third_party/rnp/src/lib/utils.cpp.orig 2024-10-25 23:29:32 UTC
|
||||
+++ comm/third_party/rnp/src/lib/utils.cpp
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2021, [Ribose Inc](https://www.ribose.com).
|
||||
+ * Copyright (c) 2021, 2024 [Ribose Inc](https://www.ribose.com).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -53,21 +53,6 @@ id_str_pair::lookup(const id_str_pair pair[], const st
|
||||
|
||||
int
|
||||
id_str_pair::lookup(const id_str_pair pair[], const std::vector<uint8_t> &bytes, int notfound)
|
||||
-{
|
||||
- while (pair && pair->str) {
|
||||
- if ((strlen(pair->str) == bytes.size()) &&
|
||||
- !memcmp(pair->str, bytes.data(), bytes.size())) {
|
||||
- return pair->id;
|
||||
- }
|
||||
- pair++;
|
||||
- }
|
||||
- return notfound;
|
||||
-}
|
||||
-
|
||||
-int
|
||||
-id_str_pair::lookup(const id_str_pair pair[],
|
||||
- const std::basic_string<uint8_t> &bytes,
|
||||
- int notfound)
|
||||
{
|
||||
while (pair && pair->str) {
|
||||
if ((strlen(pair->str) == bytes.size()) &&
|
||||
--- comm/third_party/rnp/src/librekey/key_store_g10.cpp.orig 2024-10-25 23:29:32 UTC
|
||||
+++ comm/third_party/rnp/src/librekey/key_store_g10.cpp
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2017-2022, [Ribose Inc](https://www.ribose.com).
|
||||
+ * Copyright (c) 2017-2024, [Ribose Inc](https://www.ribose.com).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -312,12 +312,12 @@ read_curve(const sexp_list_t *list, const std::string
|
||||
|
||||
const auto &bytes = data->get_string();
|
||||
pgp_curve_t curve = static_cast<pgp_curve_t>(
|
||||
- id_str_pair::lookup(g10_curve_aliases, data->get_string(), PGP_CURVE_UNKNOWN));
|
||||
+ id_str_pair::lookup(g10_curve_aliases, (const char *) bytes.data(), PGP_CURVE_UNKNOWN));
|
||||
if (curve != PGP_CURVE_UNKNOWN) {
|
||||
key.curve = curve;
|
||||
return true;
|
||||
}
|
||||
- RNP_LOG("Unknown curve: %.*s", (int) bytes.size(), (char *) bytes.data());
|
||||
+ RNP_LOG("Unknown curve: %.*s", (int) bytes.size(), (const char *) bytes.data());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ g23_parse_seckey(pgp_key_pkt_t &seckey,
|
||||
|
||||
auto & alg_bt = alg_s_exp->sexp_string_at(0)->get_string();
|
||||
pgp_pubkey_alg_t alg = static_cast<pgp_pubkey_alg_t>(
|
||||
- id_str_pair::lookup(g10_alg_aliases, alg_bt.c_str(), PGP_PKA_NOTHING));
|
||||
+ id_str_pair::lookup(g10_alg_aliases, (const char *) alg_bt.data(), PGP_PKA_NOTHING));
|
||||
if (alg == PGP_PKA_NOTHING) {
|
||||
RNP_LOG(
|
||||
"Unsupported algorithm: '%.*s'", (int) alg_bt.size(), (const char *) alg_bt.data());
|
||||
--- comm/third_party/rnp/src/libsexpp/include/sexpp/sexp.h.orig 2024-10-25 23:29:32.000000000 +0000
|
||||
+++ comm/third_party/rnp/src/libsexpp/include/sexpp/sexp.h 2024-10-27 06:14:59.238155000 +0000
|
||||
@@ -44,8 +44,93 @@
|
||||
#include "sexp-public.h"
|
||||
#include "sexp-error.h"
|
||||
|
||||
+// We are implementing char traits for octet_t with trhe following restrictions
|
||||
+// -- limit visibility so that other traits for unsigned char are still possible
|
||||
+// -- create template specializatio in std workspace (use workspace specialization
|
||||
+// is not specified and causes issues at least with gcc 4.8
|
||||
+
|
||||
namespace sexp {
|
||||
+using octet_t = uint8_t;
|
||||
+} // namespace sexp
|
||||
|
||||
+namespace std {
|
||||
+
|
||||
+template <> struct char_traits<sexp::octet_t> {
|
||||
+ typedef sexp::octet_t char_type;
|
||||
+ typedef int int_type;
|
||||
+ typedef std::streampos pos_type;
|
||||
+ typedef std::streamoff off_type;
|
||||
+ typedef mbstate_t state_type;
|
||||
+
|
||||
+ static void assign(char_type &__c1, const char_type &__c2) noexcept { __c1 = __c2; }
|
||||
+
|
||||
+ static constexpr bool eq(const char_type &__c1, const char_type &__c2) noexcept
|
||||
+ {
|
||||
+ return __c1 == __c2;
|
||||
+ }
|
||||
+
|
||||
+ static constexpr bool lt(const char_type &__c1, const char_type &__c2) noexcept
|
||||
+ {
|
||||
+ return __c1 < __c2;
|
||||
+ }
|
||||
+
|
||||
+ static int compare(const char_type *__s1, const char_type *__s2, size_t __n)
|
||||
+ {
|
||||
+ return memcmp(__s1, __s2, __n);
|
||||
+ }
|
||||
+
|
||||
+ static size_t length(const char_type *__s)
|
||||
+ {
|
||||
+ return strlen(reinterpret_cast<const char *>(__s));
|
||||
+ }
|
||||
+
|
||||
+ static const char_type *find(const char_type *__s, size_t __n, const char_type &__a)
|
||||
+ {
|
||||
+ return static_cast<const char_type *>(memchr(__s, __a, __n));
|
||||
+ }
|
||||
+
|
||||
+ static char_type *move(char_type *__s1, const char_type *__s2, size_t __n)
|
||||
+ {
|
||||
+ return static_cast<char_type *>(memmove(__s1, __s2, __n));
|
||||
+ }
|
||||
+
|
||||
+ static char_type *copy(char_type *__s1, const char_type *__s2, size_t __n)
|
||||
+ {
|
||||
+ return static_cast<char_type *>(memcpy(__s1, __s2, __n));
|
||||
+ }
|
||||
+
|
||||
+ static char_type *assign(char_type *__s, size_t __n, char_type __a)
|
||||
+ {
|
||||
+ return static_cast<char_type *>(memset(__s, __a, __n));
|
||||
+ }
|
||||
+
|
||||
+ static constexpr char_type to_char_type(const int_type &__c) noexcept
|
||||
+ {
|
||||
+ return static_cast<char_type>(__c);
|
||||
+ }
|
||||
+
|
||||
+ // To keep both the byte 0xff and the eof symbol 0xffffffff
|
||||
+ // from ending up as 0xffffffff.
|
||||
+ static constexpr int_type to_int_type(const char_type &__c) noexcept
|
||||
+ {
|
||||
+ return static_cast<int_type>(static_cast<unsigned char>(__c));
|
||||
+ }
|
||||
+
|
||||
+ static constexpr bool eq_int_type(const int_type &__c1, const int_type &__c2) noexcept
|
||||
+ {
|
||||
+ return __c1 == __c2;
|
||||
+ }
|
||||
+
|
||||
+ static constexpr int_type eof() noexcept { return static_cast<int_type>(0xFFFFFFFF); }
|
||||
+
|
||||
+ static constexpr int_type not_eof(const int_type &__c) noexcept
|
||||
+ {
|
||||
+ return (__c == eof()) ? 0 : __c;
|
||||
+ }
|
||||
+};
|
||||
+} // namespace std
|
||||
+
|
||||
+namespace sexp {
|
||||
/*
|
||||
* SEXP octet_t definitions
|
||||
* We maintain some presumable redundancy with ctype
|
||||
@@ -99,14 +184,14 @@ class sexp_input_stream_t;
|
||||
* SEXP simple string
|
||||
*/
|
||||
|
||||
-typedef uint8_t octet_t;
|
||||
+using octet_traits = std::char_traits<octet_t>;
|
||||
+using octet_string = std::basic_string<octet_t, octet_traits>;
|
||||
|
||||
-class SEXP_PUBLIC_SYMBOL sexp_simple_string_t : public std::basic_string<octet_t>,
|
||||
- private sexp_char_defs_t {
|
||||
+class SEXP_PUBLIC_SYMBOL sexp_simple_string_t : public octet_string, private sexp_char_defs_t {
|
||||
public:
|
||||
sexp_simple_string_t(void) = default;
|
||||
- sexp_simple_string_t(const octet_t *dt) : std::basic_string<octet_t>{dt} {}
|
||||
- sexp_simple_string_t(const octet_t *bt, size_t ln) : std::basic_string<octet_t>{bt, ln} {}
|
||||
+ sexp_simple_string_t(const octet_t *dt) : octet_string{dt} {}
|
||||
+ sexp_simple_string_t(const octet_t *bt, size_t ln) : octet_string{bt, ln} {}
|
||||
sexp_simple_string_t &append(int c)
|
||||
{
|
||||
(*this) += (octet_t)(c & 0xFF);
|
|
@ -0,0 +1,141 @@
|
|||
commit 6e6860b4ecb7cea4ecbc07f45f491c562d1a83e7
|
||||
Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
|
||||
|
||||
enable pipewire on bsd
|
||||
|
||||
diff --git third_party/libwebrtc/BUILD.gn third_party/libwebrtc/BUILD.gn
|
||||
index 85ead4162f..7dc64543dc 100644
|
||||
--- third_party/libwebrtc/BUILD.gn
|
||||
+++ third_party/libwebrtc/BUILD.gn
|
||||
@@ -107,7 +107,7 @@ if (!build_with_chromium && !build_with_mozilla) {
|
||||
"tools_webrtc/perf:webrtc_dashboard_upload",
|
||||
]
|
||||
}
|
||||
- if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
deps += [ "modules/desktop_capture:shared_screencast_stream_test" ]
|
||||
}
|
||||
}
|
||||
diff --git third_party/libwebrtc/build/config/BUILDCONFIG.gn third_party/libwebrtc/build/config/BUILDCONFIG.gn
|
||||
index 571ae5f0d6..863d428fc6 100644
|
||||
--- third_party/libwebrtc/build/config/BUILDCONFIG.gn
|
||||
+++ third_party/libwebrtc/build/config/BUILDCONFIG.gn
|
||||
@@ -132,6 +132,7 @@ declare_args() {
|
||||
|
||||
# Set to true when compiling with the Clang compiler.
|
||||
is_clang = current_os != "linux" || current_os == "openbsd" ||
|
||||
+ current_os == "freebsd" ||
|
||||
(current_cpu != "s390x" && current_cpu != "s390" &&
|
||||
current_cpu != "ppc64" && current_cpu != "ppc" &&
|
||||
current_cpu != "mips" && current_cpu != "mips64" &&
|
||||
@@ -184,7 +185,7 @@ if (host_toolchain == "") {
|
||||
# TODO(dpranke): Add some sort of assert here that verifies that
|
||||
# no toolchain omitted host_toolchain from its toolchain_args().
|
||||
|
||||
- if (host_os == "linux" || host_os == "openbsd") {
|
||||
+ if (host_os == "linux" || host_os == "openbsd" || host_os == "freebsd") {
|
||||
if (target_os != "linux") {
|
||||
host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
|
||||
} else if (is_clang) {
|
||||
@@ -222,7 +223,7 @@ if (target_os == "android") {
|
||||
assert(host_os == "linux" || host_os == "mac",
|
||||
"Android builds are only supported on Linux and Mac hosts.")
|
||||
_default_toolchain = "//build/toolchain/android:android_clang_$target_cpu"
|
||||
-} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd") {
|
||||
+} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd" || target_os == "freebsd") {
|
||||
# See comments in build/toolchain/cros/BUILD.gn about board compiles.
|
||||
if (is_clang) {
|
||||
_default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
|
||||
@@ -288,7 +289,7 @@ is_chromeos = current_os == "chromeos"
|
||||
is_fuchsia = current_os == "fuchsia"
|
||||
is_ios = current_os == "ios"
|
||||
is_linux = current_os == "linux"
|
||||
-is_bsd = current_os == "openbsd"
|
||||
+is_bsd = current_os == "openbsd" || current_os == "freebsd"
|
||||
is_mac = current_os == "mac"
|
||||
is_nacl = current_os == "nacl"
|
||||
is_win = current_os == "win" || current_os == "winuwp"
|
||||
diff --git third_party/libwebrtc/modules/desktop_capture/BUILD.gn third_party/libwebrtc/modules/desktop_capture/BUILD.gn
|
||||
index 0634e0e9c4..d5deba7ee7 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/BUILD.gn
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/BUILD.gn
|
||||
@@ -75,7 +75,7 @@ if (rtc_include_tests) {
|
||||
"window_finder_unittest.cc",
|
||||
]
|
||||
|
||||
- if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
configs += [ "../portal:gio" ]
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ if (rtc_include_tests) {
|
||||
}
|
||||
}
|
||||
|
||||
- if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
rtc_test("shared_screencast_stream_test") {
|
||||
testonly = true
|
||||
|
||||
@@ -146,7 +146,7 @@ if (rtc_include_tests) {
|
||||
"test_utils_unittest.cc",
|
||||
]
|
||||
|
||||
- if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
configs += [ "../portal:gio" ]
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ if (rtc_include_tests) {
|
||||
"mock_desktop_capturer_callback.h",
|
||||
]
|
||||
|
||||
- if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
configs += [ "../portal:gio" ]
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ if (rtc_include_tests) {
|
||||
}
|
||||
|
||||
# TODO(bugs.webrtc.org/14187): remove when all users are gone
|
||||
-if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
config("pipewire_config") {
|
||||
configs = [ "../portal:pipewire_config" ]
|
||||
}
|
||||
@@ -326,7 +326,7 @@ rtc_library("desktop_capture") {
|
||||
"window_finder.cc",
|
||||
"window_finder.h",
|
||||
]
|
||||
- if (is_linux && !is_castos && rtc_use_pipewire) {
|
||||
+ if ((is_linux || is_bsd) && !is_castos && rtc_use_pipewire) {
|
||||
sources += [ "desktop_capture_metadata.h" ]
|
||||
}
|
||||
if (is_mac) {
|
||||
diff --git third_party/libwebrtc/modules/portal/BUILD.gn third_party/libwebrtc/modules/portal/BUILD.gn
|
||||
index d7768b2323..3593a69592 100644
|
||||
--- third_party/libwebrtc/modules/portal/BUILD.gn
|
||||
+++ third_party/libwebrtc/modules/portal/BUILD.gn
|
||||
@@ -10,7 +10,7 @@ import("//build/config/linux/pkg_config.gni")
|
||||
import("//tools/generate_stubs/rules.gni")
|
||||
import("../../webrtc.gni")
|
||||
|
||||
-if ((is_linux || is_chromeos) && rtc_use_pipewire) {
|
||||
+if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) {
|
||||
if (!build_with_mozilla) {
|
||||
pkg_config("gio") {
|
||||
packages = [
|
||||
diff --git third_party/libwebrtc/webrtc.gni third_party/libwebrtc/webrtc.gni
|
||||
index e1273475b9..9bdbd7ec5e 100644
|
||||
--- third_party/libwebrtc/webrtc.gni
|
||||
+++ third_party/libwebrtc/webrtc.gni
|
||||
@@ -157,7 +157,7 @@ declare_args() {
|
||||
# By default it's only enabled on desktop Linux (excludes ChromeOS) and
|
||||
# only when using the sysroot as PipeWire is not available in older and
|
||||
# supported Ubuntu and Debian distributions.
|
||||
- rtc_use_pipewire = is_linux && use_sysroot
|
||||
+ rtc_use_pipewire = (is_linux || is_bsd) && use_sysroot
|
||||
|
||||
# Set this to link PipeWire and required libraries directly instead of using the dlopen.
|
||||
rtc_link_pipewire = false
|
|
@ -0,0 +1,26 @@
|
|||
commit 3524023ca1d2184ab9a5a7cc61695923e6834cc1
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
avoid linux-only includes
|
||||
|
||||
diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
|
||||
index 6a019c64b4b3..18bb43d797dd 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
|
||||
@@ -10,12 +10,16 @@
|
||||
|
||||
#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"
|
||||
|
||||
+#if !defined(__FreeBSD__)
|
||||
#include <asm/ioctl.h>
|
||||
+#endif
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
+#if !defined(__FreeBSD__)
|
||||
#include <linux/types.h>
|
||||
+#endif
|
||||
#include <spa/param/video/format-utils.h>
|
||||
#include <unistd.h>
|
||||
#include <xf86drm.h>
|
|
@ -0,0 +1,10 @@
|
|||
--- third_party/libwebrtc/third_party/pffft/src/pffft.c.orig 2022-02-10 18:57:48 UTC
|
||||
+++ third_party/libwebrtc/third_party/pffft/src/pffft.c
|
||||
@@ -100,6 +100,7 @@
|
||||
Altivec support macros
|
||||
*/
|
||||
#if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
|
||||
+#include <altivec.h>
|
||||
typedef vector float v4sf;
|
||||
# define SIMD_SZ 4
|
||||
# define VZERO() ((vector float) vec_splat_u8(0))
|
|
@ -0,0 +1,12 @@
|
|||
--- third_party/sqlite3/src/moz.build.old 2021-08-09 16:08:59.381182000 -0500
|
||||
+++ third_party/sqlite3/src/moz.build 2021-08-09 16:10:25.370954000 -0500
|
||||
@@ -92,7 +92,8 @@
|
||||
|
||||
# Enabling sqlite math functions
|
||||
DEFINES['SQLITE_ENABLE_MATH_FUNCTIONS'] = True
|
||||
-if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "Android":
|
||||
+if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "Android" or \
|
||||
+ CONFIG["OS_TARGET"] == "FreeBSD":
|
||||
OS_LIBS += [
|
||||
"m"
|
||||
]
|
|
@ -0,0 +1,104 @@
|
|||
diff --git toolkit/components/processtools/ProcInfo_bsd.cpp toolkit/components/processtools/ProcInfo_bsd.cpp
|
||||
index a6ff4881940c..f041ed5e50ce 100644
|
||||
--- toolkit/components/processtools/ProcInfo_bsd.cpp
|
||||
+++ toolkit/components/processtools/ProcInfo_bsd.cpp
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/user.h>
|
||||
+#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -50,25 +53,39 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync(
|
||||
}
|
||||
for (const auto& request : aRequests) {
|
||||
size_t size;
|
||||
+#ifdef __FreeBSD__
|
||||
+ int mib[4];
|
||||
+ int mibsize = 4;
|
||||
+ mib[0] = CTL_KERN;
|
||||
+ mib[1] = KERN_PROC;
|
||||
+ mib[2] = KERN_PROC_PID | KERN_PROC_INC_THREAD;
|
||||
+ mib[3] = request.pid;
|
||||
+#else
|
||||
int mib[6];
|
||||
+ int mibsize = 6;
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PID | KERN_PROC_SHOW_THREADS;
|
||||
mib[3] = request.pid;
|
||||
mib[4] = sizeof(kinfo_proc);
|
||||
mib[5] = 0;
|
||||
- if (sysctl(mib, 6, nullptr, &size, nullptr, 0) == -1) {
|
||||
+#endif
|
||||
+ if (sysctl(mib, mibsize, nullptr, &size, nullptr, 0) == -1) {
|
||||
// Can't get info for this process. Skip it.
|
||||
continue;
|
||||
}
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ auto procs = MakeUniqueFallible<kinfo_proc[]>(size / sizeof(kinfo_proc));
|
||||
+#else
|
||||
mib[5] = size / sizeof(kinfo_proc);
|
||||
auto procs = MakeUniqueFallible<kinfo_proc[]>(mib[5]);
|
||||
+#endif
|
||||
if (!procs) {
|
||||
result.SetReject(NS_ERROR_OUT_OF_MEMORY);
|
||||
return result;
|
||||
}
|
||||
- if (sysctl(mib, 6, procs.get(), &size, nullptr, 0) == -1 &&
|
||||
+ if (sysctl(mib, mibsize, procs.get(), &size, nullptr, 0) == -1 &&
|
||||
errno != ENOMEM) {
|
||||
continue;
|
||||
}
|
||||
@@ -84,19 +101,34 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync(
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < size / sizeof(kinfo_proc); i++) {
|
||||
const auto& p = procs[i];
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (i == 0) {
|
||||
+#else
|
||||
if (p.p_tid == -1) {
|
||||
+#endif
|
||||
// This is the process.
|
||||
found = true;
|
||||
+#ifdef __FreeBSD__
|
||||
+ info.cpuTime = uint64_t(p.ki_runtime) * 1'000u;
|
||||
+ info.memory = (p.ki_tsize + p.ki_dsize + p.ki_ssize) * getpagesize();
|
||||
+#else
|
||||
info.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u +
|
||||
uint64_t(p.p_rtime_usec) * 1'000u;
|
||||
info.memory =
|
||||
(p.p_vm_tsize + p.p_vm_dsize + p.p_vm_ssize) * getpagesize();
|
||||
+#endif
|
||||
+
|
||||
} else {
|
||||
// This is one of its threads.
|
||||
ThreadInfo threadInfo;
|
||||
+#ifdef __FreeBSD__
|
||||
+ threadInfo.tid = p.ki_tid;
|
||||
+ threadInfo.cpuTime = uint64_t(p.ki_runtime) * 1'000u;
|
||||
+#else
|
||||
threadInfo.tid = p.p_tid;
|
||||
threadInfo.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u +
|
||||
uint64_t(p.p_rtime_usec) * 1'000u;
|
||||
+#endif
|
||||
info.threads.AppendElement(threadInfo);
|
||||
}
|
||||
}
|
||||
diff --git toolkit/components/processtools/moz.build toolkit/components/processtools/moz.build
|
||||
index b7c164c1b0ac..a41dad52c343 100644
|
||||
--- toolkit/components/processtools/moz.build
|
||||
+++ toolkit/components/processtools/moz.build
|
||||
@@ -39,7 +39,7 @@ BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
|
||||
# Platform-specific implementations of `ProcInfo`.
|
||||
toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
|
||||
if toolkit == "gtk" or toolkit == "android":
|
||||
- if CONFIG["OS_TARGET"] == "OpenBSD":
|
||||
+ if CONFIG["OS_TARGET"] == "FreeBSD" or CONFIG["OS_TARGET"] == "OpenBSD":
|
||||
UNIFIED_SOURCES += ["ProcInfo_bsd.cpp"]
|
||||
else:
|
||||
UNIFIED_SOURCES += ["ProcInfo_linux.cpp"]
|
11
mail/thunderbird-esr/files/thunderbird.desktop.in
Normal file
11
mail/thunderbird-esr/files/thunderbird.desktop.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Thunderbird
|
||||
GenericName=Mail Client
|
||||
Comment=Mail client and News Reader
|
||||
Exec=@MOZILLA@ %u
|
||||
Icon=@PORTNAME_ICON@
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;Email;News;InstantMessaging;
|
4
mail/thunderbird-esr/pkg-descr
Normal file
4
mail/thunderbird-esr/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
Mozilla Thunderbird is a redesign of the Mozilla mail component with the goal
|
||||
of becoming a cross-platform stand alone mail application using the XUL
|
||||
user interface language. See the Mozilla Thunderbird project page for
|
||||
more details.
|
Loading…
Add table
Reference in a new issue