1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

mail/thunderbird: update to 115.3.0 (ga)

Release Notes:
  https://www.thunderbird.net/en-US/thunderbird/115.3.0/releasenotes/
This commit is contained in:
Christoph Moench-Tegeder 2023-09-26 21:14:51 +02:00
parent b0cefa75d4
commit afcc7e8a73
21 changed files with 44632 additions and 18939 deletions

View File

@ -1,8 +1,9 @@
PORTNAME= thunderbird
DISTVERSION= 102.15.1
DISTVERSION= 115.3.0
PORTREVISION= 1
CATEGORIES= mail news net-im wayland
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source
DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX}
MAINTAINER= gecko@FreeBSD.org
@ -10,14 +11,13 @@ 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.79:security/nss \
icu>=71.1,1:devel/icu \
nss>=3.90:security/nss \
libevent>=2.1.8:devel/libevent \
harfbuzz>=4.1.0:print/harfbuzz \
harfbuzz>=7.3.0:print/harfbuzz \
graphite2>=1.3.14:graphics/graphite2 \
png>=1.6.37:graphics/png \
png>=1.6.39:graphics/png \
dav1d>=1.0.0:multimedia/dav1d \
libvpx>=1.11.0:multimedia/libvpx \
libvpx>=1.13.0:multimedia/libvpx \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
v4l_compat>0:multimedia/v4l_compat \
autoconf2.13:devel/autoconf2.13 \
@ -29,7 +29,9 @@ LIB_DEPENDS= libjson-c.so:devel/json-c \
SSP_UNSAFE= yes
USE_GECKO= gecko
USE_MOZILLA= -sqlite
# cannot use system icu: calendar is completely broken by
# https://unicode-org.atlassian.net/browse/ICU-22132 (fix ETA 74.1)
USE_MOZILLA= -icu -sqlite
CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234
USES= tar:xz
@ -67,11 +69,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/comm/mail/app/nsMailApp.cpp
pre-configure:
(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf2.13)
(cd ${MOZSRC} && ${LOCALBASE}/bin/autoconf2.13)
(cd ${MOZSRC}/js/src/ && ${LOCALBASE}/bin/autoconf2.13)
port-pre-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/defaults

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1694536359
SHA256 (thunderbird-102.15.1.source.tar.xz) = a20d53bbb3c01cea86b34da3907536f750421ae283cb527eef6bf81acbb8a038
SIZE (thunderbird-102.15.1.source.tar.xz) = 504786376
TIMESTAMP = 1695746048
SHA256 (thunderbird-115.3.0.source.tar.xz) = 2b9ba16d737fdfb91055d75e43e20cd457254e9fa5b097cecdc1b0cc64818fc3
SIZE (thunderbird-115.3.0.source.tar.xz) = 533553340

View File

@ -1,9 +1,9 @@
https://github.com/mozilla/addons/issues/708
https://github.com/mozilla/addons-frontend/issues/4610
--- comm/mail/app/profile/all-thunderbird.js.orig 2022-09-10 23:48:23.616215000 +0200
+++ comm/mail/app/profile/all-thunderbird.js 2022-09-11 00:01:06.140736000 +0200
@@ -167,10 +167,10 @@
--- comm/mail/app/profile/all-thunderbird.js.orig 2023-09-18 22:38:56.049701000 +0200
+++ comm/mail/app/profile/all-thunderbird.js 2023-09-18 22:41:26.840390000 +0200
@@ -207,10 +207,10 @@
pref("extensions.getAddons.compatOverides.url", "https://services.addons.thunderbird.net/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%");
pref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/");
pref("browser.dictionaries.download.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/language-tools/");
@ -18,7 +18,7 @@ https://github.com/mozilla/addons-frontend/issues/4610
pref("extensions.getAddons.langpacks.url", "https://services.addons.thunderbird.net/api/v3/addons/language-tools/?app=thunderbird&type=language&appversion=%VERSION%");
pref("extensions.getAddons.discovery.api_url", "https://services.addons.thunderbird.net/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
@@ -202,9 +202,9 @@
@@ -242,9 +242,9 @@
// .. etc ..
//
pref("extensions.update.enabled", true);
@ -30,20 +30,20 @@ https://github.com/mozilla/addons-frontend/issues/4610
pref("extensions.update.interval", 86400); // Check for updates to Extensions and
// Themes every day
--- toolkit/mozapps/extensions/internal/AddonRepository.jsm.orig 2022-09-11 00:01:40.212952000 +0200
+++ toolkit/mozapps/extensions/internal/AddonRepository.jsm 2022-09-11 00:07:14.587890000 +0200
@@ -592,7 +592,7 @@
--- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs.orig 2023-09-18 22:35:42.082170000 +0200
+++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs 2023-09-18 22:36:14.313490000 +0200
@@ -596,7 +596,7 @@
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 == PLATFORM) {
+ if (file.platform == "all" || file.platform == "linux" || file.platform == PLATFORM) {
- if (file.platform == "all" || file.platform == lazy.PLATFORM) {
+ if (file.platform == "all" || file.platform == "linux" || file.platform == lazy.PLATFORM) {
if (file.url) {
addon.sourceURI = NetUtil.newURI(file.url);
addon.sourceURI = lazy.NetUtil.newURI(file.url);
}
--- toolkit/mozapps/extensions/internal/XPIDatabase.jsm.orig 2022-09-11 00:08:09.244518000 +0200
+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm 2022-09-11 00:09:56.387390000 +0200
@@ -569,7 +569,7 @@
--- toolkit/mozapps/extensions/internal/XPIDatabase.jsm.orig 2023-09-18 22:36:52.473447000 +0200
+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm 2023-09-18 22:37:26.177990000 +0200
@@ -634,7 +634,7 @@
// Something is causing errors in here
try {
for (let platform of this.targetPlatforms) {

View File

@ -14,10 +14,11 @@ Solution: This is not a real solution, but a hack. The real solution would have
are readable, albeit not as pretty to look at as they could be.
Side-effects: I have not yet found an unwanted side-effect.
diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
--- gfx/2d/DrawTargetSkia.cpp Tue Oct 22 12:27:22 2019 +0200
+++ gfx/2d/DrawTargetSkia.cpp Thu Oct 31 09:11:56 2019 +0100
@@ -1861,6 +1861,14 @@
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));
@ -32,3 +33,4 @@ diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
mCanvas->saveLayer(saveRec);
SetPermitSubpixelAA(aOpaque);

View File

@ -3,9 +3,42 @@ https://bugzilla.mozilla.org/attachment.cgi?id=9028600
Rough progress patch
diff -r 53107afbc21e gfx/skia/skia/third_party/skcms/skcms.cc
--- gfx/skia/skia/third_party/skcms/skcms.cc Wed Nov 07 04:50:21 2018 +0000
+++ gfx/skia/skia/third_party/skcms/skcms.cc Thu Nov 29 12:49:35 2018 +0000
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>
@ -14,8 +47,8 @@ diff -r 53107afbc21e gfx/skia/skia/third_party/skcms/skcms.cc
+ #define SKCMS_PORTABLE
#endif
// sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
@@ -280,20 +282,28 @@ enum {
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));
@ -48,33 +81,3 @@ diff -r 53107afbc21e gfx/skia/skia/third_party/skcms/skcms.cc
#endif
}
--- gfx/2d/DrawTargetSkia.cpp.orig 2019-09-21 15:51:04.129603000 +0200
+++ gfx/2d/DrawTargetSkia.cpp 2019-09-21 15:52:11.900316000 +0200
@@ -138,8 +138,7 @@ static IntRect CalculateSurfaceBounds(const IntSize& a
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) {
--- gfx/2d/Types.h.orig 2019-09-21 15:52:47.044803000 +0200
+++ gfx/2d/Types.h 2019-09-21 15:53:40.113641000 +0200
@@ -87,15 +87,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.
//

View File

@ -1,49 +0,0 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c9
https://bugzilla.mozilla.org/attachment.cgi?id=9111146
mozilla-bmo1504834-part3.patch
# HG changeset patch
# Parent aecb4600e5da17443b224c79eee178c1d8e155e3
For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
--- gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200
+++ gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200
@@ -238,7 +238,18 @@
AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
+ // On Big endian the commented out variant doesn't work,
+ // and honestly, I have no idea why it exists in the first place.
+ // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
+ // which gets a 64-bit integer, and FromBits returns 32-bit,
+ // cutting off the wrong half again.
+ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
+ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
+#ifdef SK_CPU_BENDIAN
+ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
+#else
AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
+#endif
AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
--- gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200
+++ gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200
@@ -203,7 +203,13 @@
// ~~~>
// a = 1*aa + d(1-1*aa) = aa + d(1-aa)
// c = 0*aa + d(1-1*aa) = d(1-aa)
+
+ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
+#ifdef SK_CPU_BENDIAN
+ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
+#else
return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
+#endif
+ d.approxMulDiv255(aa.inv());
};
while (h --> 0) {

View File

@ -63,26 +63,27 @@ index 8509aec..eb6f129 100644
EXPORTS += [
diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
index 0069865..e806fc8 100644
--- media/ffvpx/libavcodec/moz.build
--- media/ffvpx/libavcodec/moz.build.orig
+++ media/ffvpx/libavcodec/moz.build
@@ -112,9 +112,15 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
'vaapi_vp8.c',
'vaapi_vp9.c',
]
+ if CONFIG["MOZ_SYSTEM_AV1"]:
+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+ else:
+ USE_LIBS += [
+ 'dav1d',
+ 'media_libdav1d_asm',
+ ]
USE_LIBS += [
- 'dav1d',
- 'media_libdav1d_asm',
'mozva'
]
@@ -108,10 +108,14 @@
'vp9prob.c',
'vp9recon.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']
+ else:
+ USE_LIBS += [
+ 'dav1d',
+ 'media_libdav1d_asm',
+ ]
if CONFIG['MOZ_WAYLAND']:
LOCAL_INCLUDES += ['/media/mozva']
SOURCES += [
diff --git toolkit/moz.configure toolkit/moz.configure
index 0069865..e806fc8 100644
--- toolkit/moz.configure

View File

@ -1,15 +0,0 @@
Unbreak build with Rust 1.45.0
error: options `-C embed-bitcode=no` and `-C lto` are incompatible
--- config/makefiles/rust.mk.orig 2020-05-12 09:36:22 UTC
+++ config/makefiles/rust.mk
@@ -61,7 +61,7 @@ ifndef MOZ_DEBUG_RUST
# Enable link-time optimization for release builds, but not when linking
# gkrust_gtest.
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto
+cargo_rustc_flags +=
endif
endif
endif

View File

@ -20,16 +20,22 @@ media/libcubeb/src/cubeb_alsa.c:1168:3: note: include the header <stdlib.h> or e
^
2 errors generated.
--- media/libcubeb/src/cubeb_alsa.c.orig 2021-08-31 14:26:24.530548000 +0200
+++ media/libcubeb/src/cubeb_alsa.c 2021-08-31 14:26:43.081470000 +0200
@@ -5,9 +5,7 @@
--- 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
-#define _DEFAULT_SOURCE
-#define _BSD_SOURCE
-#define _XOPEN_SOURCE 500
+#define _GNU_SOURCE 1
+#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 <alsa/asoundlib.h>
#include "cubeb_tracing.h"

View File

@ -1,93 +0,0 @@
--- modules/fdlibm/src/math_private.h.orig 2021-09-30 19:32:33.764224000 +0200
+++ modules/fdlibm/src/math_private.h 2021-10-02 22:15:33.265122000 +0200
@@ -30,7 +30,11 @@
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
*/
-typedef double __double_t;
+#ifdef __LP64__
+typedef double __double_t;
+#else
+typedef long double __double_t;
+#endif
typedef __double_t double_t;
/*
@@ -630,7 +634,37 @@
return ((double)(x + 0x1.8p52) - 0x1.8p52);
}
+static inline float
+rnintf(__float_t x)
+{
+ /*
+ * As for rnint(), except we could just call that to handle the
+ * extra precision case, usually without losing efficiency.
+ */
+ return ((float)(x + 0x1.8p23F) - 0x1.8p23F);
+}
+
+#ifdef LDBL_MANT_DIG
/*
+ * The complications for extra precision are smaller for rnintl() since it
+ * can safely assume that the rounding precision has been increased from
+ * its default to FP_PE on x86. We don't exploit that here to get small
+ * optimizations from limiting the rangle to double. We just need it for
+ * the magic number to work with long doubles. ld128 callers should use
+ * rnint() instead of this if possible. ld80 callers should prefer
+ * rnintl() since for amd64 this avoids swapping the register set, while
+ * for i386 it makes no difference (assuming FP_PE), and for other arches
+ * it makes little difference.
+ */
+static inline long double
+rnintl(long double x)
+{
+ return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 -
+ __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2);
+}
+#endif /* LDBL_MANT_DIG */
+
+/*
* irint() and i64rint() give the same result as casting to their integer
* return type provided their arg is a floating point integer. They can
* sometimes be more efficient because no rounding is required.
@@ -644,6 +678,39 @@
sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
#else
#define irint(x) ((int)(x))
+#endif
+
+#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */
+
+#if defined(__i386__) && defined(__GNUCLIKE_ASM)
+static __inline int
+irintf(float x)
+{
+ int n;
+
+ __asm("fistl %0" : "=m" (n) : "t" (x));
+ return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+ int n;
+
+ __asm("fistl %0" : "=m" (n) : "t" (x));
+ return (n);
+}
+#endif
+
+#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM)
+static __inline int
+irintl(long double x)
+{
+ int n;
+
+ __asm("fistl %0" : "=m" (n) : "t" (x));
+ return (n);
+}
#endif
#ifdef DEBUG

View File

@ -97,13 +97,9 @@ index b91d9c1..a97e6eb 100755
echo If gfx/graphite2/src/files.mk has changed, please make corresponding
diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
index 3180257..4587a3b 100644
--- gfx/harfbuzz/README-mozilla
+++ gfx/harfbuzz/README-mozilla
@@ -21,3 +21,8 @@ from within the gfx/harfbuzz directory.
If the collection of source files changes, manual updates to moz.build may be
needed as we don't use the upstream makefiles.
+
--- /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

View 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_;

View 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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,35 +1,48 @@
Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init
Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init
Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819
diff --git third_party/libwebrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc third_party/libwebrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
index 2fd3b1a575..79a14d7d7e 100644
--- third_party/libwebrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++ third_party/libwebrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -279,7 +279,7 @@ void BaseCapturerPipeWire::InitPipeWire() {
}
#endif // defined(WEBRTC_DLOPEN_PIPEWIRE)
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 49b64845100b..283c387db770 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
@@ -402,7 +402,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);
pw_context_ = pw_context_new(pw_thread_loop_get_loop(pw_main_loop_), nullptr, 0);
diff --git third_party/libwebrtc/modules/desktop_capture/linux/pipewire.sigs third_party/libwebrtc/modules/desktop_capture/linux/pipewire.sigs
index 3e21e9dc07..f561dcf619 100644
--- third_party/libwebrtc/modules/desktop_capture/linux/pipewire.sigs
+++ third_party/libwebrtc/modules/desktop_capture/linux/pipewire.sigs
@@ -16,7 +16,7 @@ void pw_loop_destroy(pw_loop *loop);
pw_loop * pw_loop_new(pw_properties *properties);
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 3b829959aca8..9bdcdf1ffd51 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 139a8c37a551..9fe131d8daa6 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
pw_properties * pw_properties_new_string(const char *args);
diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp
index 1ecfc3196a..6f44b35964 100644
index fbeeb8e5a760..46f768790946 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,
@ -41,7 +54,7 @@ index 1ecfc3196a..6f44b35964 100644
static void (*pw_stream_add_listener_fn)(struct pw_stream *stream,
struct spa_hook *listener,
const struct pw_stream_events *events,
@@ -96,7 +96,7 @@ bool IsPwLibraryLoaded() {
@@ -101,7 +101,7 @@ bool IsPwLibraryLoaded() {
IS_FUNC_LOADED(pw_context_destroy_fn) &&
IS_FUNC_LOADED(pw_context_new_fn) &&
IS_FUNC_LOADED(pw_core_disconnect_fn) &&
@ -49,8 +62,8 @@ index 1ecfc3196a..6f44b35964 100644
+ IS_FUNC_LOADED(pipewire_init_fn) &&
IS_FUNC_LOADED(pw_stream_add_listener_fn) &&
IS_FUNC_LOADED(pw_stream_connect_fn) &&
IS_FUNC_LOADED(pw_stream_dequeue_buffer_fn) &&
@@ -133,7 +133,7 @@ bool LoadPWLibrary() {
IS_FUNC_LOADED(pw_stream_disconnect_fn) &&
@@ -142,7 +142,7 @@ bool LoadPWLibrary() {
GET_FUNC(pw_context_destroy, pwLib);
GET_FUNC(pw_context_new, pwLib);
GET_FUNC(pw_core_disconnect, pwLib);
@ -58,8 +71,8 @@ index 1ecfc3196a..6f44b35964 100644
+ GET_FUNC(pipewire_init, pwLib);
GET_FUNC(pw_stream_add_listener, pwLib);
GET_FUNC(pw_stream_connect, pwLib);
GET_FUNC(pw_stream_dequeue_buffer, pwLib);
@@ -207,12 +207,12 @@ pw_core_disconnect(struct pw_core *core)
GET_FUNC(pw_stream_disconnect, pwLib);
@@ -220,12 +220,12 @@ pw_core_disconnect(struct pw_core *core)
}
void
@ -75,11 +88,11 @@ index 1ecfc3196a..6f44b35964 100644
void
diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h
index 69c523bd62..378502004c 100644
index b932103f46e6..2c88e28421ec 100644
--- third_party/pipewire/pipewire/pipewire.h
+++ third_party/pipewire/pipewire/pipewire.h
@@ -114,9 +114,9 @@ extern "C" {
* \brief PipeWire initialization and infrastructure functions
@@ -69,9 +69,9 @@ extern "C" {
* \{
*/
void
-pw_init(int *argc, char **argv[]);

View File

@ -0,0 +1,48 @@
commit 0c96c599752d8d8f68b5ed8a6344888d1b505773
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
fixup gn_processor.py for FreeBSD
diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py
index b6c51ee010a8..15b4bda9df6e 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",
@@ -735,16 +736,16 @@ 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 == "linux":
- target_cpus.extend(["ppc64", "riscv64", "mipsel", "mips64el"])
+ if target_os in ("freebsd", "linux"):
+ target_cpus.extend(["ppc64", "mipsel", "mips64el"])
for target_cpu in target_cpus:
vars = {
"host_cpu": "x64",
@@ -752,7 +753,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())

View File

@ -1,42 +1,37 @@
--- ./third_party/libwebrtc/build/config/BUILDCONFIG.gn.orig 2022-07-16 22:08:55.347215000 +0200
+++ ./third_party/libwebrtc/build/config/BUILDCONFIG.gn 2022-07-16 22:21:04.528041000 +0200
@@ -131,10 +131,10 @@
is_official_build = false
# Whether we're a traditional desktop unix.
- is_desktop_linux = current_os == "linux" || current_os == "openbsd"
+ is_desktop_linux = current_os == "freebsd" || current_os == "linux" || current_os == "openbsd"
--- third_party/libwebrtc/build/config/BUILDCONFIG.gn.orig 2022-10-09 20:42:58.113963000 +0200
+++ third_party/libwebrtc/build/config/BUILDCONFIG.gn 2022-10-09 20:46:16.128220000 +0200
@@ -132,6 +132,7 @@
# Set to true when compiling with the Clang compiler.
- is_clang = current_os != "linux" || current_os == "openbsd" ||
+ is_clang = current_os != "linux" || current_os == "freebsd" || current_os == "openbsd" ||
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")
@@ -186,7 +186,7 @@
current_cpu != "mips" && current_cpu != "mips64" &&
@@ -184,7 +185,7 @@
# 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 == "freebsd" || 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) {
@@ -224,7 +224,7 @@
@@ -222,7 +223,7 @@
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 == "freebsd" || 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"
@@ -289,7 +289,7 @@
@@ -288,7 +289,7 @@
is_fuchsia = current_os == "fuchsia"
is_ios = current_os == "ios"
is_linux = current_os == "chromeos" || current_os == "linux"
is_linux = current_os == "linux"
-is_bsd = current_os == "openbsd"
+is_bsd = current_os == "freebsd" || 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"

View File

@ -0,0 +1,23 @@
commit d1f5a45c1906e9f1e6a51f3b44c52d981bb3958c
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
Date: Wed Oct 12 19:57:20 2022 +0200
pull in sys/types.h for u_XXX typedefs on FreeBSD 12
In file included from /wrkdirs/usr/ports/www/firefox/work/firefox-106.0/third_party/libwebrtc/rtc_base/ip_address.cc:20:
/usr/include/netinet/ip.h:53:2: error: unknown type name 'u_char'; did you mean 'char'?
u_char ip_hl:4, /* header length */
diff --git third_party/libwebrtc/rtc_base/ip_address.cc third_party/libwebrtc/rtc_base/ip_address.cc
index d544b611e149..ef9b742dac5f 100644
--- third_party/libwebrtc/rtc_base/ip_address.cc
+++ third_party/libwebrtc/rtc_base/ip_address.cc
@@ -11,6 +11,8 @@
#if defined(WEBRTC_POSIX)
#include <netinet/in.h>
#include <sys/socket.h>
+/* for u_char/u_short etc on FreeBSD 12 */
+#include <sys/types.h>
#include "absl/strings/string_view.h"
#ifdef OPENBSD

View File

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

View File

@ -0,0 +1,17 @@
--- toolkit/xre/glxtest/glxtest.cpp.orig 2023-05-28 22:08:21.663847000 +0200
+++ toolkit/xre/glxtest/glxtest.cpp 2023-05-28 22:09:33.647075000 +0200
@@ -195,9 +195,14 @@
static void get_pci_status() {
log("GLX_TEST: get_pci_status start\n");
+#if defined(__FreeBSD__)
+ if (access("/dev/pci", F_OK) != 0) {
+ record_warning("cannot access /dev/pci");
+#else
if (access("/sys/bus/pci/", F_OK) != 0 &&
access("/sys/bus/pci_express/", F_OK) != 0) {
record_warning("cannot access /sys/bus/pci");
+#endif
return;
}