Tuesday, September 01, 2026

www/librewolf: bump to 155.0-1, this time correctly

Hi everyone, Here is an updated version of my LibreWolf 155.0-1 update, compared to the one I sent earlier. It updates the PLIST properly, and that's the only difference. This should be safe to merge, but I'm building it one more time just to be sure. To re-cap, in addition to the 155.0-1 update, this patch also makes the following changes: * PGO data re-used from firefox builds, for performance gain depending on workload * Re-enables --enable-rust-simd in mozconfig for performance gain depending on workload * Moves DIST_SUBDIR to mozilla instead of librewolf, so that PGO data can be re-used from mozilla-firefox porting * Cleans up some stale patches accordingly; one patch was removed due to it having already been applied upstream One other change: i forgot to update SO_VERSION in the previous version of the patch. This has now been done. I'm now 99.9% sure that this patch is correct. I'll be 100% sure when it finishes compiled (ETA one to two hours on my machine, after I send this email). -- Company director, Minifree Ltd Registered in England, No. 9361826 | VAT No. GB202190462 Registered Office: 19 Hilton Road, Canvey Island, Essex SS8 9QA, UK

From 557254d6400029666c252592755d0b95bc7d4e9d Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sun, 30 Aug 2026 20:51:18 +0100
Subject: [PATCH 1/1] www/librewolf: bump to release 155.0-1

patches/patch-xpcom_ds_nsAtom_h removed, because this change seems
to have been made upstream. changes in this patch, besides 155.0:

use firefox PGO data, matched to the corresponding firefox
version (155.0) matching librewolf 155.0-1.

although librewolf doesn't provide PGO data, the two codebases
are so similar that using PGO for speed optimisation will work
on areas of the code that remain untouched by librewolf, which
is most of the code. therefore, using mozilla profdata works fine.
openbsd already re-uses mozilla PGO data despite modifying firefox.
the changes made by librewolf aren't aggressive enough to really
invalidate the profdata, so it will still provide a viable boost
to most workloads.

i've re-added the rust simd build option, which is fine so long
as you keep both librewolf and rustc/cargo up to date in the ports
system. i initially removed this option during development of the
port, and i was often using older versions of librewolf or its
libraries, which includes rust libraries, which sometimes caused
build errors that removing this option mitigated. for regular ports
maintenance, it is best that this option remains enabled as it
enables a nice performance boost for users in certain workloads.

MERGE NOTE:

DIST_SUBDIR is changed to mozilla, so now librewolf shares the same
subdir as firefox. This avoids duplicating identical copies of
mozilla PGO data on the openbsd dist server.

This way, we avoid any duplication. This means that there will
forever by a stale librewolf/ directory on the dist server. I tested
it with this change, and it works fine. LibreWolf tarballs now
download into mozilla/ on the dist server.

I waited until the next release update before doing this, to
avoid the 154.0.1-3 release being duplicated on the openbsd
dist server.

Signed-off-by: Leah Rowe <leah@libreboot.org>
---
 www/librewolf/Makefile                        | 13 ++++++---
 www/librewolf/distinfo                        |  6 ++--
 .../patches/patch-config_makefiles_rust_mk    |  2 +-
 www/librewolf/patches/patch-mozconfig         | 12 +++-----
 www/librewolf/patches/patch-xpcom_ds_nsAtom_h | 29 -------------------
 www/librewolf/pkg/PLIST                       |  4 +--
 6 files changed, 19 insertions(+), 47 deletions(-)
 delete mode 100644 www/librewolf/patches/patch-xpcom_ds_nsAtom_h

diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile
index ba70810ef68..b25823a96bb 100644
--- a/www/librewolf/Makefile
+++ b/www/librewolf/Makefile
@@ -13,16 +13,22 @@ ONLY_FOR_ARCHS =	amd64 aarch64 riscv64
 
 # If upstream adds revision number -x, it will become plx in OpenBSD, e.g.
 # librewolf-149.0.2-2 (upstream) becomes librewolf-149.0.2pl2 (patch level 2)
-MOZILLA_DIST_VERSION =	154.0.1-3
+MOZILLA_DIST_VERSION =	155.0-1
 MOZILLA_VERSION =	${MOZILLA_DIST_VERSION:C/-([0-9]+)$/pl\1/}
-REVISION = 0
 
 MOZILLA_PROJECT =	librewolf
 MOZILLA_CODENAME =	browser
 MAINTAINER =		Leah Rowe <leah@libreboot.org>
 
+# LibreWolf doesn't provide PGO data, but we use the data
+# provided by FireFox releases, re-using the OpenBSD distfile
+MOZILLA_PROFDATA_TASKID =	cNOKkWdaQfOqEzllBpy9Rw
+FFVERSION =			${MOZILLA_DIST_VERSION:C/-([0-9]+)$//}
+FFDIST =			firefox-${FFVERSION}.source
+DISTFILES.profdata = ${FFDIST}-profdata.tar.xz{profdata.tar.xz}
+
 HOMEPAGE =	https://librewolf.net/
-SO_VERSION =	3.0
+SO_VERSION =	4.0
 # Bump minor ver if shlibs deleted in components dir to avoid pkg_add -r issues
 MOZILLA_LIBS =	mozavcodec mozavutil mozgtk mozinference mozwayland xul \
 		clearkey gkcodecs lgpllibs mozsqlite3
@@ -32,7 +38,6 @@ CATEGORIES =	www
 MOZSITE =	https://librewolf.dev/api/packages/librewolf/generic
 SITES =		${MOZSITE}/librewolf-source/${MOZILLA_DIST_VERSION}/
 EXTRACT_SUFX =	.tar.gz
-DIST_SUBDIR =	librewolf
 
 # mozilla public license
 PERMIT_PACKAGE=	Yes
diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo
index a9b3cc0a0e6..0e403401391 100644
--- a/www/librewolf/distinfo
+++ b/www/librewolf/distinfo
@@ -1,2 +1,4 @@
-SHA256 (librewolf/librewolf-154.0.1-3.source.tar.gz) = /ubKrDD5r/bf2P6GjOhDYCsDwwcmCchv9/xsF8OXpsw=
-SIZE (librewolf/librewolf-154.0.1-3.source.tar.gz) = 1175015645
+SHA256 (mozilla/firefox-155.0.source-profdata.tar.xz) = ML66F7kaeSloWTP2fL28H2w3ep0UMrnRd60HQeXg+NY=
+SHA256 (mozilla/librewolf-155.0-1.source.tar.gz) = XZUdgHHva8xOq4u6FJLiaa9yjINYZDfsKn2xHUa+NvY=
+SIZE (mozilla/firefox-155.0.source-profdata.tar.xz) = 18883580
+SIZE (mozilla/librewolf-155.0-1.source.tar.gz) = 1175547857
diff --git a/www/librewolf/patches/patch-config_makefiles_rust_mk b/www/librewolf/patches/patch-config_makefiles_rust_mk
index 6956d2ba803..177aa8e43ee 100644
--- a/www/librewolf/patches/patch-config_makefiles_rust_mk
+++ b/www/librewolf/patches/patch-config_makefiles_rust_mk
@@ -5,7 +5,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1640982
 Index: config/makefiles/rust.mk
 --- config/makefiles/rust.mk.orig
 +++ config/makefiles/rust.mk
-@@ -118,7 +118,8 @@ ifndef rustflags_sancov
+@@ -91,7 +91,8 @@ ifeq (,$(RUST_SANCOV_FLAGS))
  # 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)))
diff --git a/www/librewolf/patches/patch-mozconfig b/www/librewolf/patches/patch-mozconfig
index 011bd84fadf..327fa7440ef 100644
--- a/www/librewolf/patches/patch-mozconfig
+++ b/www/librewolf/patches/patch-mozconfig
@@ -10,7 +10,7 @@ restored on re-builds, matching what was produced by this patch.
 Index: mozconfig
 --- mozconfig.orig
 +++ mozconfig
-@@ -1,20 +1,29 @@
+@@ -1,9 +1,16 @@
 +# %%VARIABLE%% is replaced with a string set by the
 +# OpenBSD port Makefile at build time. In addition to
 +# these changes, the LibreWolf OpenBSD port Makefile
@@ -29,12 +29,8 @@ Index: mozconfig
  ac_add_options --disable-updater
  ac_add_options --disable-cargo-incremental
  ac_add_options --enable-hardening
- ac_add_options --enable-stl-hardening
- ac_add_options --enable-optimize
- ac_add_options --enable-release
--ac_add_options --enable-rust-simd
-+# Rust SIMD option causes build errors on OpenBSD:
-+# ac_add_options --enable-rust-simd
+@@ -13,8 +20,9 @@ ac_add_options --enable-release
+ ac_add_options --enable-rust-simd
  # allow replacing malloc manually, will not affect regular systems
  # not compatible with ac_add_options --disable-jemalloc, which only works when preloading custom malloc
 -ac_add_options --enable-replace-malloc
@@ -45,7 +41,7 @@ Index: mozconfig
  
  ac_add_options --with-app-name=librewolf
  ac_add_options --with-branding=browser/branding/librewolf
-@@ -33,7 +42,19 @@
+@@ -33,7 +41,19 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0
  
  export CFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CFLAGS"
  export CXXFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CXXFLAGS"
diff --git a/www/librewolf/patches/patch-xpcom_ds_nsAtom_h b/www/librewolf/patches/patch-xpcom_ds_nsAtom_h
deleted file mode 100644
index 851ab0078b3..00000000000
--- a/www/librewolf/patches/patch-xpcom_ds_nsAtom_h
+++ /dev/null
@@ -1,29 +0,0 @@
-fix build with libcxx22
-https://phabricator.services.mozilla.com/D316723
-
-Index: xpcom/ds/nsAtom.h
---- xpcom/ds/nsAtom.h.orig
-+++ xpcom/ds/nsAtom.h
-@@ -36,11 +36,19 @@ class nsDynamicAtom;
- class nsAtom {
-  public:
-   // Returns true if ToLowercaseASCII would return the string unchanged.
-+  //
-+  // This is deliberately a plain loop rather than std::all_of: gGkAtoms calls
-+  // this for every static atom within a single constant expression, and
-+  // std::all_of costs enough extra constexpr steps to exceed the default
-+  // -fconstexpr-steps budget with some standard library implementations.
-   static constexpr bool ComputeIsAsciiLowercase(const char16_t* aString,
-                                                 const uint32_t aLength) {
--    return std::all_of(aString, aString + aLength, [](char16_t c) {
--      return !mozilla::IsAsciiUppercaseAlpha(c);
--    });
-+    for (uint32_t i = 0; i < aLength; ++i) {
-+      if (mozilla::IsAsciiUppercaseAlpha(aString[i])) {
-+        return false;
-+      }
-+    }
-+    return true;
-   }
- 
-   template <size_t N>
diff --git a/www/librewolf/pkg/PLIST b/www/librewolf/pkg/PLIST
index 8a89d2c1e3b..c73c905d5b8 100644
--- a/www/librewolf/pkg/PLIST
+++ b/www/librewolf/pkg/PLIST
@@ -49,7 +49,7 @@ lib/${MOZILLA_PROJECT}/dependentlibs.list
 lib/${MOZILLA_PROJECT}/distribution/
 lib/${MOZILLA_PROJECT}/distribution/distribution.ini
 lib/${MOZILLA_PROJECT}/distribution/policies.json
-@bin lib/${MOZILLA_PROJECT}/glxtest
+@bin lib/${MOZILLA_PROJECT}/gfxtest
 lib/${MOZILLA_PROJECT}/gmp-clearkey/
 lib/${MOZILLA_PROJECT}/gmp-clearkey/0.1/
 @lib lib/${MOZILLA_PROJECT}/gmp-clearkey/0.1/libclearkey.so.${LIBclearkey_VERSION}
@@ -69,8 +69,6 @@ lib/${MOZILLA_PROJECT}/${MOZILLA_PROJECT}.cfg
 lib/${MOZILLA_PROJECT}/omni.ja
 lib/${MOZILLA_PROJECT}/platform.ini
 lib/${MOZILLA_PROJECT}/removed-files
-@bin lib/${MOZILLA_PROJECT}/vaapitest
-@bin lib/${MOZILLA_PROJECT}/vulkantest
 @man man/man1/${MOZILLA_PROJECT}.1
 share/applications/${MOZILLA_PROJECT}.desktop
 share/doc/pkg-readmes/${PKGSTEM}
-- 
2.55.0

No comments:

Post a Comment