Skip to content

Commit

Permalink
www/librewolf: update to 117.0.1-1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Martinfx authored and clausecker committed Oct 9, 2023
1 parent 1678e38 commit a1069e8
Show file tree
Hide file tree
Showing 24 changed files with 22,915 additions and 16,859 deletions.
15 changes: 8 additions & 7 deletions www/librewolf/Makefile
@@ -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 \
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions www/librewolf/distinfo
@@ -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
20 changes: 10 additions & 10 deletions www/librewolf/files/patch-addon-search
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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) {
Expand Down
10 changes: 4 additions & 6 deletions www/librewolf/files/patch-bug1504834_comment5
Expand Up @@ -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>
Expand All @@ -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));
Expand Down
49 changes: 0 additions & 49 deletions www/librewolf/files/patch-bug1504834_comment9

This file was deleted.

42 changes: 21 additions & 21 deletions www/librewolf/files/patch-bug1559213
Expand Up @@ -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"]:
Expand All @@ -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',
]

Expand All @@ -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",
]
Expand All @@ -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


Expand All @@ -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)
Expand Down
17 changes: 0 additions & 17 deletions www/librewolf/files/patch-bug1640982

This file was deleted.

22 changes: 14 additions & 8 deletions www/librewolf/files/patch-bug1659612
Expand Up @@ -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 changes: 11 additions & 0 deletions www/librewolf/files/patch-gfx_skia_skia_src_base_SkEndian.h
@@ -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 changes: 35 additions & 0 deletions www/librewolf/files/patch-js_public_Utility.h
@@ -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

0 comments on commit a1069e8

Please sign in to comment.