pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/firefox128
Module Name: pkgsrc
Committed By: leot
Date: Sun Aug 18 15:02:22 UTC 2024
Added Files:
pkgsrc/www/firefox128: DESCR Makefile PLIST PLIST.Linux distinfo
mozilla-common.mk options.mk
pkgsrc/www/firefox128/files: desktop.in firefox.sh node-wrapper.sh
replace-moz.build.awk
pkgsrc/www/firefox128/patches: patch-browser_app_profile_firefox.js
patch-build_moz.configure_init.configure
patch-build_moz.configure_rust.configure
patch-config_gcc-stl-wrapper.template.h
patch-config_makefiles_rust.mk patch-dom_base_nsAttrName.h
patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp
patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp
patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
patch-gfx_wr_swgl_build.rs patch-intl_lwbrk_LineBreaker.cpp
patch-ipc_chromium_src_base_message__pump__libevent.cc
patch-ipc_chromium_src_base_platform__thread__posix.cc
patch-ipc_glue_GeckoChildProcessHost.cpp
patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp
patch-js_public_Utility.h patch-js_src_jit_FlushICache.cpp
patch-js_src_old-configure.in patch-js_src_util_NativeStack.cpp
patch-media_ffvpx_libavutil_arm_bswap.h
patch-media_libpng_pngpriv.h patch-media_libtheora_lib_info.c
patch-modules_fdlibm_src_math__private.h
patch-netwerk_protocol_http_nsHttpHandler.cpp
patch-nsprpub_pr_src_pthreads_ptsynch.c
patch-security_nss_lib_freebl_mpi_mpi.c
patch-third__party_js_cfworker_build.sh
patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build
patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc
patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
patch-third__party_sqlite3_src_moz.build
patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc
patch-toolkit_components_terminator_nsTerminator.cpp
patch-toolkit_moz.configure
patch-toolkit_mozapps_installer_packager.mk
patch-xpcom_base_nscore.h
patch-xpcom_reflect_xptcall_md_unix_moz.build
Log Message:
www: Import firefox128-128.1.0
Mozilla Firefox is a free, open-source and cross-platform web browser
for Windows, Linux, MacOS X and many other operating systems.
It is fast and easy to use, and offers many advantages over other web
browsers, such as tabbed browsing and the ability to block pop-up
windows.
Firefox also offers excellent bookmark and history management, and it
can be extended by developers using industry standards such as XML,
CSS, JavaScript, C++, etc. Many extensions are available.
Note: Due to upstream's trademark policies, this package identifies as
"Nightly" rather than "Firefox" by default.
This package provides Firefox 128 Extended Support Release.
Based on www/firefox{,115} and packaged by myself in pkgsrc-wip.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/www/firefox128/DESCR \
pkgsrc/www/firefox128/Makefile pkgsrc/www/firefox128/PLIST \
pkgsrc/www/firefox128/PLIST.Linux pkgsrc/www/firefox128/distinfo \
pkgsrc/www/firefox128/mozilla-common.mk pkgsrc/www/firefox128/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/www/firefox128/files/desktop.in \
pkgsrc/www/firefox128/files/firefox.sh \
pkgsrc/www/firefox128/files/node-wrapper.sh \
pkgsrc/www/firefox128/files/replace-moz.build.awk
cvs rdiff -u -r0 -r1.1 \
pkgsrc/www/firefox128/patches/patch-browser_app_profile_firefox.js \
pkgsrc/www/firefox128/patches/patch-build_moz.configure_init.configure \
pkgsrc/www/firefox128/patches/patch-build_moz.configure_rust.configure \
pkgsrc/www/firefox128/patches/patch-config_gcc-stl-wrapper.template.h \
pkgsrc/www/firefox128/patches/patch-config_makefiles_rust.mk \
pkgsrc/www/firefox128/patches/patch-dom_base_nsAttrName.h \
pkgsrc/www/firefox128/patches/patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp \
pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp \
pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h \
pkgsrc/www/firefox128/patches/patch-gfx_wr_swgl_build.rs \
pkgsrc/www/firefox128/patches/patch-intl_lwbrk_LineBreaker.cpp \
pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc \
pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc \
pkgsrc/www/firefox128/patches/patch-ipc_glue_GeckoChildProcessHost.cpp \
pkgsrc/www/firefox128/patches/patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp \
pkgsrc/www/firefox128/patches/patch-js_public_Utility.h \
pkgsrc/www/firefox128/patches/patch-js_src_jit_FlushICache.cpp \
pkgsrc/www/firefox128/patches/patch-js_src_old-configure.in \
pkgsrc/www/firefox128/patches/patch-js_src_util_NativeStack.cpp \
pkgsrc/www/firefox128/patches/patch-media_ffvpx_libavutil_arm_bswap.h \
pkgsrc/www/firefox128/patches/patch-media_libpng_pngpriv.h \
pkgsrc/www/firefox128/patches/patch-media_libtheora_lib_info.c \
pkgsrc/www/firefox128/patches/patch-modules_fdlibm_src_math__private.h \
pkgsrc/www/firefox128/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp \
pkgsrc/www/firefox128/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c \
pkgsrc/www/firefox128/patches/patch-security_nss_lib_freebl_mpi_mpi.c \
pkgsrc/www/firefox128/patches/patch-third__party_js_cfworker_build.sh \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc \
pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc \
pkgsrc/www/firefox128/patches/patch-third__party_sqlite3_src_moz.build \
pkgsrc/www/firefox128/patches/patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc \
pkgsrc/www/firefox128/patches/patch-toolkit_components_terminator_nsTerminator.cpp \
pkgsrc/www/firefox128/patches/patch-toolkit_moz.configure \
pkgsrc/www/firefox128/patches/patch-toolkit_mozapps_installer_packager.mk \
pkgsrc/www/firefox128/patches/patch-xpcom_base_nscore.h \
pkgsrc/www/firefox128/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/www/firefox128/DESCR
diff -u /dev/null pkgsrc/www/firefox128/DESCR:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/DESCR Sun Aug 18 15:02:19 2024
@@ -0,0 +1,15 @@
+Mozilla Firefox is a free, open-source and cross-platform web browser
+for Windows, Linux, MacOS X and many other operating systems.
+
+It is fast and easy to use, and offers many advantages over other web
+browsers, such as tabbed browsing and the ability to block pop-up
+windows.
+
+Firefox also offers excellent bookmark and history management, and it
+can be extended by developers using industry standards such as XML,
+CSS, JavaScript, C++, etc. Many extensions are available.
+
+Note: Due to upstream's trademark policies, this package identifies as
+"Nightly" rather than "Firefox" by default.
+
+This package provides Firefox 128 Extended Support Release.
Index: pkgsrc/www/firefox128/Makefile
diff -u /dev/null pkgsrc/www/firefox128/Makefile:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/Makefile Sun Aug 18 15:02:20 2024
@@ -0,0 +1,196 @@
+# $NetBSD: Makefile,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
+MOZ_BRANCH= 128.1
+MOZ_BRANCH_MINOR= .0esr
+
+DISTNAME= firefox-${FIREFOX_VER}.source
+PKGNAME= ${DISTNAME:S/.source//:S/b/beta/:S/esr//:S/firefox-/firefox128-/}
+CATEGORIES= www
+MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
+MASTER_SITES+= ${MASTER_SITE_MOZILLA_ALL:=firefox/releases/${FIREFOX_VER}/source/}
+EXTRACT_SUFX= .tar.xz
+
+NODEJSKIT= nodejs-output-128.0.tgz
+DISTFILES= ${DEFAULT_DISTFILES} ${NODEJSKIT}
+SITES.${NODEJSKIT}= ${MASTER_SITE_LOCAL}
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://www.mozilla.org/en-US/firefox/
+COMMENT= Web browser with support for extensions (version ${FIREFOX_VER:tu:C/\\.[[:digit:]\.]*//})
+LICENSE= mpl-1.1
+
+# -------- BEFORE UPDATING THIS PACKAGE PLEASE READ & UNDERSTAND: -------
+#
+# This package works around a (stupid) build time dependency on nodejs
+# (which is not available for all architectures and unnecessary for the
+# real build). To do this, it places some additional burden on the
+# maintainer.
+#
+# While working on the package, please make sure you have
+#
+# FIREFOX_MAINTAINER=yes
+#
+# set in your build environment.
+# When the package is ready for commit (but before commit), do:
+#
+# make maintainer-files
+#
+# This will do another round (depending on state of your work dir at this
+# moment) of one or two builds and generate a cache of all output that
+# nodejs generates during a build.
+#
+# When this is done, just commit the results (they will be in the files/
+# directory).
+#
+# -----------------------------------------------------------------------
+
+WRKSRC= ${WRKDIR}/firefox-${PKGVERSION_NOREV}
+
+MOZILLA_DIR= # empty
+
+# Note: In --enable-chrome-format=flat case,
+# when updating remember to conditionalise about-background.png in PLIST
+CONFIGURE_ARGS+= --enable-application=browser
+
+#CFLAGS+= -I${PREFIX}/include/nspr
+# for lang/gcc6
+CFLAGS+= -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS
+CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
+# Do not use uselocale() in third_party/pipewire.
+CFLAGS.NetBSD+= -D__LOCALE_C_ONLY
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+LDFLAGS.DragonFly+= -lplc4 -lnspr4
+LDFLAGS.FreeBSD+= -lplc4 -lnspr4
+LDFLAGS.Linux+= -lnspr4
+LDFLAGS.SunOS+= -lm
+
+# Should revisit to complete mprotect support.
+NOT_PAX_MPROTECT_SAFE+= lib/${PKGBASE}/${MOZILLA}
+NOT_PAX_MPROTECT_SAFE+= lib/${PKGBASE}/${MOZILLA}-bin
+
+# Avoid ld "invalid section index" errors.
+BUILDLINK_TRANSFORM.SunOS+= rm:-fdata-sections
+BUILDLINK_TRANSFORM.SunOS+= rm:-ffunction-sections
+BUILDLINK_TRANSFORM.SunOS+= rm:-pie
+
+BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${WRKDIR}/build/dist/bin
+BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${PREFIX}/lib
+
+# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
+BUILDLINK_TRANSFORM.NetBSD+= rm:-fexperimental-new-pass-manager
+
+SUBST_CLASSES+= dfly_malloc_h
+SUBST_STAGE.dfly_malloc_h= pre-configure
+SUBST_MESSAGE.dfly_malloc_h= Dont include malloc.h on dragonflybsd
+SUBST_SED.dfly_malloc_h= -e 's,HAVE_MALLOC_H,HAVE_MALLOC_H \&\& !defined(__DragonFly__),g'
+SUBST_FILES.dfly_malloc_h+= media/ffvpx/libavutil/mem.c
+
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= pre-configure
+SUBST_FILES.paths= ../firefox.sh
+SUBST_VARS.paths= PREFIX MOZILLA
+
+.include "mozilla-common.mk"
+.include "options.mk"
+
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/header.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/typelib.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/xpidl.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/xpt.py
+
+CHECK_WRKREF_SKIP+= lib/${MOZILLA}/omni.ja
+
+MOZILLA= ${PKGBASE}
+
+.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
+MOZILLA_NAME= Firefox
+MOZILLA_BRANDING= official
+.else
+MOZILLA_NAME= Browser
+MOZILLA_BRANDING= unofficial
+.endif
+
+pre-configure:
+# As of 106.0, .in template files are not patched.
+# cd ${WRKSRC} && autoconf
+# cd ${WRKSRC}/js/src && autoconf
+ cd ${WRKSRC} && mkdir ${OBJDIR}
+ cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
+# Do not fetch Rust Cargo file via network during build
+.if !defined(FIREFOX_MAINTAINER)
+ mv ${WRKDIR}/dist ${WRKSRC}/${OBJDIR}
+.endif
+
+.if defined(FIREFOX_MAINTAINER)
+# Create files needed only by the firefox maintainer when updating
+# the package
+# XXX - manually removing the .*_done files is wrong!
+.PHONY: build-list
+build-list:
+ cd ${WRKSRC}/${OBJDIR}/dist/bin/browser/chrome && \
+ find . -type f | sort > ${OUT:Q}
+
+NODE_LIST= "${WRKDIR}/node.list"
+NO_NODE_LIST= "${WRKDIR}/no-node.list"
+NODE_FILES= "${WRKDIR}/node.flist"
+
+.PHONY: maintainer-files
+maintainer-files:
+ rm -f ${FILESDIR}/node-wrapper.sh
+ V=$$( node -v ) && \
+ printf '#! /bin/sh\n\nVERS=%s\n\nif [ "$$1" = "-v" ] || [ "$$1" = "--version" ]; then\n\tprintf "$${VERS}\\n"\nfi\n\nexit 0\n' $$V \
+ > ${FILESDIR}/node-wrapper.sh && \
+ chmod 0755 ${FILESDIR}/node-wrapper.sh
+ rm -f ${WRKDIR}/.build_done ${WRKDIR}/.configure_done
+ ${MAKE} MAINTAINER_INTERNAL=yes build
+ ${MAKE} MAINTAINER_INTERNAL=yes OUT="${NO_NODE_LIST}" build-list
+ ${MAKE} OUT="${NODE_LIST}" build-list
+ ${DIFF} -u "${NO_NODE_LIST}" "${NODE_LIST}" | \
+ ${AWK} \
+ '/^\+\.\//{ printf("dist/bin/browser/chrome/%s\n", gensub(/^\+\.\//, "", "")) }' \
+ > "${NODE_FILES}"
+ cd ${WRKSRC}/${OBJDIR} && tar -c -T "${NODE_FILES}" -z \
+ -f ${FILESDIR}/nodejs-output-${PKGVERSION_NOREV}.tgz
+.endif
+
+pre-patch:
+ for f in $$(find ${WRKSRC}/third_party/libwebrtc -name moz.build -type f) ; \
+ do \
+ ${AWK} -f ${FILESDIR}/replace-moz.build.awk $$f > $$f.new; mv $$f.new $$f ; \
+ done
+
+post-build:
+ ${SED} -e 's|@MOZILLA@|${MOZILLA}|g' \
+ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
+ -e 's|@FIREFOX_ICON@|${MOZILLA}|g' \
+ < ${FILESDIR}/desktop.in \
+ > ${WRKDIR}/desktop
+
+INSTALLATION_DIRS+= share/applications
+
+post-extract:
+ ${CP} ${FILESDIR}/firefox.sh ${WRKDIR}/firefox.sh
+
+post-install:
+.if ${OPSYS} == "NetBSD" && ${X11_TYPE} == "native"
+ ${INSTALL_SCRIPT} ${WRKDIR}/firefox.sh ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+.else
+ ${ECHO} '#! /bin/sh' > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+ ${ECHO} '${PREFIX}/lib/${MOZILLA}/${MOZILLA} "$$@"' >> \
+ ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+ ${CHMOD} 755 ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+.endif
+ ${INSTALL_DATA} ${WRKDIR}/desktop \
+ ${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
+.for i in 16 22 24 32 48 64 128 256
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps
+ ${INSTALL_DATA} ${WRKSRC}/browser/branding/${MOZILLA_BRANDING}/default${i}.png \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/${MOZILLA}.png
+.endfor
+
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/firefox128/PLIST
diff -u /dev/null pkgsrc/www/firefox128/PLIST:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/PLIST Sun Aug 18 15:02:20 2024
@@ -0,0 +1,46 @@
+@comment $NetBSD: PLIST,v 1.1 2024/08/18 15:02:20 leot Exp $
+bin/firefox128
+lib/firefox128/application.ini
+lib/firefox128/browser/chrome/icons/default/default128.png
+lib/firefox128/browser/chrome/icons/default/default16.png
+lib/firefox128/browser/chrome/icons/default/default32.png
+lib/firefox128/browser/chrome/icons/default/default48.png
+lib/firefox128/browser/chrome/icons/default/default64.png
+lib/firefox128/browser/features/formautofill%mozilla.org.xpi@localhost
+lib/firefox128/browser/features/pictureinpicture%mozilla.org.xpi@localhost
+lib/firefox128/browser/features/screenshots%mozilla.org.xpi@localhost
+lib/firefox128/browser/features/webcompat-reporter%mozilla.org.xpi@localhost
+lib/firefox128/browser/features/webcompat%mozilla.org.xpi@localhost
+lib/firefox128/browser/omni.ja
+lib/firefox128/defaults/pref/channel-prefs.js
+lib/firefox128/dependentlibs.list
+lib/firefox128/firefox128
+lib/firefox128/firefox128-bin
+lib/firefox128/fonts/TwemojiMozilla.ttf
+lib/firefox128/glxtest
+lib/firefox128/gmp-clearkey/0.1/libclearkey.so
+lib/firefox128/gmp-clearkey/0.1/manifest.json
+lib/firefox128/libgkcodecs.so
+lib/firefox128/libipcclientcerts.so
+lib/firefox128/liblgpllibs.so
+${PLIST.ffvpx}lib/firefox128/libmozavcodec.so
+${PLIST.ffvpx}lib/firefox128/libmozavutil.so
+lib/firefox128/libmozgtk.so
+lib/firefox128/libmozsqlite3.so
+${PLIST.wayland}lib/firefox128/libmozwayland.so
+lib/firefox128/libxul.so
+lib/firefox128/omni.ja
+lib/firefox128/pingsender
+lib/firefox128/platform.ini
+lib/firefox128/removed-files
+${PLIST.v4l2_decode}lib/firefox128/v4l2test
+lib/firefox128/vaapitest
+share/applications/firefox128.desktop
+share/icons/hicolor/128x128/apps/firefox128.png
+share/icons/hicolor/16x16/apps/firefox128.png
+share/icons/hicolor/22x22/apps/firefox128.png
+share/icons/hicolor/24x24/apps/firefox128.png
+share/icons/hicolor/256x256/apps/firefox128.png
+share/icons/hicolor/32x32/apps/firefox128.png
+share/icons/hicolor/48x48/apps/firefox128.png
+share/icons/hicolor/64x64/apps/firefox128.png
Index: pkgsrc/www/firefox128/PLIST.Linux
diff -u /dev/null pkgsrc/www/firefox128/PLIST.Linux:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/PLIST.Linux Sun Aug 18 15:02:20 2024
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.Linux,v 1.1 2024/08/18 15:02:20 leot Exp $
+lib/firefox/libmozsandbox.so
Index: pkgsrc/www/firefox128/distinfo
diff -u /dev/null pkgsrc/www/firefox128/distinfo:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/distinfo Sun Aug 18 15:02:20 2024
@@ -0,0 +1,48 @@
+$NetBSD: distinfo,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+BLAKE2s (firefox-128.1.0esr.source.tar.xz) = 281774e06fb58430bd45aab1ce9600e4f9aa8ba5784f96988620131da7ac5bf4
+SHA512 (firefox-128.1.0esr.source.tar.xz) = 8055a7f83acf0cab6124ba5809aff1c082e81a0d30ff318ec719f8fd3f4af9aa60e2094c1abd6c981193d751075a9569370176e20e50f3c1959fe27a15511388
+Size (firefox-128.1.0esr.source.tar.xz) = 561953208 bytes
+BLAKE2s (nodejs-output-128.0.tgz) = a55b907ebe308948b99b9150d2530204c8fe2a5fda5ac371dd1163a6db43bcbc
+SHA512 (nodejs-output-128.0.tgz) = fba59ec14c43556749cac7a9233278e8dcd7779d5ba530ede67009bf1887c5d72dd31e3f440164b646738b465d852b882522caf7ed9aa4f81f53e588bdd3adec
+Size (nodejs-output-128.0.tgz) = 227482 bytes
+SHA1 (patch-browser_app_profile_firefox.js) = bc719edef37d18655ba79b030270438ee166fdaf
+SHA1 (patch-build_moz.configure_init.configure) = 65deb3c233df0aab81eb1fca05d708e5a4ed169a
+SHA1 (patch-build_moz.configure_rust.configure) = 25ddfacd29cebbc6db005dbe61a2a7446d480678
+SHA1 (patch-config_gcc-stl-wrapper.template.h) = 9d1f15ff487efa9202114d19ed5668b4e7aa032a
+SHA1 (patch-config_makefiles_rust.mk) = 95184af03c73ac732b6a7377efda8a0c3fc3bff2
+SHA1 (patch-dom_base_nsAttrName.h) = ac7ba441a3b27df2855cf2673eea36b1cb44ad49
+SHA1 (patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp) = b93b4c6367bd2fb3d1868ab7d97ca56c100be414
+SHA1 (patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = e458c9c8dc66edc69c1874734af28a77fc5e3993
+SHA1 (patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h) = b2adce9e65662283a11b6dcff40e95523e940045
+SHA1 (patch-gfx_wr_swgl_build.rs) = df6ebfaabb4d27994e59a9d0eaf12c7cf08415fb
+SHA1 (patch-intl_lwbrk_LineBreaker.cpp) = e2eaf7d66f1255ba5baf7f7edadbb1fa8cb39b13
+SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 298642a3527804115b398fb7904a3596962932e3
+SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 753bb4e90758f5b42a51bbc073b328de673988cf
+SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 63fbee04321f7ade20db4ccc1a1218b848344ce1
+SHA1 (patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp) = d90fca47d79551fd74214d47f8184670b901b792
+SHA1 (patch-js_public_Utility.h) = 0ae3d60c97358791b5d5dc2538f9c5969e06be45
+SHA1 (patch-js_src_jit_FlushICache.cpp) = d1e611eaf7d7be22abfac6b39fbcd99df3570e47
+SHA1 (patch-js_src_old-configure.in) = 589e24765615ede2c3c6abfe0b3529c5645193ed
+SHA1 (patch-js_src_util_NativeStack.cpp) = a0a16d8d8d78d3cc3f4d2a508586f1a7821f7dba
+SHA1 (patch-media_ffvpx_libavutil_arm_bswap.h) = de58daa0fd23d4fec50426602b65c9ea5862558a
+SHA1 (patch-media_libpng_pngpriv.h) = 8320a1f7534ed5c4914b597bb3d6117d0060318f
+SHA1 (patch-media_libtheora_lib_info.c) = f6dbf536d73859a1ff78304c2e9f6a6f74dac01f
+SHA1 (patch-modules_fdlibm_src_math__private.h) = e20b6c23011d7123cbbd64a500eb8ce8c426620e
+SHA1 (patch-netwerk_protocol_http_nsHttpHandler.cpp) = 8e1d9a0746b637f5f4259e448e72172cfb08b23f
+SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = b0d1f6a6e0eb852b0fd0238ad3f8ed3166c60a50
+SHA1 (patch-security_nss_lib_freebl_mpi_mpi.c) = a7cd867916524770609d1c307a65b315b88456f4
+SHA1 (patch-third__party_js_cfworker_build.sh) = 46cdf97b99cf01080f290ae8d9a33b5f869fc3e4
+SHA1 (patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build) = d0454784eb72be49162f619579e060a0de3c480f
+SHA1 (patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc) = 455be625b5de2f6f1f4b2dbb6c8cb33ca16c2583
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc) = 4cb0e1c88dc83370024ed1aac7f75445b9f98df8
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc) = 8111952a107eb2cd665525ddd0e27c79eee3c1cd
+SHA1 (patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc) = 6909c4da9e7b3785252e5bce9be0ff47ebb87e01
+SHA1 (patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc) = b90e22b50879f7adcc1da3a993f52c0701b720f8
+SHA1 (patch-third__party_sqlite3_src_moz.build) = b26856a4b87aa12211575d9982f62dc899474b52
+SHA1 (patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc) = 99d0db944f0c2d0c623460991efd423d9127c988
+SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = e905e38ef1b88d764c695c019f15609350c1c43b
+SHA1 (patch-toolkit_moz.configure) = 1306e7ac3c3939886aff38a58dd3162e6517409b
+SHA1 (patch-toolkit_mozapps_installer_packager.mk) = 706635b76a7b525794aba95e95544f09e18bb662
+SHA1 (patch-xpcom_base_nscore.h) = 1ac4d34d3c9e80bc1ac966c6c84cb320bc0fa1ec
+SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = 8980398051fa16c7283acb6d323419993cce1420
Index: pkgsrc/www/firefox128/mozilla-common.mk
diff -u /dev/null pkgsrc/www/firefox128/mozilla-common.mk:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/mozilla-common.mk Sun Aug 18 15:02:20 2024
@@ -0,0 +1,273 @@
+# $NetBSD: mozilla-common.mk,v 1.1 2024/08/18 15:02:20 leot Exp $
+#
+# common Makefile fragment for mozilla packages based on gecko 2.0.
+#
+# used by www/firefox/Makefile
+
+.include "../../mk/bsd.prefs.mk"
+
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+PYTHON_FOR_BUILD_ONLY= tool
+ALL_ENV+= PYTHON3=${PYTHONBIN}
+
+REPLACE_PYTHON= build/cargo-linker
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+USE_TOOLS+= pkg-config perl gmake gm4 unzip zip # autoconf213
+UNLIMIT_RESOURCES+= datasize stacksize virtualsize
+
+OVERRIDE_GNU_CONFIG_SCRIPTS= yes
+OVERRIDE_DIRDEPTH= 4
+
+USE_LANGUAGES+= c c++
+
+# XXX: As of 114.0.2
+# For nested constant initializer support in rlbox, requires 8.
+GCC_REQD+= 8
+
+TOOL_DEPENDS+= cbindgen>=0.26.0:../../devel/cbindgen
+
+.if defined(FIREFOX_MAINTAINER) && !defined(MAINTAINER_INTERNAL)
+TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
+USE_TOOLS+= diff
+.else
+CONFIGURE_ENV+= NODEJS="${FILESDIR}/node-wrapper.sh"
+.endif
+
+# malloc_usable_size()
+LDFLAGS.NetBSD+= -ljemalloc
+
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+TOOL_DEPENDS+= nasm>=2.14:../../devel/nasm
+TOOL_DEPENDS+= yasm>=1.1:../../devel/yasm
+CFLAGS+= -msse2
+.endif
+
+# This is to work around build failures where an upstream configuration script
+# is confused by having more than one approximate match to MACHINE_GNU_PLATFORM
+# "i486" when attempting to select the Rust compiler target.
+.if ${MACHINE_PLATFORM:MNetBSD-*-i386}
+CONFIGURE_ARGS+= --target=i586-unknown-netbsd
+CONFIGURE_ARGS+= --host=i586-unknown-netbsd
+.elif ${MACHINE_PLATFORM:MSunOS-*-x86_64}
+CONFIGURE_ARGS+= --host=x86_64-unknown-illumos
+CONFIGURE_ARGS+= --target=x86_64-unknown-illumos
+.else
+CONFIGURE_ARGS+= --target=${MACHINE_GNU_PLATFORM}
+CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
+.endif
+
+CONFIGURE_ENV+= BINDGEN_CFLAGS="-isystem${PREFIX}/include/nspr \
+ -isystem${X11BASE}/include/pixman-1"
+
+do-test:
+ cd ${WRKSRC}/${OBJDIR}/dist/bin && \
+ ./run-mozilla.sh ${WRKSRC}/mach check-spidermonkey
+
+# tar(1) of OpenBSD 5.5 has no --exclude command line option.
+.if ${OPSYS} == "OpenBSD"
+TOOLS_PLATFORM.tar= ${TOOLS_PATH.bsdtar}
+USE_TOOLS+= bsdtar
+.else
+USE_TOOLS+= tar
+.endif
+
+.if ${MACHINE_ARCH} == "i386"
+# This is required for SSE2 code under i386.
+CFLAGS+= -mstackrealign
+.endif
+
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}security/nss/tests/*/*.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}js/src/tests/update-test262.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}intl/icu/source/configure
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}browser/components/loop/run-all-loop-tests.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}third_party/libwebrtc/tools_webrtc/iwyu/apply-iwyu
+
+CONFIGURE_ARGS+= --enable-release
+# Disable Rust SIMD option to fix build with lang/rust-1.33.0
+# This should be enabled later again.
+#CONFIGURE_ARGS+= --enable-rust-simd
+CONFIGURE_ARGS+= --disable-tests
+# Mozilla Bug 1432751
+#CONFIGURE_ARGS+= --enable-system-cairo
+CONFIGURE_ARGS+= --enable-system-pixman
+CONFIGURE_ARGS+= --with-system-libvpx
+CONFIGURE_ARGS+= --enable-system-ffi
+CONFIGURE_ARGS+= --with-system-icu
+CONFIGURE_ARGS+= --with-intl-api
+CONFIGURE_ARGS+= --with-system-nss
+CONFIGURE_ARGS+= --with-system-nspr
+#CONFIGURE_ARGS+= --with-system-jpeg
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --with-system-libevent
+CONFIGURE_ARGS+= --disable-crashreporter
+CONFIGURE_ARGS+= --enable-chrome-format=omni
+CONFIGURE_ARGS+= --with-system-webp
+CONFIGURE_ARGS+= --enable-forkserver
+
+#CONFIGURE_ARGS+= --enable-readline
+CONFIGURE_ARGS+= --disable-icf
+CONFIGURE_ARGS+= --disable-updater
+
+.include "../../mk/compiler.mk"
+
+.if empty(PKGSRC_COMPILER:Mclang)
+# Set path to "clang for cbindgen" when target compiler is not clang.
+CONFIGURE_ARGS+= --with-clang-path=${PREFIX}/bin/clang
+.endif
+CONFIGURE_ARGS+= --with-libclang-path=${PREFIX}/lib
+
+# RLBox WASM sandbox
+.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
+# For wasm-ld command
+TOOL_DEPENDS+= lld-[0-9]*:../../devel/lld
+.include "../../lang/wasi-libc/buildlink3.mk"
+.include "../../lang/wasi-libcxx/buildlink3.mk"
+.include "../../lang/wasi-compiler-rt/buildlink3.mk"
+CONFIGURE_ARGS+= --with-wasi-sysroot=${PREFIX}/wasi
+CONFIGURE_ENV+= WASM_CC=${PREFIX}/bin/clang
+CONFIGURE_ENV+= WASM_CXX=${PREFIX}/bin/clang++
+.else
+CONFIGURE_ARGS+= --without-wasm-sandboxed-libraries
+.endif
+
+.include "../../sysutils/pciutils/libname.mk"
+SUBST_CLASSES+= fix-libpci-soname
+SUBST_STAGE.fix-libpci-soname= pre-configure
+SUBST_MESSAGE.fix-libpci-soname= Fixing libpci soname
+SUBST_FILES.fix-libpci-soname+= ${MOZILLA_DIR}toolkit/xre/glxtest/glxtest.cpp
+SUBST_SED.fix-libpci-soname+= -e 's,"libpci.so, "lib${PCIUTILS_LIBNAME}.so,'
+
+.if ${MACHINE_PLATFORM:MNetBSD-*-i386}
+SQLITE3OPTFLAG= '-O0',
+.else
+SQLITE3OPTFLAG= # empty
+.endif
+SUBST_CLASSES+= sqlite3-opt
+SUBST_STAGE.sqlite3-opt= pre-configure
+SUBST_MESSAGE.sqlite3-opt= Fixing segfault in libmozsqlite3.so
+SUBST_FILES.sqlite3-opt+= ${MOZILLA_DIR}third_party/sqlite3/src/moz.build
+SUBST_VARS.sqlite3-opt+= SQLITE3OPTFLAG
+
+# Do not pass '-j1 -j1' for MAKE_JOBS=1 for NetBSD 9.3 or earlier.
+RUST_MAKE_JOBS= # empty by default
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 090400
+. if defined(MAKE_JOBS) && !empty(MAKE_JOBS) && !(defined(MAKE_JOBS_SAFE) && ${MAKE_JOBS_SAFE:U:tl} == no)
+. if ${MAKE_JOBS} > 1
+RUST_MAKE_JOBS= -j1 # for MAKE_JOBS=1, RUST_MAKE_JOBS should be empty.
+. endif
+. endif
+.endif
+
+SUBST_CLASSES+= njobs
+SUBST_STAGE.njobs= pre-configure
+SUBST_MESSAGE.njobs= Setting MAKE_JOBS for cairo
+SUBST_FILES.njobs+= ${MOZILLA_DIR}config/makefiles/rust.mk
+SUBST_VARS.njobs+= RUST_MAKE_JOBS
+
+# Workaround for link of libxul.so as of 96.0.
+# There are too many -ldl under third_paty/libwebrtc.
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.guess
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.sub
+
+CONFIGURE_ENV+= CPP=${CPP:Q}
+ALL_ENV+= SHELL=${CONFIG_SHELL:Q}
+ALL_ENV+= MOZ_APP_NAME=${MOZILLA}
+
+# Build outside ${WRKSRC}
+# Try to avoid conflict with config/makefiles/xpidl/Makefile.in
+.if ${MAINTAINER_INTERNAL:Uno} == "yes"
+OBJDIR= ../no-node-build
+.else
+OBJDIR= ../build
+.endif
+CONFIGURE_DIRS= ${OBJDIR}
+CONFIGURE_SCRIPT= ${WRKSRC}/configure
+
+PLIST_VARS+= v4l2_decode ffvpx
+
+PLIST_VARS+= v4l2_decode
+.if ${MACHINE_ARCH} == "aarch64" || \
+ ${MACHINE_ARCH:M*arm*} || \
+ ${MACHINE_ARCH} == riscv64
+PLIST.v4l2_decode= yes # see toolkit/moz.configure
+.endif
+
+.if ${MACHINE_ARCH} == "aarch64" || \
+ ${MACHINE_ARCH:M*arm*} || \
+ ${MACHINE_ARCH} == "i386" || \
+ ${MACHINE_ARCH} == "x86_64"
+PLIST.ffvpx= yes # see media/ffvpx/ffvpxcommon.mozbuild
+.endif
+
+# See ${WRKSRC}/security/sandbox/mac/Sandbox.mm: On Darwin, sandboxing
+# support is only available when the toolkit is cairo-cocoa.
+CONFIGURE_ARGS.Darwin+= --disable-sandbox
+CONFIGURE_ARGS.NetBSD+= --disable-sandbox
+
+# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
+.PHONY: create-rm-wrapper
+pre-configure: create-rm-wrapper
+create-rm-wrapper:
+ printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
+ ${WRAPPER_DIR}/bin/rm
+ chmod +x ${WRAPPER_DIR}/bin/rm
+
+# The configure test for __thread succeeds, but later we end up with:
+# dist/bin/libxul.so: undefined reference to `__tls_get_addr'
+CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no
+# In unspecified case, clock_gettime(CLOCK_MONOTONIC, ...) fails.
+CONFIGURE_ENV.NetBSD+= ac_cv_clock_monotonic=
+
+.include "../../sysutils/pciutils/buildlink3.mk"
+.include "../../mk/atomic64.mk"
+BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/libffi/buildlink3.mk"
+BUILDLINK_API_DEPENDS.nspr+= nspr>=4.34
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+BUILDLINK_API_DEPENDS.nss+= nss>=3.101
+.include "../../devel/nss/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+#.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+#BUILDLINK_API_DEPENDS.cairo+= cairo>=1.10.2nb4
+#.include "../../graphics/cairo/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libwebp+= libwebp>=1.0.2
+.include "../../graphics/libwebp/buildlink3.mk"
+BUILDLINK_DEPMETHOD.clang= build
+.include "../../lang/clang/buildlink3.mk"
+RUST_REQ= 1.76.0
+.include "../../lang/rust/rust.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../net/libIDL/buildlink3.mk"
+# TODO: check again, pkgsrc has hunspell 1.7
+# was: textproc/hunspell 1.3 is too old
+#.include "../../textproc/hunspell/buildlink3.mk"
+.include "../../multimedia/ffmpeg7/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+BUILDLINK_API_DEPENDS.pixman+= pixman>=0.40
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+PLIST_VARS+= wayland
+.if ${PKG_BUILD_OPTIONS.gtk3:Mwayland}
+CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3-x11-wayland
+PLIST.wayland= yes
+.else
+CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3
+.endif
+.include "../../lang/python/batteries-included.mk"
+.include "../../lang/python/application.mk"
Index: pkgsrc/www/firefox128/options.mk
diff -u /dev/null pkgsrc/www/firefox128/options.mk:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/options.mk Sun Aug 18 15:02:20 2024
@@ -0,0 +1,103 @@
+# $NetBSD: options.mk,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.firefox128
+
+PKG_SUPPORTED_OPTIONS= official-mozilla-branding
+PKG_SUPPORTED_OPTIONS+= debug debug-info mozilla-jemalloc webrtc
+PKG_SUPPORTED_OPTIONS+= dbus speechd
+PKG_SUPPORTED_OPTIONS+= alsa pulseaudio sunaudio jack
+
+.if ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+= dbus
+PKG_SUGGESTED_OPTIONS+= alsa pulseaudio mozilla-jemalloc webrtc
+.endif
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
+PKG_SUGGESTED_OPTIONS+= sunaudio
+.endif
+
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} >= 090000
+PKG_SUGGESTED_OPTIONS+= webrtc
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+AUDIO_BACKENDS+= alsa
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
+CONFIGURE_ARGS+= --enable-jemalloc
+CONFIGURE_ARGS+= --enable-replace-malloc
+.else
+CONFIGURE_ARGS+= --disable-jemalloc
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+= --enable-debug="-g -Og"
+CONFIGURE_ARGS+= --disable-optimize
+CONFIGURE_ARGS+= --enable-debug-js-modules
+CONFIGURE_ARGS+= --disable-install-strip
+.else
+. if !empty(PKG_OPTIONS:Mdebug-info)
+CONFIGURE_ARGS+= --enable-debug-symbols
+CONFIGURE_ARGS+= --enable-optimize=-O2
+CONFIGURE_ARGS+= --disable-install-strip
+. else
+CONFIGURE_ARGS+= --disable-debug-symbols
+CONFIGURE_ARGS+= --enable-optimize=-O2
+CONFIGURE_ARGS+= --enable-install-strip
+. endif
+CONFIGURE_ARGS+= --disable-debug
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+AUDIO_BACKENDS+= pulseaudio
+.include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mdbus)
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-dbus
+.else
+CONFIGURE_ARGS+= --disable-dbus
+. if ${OPSYS} == "Linux"
+CONFIGURE_ARGS+= --disable-necko-wifi
+. endif
+.endif
+
+.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
+CONFIGURE_ARGS+= --enable-official-branding
+LICENSE+= AND mozilla-trademark-license
+RESTRICTED= Trademark holder prohibits distribution of modified versions.
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+.else
+CONFIGURE_ARGS+= --with-branding=browser/branding/unofficial
+.endif
+
+.if !empty(PKG_OPTIONS:Msunaudio)
+AUDIO_BACKENDS+= sunaudio
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+AUDIO_BACKENDS+= jack
+.include "../../audio/jack/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mwebrtc)
+.include "../../graphics/libv4l/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-webrtc
+.else
+CONFIGURE_ARGS+= --disable-webrtc
+.endif
+
+.if !empty(PKG_OPTIONS:Mspeechd)
+.include "../../audio/speech-dispatcher/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-synth-speechd
+.else
+CONFIGURE_ARGS+= --disable-synth-speechd
+.endif
+
+CONFIGURE_ARGS+= --audio-backends=${AUDIO_BACKENDS:ts,}
Index: pkgsrc/www/firefox128/files/desktop.in
diff -u /dev/null pkgsrc/www/firefox128/files/desktop.in:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/files/desktop.in Sun Aug 18 15:02:20 2024
@@ -0,0 +1,191 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=@MOZILLA_NAME@ Web Browser
+Name[am]=
+Name[ar]=
+Name[az]=@MOZILLA_NAME@ Veb Səyyahı
+Name[be]=
+Name[bg]=Интернет браузър @MOZILLA_NAME@
+Name[bn]=
+Name[bs]=@MOZILLA_NAME@ web preglednik
+Name[ca]=Navegador web @MOZILLA_NAME@
+Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
+Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
+Name[da]=@MOZILLA_NAME@ - internetsurfning
+Name[de]=@MOZILLA_NAME@ Webbrowser
+Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
+Name[en_CA]=@MOZILLA_NAME@ Web Browser
+Name[en_GB]=@MOZILLA_NAME@ Web Browser
+Name[es]=Navegador Web @MOZILLA_NAME@
+Name[et]=@MOZILLA_NAME@ veebibrauser
+Name[eu]=@MOZILLA_NAME@ web arakatzailea
+Name[fi]=@MOZILLA_NAME@, WWW-selain
+Name[fr]=Navigateur Web @MOZILLA_NAME@
+Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
+Name[gu]=એપીફની વૅબ બ્રાઉઝર
+Name[he]=דפדפן @MOZILLA_NAME@
+Name[hi]=
+Name[hr]=@MOZILLA_NAME@ Web preglednik
+Name[hu]=@MOZILLA_NAME@ webböngésző
+Name[id]=Web Browser @MOZILLA_NAME@
+Name[it]=Browser web @MOZILLA_NAME@
+Name[ja]=@MOZILLA_NAME@ ウェブ・ブラウザ
+Name[ko]=@MOZILLA_NAME@ 웹 브라우저
+Name[li]=@MOZILLA_NAME@ Web Browser
+Name[lt]=@MOZILLA_NAME@ web naršyklė
+Name[mk]=@MOZILLA_NAME@ веб прелистувач
+Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസര്
+Name[mn]=@MOZILLA_NAME@ веб хөтөч
+Name[ms]=Pelungsur Web @MOZILLA_NAME@
+Name[nb]=@MOZILLA_NAME@ nettleser
+Name[nl]=@MOZILLA_NAME@ Webbrowser
+Name[nn]=@MOZILLA_NAME@ nettlesar
+Name[no]=@MOZILLA_NAME@ nettleser
+Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ
+Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
+Name[pt]=Navegador Web @MOZILLA_NAME@
+Name[pt_BR]=Navegador Web @MOZILLA_NAME@
+Name[ro]=Navigatorul @MOZILLA_NAME@
+Name[ru]=Веб-браузер @MOZILLA_NAME@
+Name[sk]=
+Name[sl]=Spletni brskalnik @MOZILLA_NAME@
+Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
+Name[sr]=
+Name[sr@Latn]=Veb čitač Spoznaja
+Name[sv]=Webbläsaren @MOZILLA_NAME@
+Name[ta]=எபிபனி வலை உலாவி
+Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
+Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
+Name[uk]=Переглядач web @MOZILLA_NAME@
+Name[vi]=Trình Duyệt Web @MOZILLA_NAME@
+Name[wa]=Betchteu waibe epiphany
+Name[zh_CN]=@MOZILLA_NAME@ Web 浏览器
+Name[zh_TW]=@MOZILLA_NAME@ 網頁瀏覽器
+GenericName=Web Browser
+GenericName[ar]=متصفّح الانترنت
+GenericName[az]=Veb Səyyahı
+GenericName[be]=Вандроўнік па павуціньню
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[bs]=Web preglednik
+GenericName[ca]=Navegador web
+GenericName[cs]=Prohlížeč WWW
+GenericName[cy]=Porwr Gwe
+GenericName[da]=Internetsurfning
+GenericName[de]=Webbrowser
+GenericName[el]=Περιηγητής Ιστοσελίδων
+GenericName[en_CA]=Web Browser
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web @MOZILLA_NAME@
+GenericName[ga]=Brabhsálaí Lín
+GenericName[gu]=વેબ બ્રાઉઝર
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[id]=Browser Web
+GenericName[it]=Browser web
+GenericName[ja]=GNOME ウェブ・ブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[li]=Wèb Browser
+GenericName[lt]=Web naršyklė
+GenericName[mk]=Веб прелистувач
+GenericName[mn]=Веб хөтөч
+GenericName[ms]=Pelungsur Web
+GenericName[nb]=Nettleser
+GenericName[nl]=Web-browser
+GenericName[nn]=Nettlesar
+GenericName[no]=Nettleser
+GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator Internet
+GenericName[ru]=Веб-браузер
+GenericName[sk]=WWW prehliadač
+GenericName[sl]=Spletni brskalnik
+GenericName[sq]=Shfletuesi Web
+GenericName[sr]=Веб читач
+GenericName[sr@Latn]=Veb čitač
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tk]=Web Ahtarçysy
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Переглядач web-сторінок
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[zh_CN]=Web 浏览器
+GenericName[zh_TW]=網頁瀏覽器
+Comment=Browse the web
+Comment[ar]=تصفح الانترنت
+Comment[az]=Vebi gəzin
+Comment[be]=Вандраваць па павуціньню
+Comment[bg]=Сърфиране в интернет
+Comment[bn]=ওয়েব ব্রাউজ করুন
+Comment[bs]=Pregledaj na internetu
+Comment[ca]=Navegueu per la web
+Comment[cs]=Prohlížet WWW
+Comment[cy]=Pori'r we
+Comment[da]=Surf på internettet
+Comment[de]=Im Web surfen
+Comment[el]=Περιήγηση στον παγκόσμιο ιστό
+Comment[en_CA]=Browse the web
+Comment[en_GB]=Browse the web
+Comment[es]=Navegar por la web
+Comment[et]=Sirvi veebi
+Comment[eu]=Arakatu web-a
+Comment[fi]=Selaa WWW:tä
+Comment[fr]=Naviguer sur Internet
+Comment[ga]=Brabhsáil an Líon
+Comment[gu]=વેબમાં શોધો
+Comment[he]=גלוש ברשת
+Comment[hi]=वेब ब्राउज़ करें
+Comment[hr]=Pregledaj Web
+Comment[hu]=A világháló böngészése
+Comment[id]=Jelajah web
+Comment[it]=Esplora il web
+Comment[ja]=ウェブを閲覧します
+Comment[ko]=웹을 돌아 다닙니다
+Comment[li]=Blajere op internet
+Comment[lt]=Naršyti internete
+Comment[mk]=Прелистувајте на веб
+Comment[ml]=വലക്കെട്ട് തിരയുക
+Comment[mn]=Веб броузе хийх
+Comment[ms]=Layari web
+Comment[nb]=Surf på nettet
+Comment[nl]=Websurfen
+Comment[nn]=Surf på nettet
+Comment[no]=Surf på nettet
+Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼
+Comment[pl]=Przeglądanie stron WWW
+Comment[pt]=Navegar na web
+Comment[pt_BR]=Navegar na web
+Comment[ro]=Navigare Internet
+Comment[ru]=Веб-браузер
+Comment[sk]=Prehliadať internet
+Comment[sl]=Brskaj po spletu
+Comment[sq]=Eksploro web-in
+Comment[sr]=Прегледај веб
+Comment[sr@Latn]=Pregledaj veb
+Comment[sv]=Surfa på nätet
+Comment[ta]=வலையில் உலாவு
+Comment[th]=ใช้งานเว็บบราวเซอร์ @MOZILLA_NAME@
+Comment[tk]=Webi Ahtar
+Comment[tr]=Web'e Gözat
+Comment[uk]=Програма перегляду web-сторінок
+Comment[vi]=Duyệt web
+Comment[wa]=Naivyî avå les waibes
+Comment[zh_CN]=浏览 Web
+Comment[zh_TW]=瀏覽網頁
+Exec=@MOZILLA@ %u
+Icon=@FIREFOX_ICON@
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=Application;Network;
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
Index: pkgsrc/www/firefox128/files/firefox.sh
diff -u /dev/null pkgsrc/www/firefox128/files/firefox.sh:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/files/firefox.sh Sun Aug 18 15:02:20 2024
@@ -0,0 +1,14 @@
+#!/bin/sh
+if [ -f /usr/X11R7/lib/libEGL.so ] && [ -z "$LD_PRELOAD" ] && \
+ nm /usr/X11R7/lib/libGL.so | grep -Fq "B _glapi_tls_Dispatch"; then
+ # Workaround for PR#57445/50277 for netbsd-9 & netbsd-10 pre 2023-08-05
+ # This may not avoid a crash 100% of the time, but changes at least some
+ # cases of 100% crash on startup to "have not yet seen crash on startup"
+ echo "Applying libEGL LD_PRELOAD workaround for NetBSD" >&2
+ export LD_PRELOAD=/usr/X11R7/lib/libEGL.so
+ # Note that there is an _additional_ issue with firefox >= 111 that
+ # needs to be addressed, and that is worked around by disabling webgl
+ # by default, but it's not even worth looking at that on a system without
+ # the fixed libGL
+fi
+exec @PREFIX@/lib/@MOZILLA@/@MOZILLA@ "$@"
Index: pkgsrc/www/firefox128/files/node-wrapper.sh
diff -u /dev/null pkgsrc/www/firefox128/files/node-wrapper.sh:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/files/node-wrapper.sh Sun Aug 18 15:02:20 2024
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+VERS=v22.4.1
+
+if [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
+ printf "${VERS}\n"
+fi
+
+exit 0
Index: pkgsrc/www/firefox128/files/replace-moz.build.awk
diff -u /dev/null pkgsrc/www/firefox128/files/replace-moz.build.awk:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/files/replace-moz.build.awk Sun Aug 18 15:02:20 2024
@@ -0,0 +1,102 @@
+/^if CONFIG\[\"OS_TARGET\"\] == \"Android\":/{
+ flag = 1;
+ print $0;
+ next;
+}
+/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"]
== \"FreeBSD\":");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"arm\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"arm\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"aarch64\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"aarch64\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86_64\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86_64\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ print $0;
+ next;
+}
+/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"aarch64\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"aarch64\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and
CONFIG\[\"MOZ_X11\"\] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and
CONFIG\[\"MOZ_X11\"\] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"arm\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"arm\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"MOZ_X11\"\]
== \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"arm\" and CONFIG\[\"MOZ_X11\"\]
== \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"MOZ_X11\"\]
== \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"MOZ_X11\"\]
== \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86_64\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\" and CONFIG\[\"TARGET_CPU\"\] == \"x86_64\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and
CONFIG\[\"MOZ_X11\"\] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+/^if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and CONFIG\[\"MOZ_X11\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and
CONFIG\[\"MOZ_X11\"\] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+}
+{
+ if (flag != 1) {
+ sub(/^ DEFINES\[\"WEBRTC_LINUX\"\] = True/, " if CONFIG\[\"OS_TARGET\"\] == \"Linux\":\n DEFINES\[\"WEBRTC_LINUX\"\] = True\n else:\n DEFINES\[\"WEBRTC_BSD\"\]
= True");
+ sub(/^if not CONFIG\[\"MOZ_DEBUG\"\] and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if not CONFIG[\"MOZ_DEBUG\"] and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] ==
\"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ sub(/^if CONFIG\[\"MOZ_DEBUG\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"MOZ_DEBUG\"] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"aarch64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"TARGET_CPU\"] == \"aarch64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"TARGET_CPU\"] == \"x86\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ sub(/^if CONFIG\[\"TARGET_CPU\"\] == \"x86_64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"TARGET_CPU\"] == \"x86_64\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or
CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):");
+ }
+ print $0;
+}
Index: pkgsrc/www/firefox128/patches/patch-browser_app_profile_firefox.js
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-browser_app_profile_firefox.js:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-browser_app_profile_firefox.js Sun Aug 18 15:02:20 2024
@@ -0,0 +1,47 @@
+$NetBSD: patch-browser_app_profile_firefox.js,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+This patch modifies default Firefox settings - see the comments above
+each one.
+
+--- browser/app/profile/firefox.js.orig 2024-03-08 13:19:26.000000000 +0000
++++ browser/app/profile/firefox.js
+@@ -2461,6 +2461,39 @@ pref("app.normandy.onsync_skew_sec", 600
+ pref("toolkit.coverage.enabled", false);
+ pref("toolkit.coverage.endpoint.base", "https://coverage.mozilla.org");
+
++// Select UI locale from LANG/LC_MESSAGE environmental variables
++pref("intl.locale.requested", "");
++
++// Enable system addons, for example langpacks from www/firefox-l10n
++pref("extensions.autoDisableScopes", 11);
++
++// Firefox includes a complex mechanism for "blacklisting" GPUs that
++// appears to fail on a NetBSD system where the only available OpenGL
++// implementations are all from Mesa. WebRender was supposed to be
++// enabled by default from Firefox 91 onwards and appears to greatly
++// improve performance even with acceleration disabled at the kernel
++// level.
++pref("gfx.webrender.all", true);
++
++// Disable Web MIDI support
++// NetBSD gets immediate SIGSEGV when Web MIDI is enabled.
++pref("midi.testing", true);
++pref("dom.webmidi.enabled", true);
++pref("midi.prompt.testing", true);
++pref("media.navigator.permission.disabled", true);
++
++// Avoid runtime error from WebGL for NetBSD systems
++pref("webgl.out-of-process", false);
++
++// Avoid unfunctional video and audio codecs
++pref("media.allow-audio-non-utility", true);
++
++// On NetBSD, many web applications (e.g. Telegram, Mastodon, Twitter)
++// will freeze until the service worker is restarted in about:serviceworkers.
++// This is a workaround that makes most of these sites function.
++// The root cause of this should be investigated.
++pref("dom.serviceWorkers.enabled", false);
++
+ // Discovery prefs
+ pref("browser.discovery.enabled", true);
+ pref("browser.discovery.containers.enabled", true);
Index: pkgsrc/www/firefox128/patches/patch-build_moz.configure_init.configure
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-build_moz.configure_init.configure:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-build_moz.configure_init.configure Sun Aug 18 15:02:20 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_init.configure,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+Support illumos triple.
+
+--- build/moz.configure/init.configure.orig 2024-05-09 17:11:33.720650056 +0000
++++ build/moz.configure/init.configure
+@@ -535,6 +535,8 @@ def split_triplet(triplet, allow_wasi=Fa
+ canonical_os = canonical_kernel = "OpenBSD"
+ elif os.startswith("solaris"):
+ canonical_os = canonical_kernel = "SunOS"
++ elif os.startswith("illumos"):
++ canonical_os = canonical_kernel = "SunOS"
+ elif os.startswith("wasi") and allow_wasi:
+ canonical_os = canonical_kernel = "WASI"
+ else:
Index: pkgsrc/www/firefox128/patches/patch-build_moz.configure_rust.configure
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-build_moz.configure_rust.configure:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-build_moz.configure_rust.configure Sun Aug 18 15:02:20 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+* Do not match rumprun toolchain for NetBSD,
+ narrowed should be one not two.
+
+--- build/moz.configure/rust.configure.orig 2020-12-03 23:12:39.000000000 +0000
++++ build/moz.configure/rust.configure
+@@ -371,6 +371,7 @@ def detect_rustc_target(
+ for c in candidates
+ if c.target.raw_os == host_or_target.raw_os
+ and c.target.raw_cpu == host_or_target.raw_cpu
++ and not c.rust_target.endswith("-rumprun-netbsd")
+ ]
+ if len(narrowed) == 1:
+ return narrowed[0].rust_target
Index: pkgsrc/www/firefox128/patches/patch-config_gcc-stl-wrapper.template.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-config_gcc-stl-wrapper.template.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-config_gcc-stl-wrapper.template.h Sun Aug 18 15:02:20 2024
@@ -0,0 +1,31 @@
+$NetBSD: patch-config_gcc-stl-wrapper.template.h,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+--- config/gcc-stl-wrapper.template.h.orig 2021-09-04 13:24:51.000000000 +0000
++++ config/gcc-stl-wrapper.template.h
+@@ -32,8 +32,8 @@
+ // limits) and bug 1694575 (iosfwd).
+ // Please be careful when adding more exceptions, especially regarding
+ // the header not directly or indirectly including <new>.
+-#ifndef moz_dont_include_mozalloc_for_cstdlib
+-# define moz_dont_include_mozalloc_for_cstdlib
++#ifndef moz_dont_include_mozalloc_for_${HEADER}
++# define moz_dont_include_mozalloc_for_${HEADER}
+ #endif
+
+ #ifndef moz_dont_include_mozalloc_for_cmath
+@@ -55,7 +55,7 @@
+ // Include mozalloc after the STL header and all other headers it includes
+ // have been preprocessed.
+ #if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
+- !defined(moz_dont_include_mozalloc_for_${HEADER})
++ !defined(moz_dont_include_mozalloc_for_cstdlib)
+ # define MOZ_INCLUDE_MOZALLOC_H
+ # define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
+ #endif
+@@ -84,4 +84,6 @@
+ # include "mozilla/throw_gcc.h"
+ #endif
+
++#undef moz_dont_include_mzalloc_for_${HEADER}
++
+ #endif // if mozilla_${HEADER}_h
Index: pkgsrc/www/firefox128/patches/patch-config_makefiles_rust.mk
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-config_makefiles_rust.mk:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-config_makefiles_rust.mk Sun Aug 18 15:02:20 2024
@@ -0,0 +1,29 @@
+$NetBSD: patch-config_makefiles_rust.mk,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+NetBSD doesn't get along with parallel rust builds (it causes issues
+with ld.so) which are the default. Force -j1.
+
+Use less memory to fix build under NetBSD/i386.
+From: https://bugzilla.mozilla.org/show_bug.cgi?id=1644409
+
+--- config/makefiles/rust.mk.orig 2024-07-04 17:04:12.000000000 +0000
++++ config/makefiles/rust.mk
+@@ -60,6 +60,9 @@ ifdef MOZ_TSAN
+ cargo_build_flags += -Zbuild-std=std,panic_abort
+ RUSTFLAGS += -Zsanitizer=thread
+ endif
++ifeq ($(OS_ARCH),NetBSD)
++cargo_build_flags += @RUST_MAKE_JOBS@
++endif
+
+ rustflags_sancov =
+ ifdef LIBFUZZER
+@@ -92,7 +95,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$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
++cargo_rustc_flags += -Clto=thin
+ endif
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
+ RUSTFLAGS += -Cembed-bitcode=yes
Index: pkgsrc/www/firefox128/patches/patch-dom_base_nsAttrName.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-dom_base_nsAttrName.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-dom_base_nsAttrName.h Sun Aug 18 15:02:20 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-dom_base_nsAttrName.h,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+cbindgen gets confused by NetBSD's types being macros too
+https://mail-index.netbsd.org/tech-pkg/2018/10/25/msg020395.html
+
+--- dom/base/nsAttrName.h.orig 2019-01-18 00:20:23.000000000 +0000
++++ dom/base/nsAttrName.h
+@@ -16,6 +16,10 @@
+ #include "mozilla/dom/NodeInfo.h"
+ #include "nsAtom.h"
+ #include "nsDOMString.h"
++#ifdef __NetBSD__
++/* This is also a macro which causes problems with cbindgen */
++#undef uintptr_t
++#endif
+
+ #define NS_ATTRNAME_NODEINFO_BIT 1
+ class nsAttrName {
Index: pkgsrc/www/firefox128/patches/patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp Sun Aug 18 15:02:20 2024
@@ -0,0 +1,40 @@
+$NetBSD: patch-dom_webtransport_api_WebTransportDatagramDuplexStream.cpp,v 1.1 2024/08/18 15:02:20 leot Exp $
+
+--- dom/webtransport/api/WebTransportDatagramDuplexStream.cpp.orig 2023-04-23 21:17:18.000000000 +0000
++++ dom/webtransport/api/WebTransportDatagramDuplexStream.cpp
+@@ -62,7 +62,7 @@ void WebTransportDatagramDuplexStream::S
+ ErrorResult& aRv) {
+ // https://w3c.github.io/webtransport/#dom-webtransportdatagramduplexstream-incomingmaxage
+ // Step 1
+- if (isnan(aMaxAge) || aMaxAge < 0.) {
++ if (std::isnan(aMaxAge) || aMaxAge < 0.) {
+ aRv.ThrowRangeError("Invalid IncomingMaxAge");
+ return;
+ }
+@@ -78,7 +78,7 @@ void WebTransportDatagramDuplexStream::S
+ ErrorResult& aRv) {
+ // https://w3c.github.io/webtransport/#dom-webtransportdatagramduplexstream-outgoingmaxage
+ // Step 1
+- if (isnan(aMaxAge) || aMaxAge < 0.) {
++ if (std::isnan(aMaxAge) || aMaxAge < 0.) {
+ aRv.ThrowRangeError("Invalid OutgoingMaxAge");
+ return;
+ }
+@@ -94,7 +94,7 @@ void WebTransportDatagramDuplexStream::S
+ double aWaterMark, ErrorResult& aRv) {
+ // https://w3c.github.io/webtransport/#dom-webtransportdatagramduplexstream-incominghighwatermark
+ // Step 1
+- if (isnan(aWaterMark) || aWaterMark < 0.) {
++ if (std::isnan(aWaterMark) || aWaterMark < 0.) {
+ aRv.ThrowRangeError("Invalid OutgoingMaxAge");
+ return;
+ }
+@@ -110,7 +110,7 @@ void WebTransportDatagramDuplexStream::S
+ double aWaterMark, ErrorResult& aRv) {
+ // https://w3c.github.io/webtransport/#dom-webtransportdatagramduplexstream-outgoinghighwatermark
+ // Step 1
+- if (isnan(aWaterMark) || aWaterMark < 0.) {
++ if (std::isnan(aWaterMark) || aWaterMark < 0.) {
+ aRv.ThrowRangeError("Invalid OutgoingHighWaterMark");
+ return;
+ }
Index: pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix build where _LITTLE_ENDIAN is not an integer.
+
+--- gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2019-07-06 01:48:31.000000000 +0000
++++ gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
+@@ -91,8 +91,8 @@ on big endian machines, or a byte-by-byt
+ /* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
+ * or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
+ #if !defined(__BYTE_ORDER)
+-# if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__ == 1 || \
+- defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN == 1
++# if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__-0 == 1 || \
++ defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN-0 == 1
+ # define __BYTE_ORDER __LITTLE_ENDIAN
+ # elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ == 1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN == 1
+ # define __BYTE_ORDER __BIG_ENDIAN
Index: pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h Sun Aug 18 15:02:21 2024
@@ -0,0 +1,16 @@
+$NetBSD: patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* isinf/isnan in make.h is defined as macro. Use non-macro version
+ to fix build.
+
+--- gfx/angle/checkout/src/compiler/translator/InfoSink.h.orig 2021-10-28 18:03:11.000000000 +0000
++++ gfx/angle/checkout/src/compiler/translator/InfoSink.h
+@@ -7,7 +7,7 @@
+ #ifndef COMPILER_TRANSLATOR_INFOSINK_H_
+ #define COMPILER_TRANSLATOR_INFOSINK_H_
+
+-#include <math.h>
++#include <cmath>
+ #include <stdlib.h>
+ #include "GLSLANG/ShaderLang.h"
+ #include "compiler/translator/Common.h"
Index: pkgsrc/www/firefox128/patches/patch-gfx_wr_swgl_build.rs
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-gfx_wr_swgl_build.rs:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-gfx_wr_swgl_build.rs Sun Aug 18 15:02:21 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-gfx_wr_swgl_build.rs,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Work around an internal compiler error on i386 when optimization is enabled:
+
+ cargo:warning=In file included from src/gl.cc:2637:0:
+ cargo:warning=src/rasterize.h: In function 'void draw_quad_spans(int, Point2D*, uint32_t, glsl::Interpolants*, Texture&, Texture&, const ClipRect&) [with P = unsigned char]':
+ cargo:warning=src/rasterize.h:782:20: internal compiler error: in convert_move, at expr.c:231
+ cargo:warning= static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
+ cargo:warning= ^~~~~~~~~~~~~~~
+
+
+--- gfx/wr/swgl/build.rs.orig 2021-08-23 14:57:16.000000000 +0000
++++ gfx/wr/swgl/build.rs
+@@ -196,6 +196,13 @@ fn main() {
+ }
+ }
+
++ // Work around a compiler bug
++ let target_triple = std::env::var("TARGET").expect("The TARGET environment variable must be set");
++ let target_name = target_triple.split('-').next().unwrap();
++ if ["i386", "i586", "i686"].contains(&target_name) {
++ build.flag("-O0");
++ }
++
+ build.file("src/gl.cc")
+ .define("_GLIBCXX_USE_CXX11_ABI", Some("0"))
+ .include(shader_dir)
Index: pkgsrc/www/firefox128/patches/patch-intl_lwbrk_LineBreaker.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-intl_lwbrk_LineBreaker.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-intl_lwbrk_LineBreaker.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,21 @@
+$NetBSD: patch-intl_lwbrk_LineBreaker.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+icu 74.1 support.
+
+--- intl/lwbrk/LineBreaker.cpp.orig 2023-10-19 19:54:30.000000000 +0000
++++ intl/lwbrk/LineBreaker.cpp
+@@ -448,7 +448,13 @@ static int8_t GetClass(uint32_t u, LineB
+ /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
+ /* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
+ /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
+- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
++ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
++ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
++ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
++ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
++ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
++ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
++};
+
+ static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
+ "Gecko vs ICU LineBreak class mismatch");
Index: pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc Sun Aug 18 15:02:21 2024
@@ -0,0 +1,22 @@
+$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Allow older libevent
+
+--- ipc/chromium/src/base/message_pump_libevent.cc.orig 2022-06-16 21:32:07.000000000 +0000
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -24,6 +24,7 @@
+
+ // This macro checks that the _EVENT_SIZEOF_* constants defined in
+ // ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct.
++#if 0
+ #if defined(_EVENT_SIZEOF_SHORT)
+ # define CHECK_EVENT_SIZEOF(TYPE, type) \
+ static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
+@@ -44,6 +45,7 @@ CHECK_EVENT_SIZEOF(SHORT, short);
+ CHECK_EVENT_SIZEOF(SIZE_T, size_t);
+ CHECK_EVENT_SIZEOF(TIME_T, time_t);
+ CHECK_EVENT_SIZEOF(VOID_P, void*);
++#endif
+
+ // Lifecycle of struct event
+ // Libevent uses two main data structures:
Index: pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc Sun Aug 18 15:02:21 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* Support NetBSD
+* Support Solaris (we can't rely on pthread_setname_np so ignore it).
+
+--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2023-07-20 18:06:23.000000000 +0000
++++ ipc/chromium/src/base/platform_thread_posix.cc
+@@ -12,7 +12,9 @@
+ #if defined(XP_DARWIN)
+ # include <mach/mach.h>
+ #elif defined(XP_NETBSD)
++_Pragma("GCC visibility push(default)")
+ # include <lwp.h>
++_Pragma("GCC visibility pop")
+ #elif defined(XP_LINUX)
+ # include <sys/syscall.h>
+ # include <sys/prctl.h>
Index: pkgsrc/www/firefox128/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-ipc_glue_GeckoChildProcessHost.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-ipc_glue_GeckoChildProcessHost.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,21 @@
+$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* Support Solaris
+* Fix NetBSD linking
+
+--- ipc/glue/GeckoChildProcessHost.cpp.orig 2023-08-17 21:21:29.000000000 +0000
++++ ipc/glue/GeckoChildProcessHost.cpp
+@@ -4,7 +4,13 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#if defined(__NetBSD__)
++_Pragma("GCC visibility push(default)")
++#endif
+ #include "GeckoChildProcessHost.h"
++#if defined(__NetBSD__)
++_Pragma("GCC visibility pop")
++#endif
+
+ #include "base/command_line.h"
+ #include "base/process.h"
Index: pkgsrc/www/firefox128/patches/patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-js-src-jit-arm64-vixl-MozCpu-vixl.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Add NetBSD support.
+
+--- js/src/jit/arm64/vixl/MozCpu-vixl.cpp.orig 2024-02-13 14:50:57.324257195 +0000
++++ js/src/jit/arm64/vixl/MozCpu-vixl.cpp
+@@ -110,7 +110,7 @@ void CPU::EnsureIAndDCacheCoherency(void
+ FlushInstructionCache(GetCurrentProcess(), address, length);
+ #elif defined(XP_DARWIN)
+ sys_icache_invalidate(address, length);
+-#elif defined(__aarch64__) && (defined(__linux__) || defined(__android__) || defined(__FreeBSD__))
++#elif defined(__aarch64__) && (defined(__linux__) || defined(__android__) || defined(__FreeBSD__) || defined(__NetBSD__))
+ // Implement the cache synchronisation for all targets where AArch64 is the
+ // host, even if we're building the simulator for an AAarch64 host. This
+ // allows for cases where the user wants to simulate code as well as run it
Index: pkgsrc/www/firefox128/patches/patch-js_public_Utility.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-js_public_Utility.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-js_public_Utility.h Sun Aug 18 15:02:21 2024
@@ -0,0 +1,24 @@
+$NetBSD: patch-js_public_Utility.h,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+--- js/public/Utility.h.orig 2024-07-04 17:04:15.000000000 +0000
++++ js/public/Utility.h
+@@ -482,9 +482,6 @@ static inline void js_free(void* p) {
+ #define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
+ template <class T, typename... Args> \
+ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \
+- static_assert( \
+- alignof(T) <= alignof(max_align_t), \
+- "over-aligned type is not supported by JS_DECLARE_NEW_METHODS"); \
+ void* memory = ALLOCATOR(sizeof(T)); \
+ return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
+ : nullptr; \
+@@ -501,9 +498,6 @@ static inline void js_free(void* p) {
+ #define JS_DECLARE_NEW_ARENA_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
+ template <class T, typename... Args> \
+ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(arena_id_t arena, Args&&... args) { \
+- static_assert( \
+- alignof(T) <= alignof(max_align_t), \
+- "over-aligned type is not supported by JS_DECLARE_NEW_ARENA_METHODS"); \
+ void* memory = ALLOCATOR(arena, sizeof(T)); \
+ return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
+ : nullptr; \
Index: pkgsrc/www/firefox128/patches/patch-js_src_jit_FlushICache.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-js_src_jit_FlushICache.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-js_src_jit_FlushICache.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,34 @@
+$NetBSD: patch-js_src_jit_FlushICache.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+NetBSD does not have the Linux-specific membarrier(2) syscall.
+
+--- js/src/jit/FlushICache.cpp.orig 2023-08-15 20:31:19.000000000 +0000
++++ js/src/jit/FlushICache.cpp
+@@ -31,12 +31,18 @@
+ # elif defined(__android__)
+ # include <sys/syscall.h>
+ # include <unistd.h>
++# elif defined(__NetBSD__)
++ // nothing
+ # else
+ # error "Missing platform-specific declarations for membarrier syscall!"
+ # endif // __linux__ / ANDROID
+
+ static int membarrier(int cmd, int flags) {
++#if defined(__NetBSD__)
++ return ENOSYS;
++#else
+ return syscall(__NR_membarrier, cmd, flags);
++#endif
+ }
+
+ // These definitions come from the Linux kernel source, for kernels before 4.16
+@@ -92,6 +98,8 @@ bool CanFlushExecutionContextForAllThrea
+
+ computed = true;
+ return kernelHasMembarrier;
++# elif defined(__NetBSD__)
++ return false;
+ # else
+ // On other platforms, we assume that the syscall for flushing the icache
+ // will flush the execution context for other cores.
Index: pkgsrc/www/firefox128/patches/patch-js_src_old-configure.in
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-js_src_old-configure.in:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-js_src_old-configure.in Sun Aug 18 15:02:21 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-js_src_old-configure.in,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix unportable test(1) operator.
+
+--- js/src/old-configure.in.orig 2024-07-14 16:00:40.315149382 +0000
++++ js/src/old-configure.in
+@@ -257,7 +257,7 @@ case "$target" in
+
+ *-android*|*-linuxandroid*)
+ MOZ_OPTIMIZE_FLAGS="-O3"
+- if test "$CC_TYPE" == gcc ; then
++ if test "$CC_TYPE" = gcc ; then
+ MOZ_OPTIMIZE_FLAGS="-fno-reorder-functions $MOZ_OPTIMIZE_FLAGS"
+ fi
+ ;;
Index: pkgsrc/www/firefox128/patches/patch-js_src_util_NativeStack.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-js_src_util_NativeStack.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-js_src_util_NativeStack.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,32 @@
+$NetBSD: patch-js_src_util_NativeStack.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Support SunOS.
+
+--- js/src/util/NativeStack.cpp.orig 2020-04-03 19:34:51.000000000 +0000
++++ js/src/util/NativeStack.cpp
+@@ -13,7 +13,7 @@
+ # if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ # include <pthread_np.h>
+ # endif
+-# if defined(SOLARIS) || defined(AIX)
++# if defined(__sun) || defined(AIX)
+ # include <ucontext.h>
+ # endif
+ # if defined(ANDROID) && !defined(__aarch64__)
+@@ -40,7 +40,7 @@ void* js::GetNativeStackBaseImpl() {
+ return static_cast<void*>(pTib->StackBase);
+ }
+
+-#elif defined(SOLARIS)
++#elif defined(__sun)
+
+ static_assert(JS_STACK_GROWTH_DIRECTION < 0);
+
+@@ -128,6 +128,7 @@ void* js::GetNativeStackBaseImpl() {
+ # elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
+ /* e.g. on FreeBSD 4.8 or newer, neundorf%kde.org@localhost */
+ pthread_attr_get_np(thread, &sattr);
++# elif defined(__sun)
+ # else
+ /*
+ * FIXME: this function is non-portable;
Index: pkgsrc/www/firefox128/patches/patch-media_ffvpx_libavutil_arm_bswap.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-media_ffvpx_libavutil_arm_bswap.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-media_ffvpx_libavutil_arm_bswap.h Sun Aug 18 15:02:21 2024
@@ -0,0 +1,22 @@
+$NetBSD: patch-media_ffvpx_libavutil_arm_bswap.h,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix NetBSD aarch64 build.
+
+--- media/ffvpx/libavutil/arm/bswap.h.orig 2019-10-30 17:35:56.000000000 +0000
++++ media/ffvpx/libavutil/arm/bswap.h
+@@ -23,6 +23,8 @@
+ #include "config.h"
+ #include "libavutil/attributes.h"
+
++#ifndef __aarch64__
++
+ #ifdef __ARMCC_VERSION
+
+ #if HAVE_ARMV6
+@@ -64,4 +66,6 @@ static av_always_inline av_const uint32_
+
+ #endif /* __ARMCC_VERSION */
+
++#endif /* __aarch64__ */
++
+ #endif /* AVUTIL_ARM_BSWAP_H */
Index: pkgsrc/www/firefox128/patches/patch-media_libpng_pngpriv.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-media_libpng_pngpriv.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-media_libpng_pngpriv.h Sun Aug 18 15:02:21 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-media_libpng_pngpriv.h,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix _POSIX_SOURCE on SunOS.
+
+--- media/libpng/pngpriv.h.orig 2024-04-05 19:49:16.000000000 +0000
++++ media/libpng/pngpriv.h
+@@ -36,8 +36,10 @@
+ * still required (as of 2011-05-02.)
+ */
+ #ifndef _POSIX_SOURCE
++#if !defined(__sun) || (__STDC_VERSION__-0 < 199901L)
+ # define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+ #endif
++#endif
+
+ #ifndef PNG_VERSION_INFO_ONLY
+ /* Standard library headers not required by png.h: */
Index: pkgsrc/www/firefox128/patches/patch-media_libtheora_lib_info.c
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-media_libtheora_lib_info.c:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-media_libtheora_lib_info.c Sun Aug 18 15:02:21 2024
@@ -0,0 +1,19 @@
+$NetBSD: patch-media_libtheora_lib_info.c,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix undefined behavior when calling <ctype.h> functions with illegal values.
+
+media/libtheora/lib/info.c:32:8: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1642081
+
+--- media/libtheora/lib/info.c.orig 2020-05-07 18:34:12.000000000 +0000
++++ media/libtheora/lib/info.c
+@@ -29,7 +29,7 @@
+ static int oc_tagcompare(const char *_s1,const char *_s2,int _n){
+ int c;
+ for(c=0;c<_n;c++){
+- if(toupper(_s1[c])!=toupper(_s2[c]))return !0;
++ if(toupper((unsigned char)_s1[c])!=toupper((unsigned char)_s2[c]))return !0;
+ }
+ return _s1[c]!='=';
+ }
Index: pkgsrc/www/firefox128/patches/patch-modules_fdlibm_src_math__private.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-modules_fdlibm_src_math__private.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-modules_fdlibm_src_math__private.h Sun Aug 18 15:02:21 2024
@@ -0,0 +1,20 @@
+$NetBSD: patch-modules_fdlibm_src_math__private.h,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* Fix PR pkg/56457, build failure on NetBSD/i386.
+ Do not use FreeBSD-specific definition.
+
+--- modules/fdlibm/src/math_private.h.orig 2022-11-03 21:19:39.000000000 +0000
++++ modules/fdlibm/src/math_private.h
+@@ -30,9 +30,9 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+-typedef double __double_t;
+-typedef __double_t double_t;
+-typedef float __float_t;
++#include <math.h>
++typedef double_t __double_t;
++typedef float_t __float_t;
+
+ /*
+ * The original fdlibm code used statements like:
Index: pkgsrc/www/firefox128/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp Sun Aug 18 15:02:21 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-netwerk_protocol_http_nsHttpHandler.cpp,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* Do not freeze user-agent string as Linux under NetBSD.
+
+--- netwerk/protocol/http/nsHttpHandler.cpp.orig 2024-03-12 14:30:47.266423256 +0000
++++ netwerk/protocol/http/nsHttpHandler.cpp
+@@ -903,6 +903,8 @@ void nsHttpHandler::InitUserAgentCompone
+ if (mozilla::StaticPrefs::network_http_useragent_freezeCpu()) {
+ # ifdef ANDROID
+ mOscpu.AssignLiteral("Linux armv81");
++# elif defined(__NetBSD__)
++ mOscpu.AssignLiteral("NetBSD x86_64");
+ # else
+ mOscpu.AssignLiteral("Linux x86_64");
+ # endif
Index: pkgsrc/www/firefox128/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c Sun Aug 18 15:02:21 2024
@@ -0,0 +1,112 @@
+$NetBSD: patch-nsprpub_pr_src_pthreads_ptsynch.c,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+firefox: Workaround broken pthread_equal() usage
+
+Switch to an internal version of pthread_equal() without sanity checks.
+
+Problems detected on NetBSD 9.99.46.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1718838
+
+--- nsprpub/pr/src/pthreads/ptsynch.c.orig 2020-01-17 21:34:42.000000000 +0000
++++ nsprpub/pr/src/pthreads/ptsynch.c
+@@ -25,6 +25,13 @@ static pthread_condattr_t _pt_cvar_attr;
+ extern PTDebug pt_debug; /* this is shared between several modules */
+ #endif /* defined(DEBUG) */
+
++/* XXX, pthread_equal() is misused to compare non-valid thread pointers */
++static int
++pt_pthread_equal(pthread_t t1, pthread_t t2)
++{
++ return t1 == t2;
++}
++
+ #if defined(FREEBSD)
+ /*
+ * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK.
+@@ -197,9 +204,9 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock
+ PR_ASSERT(lock != NULL);
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(lock->mutex));
+ PR_ASSERT(PR_TRUE == lock->locked);
+- PR_ASSERT(pthread_equal(lock->owner, self));
++ PR_ASSERT(pt_pthread_equal(lock->owner, self));
+
+- if (!lock->locked || !pthread_equal(lock->owner, self)) {
++ if (!lock->locked || !pt_pthread_equal(lock->owner, self)) {
+ return PR_FAILURE;
+ }
+
+@@ -225,7 +232,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ * to the correctness of PR_AssertCurrentThreadOwnsLock(), but
+ * this particular order makes the assertion more likely to
+ * catch errors. */
+- PR_ASSERT(lock->locked && pthread_equal(lock->owner, pthread_self()));
++ PR_ASSERT(lock->locked && pt_pthread_equal(lock->owner, pthread_self()));
+ }
+
+ /**************************************************************/
+@@ -281,7 +288,7 @@ static void pt_PostNotifyToCvar(PRCondVa
+ _PT_Notified *notified = &cvar->lock->notified;
+
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+
+ while (1)
+@@ -369,7 +376,7 @@ PR_IMPLEMENT(PRStatus) PR_WaitCondVar(PR
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+ /* and it better be by us */
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+
+ if (_PT_THREAD_INTERRUPTED(thred)) {
+ goto aborted;
+@@ -582,7 +589,7 @@ PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryC
+
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ count = mon->entryCount;
+ }
+ rv = pthread_mutex_unlock(&mon->lock);
+@@ -598,7 +605,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ PR_ASSERT(mon->entryCount != 0 &&
+- pthread_equal(mon->owner, pthread_self()));
++ pt_pthread_equal(mon->owner, pthread_self()));
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ #endif
+@@ -614,7 +621,7 @@ PR_IMPLEMENT(void) PR_EnterMonitor(PRMon
+ PR_ASSERT(0 == rv);
+ if (mon->entryCount != 0)
+ {
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ goto done;
+ }
+ while (mon->entryCount != 0)
+@@ -646,8 +653,8 @@ PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PR
+ PR_ASSERT(0 == rv);
+ /* the entries should be > 0 and we'd better be the owner */
+ PR_ASSERT(mon->entryCount > 0);
+- PR_ASSERT(pthread_equal(mon->owner, self));
+- if (mon->entryCount == 0 || !pthread_equal(mon->owner, self))
++ PR_ASSERT(pt_pthread_equal(mon->owner, self));
++ if (mon->entryCount == 0 || !pt_pthread_equal(mon->owner, self))
+ {
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+@@ -695,7 +702,7 @@ PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor
+ /* the entries better be positive */
+ PR_ASSERT(mon->entryCount > 0);
+ /* and it better be owned by us */
+- PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(mon->owner, pthread_self()));
+
+ /* tuck these away 'till later */
+ saved_entries = mon->entryCount;
Index: pkgsrc/www/firefox128/patches/patch-security_nss_lib_freebl_mpi_mpi.c
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-security_nss_lib_freebl_mpi_mpi.c:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-security_nss_lib_freebl_mpi_mpi.c Sun Aug 18 15:02:21 2024
@@ -0,0 +1,35 @@
+$NetBSD: patch-security_nss_lib_freebl_mpi_mpi.c,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+Fix undefined behavior when calling <ctype.h> functions with illegal values.
+
+security/nss/lib/freebl/mpi/mpi.c:4565:15: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+ xch = toupper(ch);
+
+security/nss/lib/freebl/mpi/mpi.c:4611:14: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+ ch = tolower(ch);
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1642081
+
+--- security/nss/lib/freebl/mpi/mpi.c.orig 2020-05-07 18:35:01.000000000 +0000
++++ security/nss/lib/freebl/mpi/mpi.c
+@@ -4560,9 +4560,9 @@ s_mp_tovalue(char ch, int r)
+ int val, xch;
+
+ if (r > 36)
+- xch = ch;
++ xch = (unsigned char) ch;
+ else
+- xch = toupper(ch);
++ xch = toupper((unsigned char) ch);
+
+ if (isdigit(xch))
+ val = xch - '0';
+@@ -4608,7 +4608,7 @@ s_mp_todigit(mp_digit val, int r, int lo
+ ch = s_dmap_1[val];
+
+ if (r <= 36 && low)
+- ch = tolower(ch);
++ ch = tolower((unsigned char) ch);
+
+ return ch;
+
Index: pkgsrc/www/firefox128/patches/patch-third__party_js_cfworker_build.sh
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_js_cfworker_build.sh:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_js_cfworker_build.sh Sun Aug 18 15:02:21 2024
@@ -0,0 +1,20 @@
+$NetBSD: patch-third__party_js_cfworker_build.sh,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+shell portability
+
+--- third_party/js/cfworker/build.sh.orig 2022-04-28 22:03:47.000000000 +0000
++++ third_party/js/cfworker/build.sh
+@@ -4,9 +4,10 @@ set -euo pipefail
+ # Path to mach relative to /third_party/js/cfworker
+ MACH=$(realpath "../../../mach")
+
+-if [[ $(uname -a) == *MSYS* ]]; then
+- MACH="python ${MACH}"
+-fi
++# uname -a is not a good idea here. Someone could have MSYS in the hostname.
++#if uname -a | grep MSYS > /dev/null; then
++# MACH="python ${MACH}"
++#fi
+
+ NODE="${MACH} node"
+ NPM="${MACH} npm"
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build Sun Aug 18 15:02:21 2024
@@ -0,0 +1,45 @@
+$NetBSD: patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+* Disable Wayland desktop capture for non-Linux platforms.
+ Fix segfault under X11.
+
+--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.orig 2024-03-11 10:11:56.287869888 +0000
++++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build
+@@ -392,7 +392,7 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG
+
+ DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
+
+-if CONFIG["TARGET_CPU"] == "aarch64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
++if CONFIG["TARGET_CPU"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
+ DEFINES["_GNU_SOURCE"] = True
+@@ -449,7 +449,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CO
+ "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
+ ]
+
+-if CONFIG["TARGET_CPU"] == "x86" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
++if CONFIG["TARGET_CPU"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
+ "-msse2"
+@@ -482,7 +482,7 @@ if CONFIG["TARGET_CPU"] == "x86" and (CO
+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
+ ]
+
+-if CONFIG["TARGET_CPU"] == "x86_64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
++if CONFIG["TARGET_CPU"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
+ DEFINES["_GNU_SOURCE"] = True
+@@ -628,6 +628,10 @@ if CONFIG["TARGET_CPU"] == "x86" and CON
+ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_USE_X11"] = True
+
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ OS_LIBS += [
+ "X11",
+ "Xcomposite",
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc Sun Aug 18 15:02:21 2024
@@ -0,0 +1,21 @@
+$NetBSD: patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc,v 1.1 2024/08/18 15:02:21 leot Exp $
+
+--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2023-03-30 21:16:09.000000000 +0000
++++ 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(__linux__)
+ #include <asm/ioctl.h>
++#endif
+ #include <dlfcn.h>
+ #include <fcntl.h>
+ #include <gdk/gdk.h>
+ #include <libdrm/drm_fourcc.h>
++#if defined(__linux__)
+ #include <linux/types.h>
++#endif
+ #include <spa/param/video/format-utils.h>
+ #include <unistd.h>
+ #include <xf86drm.h>
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc Sun Aug 18 15:02:22 2024
@@ -0,0 +1,67 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Fix build under NetBSD 9 and older.
+ The older NetBSD's sys/videoio.h does not have v4l2_capability.device_caps.
+
+--- third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc.orig 2023-09-14 21:15:08.000000000 +0000
++++ third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc
+@@ -211,11 +211,13 @@ uint32_t DeviceInfoV4l2::NumberOfDevices
+ for (int n = 0; n < 64; n++) {
+ snprintf(device, sizeof(device), "/dev/video%d", n);
+ if ((fd = open(device, O_RDONLY)) != -1) {
++#if defined(VIDIOC_QUERYCAP)
+ // query device capabilities and make sure this is a video capture device
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !IsVideoCaptureDevice(&cap)) {
+ close(fd);
+ continue;
+ }
++#endif
+
+ close(fd);
+ count++;
+@@ -242,11 +244,13 @@ int32_t DeviceInfoV4l2::GetDeviceName(ui
+ for (int n = 0; n < 64; n++) {
+ snprintf(device, sizeof(device), "/dev/video%d", n);
+ if ((fd = open(device, O_RDONLY)) != -1) {
++#if defined(VIDIOC_QUERYCAP)
+ // query device capabilities and make sure this is a video capture device
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !IsVideoCaptureDevice(&cap)) {
+ close(fd);
+ continue;
+ }
++#endif
+ if (count == deviceNumber) {
+ // Found the device
+ found = true;
+@@ -317,6 +321,7 @@ int32_t DeviceInfoV4l2::CreateCapability
+ if (fd == -1)
+ continue;
+
++#if defined(VIDIOC_QUERYCAP)
+ // query device capabilities
+ struct v4l2_capability cap;
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0) {
+@@ -341,6 +346,7 @@ int32_t DeviceInfoV4l2::CreateCapability
+ }
+ }
+ }
++#endif
+ close(fd); // close since this is not the matching device
+ }
+
+@@ -386,11 +392,15 @@ bool DeviceInfoV4l2::IsDeviceNameMatches
+
+ bool DeviceInfoV4l2::IsVideoCaptureDevice(struct v4l2_capability* cap)
+ {
++#if defined(V4L2_CAP_DEVICE_CAPS)
+ if (cap->capabilities & V4L2_CAP_DEVICE_CAPS) {
+ return cap->device_caps & V4L2_CAP_VIDEO_CAPTURE;
+ } else {
+ return cap->capabilities & V4L2_CAP_VIDEO_CAPTURE;
+ }
++#else
++ return cap->capabilities & V4L2_CAP_VIDEO_CAPTURE;
++#endif
+ }
+
+ int32_t DeviceInfoV4l2::FillCapabilities(int fd) {
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc Sun Aug 18 15:02:22 2024
@@ -0,0 +1,23 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Fix build under NetBSD 9 and older.
+ The older NetBSD's sys/videoio.h does not have v4l2_capability.device_caps.
+
+--- third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc.orig 2022-10-06 21:19:29.000000000 +0000
++++ third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc
+@@ -77,6 +77,7 @@ int32_t VideoCaptureModuleV4L2::Init(con
+ if ((fd = open(device, O_RDONLY)) != -1) {
+ // query device capabilities
+ struct v4l2_capability cap;
++#if defined(VIDIOC_QUERYCAP)
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0) {
+ if (cap.bus_info[0] != 0) {
+ if (strncmp((const char*)cap.bus_info,
+@@ -89,6 +90,7 @@ int32_t VideoCaptureModuleV4L2::Init(con
+ }
+ }
+ }
++#endif
+ close(fd); // close since this is not the matching device
+ }
+ }
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc Sun Aug 18 15:02:22 2024
@@ -0,0 +1,13 @@
+$NetBSD: patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+--- third_party/libwebrtc/rtc_base/physical_socket_server.cc.orig 2024-07-03 20:25:45.412396416 +0000
++++ third_party/libwebrtc/rtc_base/physical_socket_server.cc
+@@ -770,7 +770,7 @@ int PhysicalSocket::TranslateOption(Opti
+ return -1;
+ #endif
+ case OPT_RECV_ECN:
+-#if defined(WEBRTC_POSIX)
++#if defined(WEBRTC_POSIX) && defined(IP_RECVTOS)
+ if (family_ == AF_INET6) {
+ *slevel = IPPROTO_IPV6;
+ *sopt = IPV6_RECVTCLASS;
Index: pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc Sun Aug 18 15:02:22 2024
@@ -0,0 +1,25 @@
+$NetBSD: patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Fix build under NetBSD at least.
+
+--- third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc.orig 2022-01-13 19:26:15.000000000 +0000
++++ third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -8,7 +8,9 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#if !defined(__NetBSD__)
+ #include <features.h>
++#endif
+ #include <stdlib.h>
+ #include <string.h>
+
+@@ -30,7 +32,7 @@
+ #include "rtc_base/system/arch.h"
+ #include "system_wrappers/include/cpu_features_wrapper.h"
+
+-#if defined(WEBRTC_ARCH_ARM_FAMILY)
++#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(__linux__)
+ #include <asm/hwcap.h>
+
+ namespace webrtc {
Index: pkgsrc/www/firefox128/patches/patch-third__party_sqlite3_src_moz.build
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_sqlite3_src_moz.build:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_sqlite3_src_moz.build Sun Aug 18 15:02:22 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-third__party_sqlite3_src_moz.build,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Fix segfault under NetBSD/i386 9 and pkgsrc/lang/gcc8-8.5.0
+ For NetBSD/i386 9, @SQLITE3OPTFLAG@ will be replaced with "'-O0',".
+
+--- third_party/sqlite3/src/moz.build.orig 2023-06-22 21:19:22.000000000 +0000
++++ third_party/sqlite3/src/moz.build
+@@ -108,6 +108,7 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
+ CFLAGS += [
+ '-Wno-sign-compare',
+ '-Wno-type-limits',
++ @SQLITE3OPTFLAG@
+ ]
+
+ # Set a default journal size limit. Note an hot journal can grow over this
Index: pkgsrc/www/firefox128/patches/patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc Sun Aug 18 15:02:22 2024
@@ -0,0 +1,13 @@
+$NetBSD: patch-third__party_wasm2c_src_prebuilt_wasm2c__source__includes.cc,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+--- third_party/wasm2c/src/prebuilt/wasm2c_source_includes.cc.orig 2023-05-25 21:19:41.000000000 +0000
++++ third_party/wasm2c/src/prebuilt/wasm2c_source_includes.cc
+@@ -20,7 +20,7 @@ R"w2c_template(#include <malloc.h>
+ )w2c_template"
+ R"w2c_template(#define alloca _alloca
+ )w2c_template"
+-R"w2c_template(#elif defined(__FreeBSD__) || defined(__OpenBSD__)
++R"w2c_template(#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ )w2c_template"
+ R"w2c_template(#include <stdlib.h>
+ )w2c_template"
Index: pkgsrc/www/firefox128/patches/patch-toolkit_components_terminator_nsTerminator.cpp
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-toolkit_components_terminator_nsTerminator.cpp:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-toolkit_components_terminator_nsTerminator.cpp Sun Aug 18 15:02:22 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Fix segfault on exit under NetBSD
+
+--- toolkit/components/terminator/nsTerminator.cpp.orig 2022-06-16 21:35:58.000000000 +0000
++++ toolkit/components/terminator/nsTerminator.cpp
+@@ -34,7 +34,7 @@
+ #if defined(XP_WIN)
+ # include <windows.h>
+ #else
+-# include <unistd.h>
++# include <time.h>
+ #endif
+
+ #include "mozilla/AppShutdown.h"
+@@ -184,7 +184,10 @@ void RunWatchdog(void* arg) {
+ #if defined(XP_WIN)
+ Sleep(HEARTBEAT_INTERVAL_MS /* ms */);
+ #else
+- usleep(HEARTBEAT_INTERVAL_MS * 1000 /* usec */);
++ struct timespec tickd;
++ tickd.tv_sec = 0;
++ tickd.tv_nsec = HEARTBEAT_INTERVAL_MS * 1000 * 1000;
++ nanosleep(&tickd, NULL);
+ #endif
+
+ if (gHeartbeat++ < timeToLive) {
Index: pkgsrc/www/firefox128/patches/patch-toolkit_moz.configure
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-toolkit_moz.configure:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-toolkit_moz.configure Sun Aug 18 15:02:22 2024
@@ -0,0 +1,31 @@
+$NetBSD: patch-toolkit_moz.configure,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Enable ALSA for NetBSD too.
+* Support --enable-forkserver on NetBSD.
+
+--- toolkit/moz.configure.orig 2023-08-15 21:10:03.000000000 +0000
++++ toolkit/moz.configure
+@@ -242,6 +242,7 @@ def imply_alsa(values, target):
+ any("alsa" in value for value in values)
+ and target.kernel != "Linux"
+ and target.os != "FreeBSD"
++ and target.os != "NetBSD"
+ ):
+ die("Cannot enable ALSA on %s", target.os)
+ return any("alsa" in value for value in values) or None
+@@ -2816,6 +2817,7 @@ def forkserver_default(target, build_pro
+ (target.os == "GNU" and target.kernel == "Linux")
+ or target.os == "FreeBSD"
+ or target.os == "OpenBSD"
++ or target.os == "NetBSD"
+ )
+
+
+@@ -2834,6 +2836,7 @@ def forkserver_flag(value, target):
+ or (target.os == "GNU" and target.kernel == "Linux")
+ or target.os == "FreeBSD"
+ or target.os == "OpenBSD"
++ or target.os == "NetBSD"
+ ):
+ return bool(value)
+ pass
Index: pkgsrc/www/firefox128/patches/patch-toolkit_mozapps_installer_packager.mk
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-toolkit_mozapps_installer_packager.mk:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-toolkit_mozapps_installer_packager.mk Sun Aug 18 15:02:22 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-toolkit_mozapps_installer_packager.mk,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Symbolic link to lib/firefox/firefox causes 'Couldn't load XPCOM.' error.
+
+--- toolkit/mozapps/installer/packager.mk.orig 2020-01-29 07:05:13.000000000 +0000
++++ toolkit/mozapps/installer/packager.mk
+@@ -145,7 +145,7 @@ endif
+ (cd $(DESTDIR)$(installdir) && tar -xf -)
+ $(NSINSTALL) -D $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
+- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
++ #ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+
+ upload:
+ $(PYTHON3) -u $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) $(UPLOAD_FILES)
Index: pkgsrc/www/firefox128/patches/patch-xpcom_base_nscore.h
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-xpcom_base_nscore.h:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-xpcom_base_nscore.h Sun Aug 18 15:02:22 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-xpcom_base_nscore.h,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+* Support llvm/clang
+
+--- xpcom/base/nscore.h.orig 2019-03-07 16:53:44.000000000 +0000
++++ xpcom/base/nscore.h
+@@ -76,7 +76,7 @@
+ * NS_HIDDEN_(int) NS_FASTCALL func2(char *foo);
+ */
+
+-#if defined(__i386__) && defined(__GNUC__)
++#if defined(__i386__) && defined(__GNUC__) && !(defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ == 0)
+ # define NS_FASTCALL __attribute__((regparm(3), stdcall))
+ # define NS_CONSTRUCTOR_FASTCALL __attribute__((regparm(3), stdcall))
+ #elif defined(XP_WIN) && !defined(_WIN64)
Index: pkgsrc/www/firefox128/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build
diff -u /dev/null pkgsrc/www/firefox128/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build:1.1
--- /dev/null Sun Aug 18 15:02:22 2024
+++ pkgsrc/www/firefox128/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build Sun Aug 18 15:02:22 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-xpcom_reflect_xptcall_md_unix_moz.build,v 1.1 2024/08/18 15:02:22 leot Exp $
+
+Make NetBSD/sparc64 use the same xptcall bindings as all other sparc64 ports
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1505360
+
+--- xpcom/reflect/xptcall/md/unix/moz.build.orig 2024-01-12 13:20:20.000000000 +0000
++++ xpcom/reflect/xptcall/md/unix/moz.build
+@@ -221,7 +221,7 @@ if CONFIG["OS_ARCH"] == "OpenBSD" and CO
+ ]
+
+ if (
+- CONFIG["OS_ARCH"] in ("OpenBSD", "FreeBSD", "Linux", "SunOS")
++ CONFIG["OS_ARCH"] in ("OpenBSD", "FreeBSD", "Linux", "SunOS", "NetBSD")
+ and CONFIG["TARGET_CPU"] == "sparc64"
+ ):
+ SOURCES += [
Home |
Main Index |
Thread Index |
Old Index