mirror of
https://git.freebsd.org/ports.git
synced 2025-06-03 11:56:28 -04:00
www/librewolf: update to 117.0.1-1
With two additional patches to the unity_menu patch due to jsm@. Changelog: https://gitlab.com/librewolf-community/browser/bsys6/-/releases PR: 273948 See also: https://codeberg.org/librewolf/issues/issues/1279 Obtained from: https://people.freebsd.org/~jsm/patch2.diff
This commit is contained in:
parent
1678e38dfb
commit
a1069e80ec
24 changed files with 24148 additions and 18092 deletions
|
@ -1,18 +1,19 @@
|
|||
PORTNAME= librewolf
|
||||
DISTVERSION= 109.0.1.2
|
||||
PORTREVISION= 10
|
||||
DISTVERSION= 117.0.1-1
|
||||
CATEGORIES= www wayland
|
||||
MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${DISTVERSION:R}-2/
|
||||
DISTNAME= ${PORTNAME}-${DISTVERSION:R}-2.source.
|
||||
MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${DISTVERSION:R}-1/
|
||||
DISTNAME= ${PORTNAME}-${DISTVERSION:R}-1.source.
|
||||
EXTRACT_SUFX= tar.gz
|
||||
|
||||
PATCH_SITES= https://gitlab.com/librewolf-community/browser/source/-/raw/d114d4f8e8271adcb854082060c387b16ac56352/
|
||||
PATCH_SITES= https://gitlab.com/librewolf-community/browser/source/-/raw/5a211f7bad8dcf188a96b408cc143082df8d30a8/
|
||||
PATCHFILES= patches/unity_kde/unity-menubar.patch?inline=false:-p1
|
||||
|
||||
MAINTAINER= freebsd@sysctl.cz
|
||||
COMMENT= Custom version of Firefox, focused on privacy, security and freedom
|
||||
WWW= https://librewolf.net/
|
||||
|
||||
LICENSE= MPL20
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= nspr>=4.32:devel/nspr \
|
||||
nss>=3.84:security/nss \
|
||||
icu>=71.1:devel/icu \
|
||||
|
@ -74,7 +75,7 @@ MOZ_OPTIONs= --enable-application=browser \
|
|||
MOZ_SERVICES_HEALTHREPORT=0
|
||||
|
||||
# helpful when testing beta
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}-2
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}-1
|
||||
|
||||
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
|
||||
FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1676816988
|
||||
SHA256 (librewolf-109.0.1-2.source.tar.gz) = 33573e6286334a2322bf39f573b5e9fbc526127fa04806b388a796e706dbdd87
|
||||
SIZE (librewolf-109.0.1-2.source.tar.gz) = 821281100
|
||||
SHA256 (patches/unity_kde/unity-menubar.patch?inline=false) = 2c3d1a778fa07a15a21232b84c6c598330d5a38cfe8f0ec602aee66ac204b8e0
|
||||
TIMESTAMP = 1696616618
|
||||
SHA256 (librewolf-117.0-1.source.tar.gz) = 446e9479547dceda58cbcdc2f9f503539086ddb193c8b1206b7c736cd56e44c3
|
||||
SIZE (librewolf-117.0-1.source.tar.gz) = 903353725
|
||||
SHA256 (patches/unity_kde/unity-menubar.patch?inline=false) = ff6e224ed0eb3c9d4c3ae92acd9cd04d750e0bcc6be1fa64ccc1317abcc13711
|
||||
SIZE (patches/unity_kde/unity-menubar.patch?inline=false) = 163548
|
||||
|
|
|
@ -2,7 +2,7 @@ https://github.com/mozilla/addons/issues/708
|
|||
https://github.com/mozilla/addons-frontend/issues/4610
|
||||
|
||||
diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js
|
||||
index af08811..77a3b18 100644
|
||||
index 621900f90fc1..401ef9074bd0 100644
|
||||
--- browser/app/profile/firefox.js
|
||||
+++ browser/app/profile/firefox.js
|
||||
@@ -38,7 +38,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true);
|
||||
|
@ -14,7 +14,7 @@ index af08811..77a3b18 100644
|
|||
pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
|
||||
pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
|
||||
pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
|
||||
@@ -193,8 +193,8 @@ pref("app.update.langpack.enabled", true);
|
||||
@@ -204,8 +204,8 @@ pref("app.update.langpack.enabled", true);
|
||||
// .. etc ..
|
||||
//
|
||||
pref("extensions.update.enabled", true);
|
||||
|
@ -25,24 +25,24 @@ index af08811..77a3b18 100644
|
|||
pref("extensions.update.interval", 86400); // Check for updates to Extensions and
|
||||
// Themes every day
|
||||
|
||||
diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm
|
||||
index 661c902..a41b32f 100644
|
||||
--- toolkit/mozapps/extensions/internal/AddonRepository.jsm
|
||||
+++ toolkit/mozapps/extensions/internal/AddonRepository.jsm
|
||||
@@ -592,7 +592,7 @@ var AddonRepository = {
|
||||
diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
index f906f244b658..7bb2eb6697c6 100644
|
||||
--- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
+++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
|
||||
@@ -596,7 +596,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 = NetUtil.newURI(file.url);
|
||||
addon.sourceURI = lazy.NetUtil.newURI(file.url);
|
||||
}
|
||||
diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm
|
||||
index f8c99c7..c6ba8a1 100644
|
||||
index 03186dad43a4..4053fc6f2702 100644
|
||||
--- toolkit/mozapps/extensions/internal/XPIDatabase.jsm
|
||||
+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm
|
||||
@@ -520,7 +520,7 @@ class AddonInternal {
|
||||
@@ -634,7 +634,7 @@ class AddonInternal {
|
||||
// Something is causing errors in here
|
||||
try {
|
||||
for (let platform of this.targetPlatforms) {
|
||||
|
|
|
@ -37,10 +37,8 @@ index 6b3bdc7..7c6c342 100644
|
|||
|
||||
// The following values are OS and endian-independent synonyms.
|
||||
//
|
||||
diff --git gfx/skia/skia/third_party/skcms/skcms.cc gfx/skia/skia/third_party/skcms/skcms.cc
|
||||
index 6b4d87b..7c0559d 100644
|
||||
--- gfx/skia/skia/third_party/skcms/skcms.cc
|
||||
+++ gfx/skia/skia/third_party/skcms/skcms.cc
|
||||
--- 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>
|
||||
|
@ -49,8 +47,8 @@ index 6b4d87b..7c0559d 100644
|
|||
+ #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));
|
||||
|
|
|
@ -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) {
|
|
@ -11,10 +11,10 @@ Date: Thu Jun 13 11:53:00 2019 -0700
|
|||
4 files changed, 34 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git config/external/moz.build config/external/moz.build
|
||||
index ab77121..75595d9 100644
|
||||
index a0877c9d717e..5caa2036e0ec 100644
|
||||
--- config/external/moz.build
|
||||
+++ config/external/moz.build
|
||||
@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
|
||||
@@ -45,8 +45,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
|
||||
external_dirs += ["media/libvpx"]
|
||||
|
||||
if CONFIG["MOZ_AV1"]:
|
||||
|
@ -27,10 +27,10 @@ index ab77121..75595d9 100644
|
|||
if not CONFIG["MOZ_SYSTEM_PNG"]:
|
||||
external_dirs += ["media/libpng"]
|
||||
diff --git config/system-headers.mozbuild config/system-headers.mozbuild
|
||||
index a1b58eb..65729f9 100644
|
||||
index d9489c8f15e4..4d2f15e18c1c 100644
|
||||
--- config/system-headers.mozbuild
|
||||
+++ config/system-headers.mozbuild
|
||||
@@ -1289,6 +1289,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
|
||||
@@ -1291,6 +1291,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
|
||||
'proxy.h',
|
||||
]
|
||||
|
||||
|
@ -46,10 +46,10 @@ index a1b58eb..65729f9 100644
|
|||
system_headers += [
|
||||
'vpx_mem/vpx_mem.h',
|
||||
diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
|
||||
index 8509aec..eb6f129 100644
|
||||
index c71f22a22eee..efbd523b1225 100644
|
||||
--- dom/media/platforms/moz.build
|
||||
+++ dom/media/platforms/moz.build
|
||||
@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]:
|
||||
@@ -80,6 +80,11 @@ if CONFIG["MOZ_AV1"]:
|
||||
"agnostic/AOMDecoder.cpp",
|
||||
"agnostic/DAV1DDecoder.cpp",
|
||||
]
|
||||
|
@ -62,33 +62,33 @@ index 8509aec..eb6f129 100644
|
|||
if CONFIG["MOZ_OMX"]:
|
||||
EXPORTS += [
|
||||
diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
|
||||
index 0069865..e806fc8 100644
|
||||
--- media/ffvpx/libavcodec/moz.build.orig
|
||||
index 5675c28234a1..56344e5e4c98 100644
|
||||
--- media/ffvpx/libavcodec/moz.build
|
||||
+++ media/ffvpx/libavcodec/moz.build
|
||||
@@ -108,10 +108,14 @@
|
||||
'vp9prob.c',
|
||||
'vp9recon.c'
|
||||
@@ -109,10 +109,14 @@ 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_LIBDAV1D_CFLAGS']
|
||||
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
|
||||
+ else:
|
||||
+ USE_LIBS += [
|
||||
+ 'dav1d',
|
||||
+ 'media_libdav1d_asm',
|
||||
+ ]
|
||||
if CONFIG['MOZ_WAYLAND']:
|
||||
+ USE_LIBS += [
|
||||
+ 'dav1d',
|
||||
+ 'media_libdav1d_asm',
|
||||
+ ]
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
LOCAL_INCLUDES += ['/media/mozva']
|
||||
SOURCES += [
|
||||
diff --git toolkit/moz.configure toolkit/moz.configure
|
||||
index 0069865..e806fc8 100644
|
||||
index 2e56fa46ce59..23e30935c4bc 100644
|
||||
--- toolkit/moz.configure
|
||||
+++ toolkit/moz.configure
|
||||
@@ -523,7 +523,23 @@ def av1(value):
|
||||
@@ -745,7 +745,23 @@ def av1(value):
|
||||
return True
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ index 0069865..e806fc8 100644
|
|||
def dav1d_asm(target):
|
||||
if target.cpu in ("aarch64", "x86", "x86_64"):
|
||||
return True
|
||||
@@ -539,6 +555,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
|
||||
@@ -761,6 +777,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)
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
Unbreak build with Rust 1.45.0
|
||||
|
||||
error: options `-C embed-bitcode=no` and `-C lto` are incompatible
|
||||
|
||||
diff --git config/makefiles/rust.mk config/makefiles/rust.mk
|
||||
index 75570d3..94ec33f 100644
|
||||
--- config/makefiles/rust.mk
|
||||
+++ config/makefiles/rust.mk
|
||||
@@ -97,7 +97,7 @@ ifndef rustflags_sancov
|
||||
# Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
|
||||
ifndef MOZ_CODE_COVERAGE
|
||||
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
|
||||
-cargo_rustc_flags += -Clto
|
||||
+cargo_rustc_flags +=
|
||||
endif
|
||||
# We need -Cembed-bitcode=yes for all crates when using -Clto.
|
||||
RUSTFLAGS += -Cembed-bitcode=yes
|
|
@ -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"
|
||||
|
|
11
www/librewolf/files/patch-gfx_skia_skia_src_base_SkEndian.h
Normal file
11
www/librewolf/files/patch-gfx_skia_skia_src_base_SkEndian.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- gfx/skia/skia/src/base/SkEndian.h.orig 2023-06-16 01:32:16.999830000 +0200
|
||||
+++ gfx/skia/skia/src/base/SkEndian.h 2023-06-16 01:32:41.701673000 +0200
|
||||
@@ -131,7 +131,7 @@
|
||||
#define SkTEndian_SwapLE64(n) (n)
|
||||
#else // SK_CPU_BENDIAN
|
||||
#define SkEndian_SwapBE16(n) (n)
|
||||
- #define SkEndian_SwapBE32(n) (n)
|
||||
+ #define SkEndian_SwapBE32(n) uint32_t(n)
|
||||
#define SkEndian_SwapBE64(n) (n)
|
||||
#define SkEndian_SwapLE16(n) SkEndianSwap16(n)
|
||||
#define SkEndian_SwapLE32(n) SkEndianSwap32(n)
|
|
@ -0,0 +1,11 @@
|
|||
--- gfx/skia/skia/src/core/SkRasterPipeline.h.orig 2023-06-10 14:20:18.155477000 +0200
|
||||
+++ gfx/skia/skia/src/core/SkRasterPipeline.h 2023-06-10 14:20:30.760915000 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
struct SkImageInfo;
|
||||
struct skcms_TransferFunction;
|
||||
|
||||
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
|
||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc__)
|
||||
#define SK_HAS_MUSTTAIL 1
|
||||
#else
|
||||
#define SK_HAS_MUSTTAIL 0
|
35
www/librewolf/files/patch-js_public_Utility.h
Normal file
35
www/librewolf/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
|
File diff suppressed because it is too large
Load diff
27
www/librewolf/files/patch-modules_fdlibm_src_math__private.h
Normal file
27
www/librewolf/files/patch-modules_fdlibm_src_math__private.h
Normal 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:
|
84
www/librewolf/files/patch-mozglue_misc_SSE.h
Normal file
84
www/librewolf/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['CPU_ARCH'] == '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))
|
||||
|
|
@ -2,23 +2,36 @@
|
|||
|
||||
Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819
|
||||
|
||||
diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc
|
||||
index 9bd7cec7ff22..811c4eb33e7c 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc
|
||||
@@ -382,7 +382,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 1872a8684132..7e519f9e9cbb 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
|
||||
@@ -417,7 +417,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/pipewire.sigs third_party/libwebrtc/modules/desktop_capture/linux/wayland/pipewire.sigs
|
||||
index 06a97b8f294e..ea14a8014431 100644
|
||||
--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/pipewire.sigs
|
||||
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/pipewire.sigs
|
||||
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 ffba13775363..da6a828a21ee 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 c3abf05b386f..a994c218f5a5 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);
|
||||
|
||||
|
||||
|
@ -28,21 +41,21 @@ index 06a97b8f294e..ea14a8014431 100644
|
|||
const char* pw_get_library_version();
|
||||
|
||||
// properties.h
|
||||
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 12c8e7a9347d..00e3a9c76758 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
|
||||
@@ -388,7 +388,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream(
|
||||
diff --git third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
index f2680b28162c..03476a5fffd0 100644
|
||||
--- third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
+++ third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
@@ -252,7 +252,7 @@ void PipeWireSession::InitPipeWire(int fd) {
|
||||
}
|
||||
|
||||
pw_stream_node_id_ = stream_node_id;
|
||||
|
||||
- pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
+ pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr);
|
||||
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 1ecfc3196af1..6f44b35964d0 100644
|
||||
index b8068296745e..7e8be3dc764f 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,
|
||||
|
@ -51,19 +64,19 @@ index 1ecfc3196af1..6f44b35964d0 100644
|
|||
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,
|
||||
const struct pw_stream_events *events,
|
||||
@@ -96,7 +96,7 @@ bool IsPwLibraryLoaded() {
|
||||
@@ -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) &&
|
||||
IS_FUNC_LOADED(pw_stream_dequeue_buffer_fn) &&
|
||||
@@ -133,7 +133,7 @@ bool LoadPWLibrary() {
|
||||
@@ -146,7 +146,7 @@ bool LoadPWLibrary() {
|
||||
GET_FUNC(pw_context_destroy, pwLib);
|
||||
GET_FUNC(pw_context_new, pwLib);
|
||||
GET_FUNC(pw_core_disconnect, pwLib);
|
||||
|
@ -71,8 +84,8 @@ index 1ecfc3196af1..6f44b35964d0 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);
|
||||
@@ -226,12 +226,12 @@ pw_core_disconnect(struct pw_core *core)
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -87,21 +100,6 @@ index 1ecfc3196af1..6f44b35964d0 100644
|
|||
}
|
||||
|
||||
void
|
||||
diff --git third_party/pipewire/pipewire/log.h third_party/pipewire/pipewire/log.h
|
||||
index 26ffc20f9a0d..0357bdffbb7e 100644
|
||||
--- third_party/pipewire/pipewire/log.h
|
||||
+++ third_party/pipewire/pipewire/log.h
|
||||
@@ -50,8 +50,8 @@ extern enum spa_log_level pw_log_level;
|
||||
extern struct spa_log_topic *PW_LOG_TOPIC_DEFAULT;
|
||||
|
||||
/** Configure a logging module. This is usually done automatically
|
||||
- * in pw_init() but you can install a custom logger before calling
|
||||
- * pw_init(). */
|
||||
+ * in pipewire_init() but you can install a custom logger before calling
|
||||
+ * pipewire_init(). */
|
||||
void pw_log_set(struct spa_log *log);
|
||||
|
||||
/** Get the log interface */
|
||||
diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h
|
||||
index b932103f46e6..2c88e28421ec 100644
|
||||
--- third_party/pipewire/pipewire/pipewire.h
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
--- python/mozbuild/mozbuild/gn_processor.py.orig 2022-11-03 22:19:40.000000000 +0100
|
||||
+++ python/mozbuild/mozbuild/gn_processor.py 2022-11-07 21:11:42.596355000 +0100
|
||||
@@ -166,6 +166,7 @@
|
||||
commit 8dfec3226ff4d7d7f852ea700a5052976eded46e
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
chase gn_processor.py changes
|
||||
|
||||
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",
|
||||
|
@ -8,7 +15,7 @@
|
|||
"linux": "Linux",
|
||||
"mac": "Darwin",
|
||||
"openbsd": "OpenBSD",
|
||||
@@ -662,15 +663,15 @@
|
||||
@@ -735,16 +736,16 @@ def main():
|
||||
|
||||
vars_set = []
|
||||
for is_debug in (True, False):
|
||||
|
@ -24,11 +31,13 @@
|
|||
+ 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.append("ppc64")
|
||||
+ target_cpus.extend(["ppc64", "mipsel", "mips64el"])
|
||||
for target_cpu in target_cpus:
|
||||
vars = {
|
||||
@@ -679,7 +680,7 @@
|
||||
"host_cpu": "x64",
|
||||
@@ -752,7 +753,7 @@ def main():
|
||||
"target_cpu": target_cpu,
|
||||
"target_os": target_os,
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
https://github.com/mozilla/mp4parse-rust/commit/8b5b652d38e007e736bb442ccd5aa5ed699db100
|
||||
|
||||
From 8b5b652d38e007e736bb442ccd5aa5ed699db100 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Gregan <kinetik@flim.org>
|
||||
Date: Thu, 16 Jun 2022 13:54:02 +1200
|
||||
Subject: [PATCH] Fix `unstable-name-collisions` warning by using fully
|
||||
qualified path.
|
||||
|
||||
---
|
||||
mp4parse/src/lib.rs | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mp4parse/src/lib.rs b/mp4parse/src/lib.rs
|
||||
index 567ee21d..4f3d7153 100644
|
||||
--- third_party/rust/mp4parse/src/lib.rs
|
||||
+++ third_party/rust/mp4parse/src/lib.rs
|
||||
@@ -3506,8 +3506,13 @@ macro_rules! impl_mul {
|
||||
type Output = $output;
|
||||
|
||||
fn mul(self, rhs: $rhs) -> Self::Output {
|
||||
- static_assertions::const_assert!(<$output>::MAX <= <$inner>::MAX as u64);
|
||||
- static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
|
||||
+ static_assertions::const_assert!(
|
||||
+ <$output as UpperBounded>::MAX <= <$inner>::MAX as u64
|
||||
+ );
|
||||
+ static_assertions::const_assert!(
|
||||
+ <$lhs as UpperBounded>::MAX * <$rhs as UpperBounded>::MAX
|
||||
+ <= <$output as UpperBounded>::MAX
|
||||
+ );
|
||||
|
||||
let lhs: $inner = self.get().into();
|
||||
let rhs: $inner = rhs.get().into();
|
||||
|
|
@ -1,6 +1,26 @@
|
|||
--- 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 @@
|
||||
commit 93615ae859d1d819b33bbe0e32c5260a467b3625
|
||||
Author: Christoph Moench-Tegeder <cmt@burggraben.net>
|
||||
|
||||
enable pipewire on bsd
|
||||
|
||||
diff --git third_party/libwebrtc/BUILD.gn third_party/libwebrtc/BUILD.gn
|
||||
index 6eb14773b0a7..d63fd1d5529f 100644
|
||||
--- third_party/libwebrtc/BUILD.gn
|
||||
+++ third_party/libwebrtc/BUILD.gn
|
||||
@@ -106,7 +106,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" ]
|
||||
}
|
||||
if (is_fuchsia) {
|
||||
diff --git third_party/libwebrtc/build/config/BUILDCONFIG.gn third_party/libwebrtc/build/config/BUILDCONFIG.gn
|
||||
index 571ae5f0d60d..863d428fc676 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" ||
|
||||
|
@ -8,7 +28,7 @@
|
|||
(current_cpu != "s390x" && current_cpu != "s390" &&
|
||||
current_cpu != "ppc64" && current_cpu != "ppc" &&
|
||||
current_cpu != "mips" && current_cpu != "mips64" &&
|
||||
@@ -184,7 +185,7 @@
|
||||
@@ -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().
|
||||
|
||||
|
@ -17,7 +37,7 @@
|
|||
if (target_os != "linux") {
|
||||
host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
|
||||
} else if (is_clang) {
|
||||
@@ -222,7 +223,7 @@
|
||||
@@ -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"
|
||||
|
@ -26,7 +46,7 @@
|
|||
# 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 @@
|
||||
@@ -288,7 +289,7 @@ is_chromeos = current_os == "chromeos"
|
||||
is_fuchsia = current_os == "fuchsia"
|
||||
is_ios = current_os == "ios"
|
||||
is_linux = current_os == "linux"
|
||||
|
@ -35,3 +55,87 @@
|
|||
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 c184e2fbbcac..e1af29734d8b 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 d7768b2323c9..3593a6959277 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 b1db8ff88415..64e0cb8f7c79 100644
|
||||
--- third_party/libwebrtc/webrtc.gni
|
||||
+++ third_party/libwebrtc/webrtc.gni
|
||||
@@ -153,7 +153,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,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"]
|
|
@ -1,9 +1,9 @@
|
|||
--- toolkit/xre/glxtest.cpp.orig
|
||||
+++ toolkit/xre/glxtest.cpp
|
||||
@@ -270,9 +270,14 @@
|
||||
#define PCI_BASE_CLASS_DISPLAY 0x03
|
||||
|
||||
--- 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");
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- toolkit/xre/nsXREDirProvider.cpp.orig
|
||||
+++ toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -1614,6 +1614,7 @@
|
||||
|
||||
rv = AppendProfileString(aFile, folder.BeginReading());
|
||||
} else {
|
||||
+ appName = nsAutoCString("librewolf");
|
||||
if (!vendor.IsEmpty()) {
|
||||
folder.Append(vendor);
|
||||
ToLowerCase(folder);
|
||||
|
11
www/librewolf/files/patch-widget_gtk_nsMenuBar.cpp
Normal file
11
www/librewolf/files/patch-widget_gtk_nsMenuBar.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- widget/gtk/nsMenuBar.cpp.orig 2023-10-06 21:47:06.056933000 +0200
|
||||
+++ widget/gtk/nsMenuBar.cpp 2023-10-06 21:44:31.623574000 +0200
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
mEventListener = new DocEventListener(this);
|
||||
|
||||
- mDocument = do_QueryInterface(ContentNode()->OwnerDoc());
|
||||
+ mDocument = ContentNode()->OwnerDoc();
|
||||
|
||||
mAccessKey = Preferences::GetInt("ui.key.menuAccessKey");
|
||||
if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_SHIFT) {
|
66
www/librewolf/files/patch-widget_gtk_nsMenuObject.cpp
Normal file
66
www/librewolf/files/patch-widget_gtk_nsMenuObject.cpp
Normal file
|
@ -0,0 +1,66 @@
|
|||
#https://bugzilla.mozilla.org/show_bug.cgi?id=1853867
|
||||
#https://aur.archlinux.org/cgit/aur.git/commit/unity-menubar.patch?h=firefox-appmenu&id=1ab4aad0eaaa2f5313aee62606420b0b92c3d238
|
||||
--- widget/gtk/nsMenuObject.cpp.orig 2023-10-06 21:50:32.804805000 +0200
|
||||
+++ widget/gtk/nsMenuObject.cpp 2023-10-06 21:11:59.559090000 +0200
|
||||
@@ -82,7 +82,7 @@
|
||||
nsMenuObject *mOwner;
|
||||
RefPtr<imgRequestProxy> mImageRequest;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
- nsIntRect mImageRect;
|
||||
+
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsMenuObjectIconLoader, imgINotificationObserver)
|
||||
@@ -136,10 +136,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (!mImageRect.IsEmpty()) {
|
||||
- img = ImageOps::Clip(img, mImageRect);
|
||||
- }
|
||||
|
||||
+
|
||||
int32_t width, height;
|
||||
img->GetWidth(&width);
|
||||
img->GetHeight(&height);
|
||||
@@ -174,7 +172,7 @@
|
||||
dom::Document *doc = mOwner->ContentNode()->OwnerDoc();
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
- nsIntRect imageRect;
|
||||
+
|
||||
imgRequestProxy *imageRequest = nullptr;
|
||||
|
||||
nsAutoString uriString;
|
||||
@@ -197,9 +195,6 @@
|
||||
imageRequest = list->mListStyleImage.GetImageRequest();
|
||||
if (imageRequest) {
|
||||
imageRequest->GetURI(getter_AddRefs(uri));
|
||||
- auto& rect = list->mImageRegion.AsRect();
|
||||
- imageRect = rect.ToLayoutRect().ToNearestPixels(
|
||||
- pc->AppUnitsPerDevPixel());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +212,7 @@
|
||||
|
||||
bool same;
|
||||
if (mURI && NS_SUCCEEDED(mURI->Equals(uri, &same)) && same &&
|
||||
- (!imageRequest || imageRect == mImageRect)) {
|
||||
+ (!imageRequest)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -229,10 +224,10 @@
|
||||
mURI = uri;
|
||||
|
||||
if (imageRequest) {
|
||||
- mImageRect = imageRect;
|
||||
+
|
||||
imageRequest->Clone(this, nullptr, getter_AddRefs(mImageRequest));
|
||||
} else {
|
||||
- mImageRect.SetEmpty();
|
||||
+
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
|
||||
RefPtr<imgLoader> loader =
|
||||
nsContentUtils::GetImgLoaderForDocument(doc);
|
Loading…
Add table
Reference in a new issue