From 57ca3177d2a513bfd1cd73e6742a35efadc49cd1 Mon Sep 17 00:00:00 2001 From: Christoph Moench-Tegeder Date: Mon, 24 Jul 2023 23:59:11 +0200 Subject: [PATCH] www/firefox: update to 116.0 (rc1) Release Notes (soon): https://www.mozilla.org/en-US/firefox/116.0/releasenotes/ --- www/firefox/Makefile | 5 +- www/firefox/distinfo | 6 +- www/firefox/files/patch-bug1427152 | 10 - www/firefox/files/patch-bug1559213 | 42 +- www/firefox/files/patch-libwebrtc-generated | 476 ++++++++++++------ www/firefox/files/patch-pipewire_init | 33 +- ...-python_mozbuild_mozbuild_gn__processor.py | 16 +- ...t_compontents_processtools_procinfo__bsd.c | 104 ++++ 8 files changed, 489 insertions(+), 203 deletions(-) delete mode 100644 www/firefox/files/patch-bug1427152 create mode 100644 www/firefox/files/patch-toolkit_compontents_processtools_procinfo__bsd.c diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 02feda8ec50c2..fa09ddf95316c 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,6 +1,5 @@ PORTNAME= firefox -DISTVERSION= 115.0.2 -PORTREVISION= 1 +DISTVERSION= 116.0 PORTEPOCH= 2 CATEGORIES= www wayland MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \ @@ -12,7 +11,7 @@ COMMENT= Web browser based on the browser portion of Mozilla WWW= https://www.mozilla.com/firefox BUILD_DEPENDS= nspr>=4.32:devel/nspr \ - nss>=3.90:security/nss \ + nss>=3.91:security/nss \ icu>=73.1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=7.3.0:print/harfbuzz \ diff --git a/www/firefox/distinfo b/www/firefox/distinfo index 824870067b85a..6d86b97f55295 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1689020718 -SHA256 (firefox-115.0.2.source.tar.xz) = 6b2844124c13b4bd9d97ac7f5840f3e957b7631659591f3bea1ac9a89bee1654 -SIZE (firefox-115.0.2.source.tar.xz) = 506385780 +TIMESTAMP = 1690232273 +SHA256 (firefox-116.0.source.tar.xz) = 2160d681e7dcfd16361d2c482f759eb16c7da3f53dd718a838e825f4dea6c33b +SIZE (firefox-116.0.source.tar.xz) = 518964476 diff --git a/www/firefox/files/patch-bug1427152 b/www/firefox/files/patch-bug1427152 deleted file mode 100644 index 49bd5a581ac81..0000000000000 --- a/www/firefox/files/patch-bug1427152 +++ /dev/null @@ -1,10 +0,0 @@ ---- modules/libpref/Preferences.cpp.orig 2023-05-11 21:42:41 UTC -+++ modules/libpref/Preferences.cpp -@@ -6126,6 +6126,7 @@ static const PrefListEntry sDynamicPrefOverrideList[]{ - PREF_LIST_ENTRY("logging.config.LOG_FILE"), - PREF_LIST_ENTRY("media.audio_loopback_dev"), - PREF_LIST_ENTRY("media.decoder-doctor."), -+ PREF_LIST_ENTRY("media.cubeb.backend"), - PREF_LIST_ENTRY("media.cubeb.output_device"), - PREF_LIST_ENTRY("media.getusermedia.fake-camera-name"), - PREF_LIST_ENTRY("media.hls.server.url"), diff --git a/www/firefox/files/patch-bug1559213 b/www/firefox/files/patch-bug1559213 index 49bbb0fb05ff8..516328d61aca2 100644 --- a/www/firefox/files/patch-bug1559213 +++ b/www/firefox/files/patch-bug1559213 @@ -11,10 +11,10 @@ Date: Thu Jun 13 11:53:00 2019 -0700 4 files changed, 34 insertions(+), 3 deletions(-) diff --git config/external/moz.build config/external/moz.build -index ab77121..75595d9 100644 +index a0877c9d717e..5caa2036e0ec 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: +@@ -45,8 +45,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: external_dirs += ["media/libvpx"] if CONFIG["MOZ_AV1"]: @@ -27,10 +27,10 @@ index ab77121..75595d9 100644 if not CONFIG["MOZ_SYSTEM_PNG"]: external_dirs += ["media/libpng"] diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index a1b58eb..65729f9 100644 +index d9489c8f15e4..4d2f15e18c1c 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild -@@ -1289,6 +1289,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: +@@ -1291,6 +1291,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: 'proxy.h', ] @@ -46,10 +46,10 @@ index a1b58eb..65729f9 100644 system_headers += [ 'vpx_mem/vpx_mem.h', diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build -index 8509aec..eb6f129 100644 +index c71f22a22eee..efbd523b1225 100644 --- dom/media/platforms/moz.build +++ dom/media/platforms/moz.build -@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]: +@@ -80,6 +80,11 @@ if CONFIG["MOZ_AV1"]: "agnostic/AOMDecoder.cpp", "agnostic/DAV1DDecoder.cpp", ] @@ -62,33 +62,33 @@ index 8509aec..eb6f129 100644 if CONFIG["MOZ_OMX"]: EXPORTS += [ diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build -index 0069865..e806fc8 100644 ---- media/ffvpx/libavcodec/moz.build.orig +index 5675c28234a1..56344e5e4c98 100644 +--- media/ffvpx/libavcodec/moz.build +++ media/ffvpx/libavcodec/moz.build -@@ -108,10 +108,14 @@ - 'vp9prob.c', - 'vp9recon.c' +@@ -109,10 +109,14 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']: + 'vp9recon.c', + 'vpx_rac.c', ] - USE_LIBS += [ - 'dav1d', - 'media_libdav1d_asm', - ] + if CONFIG["MOZ_SYSTEM_AV1"]: -+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] -+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] ++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] + else: -+ USE_LIBS += [ -+ 'dav1d', -+ 'media_libdav1d_asm', -+ ] - if CONFIG['MOZ_WAYLAND']: ++ USE_LIBS += [ ++ 'dav1d', ++ 'media_libdav1d_asm', ++ ] + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": LOCAL_INCLUDES += ['/media/mozva'] SOURCES += [ diff --git toolkit/moz.configure toolkit/moz.configure -index 0069865..e806fc8 100644 +index 2e56fa46ce59..23e30935c4bc 100644 --- toolkit/moz.configure +++ toolkit/moz.configure -@@ -523,7 +523,23 @@ def av1(value): +@@ -745,7 +745,23 @@ def av1(value): return True @@ -113,7 +113,7 @@ index 0069865..e806fc8 100644 def dav1d_asm(target): if target.cpu in ("aarch64", "x86", "x86_64"): return True -@@ -539,6 +555,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) +@@ -761,6 +777,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) set_define("MOZ_DAV1D_ASM", dav1d_asm) set_config("MOZ_AV1", av1) set_define("MOZ_AV1", av1) diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated index 2f46714ce495a..5f4d18be3d854 100644 --- a/www/firefox/files/patch-libwebrtc-generated +++ b/www/firefox/files/patch-libwebrtc-generated @@ -1,7 +1,7 @@ -commit ddd5c82284f974ce7fc5857e2a3061a83ed45094 +commit 22b0397dd637396ffdc5a0fe913cdcc1b7ba7b9b Author: Christoph Moench-Tegeder - regenerate FreeBSD libwebrtc patch for Firefox 115 + regenerate FreeBSD libwebrtc patch for Firefox 116 diff --git third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build index c3f52293bf1b..46d0a26b3591 100644 @@ -13138,7 +13138,7 @@ index 1908dc466677..888e6cd29d2b 100644 Library("field_trial_based_config_gn") diff --git third_party/libwebrtc/api/transport/goog_cc_gn/moz.build third_party/libwebrtc/api/transport/goog_cc_gn/moz.build -index b438b01c9f76..b4bf72798b33 100644 +index 6125806b93a0..b4bf72798b33 100644 --- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build +++ third_party/libwebrtc/api/transport/goog_cc_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -13163,7 +13163,7 @@ index b438b01c9f76..b4bf72798b33 100644 FINAL_LIBRARY = "webrtc" -@@ -43,180 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,181 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -13183,6 +13183,7 @@ index b438b01c9f76..b4bf72798b33 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -15948,7 +15949,7 @@ index decf74cfbedb..4c16ea3d2ae3 100644 Library("encoded_image_gn") diff --git third_party/libwebrtc/api/video/frame_buffer_gn/moz.build third_party/libwebrtc/api/video/frame_buffer_gn/moz.build -index 7a31ccedc72e..01a2a71c9623 100644 +index 7576f10c5c3b..01a2a71c9623 100644 --- third_party/libwebrtc/api/video/frame_buffer_gn/moz.build +++ third_party/libwebrtc/api/video/frame_buffer_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -15973,7 +15974,7 @@ index 7a31ccedc72e..01a2a71c9623 100644 FINAL_LIBRARY = "webrtc" -@@ -43,180 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,181 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -15993,6 +15994,7 @@ index 7a31ccedc72e..01a2a71c9623 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -19861,7 +19863,7 @@ index 6e6ab8ff7de5..28b53698939f 100644 Library("video_codecs_api_gn") diff --git third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build -index c9836b7b0116..1be3d8d2cff3 100644 +index 361543a104dd..1be3d8d2cff3 100644 --- third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -19886,7 +19888,7 @@ index c9836b7b0116..1be3d8d2cff3 100644 FINAL_LIBRARY = "webrtc" -@@ -43,180 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,181 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -19906,6 +19908,7 @@ index c9836b7b0116..1be3d8d2cff3 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -20677,7 +20680,7 @@ index ee505ec8852a..e7a97d4d85e3 100644 Library("audio_frame_operations_gn") diff --git third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build -index ade930c107f0..148769984dcc 100644 +index 4307f8342cf0..148769984dcc 100644 --- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build +++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -20702,7 +20705,7 @@ index ade930c107f0..148769984dcc 100644 FINAL_LIBRARY = "webrtc" -@@ -52,180 +62,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,181 +62,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -20722,6 +20725,7 @@ index ade930c107f0..148769984dcc 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -22331,7 +22335,7 @@ index 101cc096c354..db8671bd8a10 100644 Library("rtp_interfaces_gn") diff --git third_party/libwebrtc/call/rtp_receiver_gn/moz.build third_party/libwebrtc/call/rtp_receiver_gn/moz.build -index 4a67ac908095..06947d77d001 100644 +index f480482035e1..06947d77d001 100644 --- third_party/libwebrtc/call/rtp_receiver_gn/moz.build +++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -22356,7 +22360,7 @@ index 4a67ac908095..06947d77d001 100644 FINAL_LIBRARY = "webrtc" -@@ -45,180 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,181 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -22376,6 +22380,7 @@ index 4a67ac908095..06947d77d001 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -22542,7 +22547,7 @@ index 4a67ac908095..06947d77d001 100644 Library("rtp_receiver_gn") diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build -index 99122e269600..c29148b84f8d 100644 +index 52c4be0298ec..c29148b84f8d 100644 --- third_party/libwebrtc/call/rtp_sender_gn/moz.build +++ third_party/libwebrtc/call/rtp_sender_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -22567,7 +22572,7 @@ index 99122e269600..c29148b84f8d 100644 FINAL_LIBRARY = "webrtc" -@@ -45,180 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,181 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -22587,6 +22592,7 @@ index 99122e269600..c29148b84f8d 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -23514,7 +23520,7 @@ index 04d8ea56823e..2420d6b05b3a 100644 - Library("common_audio_c_arm_asm_gn") diff --git third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build -index 4ade815eaf3d..bafd0444d592 100644 +index bb32b976d963..bafd0444d592 100644 --- third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -23555,7 +23561,7 @@ index 4ade815eaf3d..bafd0444d592 100644 "/third_party/libwebrtc/common_audio/signal_processing/filter_ma_fast_q12.c", "/third_party/libwebrtc/common_audio/signal_processing/get_hanning_window.c", "/third_party/libwebrtc/common_audio/signal_processing/get_scaling_square.c", -@@ -81,236 +93,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -81,243 +93,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -23693,6 +23699,13 @@ index 4ade815eaf3d..bafd0444d592 100644 - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - +-if CONFIG["CPU_ARCH"] == "riscv64": +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", +- "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" +- ] +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True @@ -23732,11 +23745,12 @@ index 4ade815eaf3d..bafd0444d592 100644 - ] - -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CFLAGS += [ -- "-msse2" -- ] -- ++if CONFIG["CPU_ARCH"] == "x86": + + CFLAGS += [ + "-msse2" + ] + - OS_LIBS += [ - "android_support" - ] @@ -23747,7 +23761,8 @@ index 4ade815eaf3d..bafd0444d592 100644 - ] - -if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": -- ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" @@ -23769,12 +23784,11 @@ index 4ade815eaf3d..bafd0444d592 100644 - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CFLAGS += [ - "-msse2" - ] - +- +- CFLAGS += [ +- "-msse2" +- ] +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True - DEFINES["_GNU_SOURCE"] = True - @@ -23787,8 +23801,7 @@ index 4ade815eaf3d..bafd0444d592 100644 - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - DEFINES["_GNU_SOURCE"] = True -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +- - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" @@ -25807,7 +25820,7 @@ index 13785e1c90b5..1f876a0c4821 100644 Library("fft_size_256_gn") diff --git third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build -index 86e8bb195287..7fd37387bf8c 100644 +index 16bb5784fdc4..7fd37387bf8c 100644 --- third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build +++ third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -25843,7 +25856,7 @@ index 86e8bb195287..7fd37387bf8c 100644 if not CONFIG["MOZ_DEBUG"]: DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" -@@ -39,211 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,217 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -25962,6 +25975,12 @@ index 86e8bb195287..7fd37387bf8c 100644 - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - +-if CONFIG["CPU_ARCH"] == "riscv64": +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" +- ] +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True @@ -49353,7 +49372,7 @@ index 3188f9057cf4..3d4123fe9245 100644 Library("vad_gn") diff --git third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build -index b4738197183c..70906ddfce2b 100644 +index dad1ea662095..70906ddfce2b 100644 --- third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build @@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -49378,7 +49397,7 @@ index b4738197183c..70906ddfce2b 100644 FINAL_LIBRARY = "webrtc" -@@ -45,180 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,181 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -49398,6 +49417,7 @@ index b4738197183c..70906ddfce2b 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -49768,7 +49788,7 @@ index 673e3b28ebc0..18ef7216ba3d 100644 Library("alr_detector_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build -index 0a7053cdc2b5..d549b16faaf1 100644 +index cacce96f8838..d549b16faaf1 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build @@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -49793,7 +49813,7 @@ index 0a7053cdc2b5..d549b16faaf1 100644 FINAL_LIBRARY = "webrtc" -@@ -45,180 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,181 +55,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -49813,6 +49833,7 @@ index 0a7053cdc2b5..d549b16faaf1 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -50190,7 +50211,7 @@ index a75ba289fcc7..a37a5a617b4d 100644 Library("estimators_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build -index 5a9a2ff159d1..7dd9df879aeb 100644 +index c792c01f32b3..7dd9df879aeb 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build @@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -50215,7 +50236,7 @@ index 5a9a2ff159d1..7dd9df879aeb 100644 FINAL_LIBRARY = "webrtc" -@@ -44,180 +54,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,181 +54,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -50235,6 +50256,7 @@ index 5a9a2ff159d1..7dd9df879aeb 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -51635,7 +51657,7 @@ index e5085dddc7cc..1e2eae1bb0e5 100644 Library("send_side_bwe_gn") diff --git third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build -index 0f02a2523d3e..e107dc439687 100644 +index 7303066f89fd..e107dc439687 100644 --- third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -51660,7 +51682,7 @@ index 0f02a2523d3e..e107dc439687 100644 FINAL_LIBRARY = "webrtc" -@@ -43,180 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,181 +53,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -51680,6 +51702,7 @@ index 0f02a2523d3e..e107dc439687 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -52199,7 +52222,7 @@ index 06e178901e14..8c38587543bd 100644 - Library("desktop_capture_differ_sse2_gn") diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build -index 98561c261af8..a655376d372a 100644 +index d556763c7a51..a655376d372a 100644 --- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build @@ -14,11 +14,21 @@ AllowCompilerWarnings() @@ -52224,7 +52247,7 @@ index 98561c261af8..a655376d372a 100644 FINAL_LIBRARY = "webrtc" -@@ -70,348 +80,28 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -70,436 +80,28 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -52351,6 +52374,7 @@ index 98561c261af8..a655376d372a 100644 - "dxgi", - "iphlpapi", - "secur32", +- "shcore", - "winmm" - ] - @@ -52460,6 +52484,35 @@ index 98561c261af8..a655376d372a 100644 - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - +-if CONFIG["CPU_ARCH"] == "riscv64": +- +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_USE_X11"] = True +- +- OS_LIBS += [ +- "X11", +- "Xcomposite", +- "Xdamage", +- "Xext", +- "Xfixes", +- "Xrandr", +- "Xrender", +- "Xtst" +- ] +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" +- ] +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True @@ -52560,9 +52613,8 @@ index 98561c261af8..a655376d372a 100644 - SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" - ] -+if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD": - - UNIFIED_SOURCES += [ +- +- UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", @@ -52570,34 +52622,9 @@ index 98561c261af8..a655376d372a 100644 - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_null.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_null.cc" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True -@@ -427,91 +117,8 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_T - "Xtst" - ] - -- UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", -- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True @@ -52626,7 +52653,7 @@ index 98561c261af8..a655376d372a 100644 - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["CPU_ARCH"] == "arm" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True @@ -52641,7 +52668,33 @@ index 98561c261af8..a655376d372a 100644 - "Xrender", - "Xtst" - ] -- ++if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD": + + UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", +- "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" ++ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_null.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_null.cc" + ] + +-if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_USE_X11"] = True +@@ -515,33 +117,8 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGE + "Xtst" + ] + - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", @@ -52674,7 +52727,7 @@ index 98561c261af8..a655376d372a 100644 ] UNIFIED_SOURCES += [ -@@ -524,7 +131,9 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TA +@@ -554,7 +131,9 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TA "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", @@ -52766,7 +52819,7 @@ index c1f487a75c4c..000000000000 - -Library("desktop_capture_objc_gn") diff --git third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build -index 6daa8be7ae1a..d75c3ca29539 100644 +index 3425de316975..d75c3ca29539 100644 --- third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build +++ third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -52791,7 +52844,7 @@ index 6daa8be7ae1a..d75c3ca29539 100644 FINAL_LIBRARY = "webrtc" -@@ -49,142 +59,20 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,146 +59,20 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -52884,6 +52937,10 @@ index 6daa8be7ae1a..d75c3ca29539 100644 - - DEFINES["USE_X11"] = "1" - +-if CONFIG["CPU_ARCH"] == "riscv64": +- +- DEFINES["USE_X11"] = "1" +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True @@ -53684,7 +53741,7 @@ index 27033613552f..0aeb0b97b0db 100644 Library("interval_budget_gn") diff --git third_party/libwebrtc/modules/pacing/pacing_gn/moz.build third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -index 49d5881a3b37..010c64914b95 100644 +index a6c94f62609f..010c64914b95 100644 --- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build +++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -53709,7 +53766,7 @@ index 49d5881a3b37..010c64914b95 100644 FINAL_LIBRARY = "webrtc" -@@ -50,180 +60,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,181 +60,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -53729,6 +53786,7 @@ index 49d5881a3b37..010c64914b95 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -54618,7 +54676,7 @@ index 67966cf7a9e3..6ed3a251e50c 100644 Library("rtp_rtcp_format_gn") diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build -index 545b4d32c1d9..e9342cc76a40 100644 +index cde6cd406467..8777095f3316 100644 --- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build +++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build @@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -54643,7 +54701,7 @@ index 545b4d32c1d9..e9342cc76a40 100644 FINAL_LIBRARY = "webrtc" -@@ -95,180 +105,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -97,181 +107,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -54663,6 +54721,7 @@ index 545b4d32c1d9..e9342cc76a40 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -55829,10 +55888,10 @@ index 0046075b68b4..8d216e646134 100644 Library("utility_gn") diff --git third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build -index 0efb49460601..a6ab11c23960 100644 +index e64763f2ee81..d4b1d0888a7d 100644 --- third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build +++ third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build -@@ -12,11 +12,21 @@ AllowCompilerWarnings() +@@ -14,11 +14,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True @@ -55854,21 +55913,18 @@ index 0efb49460601..a6ab11c23960 100644 FINAL_LIBRARY = "webrtc" -@@ -30,6 +40,13 @@ LOCAL_INCLUDES += [ - "/tools/profiler/public" +@@ -33,6 +43,10 @@ LOCAL_INCLUDES += [ ] -+UNIFIED_SOURCES += [ + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc", + "/third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc", + "/third_party/libwebrtc/modules/video_capture/linux/video_capture_linux.cc", -+ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc" -+] -+ - if not CONFIG["MOZ_DEBUG"]: ++ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc", + "/third_party/libwebrtc/modules/video_capture/video_capture_options.cc" + ] - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" -@@ -39,206 +56,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,282 +59,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -56006,6 +56062,10 @@ index 0efb49460601..a6ab11c23960 100644 -if CONFIG["CPU_ARCH"] == "arm": - +- CXXFLAGS += [ +- "-mfpu=neon" +- ] +- - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True @@ -56043,6 +56103,10 @@ index 0efb49460601..a6ab11c23960 100644 - -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": - +- CXXFLAGS += [ +- "-msse2" +- ] +- - OS_LIBS += [ - "android_support" - ] @@ -56050,17 +56114,49 @@ index 0efb49460601..a6ab11c23960 100644 -if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +- LOCAL_INCLUDES += [ +- "/gfx/angle/checkout/include/", +- "/third_party/drm/drm/", +- "/third_party/drm/drm/include/", +- "/third_party/drm/drm/include/libdrm/", +- "/third_party/gbm/gbm/", +- "/third_party/libepoxy/libepoxy/include/", +- "/third_party/pipewire/" +- ] - -- CXXFLAGS += [ -- "-mfpu=neon" +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" - ] - +-if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - +- LOCAL_INCLUDES += [ +- "/gfx/angle/checkout/include/", +- "/third_party/drm/drm/", +- "/third_party/drm/drm/include/", +- "/third_party/drm/drm/include/libdrm/", +- "/third_party/gbm/gbm/", +- "/third_party/libepoxy/libepoxy/include/", +- "/third_party/pipewire/" +- ] +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" +- ] +- -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["CPU_ARCH"] == "x86": @@ -56069,13 +56165,49 @@ index 0efb49460601..a6ab11c23960 100644 ] - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": +- LOCAL_INCLUDES += [ +- "/gfx/angle/checkout/include/", +- "/third_party/drm/drm/", +- "/third_party/drm/drm/include/", +- "/third_party/drm/drm/include/libdrm/", +- "/third_party/gbm/gbm/", +- "/third_party/libepoxy/libepoxy/include/", +- "/third_party/pipewire/" +- ] +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" +- ] +- +-if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True +- +- LOCAL_INCLUDES += [ +- "/gfx/angle/checkout/include/", +- "/third_party/drm/drm/", +- "/third_party/drm/drm/include/", +- "/third_party/drm/drm/include/libdrm/", +- "/third_party/gbm/gbm/", +- "/third_party/libepoxy/libepoxy/include/", +- "/third_party/pipewire/" +- ] +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", +- "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" +- ] + DEFINES["USE_X11"] = "1" Library("video_capture_internal_impl_gn") @@ -58745,10 +58877,10 @@ index 580529c54a58..5362bea2a05c 100644 + DEFINES["USE_X11"] = "1" Library("svc_rate_allocator_gn") -diff --git third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build -index 1caa58b13ffd..1fe3fc027e55 100644 ---- third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build -+++ third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build +diff --git third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build +index a167a068b34a..165a217477fb 100644 +--- third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True @@ -58944,7 +59076,7 @@ index 1caa58b13ffd..1fe3fc027e55 100644 - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("codec_timer_gn") + Library("decode_time_percentile_filter_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build index d74b4c376a81..c37c18b0e42e 100644 --- third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build @@ -60372,7 +60504,7 @@ index 9b89c3175ffd..a43d3b87df85 100644 Library("video_codec_interface_gn") diff --git third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build -index 18ab528a5a35..f2f678fb0d1e 100644 +index 1505ee19362d..9eba28938355 100644 --- third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -60397,7 +60529,7 @@ index 18ab528a5a35..f2f678fb0d1e 100644 FINAL_LIBRARY = "webrtc" -@@ -59,181 +69,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -57,181 +67,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -60584,7 +60716,7 @@ index 18ab528a5a35..f2f678fb0d1e 100644 Library("video_coding_gn") diff --git third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build -index ab7dafa925ce..deedbe512b88 100644 +index 6e83554f9b13..deedbe512b88 100644 --- third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -60609,7 +60741,7 @@ index ab7dafa925ce..deedbe512b88 100644 FINAL_LIBRARY = "webrtc" -@@ -54,180 +64,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,181 +64,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -60629,6 +60761,7 @@ index ab7dafa925ce..deedbe512b88 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -60995,7 +61128,7 @@ index a31368bc624d..537f3d9fe0f5 100644 Library("webrtc_libvpx_interface_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build -index 5047b3580bab..92b1a296d219 100644 +index 70a6c615c6d1..92b1a296d219 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -61020,7 +61153,7 @@ index 5047b3580bab..92b1a296d219 100644 FINAL_LIBRARY = "webrtc" -@@ -46,180 +56,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,181 +56,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -61040,6 +61173,7 @@ index 5047b3580bab..92b1a296d219 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -61406,7 +61540,7 @@ index f05efa9f5bb9..fb174b5b0de7 100644 Library("webrtc_vp8_scalability_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build -index a0dc50088a1f..faf71b356c4f 100644 +index 7bdf47883470..faf71b356c4f 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -61431,7 +61565,7 @@ index a0dc50088a1f..faf71b356c4f 100644 FINAL_LIBRARY = "webrtc" -@@ -48,180 +58,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,181 +58,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -61451,6 +61585,7 @@ index a0dc50088a1f..faf71b356c4f 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -62041,7 +62176,7 @@ index 48aba2c13119..1680842fab69 100644 Library("webrtc_vp9_helpers_gn") diff --git third_party/libwebrtc/moz.build third_party/libwebrtc/moz.build -index 09cc9769bf1e..7579b40c86b7 100644 +index e559ad62cd7b..9197eaa6c68f 100644 --- third_party/libwebrtc/moz.build +++ third_party/libwebrtc/moz.build @@ -262,6 +262,8 @@ DIRS += [ @@ -62053,7 +62188,7 @@ index 09cc9769bf1e..7579b40c86b7 100644 "/third_party/libwebrtc/modules/module_api_gn", "/third_party/libwebrtc/modules/module_api_public_gn", "/third_party/libwebrtc/modules/module_fec_api_gn", -@@ -456,183 +458,14 @@ DIRS += [ +@@ -456,86 +458,14 @@ DIRS += [ "/third_party/libwebrtc/webrtc_gn" ] @@ -62097,12 +62232,13 @@ index 09cc9769bf1e..7579b40c86b7 100644 - ] - -if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": -- -- DIRS += [ -- "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", -- "/third_party/libwebrtc/common_audio/common_audio_neon_gn" -- ] -- ++if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "FreeBSD": + + DIRS += [ + "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", + "/third_party/libwebrtc/common_audio/common_audio_neon_gn" + ] + -if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": - - DIRS += [ @@ -62137,15 +62273,14 @@ index 09cc9769bf1e..7579b40c86b7 100644 - ] - -if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": -- -- DIRS += [ -- "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", -- "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", -- "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", -- "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", -- "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" -- ] -- ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": + + DIRS += [ + "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", +@@ -545,104 +475,7 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" + ] + -if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": - - DIRS += [ @@ -62227,27 +62362,45 @@ index 09cc9769bf1e..7579b40c86b7 100644 - ] - -if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "WINNT": -+if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "FreeBSD": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn" - ] - +- +- DIRS += [ +- "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", +- "/third_party/libwebrtc/common_audio/common_audio_neon_gn" +- ] +- -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "WINNT": -+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", -@@ -642,7 +475,7 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "WINNT": - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - +- +- DIRS += [ +- "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", +- "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", +- "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", +- "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", +- "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" +- ] +- -if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT": +if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": DIRS += [ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", +@@ -651,17 +484,3 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT": + "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" + ] +- +-if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DIRS += [ +- "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", +- "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" +- ] +- +-if CONFIG["CPU_ARCH"] == "riscv64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DIRS += [ +- "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", +- "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" +- ] diff --git third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build index d30e26fa8e66..384b3d8d2a9b 100644 --- third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build @@ -82721,7 +82874,7 @@ index 75df83a0ce58..b9dd43747840 100644 Library("system_wrappers_gn") diff --git third_party/libwebrtc/test/rtp_test_utils_gn/moz.build third_party/libwebrtc/test/rtp_test_utils_gn/moz.build -index c02fce36c9a3..adae028f86db 100644 +index 056a722f366d..adae028f86db 100644 --- third_party/libwebrtc/test/rtp_test_utils_gn/moz.build +++ third_party/libwebrtc/test/rtp_test_utils_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -82746,7 +82899,7 @@ index c02fce36c9a3..adae028f86db 100644 FINAL_LIBRARY = "webrtc" -@@ -39,168 +49,15 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,169 +49,15 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -82766,6 +82919,7 @@ index c02fce36c9a3..adae028f86db 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -87478,7 +87632,7 @@ index bac3c415a85e..087012313675 100644 Library("rnn_vad_gn") diff --git third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build -index cdf3afe0d5e8..a45836895947 100644 +index 64c074df80bf..a45836895947 100644 --- third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build +++ third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -87503,7 +87657,7 @@ index cdf3afe0d5e8..a45836895947 100644 FINAL_LIBRARY = "webrtc" -@@ -52,180 +62,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,181 +62,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -87523,6 +87677,7 @@ index cdf3afe0d5e8..a45836895947 100644 - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - @@ -89962,7 +90117,7 @@ index 56b5fd181389..e71b467261f6 100644 Library("unique_timestamp_counter_gn") diff --git third_party/libwebrtc/video/video_gn/moz.build third_party/libwebrtc/video/video_gn/moz.build -index 339c0caed506..5f87c7f5a820 100644 +index 1d771a2ac3ce..e7b59e68ba4d 100644 --- third_party/libwebrtc/video/video_gn/moz.build +++ third_party/libwebrtc/video/video_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -89987,7 +90142,7 @@ index 339c0caed506..5f87c7f5a820 100644 FINAL_LIBRARY = "webrtc" -@@ -65,181 +75,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -64,181 +74,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -90999,7 +91154,7 @@ index 0e5a20b2d558..8f98c5d580a3 100644 - Library("video_stream_encoder_interface_gn") diff --git third_party/libwebrtc/webrtc_gn/moz.build third_party/libwebrtc/webrtc_gn/moz.build -index 9a853f620964..d905c264b009 100644 +index 8019e9939b56..d905c264b009 100644 --- third_party/libwebrtc/webrtc_gn/moz.build +++ third_party/libwebrtc/webrtc_gn/moz.build @@ -12,11 +12,21 @@ AllowCompilerWarnings() @@ -91024,7 +91179,7 @@ index 9a853f620964..d905c264b009 100644 FINAL_LIBRARY = "webrtc" -@@ -39,157 +49,14 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,158 +49,14 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -91142,6 +91297,7 @@ index 9a853f620964..d905c264b009 100644 - "ole32", - "oleaut32", - "secur32", +- "shcore", - "strmiids", - "user32", - "winmm" @@ -91184,7 +91340,7 @@ index 9a853f620964..d905c264b009 100644 DEFINES["USE_X11"] = "1" -@@ -204,37 +71,4 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +@@ -205,57 +71,4 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": "Xtst" ] @@ -91204,21 +91360,41 @@ index 9a853f620964..d905c264b009 100644 -if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" +- ] +- -if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" +- ] +- -if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" +- ] +- -if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True +- +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" +- ] - Library("webrtc_gn") diff --git a/www/firefox/files/patch-pipewire_init b/www/firefox/files/patch-pipewire_init index 04cd4c495cc30..0af5db3626566 100644 --- a/www/firefox/files/patch-pipewire_init +++ b/www/firefox/files/patch-pipewire_init @@ -3,10 +3,10 @@ Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 49b64845100b..283c387db770 100644 +index 1872a8684132..7e519f9e9cbb 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -402,7 +402,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( +@@ -417,7 +417,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( pw_stream_node_id_ = stream_node_id; @@ -16,7 +16,7 @@ index 49b64845100b..283c387db770 100644 pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -index 3b829959aca8..9bdcdf1ffd51 100644 +index ffba13775363..da6a828a21ee 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc @@ -36,7 +36,7 @@ TestScreenCastStreamProvider::TestScreenCastStreamProvider(Observer* observer, @@ -29,7 +29,7 @@ index 3b829959aca8..9bdcdf1ffd51 100644 pw_main_loop_ = pw_thread_loop_new("pipewire-test-main-loop", nullptr); diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs -index 139a8c37a551..9fe131d8daa6 100644 +index c3abf05b386f..a994c218f5a5 100644 --- third_party/libwebrtc/modules/portal/pipewire.sigs +++ third_party/libwebrtc/modules/portal/pipewire.sigs @@ -15,7 +15,7 @@ pw_loop * pw_loop_new(const spa_dict *props); @@ -41,8 +41,21 @@ index 139a8c37a551..9fe131d8daa6 100644 const char* pw_get_library_version(); // properties.h +diff --git third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index f2680b28162c..03476a5fffd0 100644 +--- third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -252,7 +252,7 @@ void PipeWireSession::InitPipeWire(int fd) { + } + + bool PipeWireSession::StartPipeWire(int fd) { +- pw_init(/*argc=*/nullptr, /*argv=*/nullptr); ++ pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr); + + pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); + diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp -index fbeeb8e5a760..46f768790946 100644 +index b8068296745e..7e8be3dc764f 100644 --- third_party/pipewire/libpipewire/mozpipewire.cpp +++ third_party/pipewire/libpipewire/mozpipewire.cpp @@ -58,7 +58,7 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop, @@ -51,19 +64,19 @@ index fbeeb8e5a760..46f768790946 100644 static int (*pw_core_disconnect_fn)(struct pw_core *core); -static void (*pw_init_fn)(int *argc, char **argv[]); +static void (*pipewire_init_fn)(int *argc, char **argv[]); + static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy); static void (*pw_stream_add_listener_fn)(struct pw_stream *stream, struct spa_hook *listener, - const struct pw_stream_events *events, -@@ -101,7 +101,7 @@ bool IsPwLibraryLoaded() { +@@ -103,7 +103,7 @@ bool IsPwLibraryLoaded() { IS_FUNC_LOADED(pw_context_destroy_fn) && IS_FUNC_LOADED(pw_context_new_fn) && IS_FUNC_LOADED(pw_core_disconnect_fn) && - IS_FUNC_LOADED(pw_init_fn) && + IS_FUNC_LOADED(pipewire_init_fn) && + IS_FUNC_LOADED(pw_proxy_destroy_fn) && IS_FUNC_LOADED(pw_stream_add_listener_fn) && IS_FUNC_LOADED(pw_stream_connect_fn) && - IS_FUNC_LOADED(pw_stream_disconnect_fn) && -@@ -142,7 +142,7 @@ bool LoadPWLibrary() { +@@ -146,7 +146,7 @@ bool LoadPWLibrary() { GET_FUNC(pw_context_destroy, pwLib); GET_FUNC(pw_context_new, pwLib); GET_FUNC(pw_core_disconnect, pwLib); @@ -72,7 +85,7 @@ index fbeeb8e5a760..46f768790946 100644 GET_FUNC(pw_stream_add_listener, pwLib); GET_FUNC(pw_stream_connect, pwLib); GET_FUNC(pw_stream_disconnect, pwLib); -@@ -220,12 +220,12 @@ pw_core_disconnect(struct pw_core *core) +@@ -226,12 +226,12 @@ pw_core_disconnect(struct pw_core *core) } void diff --git a/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py b/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py index 98af67e370926..5b6f401be2b4b 100644 --- a/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py +++ b/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py @@ -1,6 +1,8 @@ ---- python/mozbuild/mozbuild/gn_processor.py.orig 2022-11-03 22:19:40.000000000 +0100 -+++ python/mozbuild/mozbuild/gn_processor.py 2022-11-07 21:11:42.596355000 +0100 -@@ -166,6 +166,7 @@ +diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py +index a1b8367fc11b..fe1087270fc0 100644 +--- python/mozbuild/mozbuild/gn_processor.py ++++ python/mozbuild/mozbuild/gn_processor.py +@@ -183,6 +183,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target): } oses = { "android": "Android", @@ -8,7 +10,7 @@ "linux": "Linux", "mac": "Darwin", "openbsd": "OpenBSD", -@@ -662,15 +663,15 @@ +@@ -733,16 +734,16 @@ def main(): vars_set = [] for is_debug in (True, False): @@ -24,11 +26,13 @@ + if target_os in ("android", "freebsd", "linux", "win"): target_cpus.append("x86") - if target_os == "linux": +- target_cpus.extend(["ppc64", "riscv64"]) + if target_os in ("freebsd", "linux"): - target_cpus.append("ppc64") ++ target_cpus.append("ppc64") for target_cpu in target_cpus: vars = { -@@ -679,7 +680,7 @@ + "host_cpu": "x64", +@@ -750,7 +751,7 @@ def main(): "target_cpu": target_cpu, "target_os": target_os, } diff --git a/www/firefox/files/patch-toolkit_compontents_processtools_procinfo__bsd.c b/www/firefox/files/patch-toolkit_compontents_processtools_procinfo__bsd.c new file mode 100644 index 0000000000000..e2e9a3cc88f45 --- /dev/null +++ b/www/firefox/files/patch-toolkit_compontents_processtools_procinfo__bsd.c @@ -0,0 +1,104 @@ +diff --git toolkit/components/processtools/ProcInfo_bsd.cpp toolkit/components/processtools/ProcInfo_bsd.cpp +index a6ff4881940c..f041ed5e50ce 100644 +--- toolkit/components/processtools/ProcInfo_bsd.cpp ++++ toolkit/components/processtools/ProcInfo_bsd.cpp +@@ -18,6 +18,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + + namespace mozilla { + +@@ -50,25 +53,39 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync( + } + for (const auto& request : aRequests) { + size_t size; ++#ifdef __FreeBSD__ ++ int mib[4]; ++ int mibsize = 4; ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_PID | KERN_PROC_INC_THREAD; ++ mib[3] = request.pid; ++#else + int mib[6]; ++ int mibsize = 6; + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PID | KERN_PROC_SHOW_THREADS; + mib[3] = request.pid; + mib[4] = sizeof(kinfo_proc); + mib[5] = 0; +- if (sysctl(mib, 6, nullptr, &size, nullptr, 0) == -1) { ++#endif ++ if (sysctl(mib, mibsize, nullptr, &size, nullptr, 0) == -1) { + // Can't get info for this process. Skip it. + continue; + } + ++#ifdef __FreeBSD__ ++ auto procs = MakeUniqueFallible(size / sizeof(kinfo_proc)); ++#else + mib[5] = size / sizeof(kinfo_proc); + auto procs = MakeUniqueFallible(mib[5]); ++#endif + if (!procs) { + result.SetReject(NS_ERROR_OUT_OF_MEMORY); + return result; + } +- if (sysctl(mib, 6, procs.get(), &size, nullptr, 0) == -1 && ++ if (sysctl(mib, mibsize, procs.get(), &size, nullptr, 0) == -1 && + errno != ENOMEM) { + continue; + } +@@ -84,19 +101,34 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync( + bool found = false; + for (size_t i = 0; i < size / sizeof(kinfo_proc); i++) { + const auto& p = procs[i]; ++#ifdef __FreeBSD__ ++ if (i == 0) { ++#else + if (p.p_tid == -1) { ++#endif + // This is the process. + found = true; ++#ifdef __FreeBSD__ ++ info.cpuTime = uint64_t(p.ki_runtime) * 1'000u; ++ info.memory = (p.ki_tsize + p.ki_dsize + p.ki_ssize) * getpagesize(); ++#else + info.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u + + uint64_t(p.p_rtime_usec) * 1'000u; + info.memory = + (p.p_vm_tsize + p.p_vm_dsize + p.p_vm_ssize) * getpagesize(); ++#endif ++ + } else { + // This is one of its threads. + ThreadInfo threadInfo; ++#ifdef __FreeBSD__ ++ threadInfo.tid = p.ki_tid; ++ threadInfo.cpuTime = uint64_t(p.ki_runtime) * 1'000u; ++#else + threadInfo.tid = p.p_tid; + threadInfo.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u + + uint64_t(p.p_rtime_usec) * 1'000u; ++#endif + info.threads.AppendElement(threadInfo); + } + } +diff --git toolkit/components/processtools/moz.build toolkit/components/processtools/moz.build +index b7c164c1b0ac..a41dad52c343 100644 +--- toolkit/components/processtools/moz.build ++++ toolkit/components/processtools/moz.build +@@ -39,7 +39,7 @@ BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"] + # Platform-specific implementations of `ProcInfo`. + toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"] + if toolkit == "gtk" or toolkit == "android": +- if CONFIG["OS_TARGET"] == "OpenBSD": ++ if CONFIG["OS_TARGET"] == "FreeBSD" or CONFIG["OS_TARGET"] == "OpenBSD": + UNIFIED_SOURCES += ["ProcInfo_bsd.cpp"] + else: + UNIFIED_SOURCES += ["ProcInfo_linux.cpp"]