pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
librewolf: update to 146.0.1
Module Name: pkgsrc-wip
Committed By: Pkgsrc User <pkgsrc-user%NetBSD.org@localhost>
Pushed By: nuclearkev
Date: Tue Dec 30 08:32:57 2025 -0500
Changeset: d672a5ca8bd091c7392126937267ee4cb8255517
Modified Files:
librewolf/Makefile
librewolf/distinfo
librewolf/options.mk
librewolf/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc
librewolf/patches/patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc
librewolf/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
Added Files:
librewolf/patches/patch-mozconfig
librewolf/patches/patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build
librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build
Removed Files:
librewolf/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
Log Message:
librewolf: update to 146.0.1
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d672a5ca8bd091c7392126937267ee4cb8255517
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
librewolf/Makefile | 6 +-
librewolf/distinfo | 24 ++++---
librewolf/options.mk | 2 +-
librewolf/patches/patch-mozconfig | 15 +++++
...-cpp_absl_debugging_internal_elf__mem__image.cc | 16 +----
...tc_modules_audio__device_audio__device__impl.cc | 14 ++--
...s_desktop__capture_linux_wayland_egl__dmabuf.cc | 14 ++--
...y_libwebrtc_modules_portal_portal__gn_moz.build | 29 ++++++++
...ules_video__capture_linux_device__info__v4l2.cc | 78 ++--------------------
...es_video__capture_linux_video__capture__v4l2.cc | 27 ++++++--
...re_video__capture__internal__impl__gn_moz.build | 40 +++++++++++
...system__wrappers_source_cpu__features__linux.cc | 25 -------
12 files changed, 145 insertions(+), 145 deletions(-)
diffs:
diff --git a/librewolf/Makefile b/librewolf/Makefile
index fcab4e3284..832a883e09 100644
--- a/librewolf/Makefile
+++ b/librewolf/Makefile
@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.650 2025/11/14 17:17:18 ryoon Exp $
FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
-MOZ_BRANCH= 144.0
-MOZ_BRANCH_MINOR= .2
+MOZ_BRANCH= 146.0
+MOZ_BRANCH_MINOR= .1
DISTNAME= librewolf-${FIREFOX_VER}-1.source
PKGNAME= ${DISTNAME:S/.source//:S/-1$//}
@@ -10,7 +10,7 @@ CATEGORIES= www
MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${FIREFOX_VER}-1/
EXTRACT_SUFX= .tar.gz
-NODEJSKIT= nodejs-output-144.0.tgz
+NODEJSKIT= nodejs-output-146.0.1.tgz
DISTFILES= ${DEFAULT_DISTFILES} ${NODEJSKIT}
SITES.${NODEJSKIT}= ${MASTER_SITE_LOCAL}
diff --git a/librewolf/distinfo b/librewolf/distinfo
index 67a57fe19b..71f773bc5a 100644
--- a/librewolf/distinfo
+++ b/librewolf/distinfo
@@ -1,11 +1,11 @@
$NetBSD: distinfo,v 1.569 2025/11/14 17:17:18 ryoon Exp $
-BLAKE2s (librewolf-144.0.2-1.source.tar.gz) = adf0d5080c2014c8dfde5bc3c717546c729567052d7648bd6be717018bd8e617
-SHA512 (librewolf-144.0.2-1.source.tar.gz) = e9f479dc310ad415f730e27d4508c122626edb0d3a181efb25da201de4ba0e6ce4d90ba7fc2582a41213f0f2b40bc64a08577d1bc56863efff0e3023a64a3b93
-Size (librewolf-144.0.2-1.source.tar.gz) = 1029983140 bytes
-BLAKE2s (nodejs-output-144.0.tgz) = 5c8b90a5d17c56467480bdf0a8f1884d14972c8f4163d293463834721f9a4432
-SHA512 (nodejs-output-144.0.tgz) = 6bb2a8975660c68d37b09da5d3f8f0af9bd9a826ca6cb836ef41ca3e7c0c5a902e37b6cbfac5871177688fc1d808b2e07a4e0d0a705470bfa3e368053bc079fd
-Size (nodejs-output-144.0.tgz) = 248214 bytes
+BLAKE2s (librewolf-146.0.1-1.source.tar.gz) = 53ed6beaace9b461bdd4f6fbc1bd4e0c07ad0bf1d2b4866ae4d870524a3dbf96
+SHA512 (librewolf-146.0.1-1.source.tar.gz) = f82cb7fdf4b7a325677dd845f82628ee3f3a2598032b1e5e86c8d4941e13b8b41bb2c7ee7db748de0c55a3eeb8c016d32a1280c5bc7c4a9b625bf4f6402c87ce
+Size (librewolf-146.0.1-1.source.tar.gz) = 1033671870 bytes
+BLAKE2s (nodejs-output-146.0.1.tgz) = 325dc3d29b5fa5492bfd77905caf0030db0b61b8b8db6317cf4097d236435714
+SHA512 (nodejs-output-146.0.1.tgz) = 847a32df3759e2650b6897794a66036c99ed727849f39a545671d47385de3610766e64f5f329e5d35d0bdf261d585db1b1bc0815900b3558a4db184833c71699
+Size (nodejs-output-146.0.1.tgz) = 249292 bytes
SHA1 (patch-browser_app_profile_firefox.js) = 1eaa674c0aa8279e2f9dc2eda582650a08156d65
SHA1 (patch-build_gn__processor.py) = 078f773104bf4c1b30584564aefe365db6ba6daf
SHA1 (patch-build_moz.configure_init.configure) = 65deb3c233df0aab81eb1fca05d708e5a4ed169a
@@ -36,14 +36,16 @@ SHA1 (patch-modules_fdlibm_src_math__private.h) = e20b6c23011d7123cbbd64a500eb8c
SHA1 (patch-netwerk_protocol_http_nsHttpHandler.cpp) = 67493b4635041d21ff9fbfda80b3197fed542a26
SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = 753fd4d62088c870aefe7c4b739286259848446e
SHA1 (patch-python_mozbuild_mozbuild_backend_recursivemake.py) = 5be4183d9075f5a3a3c6b3e0338473af185fb50e
-SHA1 (patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc) = 4691eb3ad88134c9f6336b257246f1361f6a20a7
+SHA1 (patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc) = b1067a6804470f7e365f347683b7d505853fd799
SHA1 (patch-third__party_abseil-cpp_absl_debugging_internal_vdso__support.cc) = f9c44d0d6fd952296f23c24f56053958b30d8e5c
SHA1 (patch-third__party_js_cfworker_build.sh) = 46cdf97b99cf01080f290ae8d9a33b5f869fc3e4
-SHA1 (patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc) = 927532138175f99f96433d24060f65a2a919d2d1
+SHA1 (patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc) = 127284a1a9b6e12581d325f5a5aadae443b0e57b
SHA1 (patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build) = f53af8e5383f31b5de7df21f80eb53d60c11eae1
-SHA1 (patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc) = 605f6c7819c956d10d4b46f7ac9bb5814c150979
-SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc) = 8831d477f14fd4f8f735ff0c1a322cba8c70e277
-SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc) = 8111952a107eb2cd665525ddd0e27c79eee3c1cd
+SHA1 (patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc) = 89f8f8eb5dcb877e0c70120f742050f1b32676fb
+SHA1 (patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build) = 9a1ad764d5df7e19da8d370edf12f7ae07e4c8e3
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc) = a4b04c390f93ffbc79e049f532251bfa00376eff
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc) = 9f1e606242b2ab2625dabc06f25b593f4721d387
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build) = 2a214979769cbf57b1d534610e524138aac7fc2b
SHA1 (patch-third__party_libwebrtc_modules_video__capture_video__capture__options.cc) = e15f7e365ef6d57cd262f920f49c4d73f3a13305
SHA1 (patch-third__party_libwebrtc_rtc__base_memory__usage.cc) = a831145ba15b30d30c6e6e216b574d416253ed4a
SHA1 (patch-third__party_libwebrtc_rtc__base_physical__socket__server.cc) = 6909c4da9e7b3785252e5bce9be0ff47ebb87e01
diff --git a/librewolf/options.mk b/librewolf/options.mk
index 66ecb71c8b..f3f9725b60 100644
--- a/librewolf/options.mk
+++ b/librewolf/options.mk
@@ -29,7 +29,7 @@ AUDIO_BACKENDS+= alsa
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
CONFIGURE_ARGS+= --enable-jemalloc
-CONFIGURE_ARGS+= --enable-replace-malloc
+#CONFIGURE_ARGS+= --enable-replace-malloc
.else
CONFIGURE_ARGS+= --disable-jemalloc
#.include "../../devel/jemalloc/buildlink3.mk"
diff --git a/librewolf/patches/patch-mozconfig b/librewolf/patches/patch-mozconfig
new file mode 100644
index 0000000000..7246c9f1e2
--- /dev/null
+++ b/librewolf/patches/patch-mozconfig
@@ -0,0 +1,15 @@
+$NetBSD$
+
+For some reason this replace-malloc is not supported anymore
+
+--- mozconfig.orig 2025-12-30 02:37:54.323471546 +0000
++++ mozconfig
+@@ -13,7 +13,7 @@ ac_add_options --enable-release
+ ac_add_options --enable-rust-simd
+ # allow replacing malloc manually, will not affect regular systems
+ # not compatible with ac_add_options --disable-jemalloc, which only works when preloading custom malloc
+-ac_add_options --enable-replace-malloc
++# ac_add_options --enable-replace-malloc
+
+ ac_add_options --with-app-name=librewolf
+ ac_add_options --with-branding=browser/branding/librewolf
diff --git a/librewolf/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc b/librewolf/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc
index 658b02a572..1f8a4c03b9 100644
--- a/librewolf/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc
+++ b/librewolf/patches/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc
@@ -1,20 +1,10 @@
-$NetBSD: patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc,v 1.2 2025/11/14 17:17:18 ryoon Exp $
+$NetBSD: patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.cc,v 1.4 2025/12/15 21:09:16 gutteridge Exp $
* NetBSD has no DT_GNU_HASH definition.
+* Fix builds with NetBSD >= 11.99.4, where ELF definitions were changed.
--- third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc.orig 2025-11-06 22:07:37.000000000 +0000
+++ third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc
-@@ -25,6 +25,10 @@
- #include <cstddef>
- #include <cstdint>
-
-+#if defined(__NetBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "absl/base/config.h"
- #include "absl/base/internal/raw_logging.h"
-
@@ -221,6 +225,10 @@ void ElfMemImage::Init(const void *base)
for (; dynamic_entry->d_tag != DT_NULL; ++dynamic_entry) {
const auto value =
@@ -31,7 +21,7 @@ $NetBSD: patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.c
ABSL_RAW_CHECK(symbol && version_symbol, "");
const char *const symbol_name = image->GetDynstr(symbol->st_name);
-#if defined(__NetBSD__)
-+#if defined(__NetBSD__) && __NetBSD_Version__ < 1199000400
++#if defined(__NetBSD__) && ((_SYS_EXEC_ELF_H_ + 0) < 2)
const int version_index = version_symbol->vs_vers & VERSYM_VERSION;
#else
const ElfW(Versym) version_index = version_symbol[0] & VERSYM_VERSION;
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc b/librewolf/patches/patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc
index 02d7c9ac1d..59b65bdf53 100644
--- a/librewolf/patches/patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc
@@ -1,17 +1,17 @@
-$NetBSD: patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc,v 1.4 2025/10/27 14:24:33 ryoon Exp $
+$NetBSD: patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.cc,v 1.5 2025/12/24 15:26:41 ryoon Exp $
---- third_party/libwebrtc/modules/audio_device/audio_device_impl.cc.orig 2025-10-03 13:18:12.000000000 +0000
+--- third_party/libwebrtc/modules/audio_device/audio_device_impl.cc.orig 2025-11-28 13:14:41.000000000 +0000
+++ third_party/libwebrtc/modules/audio_device/audio_device_impl.cc
-@@ -33,7 +33,7 @@
- #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD)
+@@ -28,7 +28,7 @@
+
+ #if defined(WEBRTC_WIN)
#include "modules/audio_device/win/audio_device_core_win.h"
- #endif
-#elif defined(WEBRTC_LINUX)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
#if defined(WEBRTC_ENABLE_LINUX_ALSA)
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#endif
-@@ -151,6 +151,11 @@ int32_t AudioDeviceModuleImpl::CheckPlat
+@@ -146,6 +146,11 @@ int32_t AudioDeviceModuleImpl::CheckPlat
#elif defined(WEBRTC_FUCHSIA)
platform = kPlatformFuchsia;
RTC_LOG(LS_INFO) << "current platform is Fuchsia";
@@ -23,7 +23,7 @@ $NetBSD: patch-third__party_libwebrtc_modules_audio__device_audio__device__impl.
#endif
if (platform == kPlatformNotSupported) {
RTC_LOG(LS_ERROR)
-@@ -204,7 +209,7 @@ int32_t AudioDeviceModuleImpl::CreatePla
+@@ -199,7 +204,7 @@ int32_t AudioDeviceModuleImpl::CreatePla
// 'rtc_include_pulse_audio' build flag.
// TODO(bugs.webrtc.org/9127): improve support and make it more clear that
// PulseAudio is the default selection.
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc b/librewolf/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
index 255dfd1747..6c9f7c86ed 100644
--- a/librewolf/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
@@ -1,14 +1,14 @@
-$NetBSD$
+$NetBSD: patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc,v 1.4 2025/11/14 17:17:18 ryoon Exp $
---- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2025-11-17 00:50:40.297687435 +0000
+--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2025-10-31 13:10:50.000000000 +0000
+++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
-@@ -11,7 +11,9 @@
- #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"
-
- #include <EGL/eglext.h>
+@@ -15,7 +15,9 @@
+ #include <EGL/eglplatform.h>
+ #include <GL/gl.h>
+ #include <GL/glext.h>
+#if defined(__linux__)
#include <asm/ioctl.h>
+#endif
#include <dlfcn.h>
#include <fcntl.h>
- #include <gdk/gdk.h>
+ #include <gbm.h>
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build b/librewolf/patches/patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build
new file mode 100644
index 0000000000..b9a215b747
--- /dev/null
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build
@@ -0,0 +1,29 @@
+$NetBSD: patch-third__party_libwebrtc_modules_portal_portal__gn_moz.build,v 1.1 2025/12/24 15:26:41 ryoon Exp $
+
+--- third_party/libwebrtc/modules/portal/portal_gn/moz.build.orig 2025-12-02 15:14:25.832556602 +0000
++++ third_party/libwebrtc/modules/portal/portal_gn/moz.build
+@@ -41,7 +41,8 @@ DEFINES["WEBRTC_MOZILLA_BUILD"] = True
+ DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
+-DEFINES["WEBRTC_USE_PIPEWIRE"] = True
++if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GLIBCXX_ASSERTIONS"] = "1"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -67,10 +68,13 @@ LOCAL_INCLUDES += [
+ ]
+
+ UNIFIED_SOURCES += [
+- "/third_party/libwebrtc/modules/portal/pipewire_utils.cc",
+ "/third_party/libwebrtc/modules/portal/scoped_glib.cc",
+ "/third_party/libwebrtc/modules/portal/xdg_desktop_portal_utils.cc"
+ ]
++if CONFIG["OS_TARGET"] == "Linux":
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/modules/portal/pipewire_utils.cc"
++ ]
+
+ if not CONFIG["MOZ_DEBUG"]:
+
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
index a796819dc7..c7329886cd 100644
--- a/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
@@ -1,50 +1,10 @@
-$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc,v 1.4 2025/07/15 13:58:05 ryoon Exp $
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc,v 1.5 2025/12/24 15:26:41 ryoon 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 2025-05-17 19:55:48.000000000 +0000
+--- third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc.orig 2025-12-11 01:10:40.995051175 +0000
+++ third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc
-@@ -52,14 +52,14 @@
- #define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4')
- #endif
-
--#ifdef WEBRTC_LINUX
-+#ifdef WEBRTC_LINUX || WEBRTC_BSD
- #define EVENT_SIZE ( sizeof (struct inotify_event) )
- #define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) )
- #endif
-
- namespace webrtc {
- namespace videocapturemodule {
--#ifdef WEBRTC_LINUX
-+#ifdef WEBRTC_LINUX || WEBRTC_BSD
- void DeviceInfoV4l2::HandleEvent(inotify_event* event, int fd)
- {
- if (event->mask & IN_CREATE) {
-@@ -175,11 +175,11 @@ void DeviceInfoV4l2::InotifyProcess()
- #endif
-
- DeviceInfoV4l2::DeviceInfoV4l2() : DeviceInfoImpl()
--#ifdef WEBRTC_LINUX
-+#ifdef WEBRTC_LINUX || WEBRTC_BSD
- , _isShutdown(false)
- #endif
- {
--#ifdef WEBRTC_LINUX
-+#ifdef WEBRTC_LINUX || WEBRTC_BSD
- _inotifyEventThread = rtc::PlatformThread::SpawnJoinable(
- [this] {
- InotifyProcess();
-@@ -192,7 +192,7 @@ int32_t DeviceInfoV4l2::Init() {
- }
-
- DeviceInfoV4l2::~DeviceInfoV4l2() {
--#ifdef WEBRTC_LINUX
-+#ifdef WEBRTC_LINUX || WEBRTC_BSD
- _isShutdown = true;
-
- if (!_inotifyEventThread.empty()) {
@@ -211,11 +211,13 @@ uint32_t DeviceInfoV4l2::NumberOfDevices
for (int n = 0; n < 64; n++) {
snprintf(device, sizeof(device), "/dev/video%d", n);
@@ -59,37 +19,7 @@ $NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info_
close(fd);
count++;
-@@ -243,11 +245,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;
-@@ -318,6 +322,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) {
-@@ -342,6 +347,7 @@ int32_t DeviceInfoV4l2::CreateCapability
- }
- }
- }
-+#endif
- close(fd); // close since this is not the matching device
- }
-
-@@ -387,11 +393,15 @@ bool DeviceInfoV4l2::IsDeviceNameMatches
+@@ -387,11 +389,15 @@ bool DeviceInfoV4l2::IsDeviceNameMatches
bool DeviceInfoV4l2::IsVideoCaptureDevice(struct v4l2_capability* cap)
{
@@ -100,7 +30,7 @@ $NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info_
return cap->capabilities & V4L2_CAP_VIDEO_CAPTURE;
}
+#else
-+ return cap->capabilities & V4L2_CAP_VIDEO_CAPTURE;
++ return true;
+#endif
}
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
index 70dcb7b66d..4d761150fc 100644
--- a/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
@@ -1,11 +1,14 @@
-$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc,v 1.2 2023/01/24 17:57:09 nia Exp $
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc,v 1.3 2025/12/24 15:26:41 ryoon Exp $
* Fix build under NetBSD 9 and older.
The older NetBSD's sys/videoio.h does not have v4l2_capability.device_caps.
+* On NetBSD, some uvideo(4) devices are not usable. They returns
+ fmt.pixelformat as zero from VIDIOC_ENUM_FMT. Exclude unsupported devices
+ in early stage.
---- 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.orig 2025-12-05 17:43:20.000000000 +0000
+++ third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc
-@@ -77,6 +77,7 @@ int32_t VideoCaptureModuleV4L2::Init(con
+@@ -90,18 +90,28 @@ int32_t VideoCaptureModuleV4L2::Init(con
if ((fd = open(device, O_RDONLY)) != -1) {
// query device capabilities
struct v4l2_capability cap;
@@ -13,7 +16,23 @@ $NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_video__captur
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
+ (const char*)deviceUniqueIdUTF8,
+ strlen((const char*)deviceUniqueIdUTF8)) ==
+ 0) { // match with device id
+- close(fd);
+- found = true;
+- break; // fd matches with device unique id supplied
++ struct v4l2_fmtdesc fmt;
++ memset(&fmt, 0, sizeof(fmt));
++ fmt.index = 0;
++ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ if (ioctl(fd, VIDIOC_ENUM_FMT, &fmt) == 0) {
++ if (fmt.pixelformat != 0) {
++ close(fd);
++ found = true;
++ break; // fd matches with device unique id supplied
++ }
++ }
}
}
}
diff --git a/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build
new file mode 100644
index 0000000000..4c3a8bcb4a
--- /dev/null
+++ b/librewolf/patches/patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build
@@ -0,0 +1,40 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_video__capture__internal__impl__gn_moz.build,v 1.1 2025/12/24 15:26:41 ryoon Exp $
+
+--- third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build.orig 2025-12-02 15:13:29.385557469 +0000
++++ third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build
+@@ -282,7 +282,7 @@ if CONFIG["OS_TARGET"] == "Android" and
+ "-msse2"
+ ]
+
+-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
+@@ -299,7 +299,7 @@ if CONFIG["TARGET_CPU"] == "aarch64" and
+ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc"
+ ]
+
+-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"):
++if CONFIG["TARGET_CPU"] == "arm" and CONFIG["OS_TARGET"] == "Linux":
+
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
+ DEFINES["_GNU_SOURCE"] = True
+@@ -316,7 +316,7 @@ if CONFIG["TARGET_CPU"] == "arm" and (CO
+ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.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"
+@@ -337,7 +337,7 @@ if CONFIG["TARGET_CPU"] == "x86" and (CO
+ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.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
diff --git a/librewolf/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc b/librewolf/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
deleted file mode 100644
index 5ebcd61054..0000000000
--- a/librewolf/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc,v 1.2 2022/01/17 10:22:54 tnn 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 {
Home |
Main Index |
Thread Index |
Old Index