pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/firefox
Module Name: pkgsrc
Committed By: ryoon
Date: Sun Dec 11 13:49:09 UTC 2022
Modified Files:
pkgsrc/www/firefox: Makefile distinfo mozilla-common.mk
pkgsrc/www/firefox/files: replace-moz.build.awk
pkgsrc/www/firefox/patches: patch-modules_fdlibm_src_math__private.h
Added Files:
pkgsrc/www/firefox/patches:
patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
Removed Files:
pkgsrc/www/firefox/patches:
patch-js_src_jit_GenerateAtomicOperations.py
patch-mozglue_misc_SIMD.cpp patch-mozglue_misc_SIMD__avx2.cpp
patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
Log Message:
firefox: Update to 107.0.1
107.0.1:
Fixed
* Fixed an issue with accessing some sites reliably in Private Browsing mode
or Strict ETP due to anti-adblockers (bug 1717806).
* Fixed an issue where Color Management was not available for some users (bug
1799391).
* Fixed an issue with text overlapping in the Settings Menu for some locales
(bug 1800379).
* Fixed an incompatibility with the new Windows 11 22H2 Suggested Actions
feature resulting in hangs when copying phone number links (bug 1798098).
* Fixed an issue where the DevTools UI is not accessible when an alert dialog
is displayed (bug 1801840).
107.0:
New
* Improved the performance of the instance when Microsoft's IME and Defender
retrieve the URL of a focused document in Windows 11 version 22H2.
* Power profiling -- visualizing performance data recorded from web browsers
-- is now also supported on Linux and Mac with Intel CPUs, in addition to
Windows 11 and Apple Silicon.
Fixed
* Various security fixes.
Security fixes:
#CVE-2022-45403: Service Workers might have learned size of cross-origin media
files
#CVE-2022-45404: Fullscreen notification bypass
#CVE-2022-45405: Use-after-free in InputStream implementation
#CVE-2022-45406: Use-after-free of a JavaScript Realm
#CVE-2022-45407: Loading fonts on workers was not thread-safe
#CVE-2022-45408: Fullscreen notification bypass via windowName
#CVE-2022-45409: Use-after-free in Garbage Collection
#CVE-2022-45410: ServiceWorker-intercepted requests bypassed SameSite cookie
policy
#CVE-2022-45411: Cross-Site Tracing was possible via non-standard override
headers
#CVE-2022-45412: Symlinks may resolve to partially uninitialized buffers
#CVE-2022-45413: SameSite=Strict cookies could have been sent cross-site via
intent URLs
#CVE-2022-40674: Use-after-free vulnerability in expat
#CVE-2022-45415: Downloaded file may have been saved with malicious extension
#CVE-2022-45416: Keystroke Side-Channel Leakage
#CVE-2022-45417: Service Workers in Private Browsing Mode may have been written
to disk
#CVE-2022-45418: Custom mouse cursor could have been drawn over browser UI
#CVE-2022-45419: Deleting a security exception did not take effect immediately
#CVE-2022-45420: Iframe contents could be rendered outside the iframe
#CVE-2022-45421: Memory safety bugs fixed in Firefox 107 and Firefox ESR 102.5
106.0.5:
Fixed
* Addresses a crash experienced by users with Intel Gemini Lake CPUs.
106.0.4:
Fixed
* Fixed an issue with DRM Video playback (bug 1797292).
* Fixed broken layout of datetime input when switching types (bug 1797139).
* Fixes Firefox hanging when there is a Direct3D device reset (bug 1792115).
106.0.3:
Fixed
* Fix a startup crash for some users on Windows (bug 1797464).
* Fixed an incompatibility with the new Windows 11 22H2 Suggested Actions
feature resulting in hangs when copying text on a web page (bug 1774285).
106.0.2:
Fixed
* Fix missing content on some PDF forms (bug 1794351).
* Fix column width for the Notification sub-panel in Settings (bug 1793558).
* Fix a browser freeze with accessibility enabled on some sites such as the
Proxmox Web UI (bug 1793748).
* Fix page reloading not working with Firefox View and not refreshing synced
data (bug 1792680 and bug 1794474).
* Fix browser not opening if installed from the Windows Store (Bug 1796391).
106.0.1:
Fixed
* Addresses a crash experienced by users with AMD Zen 1 CPUs. (bug 1796126)
106.0:
New
* It is now possible to edit PDFs: including writing text, drawing, and
adding signatures.
* Setting Firefox as your default browser now also makes it the default PDF
application on Windows systems.
* You can now pin private windows to your Windows taskbar on Window 10 and
Windows 11 for simpler access. Also, private windows have been redesigned
to increase the feeling of privacy.
* Swipe-to-navigate (two fingers on a touchpad swiped left or right to
perform history back or forward) now works for Linux users on Wayland.
* Text Recognition in images allows users on macOS 10.15 and higher to
extract text from the selected image (such as a meme or screenshot).
Extracted text is copied to the clipboard in order to share, store, or
search -- without needing to manually retype everything.
+ This feature is compatible with "VoiceOver," the built-in macOS
screen reader.
+ For more information, check out our SUMO article.
* "Firefox View" helps you get back to content you previously discovered. A
pinned tab allows you to find and open recently closed tabs on your current
device, access tabs from other devices (via our "Tab Pickup" feature),
and change the look of the browser (with Colorways).
+ For more information, read our SUMO article.
* With the launch of the "Independent Voices" collection, Firefox is
introducing 18 new "Colorways." You can now access a "Colorways" modal
experience via "Firefox View"; each new color is accompanied with a
bespoke graphic and a text description that speaks to its deeper meaning.
The collection will be available through Jan 16.
+ For more information, check out our SUMO article.
Fixed
* Various security fixes.
Security fixes:
#CVE-2022-42927: Same-origin policy violation could have leaked cross-origin
URLs
#CVE-2022-42928: Memory Corruption in JS Engine
#CVE-2022-42929: Denial of Service via window.print
#CVE-2022-42930: Race condition in DOM Workers
#CVE-2022-42931: Username saved to a plaintext file on disk
#CVE-2022-42932: Memory safety bugs fixed in Firefox 106 and Firefox ESR 102.4
To generate a diff of this commit:
cvs rdiff -u -r1.541 -r1.542 pkgsrc/www/firefox/Makefile
cvs rdiff -u -r1.484 -r1.485 pkgsrc/www/firefox/distinfo
cvs rdiff -u -r1.242 -r1.243 pkgsrc/www/firefox/mozilla-common.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/www/firefox/files/replace-moz.build.awk
cvs rdiff -u -r1.3 -r0 \
pkgsrc/www/firefox/patches/patch-js_src_jit_GenerateAtomicOperations.py
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h
cvs rdiff -u -r1.1 -r0 pkgsrc/www/firefox/patches/patch-mozglue_misc_SIMD.cpp \
pkgsrc/www/firefox/patches/patch-mozglue_misc_SIMD__avx2.cpp \
pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
cvs rdiff -u -r0 -r1.1 \
pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc \
pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/firefox/Makefile
diff -u pkgsrc/www/firefox/Makefile:1.541 pkgsrc/www/firefox/Makefile:1.542
--- pkgsrc/www/firefox/Makefile:1.541 Wed Nov 23 16:21:19 2022
+++ pkgsrc/www/firefox/Makefile Sun Dec 11 13:49:09 2022
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.541 2022/11/23 16:21:19 adam Exp $
+# $NetBSD: Makefile,v 1.542 2022/12/11 13:49:09 ryoon Exp $
FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
-MOZ_BRANCH= 105.0
-MOZ_BRANCH_MINOR= .3
+MOZ_BRANCH= 107.0
+MOZ_BRANCH_MINOR= .1
DISTNAME= firefox-${FIREFOX_VER}.source
PKGNAME= ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
-PKGREVISION= 1
CATEGORIES= www
MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
EXTRACT_SUFX= .tar.xz
@@ -59,6 +58,8 @@ CONFIGURE_ARGS+= --enable-application=br
# 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
@@ -105,8 +106,9 @@ MOZILLA_BRANDING= unofficial
.endif
pre-configure:
- cd ${WRKSRC} && autoconf
- cd ${WRKSRC}/js/src && autoconf
+# 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
Index: pkgsrc/www/firefox/distinfo
diff -u pkgsrc/www/firefox/distinfo:1.484 pkgsrc/www/firefox/distinfo:1.485
--- pkgsrc/www/firefox/distinfo:1.484 Sat Oct 8 21:18:55 2022
+++ pkgsrc/www/firefox/distinfo Sun Dec 11 13:49:09 2022
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.484 2022/10/08 21:18:55 ryoon Exp $
+$NetBSD: distinfo,v 1.485 2022/12/11 13:49:09 ryoon Exp $
-BLAKE2s (firefox-105.0.3.source.tar.xz) = 64757132ada61d6a258bfa43c121884181be4702d064b10e5ca40f6666d096e8
-SHA512 (firefox-105.0.3.source.tar.xz) = 8a60ed26f3a6e3fafb1eb13a8daf067056d011a17835310f8ce814b86121014796e790f611058aea75334428529028a2e29ba81d9d2653e09517dc7c3cf48e76
-Size (firefox-105.0.3.source.tar.xz) = 484942048 bytes
+BLAKE2s (firefox-107.0.1.source.tar.xz) = b2c7102eacf1f3aa7b3919f2af5511e3a5da245a81a8d26437dc39951d4336d3
+SHA512 (firefox-107.0.1.source.tar.xz) = e57e4bfcecbcc6dbe73f23577a14a2998c8c3f3d602f85ea06f99e0974e78481b9f7bdb019cb4e9733e59f56be1407edd64a2adb7b284bb4a87b46b1e2295dea
+Size (firefox-107.0.1.source.tar.xz) = 508678860 bytes
BLAKE2s (nodejs-output-95.0.tgz) = c44b37d3605524a49157002f01c29f568f04194b0e635bc312de7ffdeb9a74c9
SHA512 (nodejs-output-95.0.tgz) = 2faf326f4e100b66f8597c365cc2eb5d0eee26aae92a7e2446891f2178041aa71ba16eae37000acacd43a657025ec11c18db73b112f5c49cc21cdb882da6d798
Size (nodejs-output-95.0.tgz) = 200627 bytes
@@ -20,7 +20,6 @@ SHA1 (patch-ipc_chromium_src_base_messag
SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 6cdd0fe60455eab8f9846257c2bfea207f19478b
SHA1 (patch-js_src_jit_FlushICache.cpp) = b7536050d06e87612fbedc7ce269b5f120eb0ce9
-SHA1 (patch-js_src_jit_GenerateAtomicOperations.py) = ef01ad195ca50b41936f90492ee440ada9e5cafa
SHA1 (patch-js_src_jit_ProcessExecutableMemory.cpp) = fad103cc698f9828ad58f742231984ec2bc27605
SHA1 (patch-js_src_util_NativeStack.cpp) = a0a16d8d8d78d3cc3f4d2a508586f1a7821f7dba
SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = 0501fdcae11568ae4ea78e0d2f6b3750b7a67d47
@@ -30,14 +29,13 @@ SHA1 (patch-media_libcubeb_src_cubeb__ja
SHA1 (patch-media_libcubeb_src_moz.build) = e027285ea24f2626b1328d4c6e9a31ed55445f99
SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
SHA1 (patch-media_libtheora_lib_info.c) = f6dbf536d73859a1ff78304c2e9f6a6f74dac01f
-SHA1 (patch-modules_fdlibm_src_math__private.h) = 61a54ae2deda36d66b6d9515471ecc7980d3b574
-SHA1 (patch-mozglue_misc_SIMD.cpp) = 2ab2e32c46c22deae29c346ad6eac2fb1bfa8065
-SHA1 (patch-mozglue_misc_SIMD__avx2.cpp) = d5bd662b620d981a6288f89026339f24c809e56d
+SHA1 (patch-modules_fdlibm_src_math__private.h) = e20b6c23011d7123cbbd64a500eb8ce8c426620e
SHA1 (patch-mozglue_misc_Uptime.cpp) = daefe25ef1ebc8e4d3735017b9e8ac68c4710a00
SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = 13e512c7ee9fa1e14ba415d62fa853e5fbfc91c0
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_video__capture_linux_device__info__linux.cc) = 2e951d7d91934751608e99628fc144632d8a3b5c
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc) = a38d6a7acbc8ba8060f2cf3c8325f7d96902b3f0
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc) = 28b9bb8b078b479d9cc0f8ccdc4d04e5a281c1b9
SHA1 (patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc) = b90e22b50879f7adcc1da3a993f52c0701b720f8
SHA1 (patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c) = 9b8ce4b823fd06951aac59bdb4a5642f256b8e3f
SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = bd7b2a0f2407c3ab95515b2f143c41c3ca6fb0c4
Index: pkgsrc/www/firefox/mozilla-common.mk
diff -u pkgsrc/www/firefox/mozilla-common.mk:1.242 pkgsrc/www/firefox/mozilla-common.mk:1.243
--- pkgsrc/www/firefox/mozilla-common.mk:1.242 Sun Dec 4 10:34:07 2022
+++ pkgsrc/www/firefox/mozilla-common.mk Sun Dec 11 13:49:09 2022
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.242 2022/12/04 10:34:07 wiz Exp $
+# $NetBSD: mozilla-common.mk,v 1.243 2022/12/11 13:49:09 ryoon Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -18,7 +18,7 @@ ALL_ENV+= PYTHON3=${PYTHONBIN}
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --prefix=${PREFIX}
-USE_TOOLS+= pkg-config perl gmake autoconf213 gm4 unzip zip
+USE_TOOLS+= pkg-config perl gmake gm4 unzip zip # autoconf213
UNLIMIT_RESOURCES+= datasize virtualsize
USE_LANGUAGES+= c c++
Index: pkgsrc/www/firefox/files/replace-moz.build.awk
diff -u pkgsrc/www/firefox/files/replace-moz.build.awk:1.1 pkgsrc/www/firefox/files/replace-moz.build.awk:1.2
--- pkgsrc/www/firefox/files/replace-moz.build.awk:1.1 Sat Aug 6 20:47:51 2022
+++ pkgsrc/www/firefox/files/replace-moz.build.awk Sun Dec 11 13:49:09 2022
@@ -9,6 +9,30 @@
print $0;
next;
}
+/^if CONFIG\[\"CPU_ARCH\"\] == \"arm\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"CPU_ARCH\"\] == \"arm\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"CPU_ARCH\"\] == \"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\[\"CPU_ARCH\"\] == \"aarch64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"CPU_ARCH\"\] == \"aarch64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"CPU_ARCH\"\] == \"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\[\"CPU_ARCH\"\] == \"x86\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"CPU_ARCH\"\] == \"x86\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"CPU_ARCH\"\] == \"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\[\"CPU_ARCH\"\] == \"x86_64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{
+ flag = 0;
+ sub(/^if CONFIG\[\"CPU_ARCH\"\] == \"x86_64\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG\[\"CPU_ARCH\"\] == \"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 (flag != 1) {
sub(/^ DEFINES\[\"WEBRTC_LINUX\"\] = True/, " if CONFIG\[\"OS_TARGET\"\] == \"Linux\":\n DEFINES\[\"WEBRTC_LINUX\"\] = True\n else:\n DEFINES\[\"WEBRTC_BSD\"\]
= True");
Index: pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h
diff -u pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h:1.2 pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h:1.3
--- pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h:1.2 Sat Oct 8 21:18:55 2022
+++ pkgsrc/www/firefox/patches/patch-modules_fdlibm_src_math__private.h Sun Dec 11 13:49:09 2022
@@ -1,21 +1,20 @@
-$NetBSD: patch-modules_fdlibm_src_math__private.h,v 1.2 2022/10/08 21:18:55 ryoon Exp $
+$NetBSD: patch-modules_fdlibm_src_math__private.h,v 1.3 2022/12/11 13:49:09 ryoon Exp $
* Fix PR pkg/56457, build failure on NetBSD/i386.
Do not use FreeBSD-specific definition.
---- modules/fdlibm/src/math_private.h.orig 2022-10-07 15:25:41.000000000 +0000
+--- modules/fdlibm/src/math_private.h.orig 2022-11-03 21:19:39.000000000 +0000
+++ modules/fdlibm/src/math_private.h
-@@ -30,10 +30,9 @@
+@@ -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;
--typedef __float_t float_t;
+#include <math.h>
+typedef double_t __double_t;
-+typedef float_t __float_t;
++typedef float_t __float_t;
/*
* The original fdlibm code used statements like:
Added files:
Index: pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc
diff -u /dev/null pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc:1.1
--- /dev/null Sun Dec 11 13:49:09 2022
+++ pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc Sun Dec 11 13:49:09 2022
@@ -0,0 +1,67 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__v4l2.cc,v 1.1 2022/12/11 13:49:09 ryoon Exp $
+
+* Fix buiuld under older NetBSD.
+ 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 2022-10-19 18:00:20.000000000 +0000
++++ third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc
+@@ -193,11 +193,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++;
+@@ -225,11 +227,13 @@ int32_t DeviceInfoV4l2::GetDeviceName(ui
+ for (device_index = 0; device_index < 64; device_index++) {
+ sprintf(device, "/dev/video%d", device_index);
+ 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;
+@@ -307,6 +311,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) {
+@@ -331,6 +336,7 @@ int32_t DeviceInfoV4l2::CreateCapability
+ }
+ }
+ }
++#endif
+ close(fd); // close since this is not the matching device
+ }
+
+@@ -376,11 +382,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/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc
diff -u /dev/null pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc:1.1
--- /dev/null Sun Dec 11 13:49:09 2022
+++ pkgsrc/www/firefox/patches/patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc Sun Dec 11 13:49:09 2022
@@ -0,0 +1,23 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_video__capture__v4l2.cc,v 1.1 2022/12/11 13:49:09 ryoon Exp $
+
+* Fix buiuld under older NetBSD.
+ 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
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index