See notes in patch. Enjoy.

(update to LibreWolf 158.0.1-2 in sync with FireFox 158.0.1)

--
Company director, Minifree Ltd
Registered in England, No. 9361826 | VAT No. GB202190462
Registered Office: 19 Hilton Road, Canvey Island, Essex SS8 9QA, UK

From 6ce7a1201920686821273174a727f9bd4d607f28 Mon Sep 17 00:00:00 2001
From: Leah Rowe <[email protected]>
Date: Sat, 24 Oct 2026 09:19:45 +0100
Subject: [PATCH 1/1] update www/librewolf to 158.0.1-2

mozconfig patching removed. i've reverted the port back
to using a fixed mozconfig instead. this means that i
must manually check for updates to upstream mozconfig
once more, but it means that casually updating this
port will be much easier by eliminating the possibility
of random merge conflicts as the port otherwise piggybacks
off of work done to the firefox port.

on balance, this is just easier for me to maintain.
if i do somehow miss a change to mozconfig, which changes
very rarely upstream anyway, the missing change would be
inconsequential in all likelihood. it just so happens that
i did, in fact, patch the latest mozconfig from upstream
as part of this librewolf port update.

conversely, this design change prevents another maintenance
headache; the port previously patched mozconfig but still,
as also in this revision, further modified the mozconfig at
build time. if a maintainer then ran make-update-patches
after a build, it would result in an erroneous diff. thus,
this revert back to the old design makes maintance more reliable.

Signed-off-by: Leah Rowe <[email protected]>
---
 www/librewolf/Makefile                | 12 ++---
 www/librewolf/distinfo                |  8 ++--
 www/librewolf/files/mozconfig         | 62 ++++++++++++++++++++++++++
 www/librewolf/patches/patch-mozconfig | 64 ---------------------------
 4 files changed, 69 insertions(+), 77 deletions(-)
 create mode 100644 www/librewolf/files/mozconfig
 delete mode 100644 www/librewolf/patches/patch-mozconfig

diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile
index fe44267c609..f4de8cd0061 100644
--- a/www/librewolf/Makefile
+++ b/www/librewolf/Makefile
@@ -13,7 +13,7 @@ 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 =	158.0-1
+MOZILLA_DIST_VERSION =	158.0.1-2
 MOZILLA_VERSION =	${MOZILLA_DIST_VERSION:C/-([0-9]+)$/pl\1/}
 
 MOZILLA_PROJECT =	librewolf
@@ -22,7 +22,7 @@ MAINTAINER =		Leah Rowe <[email protected]>
 
 # LibreWolf doesn't provide PGO data, but we use the data
 # provided by FireFox releases, re-using the OpenBSD distfile
-MOZILLA_PROFDATA_TASKID =	Yy7PLAWLTQ6Ru0Iqs0_iRQ
+MOZILLA_PROFDATA_TASKID =	ExMRLOtySd6x2mCJ0dFSrA
 FFVERSION =			${MOZILLA_DIST_VERSION:C/-([0-9]+)$//}
 FFDIST =			firefox-${FFVERSION}.source
 DISTFILES.profdata = ${FFDIST}-profdata.tar.xz{profdata.tar.xz}
@@ -132,14 +132,8 @@ do-test:
 		    ./mach xpcshell-test --sequential --keep-going
 
 MOZCONFIG = ${WRKSRC}/mozconfig
-MOZCONFIG_ORIG = ${WRKSRC}/mozconfig.obsd
 pre-configure:
-	if [ ! -f "${MOZCONFIG_ORIG}" ]; \
-	then \
-		cp "${MOZCONFIG}" "${MOZCONFIG_ORIG}" ; \
-	fi
-
-	cp "${MOZCONFIG_ORIG}" "${MOZCONFIG}"
+	cp "${FILESDIR}/mozconfig" "${MOZCONFIG}"
 	sed -i -e "s,%%PREFIX%%,${PREFIX},g" "${MOZCONFIG}"
 	sed -i -e "s,%%LOCALBASE%%,${LOCALBASE},g" "${MOZCONFIG}"
 .if defined(DEBUG)
diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo
index f3995170a8b..a04cb2accc9 100644
--- a/www/librewolf/distinfo
+++ b/www/librewolf/distinfo
@@ -1,4 +1,4 @@
-SHA256 (mozilla/firefox-158.0.source-profdata.tar.xz) = Jd8si/gEYPCqHefjsMFmOyjt438g5pGAGiYqMhl0vuQ=
-SHA256 (mozilla/librewolf-158.0-1.source.tar.gz) = 6iQk+0wCkWwMUxIQ8d2LRg6FB08tjKBSnUlVPTbdE8A=
-SIZE (mozilla/firefox-158.0.source-profdata.tar.xz) = 19008760
-SIZE (mozilla/librewolf-158.0-1.source.tar.gz) = 1181473241
+SHA256 (mozilla/firefox-158.0.1.source-profdata.tar.xz) = IvyQShuGp7mBySK5fj5OcZ8W5MY5Aa1ShqygpMU2XsM=
+SHA256 (mozilla/librewolf-158.0.1-2.source.tar.gz) = 3R54L6+OjaUyZ5l8efa1wzDKDKHPGBjG1vqusIZC99s=
+SIZE (mozilla/firefox-158.0.1.source-profdata.tar.xz) = 19009428
+SIZE (mozilla/librewolf-158.0.1-2.source.tar.gz) = 1182292355
diff --git a/www/librewolf/files/mozconfig b/www/librewolf/files/mozconfig
new file mode 100644
index 00000000000..34d989b3783
--- /dev/null
+++ b/www/librewolf/files/mozconfig
@@ -0,0 +1,62 @@
+# %%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
+# inserts conditional changes at build-time.
+
+ac_add_options --enable-application=browser
+
+ac_add_options --disable-crashreporter
+# OpenBSD configures this in the port Makefile:
+# ac_add_options --disable-debug
+ac_add_options --disable-default-browser-agent
+# OpenBSD configures this in the port Makefile:
+# ac_add_options --disable-tests
+ac_add_options --disable-updater
+ac_add_options --disable-cargo-incremental
+ac_add_options --enable-update-channel=release
+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
+ac_add_options --enable-proxy-bypass-protection
+# allow replacing malloc manually, will not affect regular systems
+# not compatible with ac_add_options --disable-jemalloc, which only works when preloading custom malloc
+# NOTE: mozjemalloc is broken on OpenBSD, so we disable it there.
+# ac_add_options --enable-replace-malloc
+# ac_add_options --enable-jemalloc
+
+ac_add_options --with-app-name=librewolf
+ac_add_options --with-branding=browser/branding/librewolf
+
+ac_add_options --with-l10n-base=$PWD/lw/l10n
+
+export MOZ_TELEMETRY_REPORTING=
+export MOZ_REQUIRE_SIGNING=
+export MOZILLA_OFFICIAL=1
+export MOZ_APP_REMOTINGNAME=LibreWolf
+export MOZ_PKG_VERSION=
+
+mk_add_options MOZ_CRASHREPORTER=0
+mk_add_options MOZ_DATA_REPORTING=0
+mk_add_options MOZ_SERVICES_HEALTHREPORT=0
+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"
+# Uncommented and populated for the ports system
+export LDFLAGS="$LDFLAGS"
+
+# Add your own stuff, libraries, architecture, etc..
+# ex: `cat mozconfig.orig mozconfig.my > mozconfig`
+
+# OpenBSD uses e.g. -fno-ret-protector
+export CPPFLAGS="$CPPFLAGS"
+
+ac_add_options --prefix=%%PREFIX%%
+ac_add_options --enable-sandbox
+ac_add_options --enable-forkserver
+ac_add_options --with-wasi-sysroot=%%LOCALBASE%%/share/wasi-sysroot
+
+# ff/lw >= 46 defaults to gtk+3
+ac_add_options --enable-default-toolkit=cairo-gtk3
diff --git a/www/librewolf/patches/patch-mozconfig b/www/librewolf/patches/patch-mozconfig
deleted file mode 100644
index 6a5c64120f3..00000000000
--- a/www/librewolf/patches/patch-mozconfig
+++ /dev/null
@@ -1,64 +0,0 @@
-OpenBSD-specific build-time configuration for the LibreWolf Web Browser port
-
-The mozconfig is conditionally modified at build time, by the OpenBSD LibreWolf
-port Makefile, e.g. add --enable-dbus if MOZILLA_USE_DBUS is set.
-
-Makefile-based configuration is done in pre-configure, on a copy of mozconfig
-created when the build is first conducted. The originally patched mozconfig is
-restored on re-builds, matching what was produced by this patch.
-
-Index: mozconfig
---- mozconfig.orig
-+++ mozconfig
-@@ -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
-+# inserts conditional changes at build-time.
-+
- ac_add_options --enable-application=browser
- 
- ac_add_options --disable-crashreporter
--ac_add_options --disable-debug
-+# OpenBSD configures this in the port Makefile:
-+# ac_add_options --disable-debug
- ac_add_options --disable-default-browser-agent
--ac_add_options --disable-tests
-+# OpenBSD configures this in the port Makefile:
-+# ac_add_options --disable-tests
- ac_add_options --disable-updater
- ac_add_options --disable-cargo-incremental
- ac_add_options --enable-update-channel=release
-@@ -15,8 +22,9 @@ ac_add_options --enable-rust-simd
- ac_add_options --enable-proxy-bypass-protection
- # 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
--ac_add_options --enable-jemalloc
-+# NOTE: mozjemalloc is broken on OpenBSD, so we disable it there.
-+# ac_add_options --enable-replace-malloc
-+# ac_add_options --enable-jemalloc
- 
- ac_add_options --with-app-name=librewolf
- ac_add_options --with-branding=browser/branding/librewolf
-@@ -36,7 +44,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"
--#export LDFLAGS=
-+# Uncommented and populated for the ports system
-+export LDFLAGS="$LDFLAGS"
- 
- # Add your own stuff, libraries, architecture, etc..
- # ex: `cat mozconfig.orig mozconfig.my > mozconfig`
-+
-+# OpenBSD uses e.g. -fno-ret-protector
-+export CPPFLAGS="$CPPFLAGS"
-+
-+ac_add_options --prefix=%%PREFIX%%
-+ac_add_options --enable-sandbox
-+ac_add_options --enable-forkserver
-+ac_add_options --with-wasi-sysroot=%%LOCALBASE%%/share/wasi-sysroot
-+
-+# ff/lw >= 46 defaults to gtk+3
-+ac_add_options --enable-default-toolkit=cairo-gtk3
-- 
2.47.3

Attachment: OpenPGP_0x5C654067D383B1FF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to