git: e3410d88a186 - main - www/librewolf: update to 124.0.1.1

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Fri, 29 Mar 2024 17:31:55 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e3410d88a1866421a9cc181555dd870bbbdff4f4

commit e3410d88a1866421a9cc181555dd870bbbdff4f4
Author:     Martin Filla <freebsd@sysctl.cz>
AuthorDate: 2024-03-26 18:53:37 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2024-03-29 17:31:39 +0000

    www/librewolf: update to 124.0.1.1
    
    PR:             277975
    Reported by:    freebsd@sysctl.cz (maintainer)
---
 www/librewolf/Makefile                             |    3 +-
 www/librewolf/distinfo                             |    6 +-
 www/librewolf/files/patch-addon-search             |   20 +-
 www/librewolf/files/patch-bug1878010               |   30 -
 www/librewolf/files/patch-bug847568                |   67 +-
 www/librewolf/files/patch-libwebrtc-generated      | 1240 +++++++++++++-------
 ...patch-python_mozbuild_mozbuild_gn__processor.py |   15 +-
 7 files changed, 858 insertions(+), 523 deletions(-)

diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile
index 3929eda74329..652a61847ef9 100644
--- a/www/librewolf/Makefile
+++ b/www/librewolf/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	librewolf
-DISTVERSION=	123.0.1-1
-PORTREVISION=	1
+DISTVERSION=	124.0.1-1
 CATEGORIES=	www wayland
 MASTER_SITES=	https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${DISTVERSION:R}-1/
 DISTNAME=	${PORTNAME}-${DISTVERSION:R}-1.source.
diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo
index fb7179e55c47..aeea0574a536 100644
--- a/www/librewolf/distinfo
+++ b/www/librewolf/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1710878981
-SHA256 (librewolf-123.0-1.source.tar.gz) = e3209efbddd0c0a79bc62cb9c5cc57b816816bf32a24e8e476e07879c2791314
-SIZE (librewolf-123.0-1.source.tar.gz) = 965610712
+TIMESTAMP = 1711462823
+SHA256 (librewolf-124.0-1.source.tar.gz) = 31c5683d3ce427d42f6c69497a2ded429d292f29af86257f9b15dbdaf5a90d22
+SIZE (librewolf-124.0-1.source.tar.gz) = 972863269
diff --git a/www/librewolf/files/patch-addon-search b/www/librewolf/files/patch-addon-search
index b6dbf7924b43..a0adc808c9fa 100644
--- a/www/librewolf/files/patch-addon-search
+++ b/www/librewolf/files/patch-addon-search
@@ -2,10 +2,10 @@ https://github.com/mozilla/addons/issues/708
 https://github.com/mozilla/addons-frontend/issues/4610
 
 diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js
-index 621900f90fc1..401ef9074bd0 100644
+index 5964d40ca3a3..ed81b06af8d5 100644
 --- browser/app/profile/firefox.js
 +++ browser/app/profile/firefox.js
-@@ -38,7 +38,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true);
+@@ -39,7 +39,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true);
  // Preferences for AMO integration
  pref("extensions.getAddons.cache.enabled", true);
  pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
@@ -14,7 +14,7 @@ index 621900f90fc1..401ef9074bd0 100644
  pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
  pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
  pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
-@@ -204,8 +204,8 @@ pref("app.update.langpack.enabled", true);
+@@ -214,8 +214,8 @@ pref("app.update.langpack.enabled", true);
  //  .. etc ..
  //
  pref("extensions.update.enabled", true);
@@ -26,10 +26,10 @@ index 621900f90fc1..401ef9074bd0 100644
                                              // Themes every day
  
 diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
-index f906f244b658..7bb2eb6697c6 100644
+index e854e04b3ce2..27e8247eb886 100644
 --- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
 +++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs
-@@ -596,7 +596,7 @@ export var AddonRepository = {
+@@ -715,7 +715,7 @@ export var AddonRepository = {
        addon.version = String(aEntry.current_version.version);
        if (Array.isArray(aEntry.current_version.files)) {
          for (let file of aEntry.current_version.files) {
@@ -38,11 +38,11 @@ index f906f244b658..7bb2eb6697c6 100644
              if (file.url) {
                addon.sourceURI = lazy.NetUtil.newURI(file.url);
              }
-diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-index 03186dad43a4..4053fc6f2702 100644
---- toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-@@ -634,7 +634,7 @@ class AddonInternal {
+diff --git toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
+index 5d1d2c19706b..4dcba06a95f4 100644
+--- toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
++++ toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
+@@ -632,7 +632,7 @@ export class AddonInternal {
      // Something is causing errors in here
      try {
        for (let platform of this.targetPlatforms) {
diff --git a/www/librewolf/files/patch-bug1878010 b/www/librewolf/files/patch-bug1878010
deleted file mode 100644
index e247f2d95d7b..000000000000
--- a/www/librewolf/files/patch-bug1878010
+++ /dev/null
@@ -1,30 +0,0 @@
-commit fa2a8be440397b623eab7a414c5685932176ef03
-Author: Andreas Pehrson <apehrson@mozilla.com>
-Date:   Fri Feb 2 18:43:54 2024 +0000
-
-    Bug 1878010 - Fix webrtc::VideoCaptureFactory for BSD. r=grulja,gaston,webrtc-reviewers,mjf
-    
-    Differential Revision: https://phabricator.services.mozilla.com/D200427
-
-diff --git third_party/libwebrtc/modules/video_capture/video_capture_factory.cc third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
-index e085ac2df8a0..2790fbbe1cba 100644
---- third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
-+++ third_party/libwebrtc/modules/video_capture/video_capture_factory.cc
-@@ -24,7 +24,7 @@ rtc::scoped_refptr<VideoCaptureModule> VideoCaptureFactory::Create(
-     const char* deviceUniqueIdUTF8) {
- // This is only implemented on pure Linux and WEBRTC_LINUX is defined for
- // Android as well
--#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID)
-   return nullptr;
- #else
-   return videocapturemodule::VideoCaptureImpl::Create(options,
-@@ -40,7 +40,7 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo(
-     VideoCaptureOptions* options) {
- // This is only implemented on pure Linux and WEBRTC_LINUX is defined for
- // Android as well
--#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID)
-   return nullptr;
- #else
-   return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(options);
diff --git a/www/librewolf/files/patch-bug847568 b/www/librewolf/files/patch-bug847568
index 37619c17f883..95bd181256e8 100644
--- a/www/librewolf/files/patch-bug847568
+++ b/www/librewolf/files/patch-bug847568
@@ -1,10 +1,10 @@
 # Allow building against system-wide graphite2/harfbuzz.
 
 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
-index 07d48e7f9748..a35804b443e5 100644
+index 0c06f581b33b..10f125be25ab 100644
 --- config/system-headers.mozbuild
 +++ config/system-headers.mozbuild
-@@ -1304,6 +1304,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
+@@ -1307,6 +1307,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
          "proxy.h",
      ]
  
@@ -25,10 +25,10 @@ index 07d48e7f9748..a35804b443e5 100644
      system_headers += [
          "unicode/calendar.h",
 diff --git dom/base/moz.build dom/base/moz.build
-index 26fe7e716da8..9015fc360402 100644
+index 14c9f9dd96fb..bd1c8f241e9b 100644
 --- dom/base/moz.build
 +++ dom/base/moz.build
-@@ -608,6 +608,9 @@ FINAL_LIBRARY = "xul"
+@@ -606,6 +606,9 @@ FINAL_LIBRARY = "xul"
  if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
      CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
  
@@ -65,36 +65,6 @@ index 000000000000..24e8d7a03274
 +AllowCompilerWarnings()
 +
 +FINAL_LIBRARY = 'gkmedias'
-diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
-index b91d9c161cc7..a97e6eb20322 100755
---- gfx/graphite2/moz-gr-update.sh
-+++ gfx/graphite2/moz-gr-update.sh
-@@ -1,6 +1,7 @@
- #!/bin/bash
- 
- # Script used to update the Graphite2 library in the mozilla source tree
-+# and bump version for --with-system-graphite2
- 
- # This script lives in gfx/graphite2, along with the library source,
- # but must be run from the top level of the mozilla-central tree.
-@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
- #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
- #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
- 
-+# chase version for --with-system-graphite2
-+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
-+  if /GR2_VERSION_REQUIRE/" old-configure.in
-+
- # summarize what's been touched
- echo Updated to $RELEASE.
- echo Here is what changed in the gfx/graphite2 directory:
- echo
- 
--hg stat gfx/graphite2
-+hg stat old-configure.in gfx/graphite2
- 
- echo
- echo If gfx/graphite2/src/files.mk has changed, please make corresponding
 diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd
 new file mode 100644
 index 000000000000..2a10eb1e2b42
@@ -162,10 +132,10 @@ index 83aa2957a938..0859316a1f09 100644
      LOCAL_INCLUDES += [
          "/gfx/cairo/cairo/src",
 diff --git gfx/thebes/moz.build gfx/thebes/moz.build
-index 97f02d59f51a..04c75cc7234d 100644
+index fd1fcf236d81..958d3f699ffd 100644
 --- gfx/thebes/moz.build
 +++ gfx/thebes/moz.build
-@@ -290,7 +290,13 @@ if CONFIG["MOZ_WAYLAND"]:
+@@ -293,7 +293,13 @@ if CONFIG["MOZ_WAYLAND"]:
  
  LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
  
@@ -195,10 +165,10 @@ index 2bbd00415cae..f66bd37695d4 100644
  
  GeneratedFile(
 diff --git netwerk/dns/moz.build netwerk/dns/moz.build
-index 784a1631fba9..574e739e22a0 100644
+index c926d14707d1..35a3f33e2885 100644
 --- netwerk/dns/moz.build
 +++ netwerk/dns/moz.build
-@@ -102,6 +102,9 @@ GeneratedFile(
+@@ -112,6 +112,9 @@ GeneratedFile(
      "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
  )
  
@@ -209,10 +179,10 @@ index 784a1631fba9..574e739e22a0 100644
  LOCAL_INCLUDES += [
      "/netwerk/base",
 diff --git old-configure.in old-configure.in
-index 86424df3f879..09c0bd470172 100644
+index 2ca88a20a4b3..88bc9b873eff 100644
 --- old-configure.in
 +++ old-configure.in
-@@ -1141,6 +1141,27 @@ fi
+@@ -1067,6 +1067,27 @@ fi
  AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
  AC_SUBST(MOZ_MACBUNDLE_ID)
  
@@ -241,10 +211,10 @@ index 86424df3f879..09c0bd470172 100644
  dnl = Child Process Name for IPC
  dnl ========================================================
 diff --git toolkit/library/moz.build toolkit/library/moz.build
-index da1d8c47f83e..e5fa5d5c45a1 100644
+index 76746f308011..f6844f4c400b 100644
 --- toolkit/library/moz.build
 +++ toolkit/library/moz.build
-@@ -295,6 +295,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
+@@ -292,6 +292,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
  if CONFIG["MOZ_SYSTEM_WEBP"]:
      OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
  
@@ -258,12 +228,12 @@ index da1d8c47f83e..e5fa5d5c45a1 100644
      OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
  
 diff --git toolkit/moz.configure toolkit/moz.configure
-index f93a5d64fec8..6cd072f7aaeb 100644
+index a060a59f728f..f0778d1ae2d6 100644
 --- toolkit/moz.configure
 +++ toolkit/moz.configure
-@@ -1279,6 +1279,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom
-         return False
-     return True
+@@ -1218,6 +1218,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info):
+ set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft)
+ set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft)
  
 +# Graphite2
 +# ==============================================================
@@ -284,6 +254,7 @@ index f93a5d64fec8..6cd072f7aaeb 100644
 +                                    when="--with-system-harfbuzz")
 +
 +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
++
  
- option(
-     "--enable-geckodriver",
+ # WebDriver (HTTP / BiDi)
+ # ==============================================================
diff --git a/www/librewolf/files/patch-libwebrtc-generated b/www/librewolf/files/patch-libwebrtc-generated
index 9e738d51a306..73b01ec37c0c 100644
--- a/www/librewolf/files/patch-libwebrtc-generated
+++ b/www/librewolf/files/patch-libwebrtc-generated
@@ -1,7 +1,7 @@
-commit 51e6b92d3903fe970db280deb69924432107ca55
+commit dc3c9060f191382e543c26328f99a06f10176309
 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
 
-    regenerate FreeBSD libwebrtc patch for Firefox 122
+    regenerate FreeBSD libwebrtc patch for Firefox 124
 
 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 c06f943d1b75..642f867db664 100644
@@ -417,6 +417,212 @@ index e89811c36f3a..935f8560bd05 100644
 -    DEFINES["_GNU_SOURCE"] = True
 -
  Library("array_view_gn")
+diff --git third_party/libwebrtc/api/async_dns_resolver_gn/moz.build third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
+index 5e31fd1734a6..8512989cc3ea 100644
+--- third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
++++ third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
+@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
+ DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
+ DEFINES["RTC_ENABLE_VP9"] = True
++DEFINES["USE_GLIB"] = "1"
++DEFINES["USE_OZONE"] = "1"
++DEFINES["WEBRTC_BSD"] = True
++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
+ DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
+ DEFINES["WEBRTC_LIBRARY_IMPL"] = True
+ DEFINES["WEBRTC_MOZILLA_BUILD"] = True
+ DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
++DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
++DEFINES["_FILE_OFFSET_BITS"] = "64"
++DEFINES["_LARGEFILE64_SOURCE"] = True
++DEFINES["_LARGEFILE_SOURCE"] = True
++DEFINES["__STDC_CONSTANT_MACROS"] = True
++DEFINES["__STDC_FORMAT_MACROS"] = True
+ 
+ FINAL_LIBRARY = "webrtc"
+ 
+@@ -39,119 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+ if CONFIG["MOZ_DEBUG"] == "1":
+ 
+     DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+-
+-if CONFIG["OS_TARGET"] == "Android":
+-
+-    DEFINES["ANDROID"] = True
+-    DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1"
+-    DEFINES["HAVE_SYS_UIO_H"] = True
+-    DEFINES["WEBRTC_ANDROID"] = True
+-    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
+-    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
+-    DEFINES["WEBRTC_LINUX"] = True
+-    DEFINES["WEBRTC_POSIX"] = True
+-    DEFINES["_GNU_SOURCE"] = True
+-    DEFINES["__STDC_CONSTANT_MACROS"] = True
+-    DEFINES["__STDC_FORMAT_MACROS"] = True
+-
+-    OS_LIBS += [
+-        "GLESv2",
+-        "log"
+-    ]
+-
+-if CONFIG["OS_TARGET"] == "Darwin":
+-
+-    DEFINES["WEBRTC_MAC"] = True
+-    DEFINES["WEBRTC_POSIX"] = True
+-    DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+-    DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+-    DEFINES["__STDC_CONSTANT_MACROS"] = True
+-    DEFINES["__STDC_FORMAT_MACROS"] = True
+-
+-if CONFIG["OS_TARGET"] == "Linux":
+-
+-    DEFINES["USE_AURA"] = "1"
+-    DEFINES["USE_GLIB"] = "1"
+-    DEFINES["USE_NSS_CERTS"] = "1"
+-    DEFINES["USE_OZONE"] = "1"
+-    DEFINES["USE_UDEV"] = True
+-    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
+-    DEFINES["WEBRTC_LINUX"] = True
+-    DEFINES["WEBRTC_POSIX"] = True
+-    DEFINES["_FILE_OFFSET_BITS"] = "64"
+-    DEFINES["_LARGEFILE64_SOURCE"] = True
+-    DEFINES["_LARGEFILE_SOURCE"] = True
+-    DEFINES["__STDC_CONSTANT_MACROS"] = True
+-    DEFINES["__STDC_FORMAT_MACROS"] = True
+-
+-if CONFIG["OS_TARGET"] == "OpenBSD":
+-
+-    DEFINES["USE_GLIB"] = "1"
+-    DEFINES["USE_OZONE"] = "1"
+-    DEFINES["USE_X11"] = "1"
+-    DEFINES["WEBRTC_BSD"] = True
+-    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
+-    DEFINES["WEBRTC_POSIX"] = True
+-    DEFINES["_FILE_OFFSET_BITS"] = "64"
+-    DEFINES["_LARGEFILE64_SOURCE"] = True
+-    DEFINES["_LARGEFILE_SOURCE"] = True
+-    DEFINES["__STDC_CONSTANT_MACROS"] = True
+-    DEFINES["__STDC_FORMAT_MACROS"] = True
+-
+-if CONFIG["OS_TARGET"] == "WINNT":
+-
+-    DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True
+-    DEFINES["NOMINMAX"] = True
+-    DEFINES["NTDDI_VERSION"] = "0x0A000000"
+-    DEFINES["PSAPI_VERSION"] = "2"
+-    DEFINES["RTC_ENABLE_WIN_WGC"] = True
+-    DEFINES["UNICODE"] = True
+-    DEFINES["USE_AURA"] = "1"
+-    DEFINES["WEBRTC_WIN"] = True
+-    DEFINES["WIN32"] = True
+-    DEFINES["WIN32_LEAN_AND_MEAN"] = True
+-    DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP"
+-    DEFINES["WINVER"] = "0x0A00"
+-    DEFINES["_ATL_NO_OPENGL"] = True
+-    DEFINES["_CRT_RAND_S"] = True
+-    DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True
+-    DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True
+-    DEFINES["_HAS_EXCEPTIONS"] = "0"
+-    DEFINES["_HAS_NODISCARD"] = True
+-    DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True
+-    DEFINES["_SECURE_ATL"] = True
+-    DEFINES["_UNICODE"] = True
+-    DEFINES["_WIN32_WINNT"] = "0x0A00"
+-    DEFINES["_WINDOWS"] = True
+-    DEFINES["__STD_C"] = True
+-
+-    OS_LIBS += [
+-        "crypt32",
+-        "iphlpapi",
+-        "secur32",
+-        "winmm"
+-    ]
++    DEFINES["_DEBUG"] = True
+ 
+ if CONFIG["TARGET_CPU"] == "aarch64":
+ 
+     DEFINES["WEBRTC_ARCH_ARM64"] = True
+     DEFINES["WEBRTC_HAS_NEON"] = True
+ 
+-if CONFIG["TARGET_CPU"] == "arm":
+-
+-    DEFINES["WEBRTC_ARCH_ARM"] = True
+-    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
+-    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+ if CONFIG["TARGET_CPU"] == "mips32":
+ 
+     DEFINES["MIPS32_LE"] = True
+     DEFINES["MIPS_FPU_LE"] = True
+-    DEFINES["_GNU_SOURCE"] = True
+-
+-if CONFIG["TARGET_CPU"] == "mips64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+ 
+ if CONFIG["TARGET_CPU"] == "x86":
+ 
+@@ -161,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+ 
+     DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
+-
+-    DEFINES["_DEBUG"] = True
+-
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+-
+-    DEFINES["_DEBUG"] = True
+-
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
+-
+-    DEFINES["_DEBUG"] = True
+-
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD":
+-
+-    DEFINES["_DEBUG"] = True
+-
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
+-
+-    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
+-
+-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
+ 
+     DEFINES["USE_X11"] = "1"
+ 
+-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
+-
+-    OS_LIBS += [
+-        "android_support",
+-        "unwind"
+-    ]
+-
+-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
+-
+-    OS_LIBS += [
+-        "android_support"
+-    ]
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+-
+ Library("async_dns_resolver_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
 index 4b9691091908..d217e83eb683 100644
 --- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
@@ -25538,7 +25744,7 @@ index ec4329a9cc6e..4adf2cb0a3ff 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 2a9bfac234f1..58196389a505 100644
+index 1c3cdc16241f..57ae8a9c5502 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()
@@ -25721,20 +25927,12 @@ index 2a9bfac234f1..58196389a505 100644
      UNIFIED_SOURCES += [
          "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
          "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c",
-@@ -250,85 +137,13 @@ if CONFIG["TARGET_CPU"] == "ppc64":
+@@ -250,93 +137,21 @@ if CONFIG["TARGET_CPU"] == "ppc64":
          "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
      ]
  
--if CONFIG["TARGET_CPU"] == "riscv64":
--
--    UNIFIED_SOURCES += [
--        "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
--        "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c",
--        "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
--    ]
+-if CONFIG["TARGET_CPU"] == "x86":
 -
- if CONFIG["TARGET_CPU"] == "x86":
- 
 -    DEFINES["WEBRTC_ENABLE_AVX2"] = True
 -
 -if CONFIG["TARGET_CPU"] == "x86_64":
@@ -25766,12 +25964,14 @@ index 2a9bfac234f1..58196389a505 100644
 -    DEFINES["USE_X11"] = "1"
 -
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64":
--
--    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["TARGET_CPU"] == "riscv64":
+ 
+     UNIFIED_SOURCES += [
+         "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
++        "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c",
+         "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
+     ]
+ 
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    OS_LIBS += [
@@ -25780,7 +25980,8 @@ index 2a9bfac234f1..58196389a505 100644
 -    ]
 -
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
--
++if CONFIG["TARGET_CPU"] == "x86":
+ 
      CFLAGS += [
          "-msse2"
      ]
@@ -25804,14 +26005,13 @@ index 2a9bfac234f1..58196389a505 100644
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
-+    DEFINES["WEBRTC_ENABLE_AVX2"] = True
- 
-     UNIFIED_SOURCES += [
-         "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
-@@ -336,21 +151,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
-         "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
-     ]
- 
+-
+-    UNIFIED_SOURCES += [
+-        "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
+-        "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c",
+-        "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
+-    ]
+-
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    DEFINES["_GNU_SOURCE"] = True
@@ -25820,6 +26020,15 @@ index 2a9bfac234f1..58196389a505 100644
 -        "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c"
 -    ]
 -
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
++    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
+     UNIFIED_SOURCES += [
+         "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
+@@ -344,13 +159,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
+         "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
+     ]
+ 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
 -
 -    CFLAGS += [
@@ -25832,15 +26041,15 @@ index 2a9bfac234f1..58196389a505 100644
  
      UNIFIED_SOURCES += [
          "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
-@@ -358,14 +161,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
+@@ -358,14 +169,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
          "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
      ]
  
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
  
--    DEFINES["_GNU_SOURCE"] = True
--
 -    UNIFIED_SOURCES += [
 -        "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
 -        "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c",
@@ -27977,7 +28186,7 @@ index e65c7c572fc8..e684b91a0664 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 316c1991d5f2..2b74740448a4 100644
+index 618af60da3be..bfb7cde7d729 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()
@@ -28134,18 +28343,12 @@ index 316c1991d5f2..2b74740448a4 100644
      UNIFIED_SOURCES += [
          "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
      ]
-@@ -171,107 +81,28 @@ if CONFIG["TARGET_CPU"] == "ppc64":
+@@ -171,107 +81,34 @@ if CONFIG["TARGET_CPU"] == "ppc64":
          "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
      ]
  
--if CONFIG["TARGET_CPU"] == "riscv64":
--
--    UNIFIED_SOURCES += [
--        "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
--    ]
+-if CONFIG["TARGET_CPU"] == "x86":
 -
- if CONFIG["TARGET_CPU"] == "x86":
- 
 -    DEFINES["WEBRTC_ENABLE_AVX2"] = True
 -
 -if CONFIG["TARGET_CPU"] == "x86_64":
@@ -28177,11 +28380,12 @@ index 316c1991d5f2..2b74740448a4 100644
 -    DEFINES["USE_X11"] = "1"
 -
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64":
--
--    UNIFIED_SOURCES += [
--        "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
--    ]
--
++if CONFIG["TARGET_CPU"] == "riscv64":
+ 
+     UNIFIED_SOURCES += [
+         "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
+     ]
+ 
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    OS_LIBS += [
@@ -28190,7 +28394,8 @@ index 316c1991d5f2..2b74740448a4 100644
 -    ]
 -
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
--
++if CONFIG["TARGET_CPU"] == "x86":
+ 
      CFLAGS += [
          "-msse2"
      ]
@@ -28212,16 +28417,22 @@ index 316c1991d5f2..2b74740448a4 100644
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
+-
+-    UNIFIED_SOURCES += [
+-        "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
+-    ]
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
+-
+-    DEFINES["_GNU_SOURCE"] = True
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
 +    DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
      UNIFIED_SOURCES += [
          "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
      ]
  
--if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
--
--    DEFINES["_GNU_SOURCE"] = True
--
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
 -
 -    CFLAGS += [
@@ -41953,7 +42164,7 @@ index 02b847ed761e..336b06122354 100644
  
  Library("aec_dump_interface_gn")
 diff --git third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build
-index a645dceff4b0..63d92c92ad50 100644
+index 9ff36991fef8..4dec482b58ab 100644
 --- third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build
 +++ third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
@@ -42136,18 +42347,12 @@ index a645dceff4b0..63d92c92ad50 100644
      SOURCES += [
          "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
      ]
-@@ -203,95 +87,28 @@ if CONFIG["TARGET_CPU"] == "ppc64":
+@@ -203,95 +87,34 @@ if CONFIG["TARGET_CPU"] == "ppc64":
          "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
      ]
  
--if CONFIG["TARGET_CPU"] == "riscv64":
--
--    SOURCES += [
--        "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
--    ]
+-if CONFIG["TARGET_CPU"] == "x86":
 -
- if CONFIG["TARGET_CPU"] == "x86":
- 
 -    DEFINES["WEBRTC_ENABLE_AVX2"] = True
 -
 -if CONFIG["TARGET_CPU"] == "x86_64":
@@ -42187,10 +42392,10 @@ index a645dceff4b0..63d92c92ad50 100644
 -
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
 -
-     CXXFLAGS += [
-         "-msse2"
-     ]
- 
+-    CXXFLAGS += [
+-        "-msse2"
+-    ]
+-
 -    OS_LIBS += [
 -        "android_support"
 -    ]
@@ -42206,18 +42411,24 @@ index a645dceff4b0..63d92c92ad50 100644
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    DEFINES["_GNU_SOURCE"] = True
-+    DEFINES["WEBRTC_ENABLE_AVX2"] = True
++if CONFIG["TARGET_CPU"] == "riscv64":
  
      SOURCES += [
          "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
      ]
  
--if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
 -
--    CXXFLAGS += [
--        "-msse2"
+-    SOURCES += [
+-        "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
 -    ]
-+if CONFIG["TARGET_CPU"] == "x86_64":
+-
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
++if CONFIG["TARGET_CPU"] == "x86":
+ 
+     CXXFLAGS += [
+         "-msse2"
+     ]
  
 -    DEFINES["_GNU_SOURCE"] = True
 +    DEFINES["WEBRTC_ENABLE_AVX2"] = True
@@ -42227,15 +42438,19 @@ index a645dceff4b0..63d92c92ad50 100644
      ]
  
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
-+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
++if CONFIG["TARGET_CPU"] == "x86_64":
  
 -    DEFINES["_GNU_SOURCE"] = True
--
--    SOURCES += [
--        "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
--    ]
-+    DEFINES["USE_X11"] = "1"
++    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
+     SOURCES += [
+         "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc"
+     ]
  
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
++
++    DEFINES["USE_X11"] = "1"
++
  Library("aecm_core_gn")
 diff --git third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build
 index f6f4442cfc84..0bf849711117 100644
@@ -56220,7 +56435,7 @@ index e02d81561426..ab560df6adc1 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 22a76e9e761e..a9ffbe84d438 100644
+index 3f0146acbf6f..166be4e7ceb6 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()
@@ -56534,34 +56749,6 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "/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["TARGET_CPU"] == "riscv64":
--
--    DEFINES["USE_X11"] = "1"
--    DEFINES["WEBRTC_USE_X11"] = True
--
--    OS_LIBS += [
--        "X11",
--        "Xcomposite",
--        "Xdamage",
--        "Xext",
--        "Xfixes",
--        "Xrandr",
--        "Xrender"
--    ]
--
--    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/linux/wayland/shared_screencast_stream.cc",
 +        "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc",
 +        "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc"
@@ -56620,6 +56807,34 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc"
 -    ]
 -
+-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64":
+-
+-    DEFINES["USE_X11"] = "1"
+-    DEFINES["WEBRTC_USE_X11"] = True
+-
+-    OS_LIBS += [
+-        "X11",
+-        "Xcomposite",
+-        "Xdamage",
+-        "Xext",
+-        "Xfixes",
+-        "Xrandr",
+-        "Xrender"
+-    ]
+-
+-    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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
 -
      CXXFLAGS += [
@@ -56671,7 +56886,7 @@ index 22a76e9e761e..a9ffbe84d438 100644
      ]
  
      UNIFIED_SOURCES += [
-@@ -505,66 +242,12 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
+@@ -505,38 +242,12 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
          "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc",
          "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc",
          "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc",
@@ -56704,9 +56919,21 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "/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/linux/wayland/shared_screencast_stream.cc",
++        "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc",
++        "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc"
+     ]
+ 
 -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm":
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
+ 
+     DEFINES["USE_X11"] = "1"
+     DEFINES["WEBRTC_USE_X11"] = True
+@@ -564,116 +275,42 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGE
+         "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc"
+     ]
+ 
+-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32":
 -
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_USE_X11"] = True
@@ -56720,8 +56947,9 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "Xrandr",
 -        "Xrender"
 -    ]
--
--    UNIFIED_SOURCES += [
++if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64":
+ 
+     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",
@@ -56732,25 +56960,17 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "/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/linux/wayland/shared_screencast_stream.cc",
-+        "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc",
-+        "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc"
-     ]
- 
--if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32":
-+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
- 
-     DEFINES["USE_X11"] = "1"
-     DEFINES["WEBRTC_USE_X11"] = True
-@@ -592,88 +275,23 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGE
-         "/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["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64":
 -
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_USE_X11"] = True
--
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64":
+ 
 -    OS_LIBS += [
 -        "X11",
 -        "Xcomposite",
@@ -56759,8 +56979,9 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "Xfixes",
 -        "Xrandr",
 -        "Xrender"
--    ]
-+if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64":
++    SOURCES += [
++        "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc"
+     ]
  
      UNIFIED_SOURCES += [
 -        "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc",
@@ -56773,14 +56994,12 @@ index 22a76e9e761e..a9ffbe84d438 100644
 -        "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc",
*** 1144 LINES SKIPPED ***