git: 071054744530 - 2025Q1 - mail/thunderbird: update to 137.0 (rc1)

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Thu, 27 Mar 2025 19:18:08 UTC
The branch 2025Q1 has been updated by cmt:

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

commit 07105474453006fc1ab49aeadbd985b6a63467d0
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2025-03-27 19:08:07 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2025-03-27 19:17:25 +0000

    mail/thunderbird: update to 137.0 (rc1)
    
    Release Notes (soon):
      https://www.thunderbird.net/en-US/thunderbird/137.0/releasenotes/
    
    Mention the big upgrade and the new thunderbird-esr port in UPDATING.
    
    (cherry picked from commit 7eb19a67e08cec39e733e1ffd8c63898bdfa7992)
---
 UPDATING                                           |     9 +
 mail/thunderbird/Makefile                          |    24 +-
 mail/thunderbird/distinfo                          |     6 +-
 mail/thunderbird/files/patch-bug1559213            |   131 -
 mail/thunderbird/files/patch-bug1948776            |    50 +
 mail/thunderbird/files/patch-bug847568             |    55 +-
 ...__processor.py => patch-build_gn__processor.py} |    24 +-
 ...patch-gfx_skia_skia_src_core_SkRasterPipeline.h |    13 -
 mail/thunderbird/files/patch-libwebrtc-generated   | 43473 ++++++++++++-------
 ...rd__party_libwebrtc_build_config_BUILDCONFIG.gn |    73 +-
 ...toolkit_components_processtools_procinfo__bsd.c |   104 -
 11 files changed, 27556 insertions(+), 16406 deletions(-)

diff --git a/UPDATING b/UPDATING
index a1936d87b3a8..c19269089168 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,15 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20250327:
+  AFFECTS: users of thunderbird
+  AUTHOR: cmt@FreeBSD.org
+
+  The mail/thunderbird port switched to Thunderbird's new release train,
+  with frequent major releases (ca. 4-weeks-cycle). Users wanting to
+  stay with the 128-releases for now and the ESR releases in general
+  should switch to the mail/thunderbird-esr port.
+
 20250205:
   AFFECTS: users of www/gitlab
   AUTHOR: mfechner@FreeBSD.org
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 5d92378a626c..f1d3664a9d8e 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -1,22 +1,22 @@
 PORTNAME=	thunderbird
-DISTVERSION=	128.9.0
+DISTVERSION=	137.0
 CATEGORIES=	mail news net-im wayland
-MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
-		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}esr-candidates/build1/source
-DISTFILES=	${DISTNAME}esr.source${EXTRACT_SUFX}
+MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
+		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}${DISTVERSIONSUFFIX}-candidates/build1/source
+DISTFILES=	${DISTNAME}.source${EXTRACT_SUFX}
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Mozilla Thunderbird is standalone mail and news that stands above
 WWW=		https://www.mozilla.com/thunderbird/
 
 BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
-		nss>=3.101:security/nss \
+		nss>=3.109:security/nss \
 		libevent>=2.1.8:devel/libevent \
-		harfbuzz>=8.5.0:print/harfbuzz \
+		harfbuzz>=10.1.0:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
-		png>=1.6.43:graphics/png \
+		png>=1.6.45:graphics/png \
 		dav1d>=1.0.0:multimedia/dav1d \
-		libvpx>=1.14.0:multimedia/libvpx \
+		libvpx>=1.15.0:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
 		autoconf2.13:devel/autoconf2.13 \
@@ -26,12 +26,16 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 LIB_DEPENDS=	libjson-c.so:devel/json-c
 
 USE_GECKO=	gecko
-# cannot use system icu: calendar is completely broken by
-# https://unicode-org.atlassian.net/browse/ICU-22132 (fix not in 74.1)
+CONFLICTS_INSTALL=	thunderbird-esr
+# cannot use system icu: too old on 2025Q1
+# before re-enabling, check:
+  # https://unicode-org.atlassian.net/browse/ICU-22132 (fix not in 74.1)
 USE_MOZILLA=	-icu -sqlite
 CFLAGS_powerpc64le=	-DSQLITE_BYTEORDER=1234
 
 USES=		tar:xz
+# helpful when testing beta
+WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
 
 MOZ_OPTIONS=	--enable-application=comm/mail --enable-official-branding
 MOZ_OPTIONS+=	--with-system-bz2 --with-system-jsonc
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 9b42dbb82d04..bbf4305af941 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1742928407
-SHA256 (thunderbird-128.9.0esr.source.tar.xz) = 735579c7fd7018ef16ad3b28ba3f254d957da33435b3b1af945d95fd20f9407b
-SIZE (thunderbird-128.9.0esr.source.tar.xz) = 676939592
+TIMESTAMP = 1743079619
+SHA256 (thunderbird-137.0.source.tar.xz) = e4b103686f264339f322501f4d2591cfd8e90e8c105a1ce9d99941db096c342c
+SIZE (thunderbird-137.0.source.tar.xz) = 719178836
diff --git a/mail/thunderbird/files/patch-bug1559213 b/mail/thunderbird/files/patch-bug1559213
deleted file mode 100644
index ead3425fa70b..000000000000
--- a/mail/thunderbird/files/patch-bug1559213
+++ /dev/null
@@ -1,131 +0,0 @@
-commit 25a5572d5cd137aa6d893e09a00bd39908a59a18
-Author: Christoph Moench-Tegeder <cmt@burggraben.net>
-Date:   Tue Sep 10 22:23:32 2024 +0200
-
-    based on:
-     commit 717bba28411c
-     Author: Jory A. Pratt <anarchy@gentoo.org>
-     Date:   Thu Jun 13 11:53:00 2019 -0700
-    
-         Bug 1559213 - Allow to use system av1 libs instead of bundled.
-
-diff --git config/external/moz.build config/external/moz.build
-index a24b470396cf..547f5f5c9e04 100644
---- config/external/moz.build
-+++ config/external/moz.build
-@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
-     external_dirs += ["media/libvpx"]
- 
- if CONFIG["MOZ_AV1"]:
--    external_dirs += ["media/libaom"]
--    external_dirs += ["media/libdav1d"]
-+    if not CONFIG["MOZ_SYSTEM_AV1"]:
-+        external_dirs += ["media/libaom"]
-+        external_dirs += ["media/libdav1d"]
- 
- if not CONFIG["MOZ_SYSTEM_PNG"]:
-     external_dirs += ["media/libpng"]
-diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
-index 61536cc6e225..29cf635bbb44 100644
---- dom/media/platforms/moz.build
-+++ dom/media/platforms/moz.build
-@@ -71,6 +71,11 @@ if CONFIG["MOZ_AV1"]:
-         "agnostic/AOMDecoder.cpp",
-         "agnostic/DAV1DDecoder.cpp",
-     ]
-+    if CONFIG['MOZ_SYSTEM_AV1']:
-+        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
- 
- if CONFIG["MOZ_OMX"]:
-     EXPORTS += [
-diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
-index 6f09049a6068..90a82a19a9d1 100644
---- media/ffvpx/libavcodec/moz.build
-+++ media/ffvpx/libavcodec/moz.build
-@@ -119,10 +119,16 @@ 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_LIBAOM_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+    else:
-+        USE_LIBS += [
-+            'dav1d',
-+            'media_libdav1d_asm',
-+        ]
-     if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
-         LOCAL_INCLUDES += ['/media/mozva']
-         SOURCES += [
-diff --git media/libopus/moz.build media/libopus/moz.build
-index 943aee79ee99..4ad07e3e98af 100644
---- media/libopus/moz.build
-+++ media/libopus/moz.build
-@@ -58,7 +58,7 @@ if not CONFIG["MOZ_SAMPLE_TYPE_FLOAT32"]:
-     DEFINES["FIXED_POINT"] = 1
-     DEFINES["DISABLE_FLOAT_API"] = True
- 
--if CONFIG["OS_ARCH"] == "Linux":
-+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
-     OS_LIBS += [
-         "m",
-     ]
-diff --git media/libvorbis/moz.build media/libvorbis/moz.build
-index cd17d4f89759..816edd72a000 100644
---- media/libvorbis/moz.build
-+++ media/libvorbis/moz.build
-@@ -45,7 +45,7 @@ LOCAL_INCLUDES += ['lib']
- if CONFIG['OS_ARCH'] == 'SunOS':
-     DEFINES['HAVE_ALLOCA_H'] = True
- 
--if CONFIG["OS_ARCH"] == "Linux":
-+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
-     OS_LIBS += [
-         "m",
-     ]
-diff --git toolkit/moz.configure toolkit/moz.configure
-index 1f85d2831f2f..07294b93f850 100644
---- toolkit/moz.configure
-+++ toolkit/moz.configure
-@@ -883,7 +883,23 @@ def av1(value):
-         return True
- 
- 
--@depends(target, when=av1 & compile_environment)
-+option("--with-system-av1",
-+       help="Use system av1 (located with pkgconfig)")
-+
-+system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
-+                                       when="--with-system-av1")
-+
-+system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1",
-+                                         when="--with-system-av1")
-+
-+@depends(system_libaom_info, system_libdav1d_info)
-+def system_av1(system_libaom_info, system_libdav1d_info):
-+    has_av1_libs = False
-+    if system_libaom_info and system_libdav1d_info:
-+        has_av1_libs = True
-+    return has_av1_libs
-+
-+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
- def dav1d_asm(target):
-     if target.cpu in ("aarch64", "x86", "x86_64"):
-         return True
-@@ -899,6 +915,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)
-+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
- 
- # JXL Image Codec Support
- # ==============================================================
diff --git a/mail/thunderbird/files/patch-bug1948776 b/mail/thunderbird/files/patch-bug1948776
new file mode 100644
index 000000000000..d969a28a0dec
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1948776
@@ -0,0 +1,50 @@
+commit 43b044fe8adaccb46868ac00c70a4e7a5d354a9c
+Author: Christoph Moench-Tegeder <cmt@burggraben.net>
+
+    Bug 1948776 - handle non-existence of MAP_NORESERVE for FreeBSD, r=afranchuk,jld,nika
+    
+    The MAP_NORESERVE flag does not exist in FreeBSD. As the minimally-
+    invasive workaround, I decided to remove that flag directly in the
+    mmap() calls, instead of defining our own MAP_NORESERVE as 0
+    possibly far away and not obviously connected to these places.
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D238531
+
+diff --git ipc/glue/SharedMemoryPlatform_posix.cpp ipc/glue/SharedMemoryPlatform_posix.cpp
+index 61121bcbaf8d..b31f2200e8e6 100644
+--- ipc/glue/SharedMemoryPlatform_posix.cpp
++++ ipc/glue/SharedMemoryPlatform_posix.cpp
+@@ -447,8 +447,12 @@ bool Platform::Protect(char* aAddr, size_t aSize, Access aAccess) {
+ }
+ 
+ void* Platform::FindFreeAddressSpace(size_t aSize) {
+-  void* memory = mmap(nullptr, aSize, PROT_NONE,
+-                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
++#ifndef __FreeBSD__
++  constexpr int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++#else
++  constexpr int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++#endif
++  void* memory = mmap(nullptr, aSize, PROT_NONE, flags, -1, 0);
+   if (memory == MAP_FAILED) {
+     return nullptr;
+   }
+diff --git ipc/glue/SharedMemory_posix.cpp ipc/glue/SharedMemory_posix.cpp
+index da279f469237..9ed83af4b1f2 100644
+--- ipc/glue/SharedMemory_posix.cpp
++++ ipc/glue/SharedMemory_posix.cpp
+@@ -61,8 +61,12 @@ SharedMemory::Handle SharedMemory::CloneHandle(const Handle& aHandle) {
+ }
+ 
+ void* SharedMemory::FindFreeAddressSpace(size_t size) {
+-  void* memory = mmap(nullptr, size, PROT_NONE,
+-                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
++#ifndef __FreeBSD__
++  constexpr int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++#else
++  constexpr int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++#endif
++  void* memory = mmap(nullptr, size, PROT_NONE, flags, -1, 0);
+   if (memory == MAP_FAILED) {
+     return nullptr;
+   }
diff --git a/mail/thunderbird/files/patch-bug847568 b/mail/thunderbird/files/patch-bug847568
index 2ee46579d43d..f3e7ecbc1a13 100644
--- a/mail/thunderbird/files/patch-bug847568
+++ b/mail/thunderbird/files/patch-bug847568
@@ -1,10 +1,10 @@
-# Allow building against system-wide graphite2/harfbuzz.
+Allow building against system-wide graphite2/harfbuzz
 
 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
-index 0c06f581b33b..10f125be25ab 100644
+index af44c89057fc..c0ac271917fb 100644
 --- config/system-headers.mozbuild
 +++ config/system-headers.mozbuild
-@@ -1307,6 +1307,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
+@@ -1304,6 +1304,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
          "proxy.h",
      ]
  
@@ -25,10 +25,10 @@ index 0c06f581b33b..10f125be25ab 100644
      system_headers += [
          "unicode/calendar.h",
 diff --git dom/base/moz.build dom/base/moz.build
-index 14c9f9dd96fb..bd1c8f241e9b 100644
+index 170d19f09aa9..a47fc8b1193c 100644
 --- dom/base/moz.build
 +++ dom/base/moz.build
-@@ -606,6 +606,9 @@ FINAL_LIBRARY = "xul"
+@@ -620,6 +620,9 @@ FINAL_LIBRARY = "xul"
  if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
      CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
  
@@ -40,7 +40,7 @@ index 14c9f9dd96fb..bd1c8f241e9b 100644
      script="gen-usecounters.py",
 diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
 new file mode 100644
-index 000000000000..24e8d7a03274
+index 000000000000..ed0323eba9d5
 --- /dev/null
 +++ gfx/graphite2/geckoextra/moz.build
 @@ -0,0 +1,21 @@
@@ -104,10 +104,10 @@ index 56ea317bedfc..07dd7f66f1bc 100644
      "thebes",
      "ipc",
 diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
-index c161d24df853..8c7dd395b371 100755
+index b589efde1c5c..47f49e10df70 100755
 --- gfx/skia/generate_mozbuild.py
 +++ gfx/skia/generate_mozbuild.py
-@@ -91,6 +91,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -95,6 +95,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
          '-Wno-unused-private-field',
      ]
  
@@ -118,10 +118,10 @@ index c161d24df853..8c7dd395b371 100755
      LOCAL_INCLUDES += [
          "/gfx/cairo/cairo/src",
 diff --git gfx/skia/moz.build gfx/skia/moz.build
-index 83aa2957a938..0859316a1f09 100644
+index 7fee54534878..ba1a4038e4a0 100644
 --- gfx/skia/moz.build
 +++ gfx/skia/moz.build
-@@ -601,6 +601,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -623,6 +623,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
          '-Wno-unused-private-field',
      ]
  
@@ -132,10 +132,10 @@ index 83aa2957a938..0859316a1f09 100644
      LOCAL_INCLUDES += [
          "/gfx/cairo/cairo/src",
 diff --git gfx/thebes/moz.build gfx/thebes/moz.build
-index fd1fcf236d81..958d3f699ffd 100644
+index 48f2849e2025..7d0a161a91b4 100644
 --- gfx/thebes/moz.build
 +++ gfx/thebes/moz.build
-@@ -293,7 +293,13 @@ if CONFIG["MOZ_WAYLAND"]:
+@@ -295,7 +295,13 @@ if CONFIG["MOZ_WAYLAND"]:
  
  LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
  
@@ -151,7 +151,7 @@ index fd1fcf236d81..958d3f699ffd 100644
  CXXFLAGS += ["-Werror=switch"]
  
 diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
-index 2bbd00415cae..f66bd37695d4 100644
+index 2396210428ee..092baac6f79c 100644
 --- intl/unicharutil/util/moz.build
 +++ intl/unicharutil/util/moz.build
 @@ -24,6 +24,9 @@ UNIFIED_SOURCES += [
@@ -165,10 +165,10 @@ index 2bbd00415cae..f66bd37695d4 100644
  
  GeneratedFile(
 diff --git netwerk/dns/moz.build netwerk/dns/moz.build
-index c926d14707d1..35a3f33e2885 100644
+index 1bb0430f01aa..0360e0f468c0 100644
 --- netwerk/dns/moz.build
 +++ netwerk/dns/moz.build
-@@ -112,6 +112,9 @@ GeneratedFile(
+@@ -111,6 +111,9 @@ GeneratedFile(
      "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
  )
  
@@ -179,10 +179,10 @@ index c926d14707d1..35a3f33e2885 100644
  LOCAL_INCLUDES += [
      "/netwerk/base",
 diff --git old-configure.in old-configure.in
-index 2ca88a20a4b3..88bc9b873eff 100644
+index 1af75c496b15..f1c7d7c48d28 100644
 --- old-configure.in
 +++ old-configure.in
-@@ -1067,6 +1067,27 @@ fi
+@@ -167,6 +167,27 @@ fi
  AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
  AC_SUBST(MOZ_MACBUNDLE_ID)
  
@@ -210,11 +210,24 @@ index 2ca88a20a4b3..88bc9b873eff 100644
  dnl ========================================================
  dnl = Child Process Name for IPC
  dnl ========================================================
+diff --git security/rlbox/moz.build security/rlbox/moz.build
+index 7ad8d076f0f1..835b9d905e03 100644
+--- security/rlbox/moz.build
++++ security/rlbox/moz.build
+@@ -47,6 +47,8 @@ if CONFIG["MOZ_WASM_SANDBOXING_GRAPHITE"]:
+     for k, v in graphite_defines:
+         WASM_DEFINES[k] = v
+     LOCAL_INCLUDES += ["/gfx/graphite2/src"]
++    if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
++      WASM_CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
+ 
+ if CONFIG["MOZ_WASM_SANDBOXING_OGG"]:
+     include("/media/libogg/sources.mozbuild")
 diff --git toolkit/library/moz.build toolkit/library/moz.build
-index 76746f308011..f6844f4c400b 100644
+index ee6051567c8e..c24a5a513bbc 100644
 --- toolkit/library/moz.build
 +++ toolkit/library/moz.build
-@@ -292,6 +292,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
+@@ -298,6 +298,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
  if CONFIG["MOZ_SYSTEM_WEBP"]:
      OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
  
@@ -228,10 +241,10 @@ index 76746f308011..f6844f4c400b 100644
      OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
  
 diff --git toolkit/moz.configure toolkit/moz.configure
-index a060a59f728f..f0778d1ae2d6 100644
+index 1f85d2831f2f..04ce56e2cc0b 100644
 --- toolkit/moz.configure
 +++ toolkit/moz.configure
-@@ -1218,6 +1218,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info):
+@@ -1397,6 +1397,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)
  
diff --git a/mail/thunderbird/files/patch-python_mozbuild_mozbuild_gn__processor.py b/mail/thunderbird/files/patch-build_gn__processor.py
similarity index 70%
rename from mail/thunderbird/files/patch-python_mozbuild_mozbuild_gn__processor.py
rename to mail/thunderbird/files/patch-build_gn__processor.py
index c569b80cad19..fd226c59f59a 100644
--- a/mail/thunderbird/files/patch-python_mozbuild_mozbuild_gn__processor.py
+++ b/mail/thunderbird/files/patch-build_gn__processor.py
@@ -1,13 +1,13 @@
-commit cb7967f55ab2f34635a10da523f277083ebd97a5
-Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
+commit e884ff2873b6ef8f3c8ee0a09e7651f46b3add95
+Author: Christoph Moench-Tegeder <cmt@burggraben.net>
 
-    chase gn_processor.py changes
+    chase gn_processor.py move
 
-diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py
-index 3a9b9e7f3b..656a28ae6a 100644
---- python/mozbuild/mozbuild/gn_processor.py
-+++ python/mozbuild/mozbuild/gn_processor.py
-@@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
+diff --git build/gn_processor.py build/gn_processor.py
+index 2ba8b92c27..962479b228 100644
+--- build/gn_processor.py
++++ build/gn_processor.py
+@@ -186,6 +186,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
      }
      oses = {
          "android": "Android",
@@ -15,7 +15,7 @@ index 3a9b9e7f3b..656a28ae6a 100644
          "linux": "Linux",
          "mac": "Darwin",
          "openbsd": "OpenBSD",
-@@ -742,17 +743,17 @@ def main():
+@@ -780,17 +781,17 @@ def main():
  
      vars_set = []
      for is_debug in (True, False):
@@ -31,14 +31,14 @@ index 3a9b9e7f3b..656a28ae6a 100644
 +            if target_os in ("android", "freebsd", "linux", "win"):
                  target_cpus.append("x86")
 -            if target_os in ("linux", "openbsd"):
-+            if target_os in ("freebsd", "linux", "openbsd"):
++            if target_os in ("linux", "freebsd", "openbsd"):
                  target_cpus.append("riscv64")
 -            if target_os == "linux":
 +            if target_os in ("freebsd", "linux"):
-                 target_cpus.extend(["ppc64", "mipsel", "mips64el"])
+                 target_cpus.extend(["loong64", "ppc64", "mipsel", "mips64el"])
              for target_cpu in target_cpus:
                  vars = {
-@@ -761,7 +762,7 @@ def main():
+@@ -799,7 +800,7 @@ def main():
                      "target_cpu": target_cpu,
                      "target_os": target_os,
                  }
diff --git a/mail/thunderbird/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h b/mail/thunderbird/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h
deleted file mode 100644
index 05cf110b1192..000000000000
--- a/mail/thunderbird/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git gfx/skia/skia/src/core/SkRasterPipeline.h gfx/skia/skia/src/core/SkRasterPipeline.h
-index 2475ea0d398d..67967483656d 100644
---- gfx/skia/skia/src/core/SkRasterPipeline.h
-+++ gfx/skia/skia/src/core/SkRasterPipeline.h
-@@ -27,7 +27,7 @@ struct SkImageInfo;
- struct skcms_TransferFunction;
- 
- #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
--        !defined(SK_CPU_LOONGARCH)
-+        !defined(SK_CPU_LOONGARCH) && !defined(__powerpc__)
-     #define SK_HAS_MUSTTAIL 1
- #else
-     #define SK_HAS_MUSTTAIL 0
diff --git a/mail/thunderbird/files/patch-libwebrtc-generated b/mail/thunderbird/files/patch-libwebrtc-generated
index 6145c12687b7..3fa6e24eb1a1 100644
--- a/mail/thunderbird/files/patch-libwebrtc-generated
+++ b/mail/thunderbird/files/patch-libwebrtc-generated
@@ -1,20 +1,20 @@
-commit b361bce19d6aef88d27c7090d84cb76a67357bbf
+commit 2c7b8d8701b0ef9853f3298ffcf1a4de3dc26ba7
 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
+Date:   Sun Mar 23 19:16:07 2025 +0000
 
-    regenerate FreeBSD libwebrtc patch for Thunderbird 128esr
+    regenerate FreeBSD libwebrtc patch for Thunderbird 137.0
 
 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 2dbd588158..332ca04819 100644
+index 655ef59cba..d54f6dbed5 100644
 --- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
 +++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ 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
@@ -29,7 +29,7 @@ index 2dbd588158..332ca04819 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -41,7 +41,6 @@ index 2dbd588158..332ca04819 100644
 -    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
@@ -68,7 +67,6 @@ index 2dbd588158..332ca04819 100644
 -    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"
@@ -83,7 +81,6 @@ index 2dbd588158..332ca04819 100644
 -    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
@@ -133,6 +130,10 @@ index 2dbd588158..332ca04819 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -215,17 +216,16 @@ index 2dbd588158..332ca04819 100644
  
  Library("resource_adaptation_api_gn")
 diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build
-index df2c86715c..6c4e403f6d 100644
+index d4382d1df1..0a1c7b839d 100644
 --- third_party/libwebrtc/api/array_view_gn/moz.build
 +++ third_party/libwebrtc/api/array_view_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ 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
@@ -240,7 +240,7 @@ index df2c86715c..6c4e403f6d 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,112 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -252,7 +252,6 @@ index df2c86715c..6c4e403f6d 100644
 -    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
@@ -279,7 +278,6 @@ index df2c86715c..6c4e403f6d 100644
 -    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"
@@ -294,7 +292,6 @@ index df2c86715c..6c4e403f6d 100644
 -    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
@@ -340,6 +337,10 @@ index df2c86715c..6c4e403f6d 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -353,7 +354,7 @@ index df2c86715c..6c4e403f6d 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -153,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -154,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -406,17 +407,16 @@ index df2c86715c..6c4e403f6d 100644
 -
  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 4d678a1de7..e163a7c1f4 100644
+index e935019626..b6efeac78e 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()
+@@ -12,11 +12,20 @@ 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
@@ -431,7 +431,7 @@ index 4d678a1de7..e163a7c1f4 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,119 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,120 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -443,7 +443,6 @@ index 4d678a1de7..e163a7c1f4 100644
 -    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
@@ -471,7 +470,6 @@ index 4d678a1de7..e163a7c1f4 100644
 -    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"
@@ -486,7 +484,6 @@ index 4d678a1de7..e163a7c1f4 100644
 -    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
@@ -539,6 +536,10 @@ index 4d678a1de7..e163a7c1f4 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -552,7 +553,7 @@ index 4d678a1de7..e163a7c1f4 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -161,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -162,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -605,17 +606,16 @@ index 4d678a1de7..e163a7c1f4 100644
 -
  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 cbd6f2e6f0..3bfa575693 100644
+index cfb3b6961c..daf2b9c13b 100644
 --- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ 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
@@ -630,7 +630,7 @@ index cbd6f2e6f0..3bfa575693 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -642,7 +642,6 @@ index cbd6f2e6f0..3bfa575693 100644
 -    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
@@ -669,7 +668,6 @@ index cbd6f2e6f0..3bfa575693 100644
 -    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"
@@ -684,7 +682,6 @@ index cbd6f2e6f0..3bfa575693 100644
 -    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
@@ -734,6 +731,10 @@ index cbd6f2e6f0..3bfa575693 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -816,10 +817,10 @@ index cbd6f2e6f0..3bfa575693 100644
  
  Library("aec3_config_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-index 746585483f..33ea9b79d4 100644
+index 589d5a72ef..9311473ef1 100644
 --- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-@@ -12,12 +12,22 @@ AllowCompilerWarnings()
+@@ -12,12 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
@@ -827,7 +828,6 @@ index 746585483f..33ea9b79d4 100644
 +DEFINES["USE_OZONE"] = "1"
  DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "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
@@ -842,7 +842,7 @@ index 746585483f..33ea9b79d4 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,189 +54,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -854,7 +854,6 @@ index 746585483f..33ea9b79d4 100644
 -    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
@@ -881,7 +880,6 @@ index 746585483f..33ea9b79d4 100644
 -    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"
@@ -900,7 +898,6 @@ index 746585483f..33ea9b79d4 100644
 -    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
@@ -957,6 +954,10 @@ index 746585483f..33ea9b79d4 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1038,18 +1039,17 @@ index 746585483f..33ea9b79d4 100644
 +    DEFINES["USE_X11"] = "1"
  
  Library("aec3_factory_gn")
-diff --git third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-index e2561db08f..59da7761dd 100644
---- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-+++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+diff --git third_party/libwebrtc/api/audio/audio_device_gn/moz.build third_party/libwebrtc/api/audio/audio_device_gn/moz.build
+index a727e70ec9..9561144637 100644
+--- third_party/libwebrtc/api/audio/audio_device_gn/moz.build
++++ third_party/libwebrtc/api/audio/audio_device_gn/moz.build
+@@ -12,11 +12,20 @@ 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
@@ -1064,7 +1064,7 @@ index e2561db08f..59da7761dd 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,185 +54,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,112 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1076,7 +1076,6 @@ index e2561db08f..59da7761dd 100644
 -    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
@@ -1103,7 +1102,6 @@ index e2561db08f..59da7761dd 100644
 -    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"
@@ -1118,7 +1116,6 @@ index e2561db08f..59da7761dd 100644
 -    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
@@ -1152,13 +1149,6 @@ index e2561db08f..59da7761dd 100644
 -    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":
@@ -1168,13 +1158,13 @@ index e2561db08f..59da7761dd 100644
  
 -if CONFIG["TARGET_CPU"] == "arm":
 -
--    CXXFLAGS += [
--        "-mfpu=neon"
--    ]
--
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1188,12 +1178,10 @@ index e2561db08f..59da7761dd 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
--
--if CONFIG["TARGET_CPU"] == "x86_64":
--
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
*** 74992 LINES SKIPPED ***