git: 4b04d64fa547 - 2021Q4 - mail/thunderbird: update to 91.2.0

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Wed, 06 Oct 2021 21:16:11 UTC
The branch 2021Q4 has been updated by cmt:

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

commit 4b04d64fa547e821082905135b47040e5739e3bc
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2021-10-06 21:12:41 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2021-10-06 21:15:55 +0000

    mail/thunderbird: update to 91.2.0
    
    Release Notes:
      https://www.thunderbird.net/en-US/thunderbird/91.2.0/releasenotes/
    
    This brings in Thunderbird 91esr:
    - the calendar is not optional anymore
    - gtk2 is not directly required anymore
    - integrated PDF viewer
    - and much more: https://support.mozilla.org/en-US/kb/new-thunderbird-91
    
    (cherry picked from commit 737c941d23dabb27ac2c98d0c8473400924c5905)
---
 mail/thunderbird/Makefile                          |   20 +-
 mail/thunderbird/distinfo                          |    6 +-
 mail/thunderbird/files/patch-addon-search          |   30 +-
 mail/thunderbird/files/patch-bug1288587            |   42 +-
 mail/thunderbird/files/patch-bug1559213            |   70 +-
 mail/thunderbird/files/patch-bug1612184            |   16 +-
 mail/thunderbird/files/patch-bug1618914            |   43 +-
 mail/thunderbird/files/patch-bug1628567            |   12 +-
 mail/thunderbird/files/patch-bug1694575            |   33 -
 mail/thunderbird/files/patch-bug1729459_comment12  |   93 ++
 mail/thunderbird/files/patch-bug847568             |  140 +--
 .../patch-comm__third_party__rnpdefs.mozbuild      |   10 +
 mail/thunderbird/files/patch-cubeb-oss             | 1324 --------------------
 mail/thunderbird/files/patch-env-api-keys          |   14 +-
 14 files changed, 296 insertions(+), 1557 deletions(-)

diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 43de586e8a11..a7e0f51283bd 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -1,8 +1,7 @@
 # Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
 
 PORTNAME=	thunderbird
-DISTVERSION=	78.14.0
-PORTREVISION=	1
+DISTVERSION=	91.2.0
 CATEGORIES=	mail news net-im
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
 		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
@@ -11,13 +10,13 @@ DISTFILES=	${DISTNAME}.source${EXTRACT_SUFX}
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Mozilla Thunderbird is standalone mail and news that stands above
 
-BUILD_DEPENDS=	nspr>=4.26:devel/nspr \
-		nss>=3.56:security/nss \
+BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
+		nss>=3.68:security/nss \
 		icu>=67.1,1:devel/icu \
 		libevent>=2.1.8:devel/libevent \
-		harfbuzz>=2.6.6:print/harfbuzz \
+		harfbuzz>=2.8.1:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
-		png>=1.6.35:graphics/png \
+		png>=1.6.37:graphics/png \
 		libvpx>=1.8.2:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
@@ -45,18 +44,11 @@ PORTNAME_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
 
 SYSTEM_PREFS=	${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
 
-OPTIONS_DEFINE=	LIGHTNING
-OPTIONS_DEFAULT=CANBERRA LIGHTNING
+OPTIONS_DEFAULT=CANBERRA
 
 .include "${.CURDIR}/../../www/firefox/Makefile.options"
 .include <bsd.port.pre.mk>
 
-.if ${PORT_OPTIONS:MLIGHTNING}
-MOZ_OPTIONS+=	--enable-calendar
-.else
-MOZ_OPTIONS+=	--disable-calendar
-.endif
-
 post-extract:
 	@${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON:R}|;s|@MOZILLA@|${MOZILLA}|' \
 		<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 17947d99bb3a..62589589f556 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1630575815
-SHA256 (thunderbird-78.14.0.source.tar.xz) = 63916611e28de0a2107ca882f56eb97ac44fd2967a3d75c082ffa5e3d58459e1
-SIZE (thunderbird-78.14.0.source.tar.xz) = 352766276
+TIMESTAMP = 1633376878
+SHA256 (thunderbird-91.2.0.source.tar.xz) = 30476803f0bd4a46d2516ac5cbb831fc580b81d5d704af17c7df81e2bb6ee075
+SIZE (thunderbird-91.2.0.source.tar.xz) = 403836192
diff --git a/mail/thunderbird/files/patch-addon-search b/mail/thunderbird/files/patch-addon-search
index 78b76a5d1fd1..38f261273f4b 100644
--- a/mail/thunderbird/files/patch-addon-search
+++ b/mail/thunderbird/files/patch-addon-search
@@ -1,11 +1,9 @@
 https://github.com/mozilla/addons/issues/708
 https://github.com/mozilla/addons-frontend/issues/4610
 
-diff --git mail/app/profile/all-thunderbird.js mail/app/profile/all-thunderbird.js
-index 75c2c5e435e35..4d8c09c02759b 100644
---- comm/mail/app/profile/all-thunderbird.js
-+++ comm/mail/app/profile/all-thunderbird.js
-@@ -153,10 +153,10 @@ pref("extensions.getAddons.maxResults", 15);
+--- comm/mail/app/profile/all-thunderbird.js.orig	2021-08-11 18:47:33.538900000 +0200
++++ comm/mail/app/profile/all-thunderbird.js	2021-08-11 18:51:30.055570000 +0200
+@@ -159,10 +159,10 @@
  pref("extensions.getAddons.get.url", "https://services.addons.thunderbird.net/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%");
  pref("extensions.getAddons.compatOverides.url", "https://services.addons.thunderbird.net/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%");
  pref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/");
@@ -16,10 +14,10 @@ index 75c2c5e435e35..4d8c09c02759b 100644
 -pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%");
 +pref("extensions.getAddons.search.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/Linux/%VERSION%/%COMPATIBILITY_MODE%?src=thunderbird");
 +pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/Linux");
- pref("extensions.getAddons.siteRegExp", "^https://.*addons\\.thunderbird\\.net");
  pref("extensions.getAddons.langpacks.url", "https://services.addons.thunderbird.net/api/v3/addons/language-tools/?app=thunderbird&type=language&appversion=%VERSION%");
+ pref("extensions.getAddons.discovery.api_url", "https://services.addons.thunderbird.net/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
  
-@@ -180,9 +180,9 @@ pref("security.cert_pinning.enforcement_level", 1);
+@@ -191,9 +191,9 @@
  //  .. etc ..
  //
  pref("extensions.update.enabled", true);
@@ -31,11 +29,9 @@ index 75c2c5e435e35..4d8c09c02759b 100644
  
  pref("extensions.update.interval", 86400);  // Check for updates to Extensions and
                                              // Themes every day
-diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm
-index f70fd8d7e3bd8..81e8cd7764fdf 100644
---- toolkit/mozapps/extensions/internal/AddonRepository.jsm
-+++ toolkit/mozapps/extensions/internal/AddonRepository.jsm
-@@ -602,7 +602,7 @@ var AddonRepository = {
+--- toolkit/mozapps/extensions/internal/AddonRepository.jsm.orig	2021-08-11 18:52:27.424729000 +0200
++++ toolkit/mozapps/extensions/internal/AddonRepository.jsm	2021-08-11 18:54:16.222790000 +0200
+@@ -584,7 +584,7 @@
        addon.version = String(aEntry.current_version.version);
        if (Array.isArray(aEntry.current_version.files)) {
          for (let file of aEntry.current_version.files) {
@@ -44,11 +40,9 @@ index f70fd8d7e3bd8..81e8cd7764fdf 100644
              if (file.url) {
                addon.sourceURI = NetUtil.newURI(file.url);
              }
-diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-index f70fd8d7e3bd8..81e8cd7764fdf 100644
---- toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-@@ -355,7 +355,7 @@ class AddonInternal {
+--- toolkit/mozapps/extensions/internal/XPIDatabase.jsm.orig	2021-08-11 18:55:01.952372000 +0200
++++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm	2021-08-11 18:55:57.455245000 +0200
+@@ -483,7 +483,7 @@
      // Something is causing errors in here
      try {
        for (let platform of this.targetPlatforms) {
@@ -56,4 +50,4 @@ index f70fd8d7e3bd8..81e8cd7764fdf 100644
 +        if (platform.os == "Linux" || platform.os == Services.appinfo.OS) {
            if (platform.abi) {
              needsABI = true;
-             if (platform.abi === abi)
+             if (platform.abi === abi) {
diff --git a/mail/thunderbird/files/patch-bug1288587 b/mail/thunderbird/files/patch-bug1288587
index bb3056c74d5f..0925ac98733c 100644
--- a/mail/thunderbird/files/patch-bug1288587
+++ b/mail/thunderbird/files/patch-bug1288587
@@ -2,36 +2,36 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi
 index 855214a..1e91d51 100644
 --- build/moz.configure/init.configure
 +++ build/moz.configure/init.configure
-@@ -251,6 +251,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre
- @imports(_from='mozbuild.pythonutil', _import='find_python3_executable')
- @imports(_from='mozbuild.pythonutil', _import='python_executable_version')
- @imports(_from='six', _import='ensure_text')
-+@imports(_from='__builtin__', _import='KeyError')
- def virtualenv_python3(env_python, virtualenv_name, build_env, mozconfig, help):
+@@ -238,6 +238,7 @@ option(
+ @imports(_from="mozbuild.pythonutil", _import="find_python3_executable")
+ @imports(_from="mozbuild.pythonutil", _import="python_executable_version")
+ @imports(_from="six", _import="ensure_text")
++@imports(_from="__builtin__", _import="KeyError")
+ def virtualenv_python3(env_python, build_env, mozconfig, help):
      # Avoid re-executing python when running configure --help.
      if help:
-@@ -283,6 +284,12 @@ def virtualenv_python3(env_python, build_env, mozconfi
-             python = mozconfig['vars']['added']['PYTHON3']
-         elif 'PYTHON3' in mozconfig['vars']['modified']:
-             python = mozconfig['vars']['modified']['PYTHON3'][1]
-+        for i in ('env', 'vars'):
-+            for j in ('added', 'modified'):
+@@ -271,6 +272,12 @@ def virtualenv_python3(env_python, virtualenv_name, bu
+             python = mozconfig["vars"]["added"]["PYTHON3"]
+         elif "PYTHON3" in mozconfig["vars"]["modified"]:
+             python = mozconfig["vars"]["modified"]["PYTHON3"][1]
++        for i in ("env", "vars"):
++            for j in ("added", "modified"):
 +                try:
-+                    del mozconfig[i][j]['PYTHON3']
++                    del mozconfig[i][j]["PYTHON3"]
 +                except KeyError:
 +                    pass
  
      log.debug("python3: executable from configuration: %r" % python)
  
-@@ -365,7 +372,10 @@ def virtualenv_python3(env_python, build_env, mozconfi
-             sys.executable, manager.python_path))
-         log.info('Re-executing in the virtualenv')
+@@ -364,7 +371,10 @@ def virtualenv_python3(env_python, virtualenv_name, bu
+         )
+         log.info("Re-executing in the virtualenv")
          if env_python:
--            del os.environ['PYTHON3']
+-            del os.environ["PYTHON3"]
 +                try:
-+                    del os.environ['PYTHON3']
++                    del os.environ["PYTHON3"]
 +                except KeyError:
 +                    pass
-         # Homebrew on macOS will change Python's sys.executable to a custom
-         # value which messes with mach's virtualenv handling code. Override
-         # Homebrew's changes with the correct sys.executable value.
+         # Another quirk on macOS, with the system python, the virtualenv is
+         # not fully operational (missing entries in sys.path) if
+         # __PYVENV_LAUNCHER__ is set.
diff --git a/mail/thunderbird/files/patch-bug1559213 b/mail/thunderbird/files/patch-bug1559213
index 0100df8d09b0..16928f792f89 100644
--- a/mail/thunderbird/files/patch-bug1559213
+++ b/mail/thunderbird/files/patch-bug1559213
@@ -14,24 +14,24 @@ diff --git config/external/moz.build config/external/moz.build
 index 03e4fa143bd1..a67d10b11fe6 100644
 --- config/external/moz.build
 +++ config/external/moz.build
-@@ -37,8 +37,9 @@ if not CONFIG['MOZ_SYSTEM_LIBVPX']:
-     external_dirs += ['media/libvpx']
+@@ -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 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']
+ if not CONFIG["MOZ_SYSTEM_PNG"]:
+     external_dirs += ["media/libpng"]
 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
 index bcf5c4925564..48964a999a9b 100644
 --- config/system-headers.mozbuild
 +++ config/system-headers.mozbuild
-@@ -1304,6 +1304,14 @@ if CONFIG['MOZ_ENABLE_CONTENTMANAGER']:
-         'SelectSingleContentItemPage.h',
+@@ -1305,6 +1305,14 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+         'harfbuzz/hb.h',
      ]
  
 +if CONFIG['MOZ_SYSTEM_AV1']:
@@ -49,9 +49,9 @@ diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
 index 092cee0c9b66..38e45de5b5f0 100644
 --- dom/media/platforms/moz.build
 +++ dom/media/platforms/moz.build
-@@ -80,6 +80,11 @@ if CONFIG['MOZ_AV1']:
-         'agnostic/AOMDecoder.cpp',
-         'agnostic/DAV1DDecoder.cpp',
+@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]:
+         "agnostic/AOMDecoder.cpp",
+         "agnostic/DAV1DDecoder.cpp",
      ]
 +    if CONFIG['MOZ_SYSTEM_AV1']:
 +        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
@@ -59,25 +59,25 @@ index 092cee0c9b66..38e45de5b5f0 100644
 +        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
 +        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
  
- if CONFIG['MOZ_OMX']:
+ if CONFIG["MOZ_OMX"]:
      EXPORTS += [
 diff --git toolkit/moz.configure toolkit/moz.configure
 index 82b5a59acf42..e2329560b42b 100644
---- toolkit/moz.configure
-+++ toolkit/moz.configure
-@@ -441,7 +441,23 @@ def av1(value):
-     if value:
+--- toolkit/moz.configure.orig	2021-04-13 16:12:34.770032000 +0200
++++ toolkit/moz.configure	2021-04-18 00:03:41.432698000 +0200
+@@ -538,7 +538,23 @@
          return True
  
--@depends(target, nasm_version, when=av1 & compile_environment)
-+option('--with-system-av1',
+ 
+-@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_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')
++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):
@@ -86,15 +86,15 @@ index 82b5a59acf42..e2329560b42b 100644
 +        has_av1_libs = True
 +    return has_av1_libs
 +
-+@depends(target, nasm_version, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
- def dav1d_asm(target, nasm_version):
-     if target.os != 'Android':
-         if target.cpu == 'aarch64':
-@@ -457,6 +473,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))
++@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
+@@ -554,6 +570,7 @@
+ 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))
  
  # Built-in fragmented MP4 support.
  # ==============================================================
diff --git a/mail/thunderbird/files/patch-bug1612184 b/mail/thunderbird/files/patch-bug1612184
index a969fae1f871..33d391a3b647 100644
--- a/mail/thunderbird/files/patch-bug1612184
+++ b/mail/thunderbird/files/patch-bug1612184
@@ -4,7 +4,7 @@ https://bug1612184.bmoattachments.org/attachment.cgi?id=9126363
 
 diff -r 388a4d04e911 media/webrtc/gn-configs/ppc64_False_ppc64_freebsd.json
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ media/webrtc/gn-configs/ppc64_False_ppc64_freebsd.json	Thu Feb 13 11:11:51 2020 +0100
++++ dom/media/webrtc/third_party_build/gn-configs/ppc64_False_ppc64_freebsd.json	Thu Feb 13 11:11:51 2020 +0100
 @@ -0,0 +1,13237 @@
 +{
 +    "gn_gen_args": {
@@ -13246,7 +13246,7 @@ diff -r 388a4d04e911 media/webrtc/gn-configs/ppc64_False_ppc64_freebsd.json
 \ No newline at end of file
 diff -r 388a4d04e911 media/webrtc/gn-configs/ppc64_True_ppc64_freebsd.json
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ media/webrtc/gn-configs/ppc64_True_ppc64_freebsd.json	Thu Feb 13 11:11:51 2020 +0100
++++ dom/media/webrtc/third_party_build/gn-configs/ppc64_True_ppc64_freebsd.json	Thu Feb 13 11:11:51 2020 +0100
 @@ -0,0 +1,12693 @@
 +{
 +    "gn_gen_args": {
@@ -25943,17 +25943,17 @@ diff -r 388a4d04e911 media/webrtc/gn-configs/ppc64_True_ppc64_freebsd.json
 +}
 \ No newline at end of file
 diff -r 388a4d04e911 media/webrtc/trunk/webrtc/moz.build
---- media/webrtc/trunk/webrtc/moz.build	Wed Jan 29 05:21:52 2020 +0000
-+++ media/webrtc/trunk/webrtc/moz.build	Thu Feb 13 11:12:15 2020 +0100
-@@ -291,6 +291,13 @@
-         "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn"
+--- third_party/libwebrtc/webrtc/moz.build.orig	2020-11-10 17:07:54 UTC
++++ third_party/libwebrtc/webrtc/moz.build
+@@ -312,6 +312,13 @@ if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"]
+         "/third_party/libwebrtc/webrtc/modules/video_processing/video_processing_neon_gn"
      ]
  
 +if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "FreeBSD":
 +
 +    DIRS += [
-+        "/media/webrtc/trunk/webrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
-+        "/media/webrtc/trunk/webrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn"
++        "/third_party/libwebrtc/webrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
++        "/third_party/libwebrtc/webrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn"
 +    ]
 +
  if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
diff --git a/mail/thunderbird/files/patch-bug1618914 b/mail/thunderbird/files/patch-bug1618914
index 817d00032222..c52ac49018b2 100644
--- a/mail/thunderbird/files/patch-bug1618914
+++ b/mail/thunderbird/files/patch-bug1618914
@@ -1,10 +1,17 @@
-[Wayland] Fall back to ftruncate if posix_fallocate isn't supported by filesystem.
+From cea8e6a01bb03bbe565c9bf5dd4f439f30ca953f Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Fri, 28 Feb 2020 16:49:38 +0000
+Subject: Bug 1618914 - [Wayland] Fall back to ftruncate if posix_fallocate isn't supported by filesystem.
 
-diff --git widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.cpp
-index 9a73326399bd5..9e42a7f1c5d18 100644
---- widget/gtk/WindowSurfaceWayland.cpp
-+++ widget/gtk/WindowSurfaceWayland.cpp
-@@ -222,20 +222,21 @@ static int WaylandAllocateShmMemory(int aSize) {
+diff --git widget/gtk/WaylandShmBuffer.cpp widget/gtk/WaylandShmBuffer.cpp
+index 42eeedd3429ac..2a5c23d287413 100644
+--- widget/gtk/WaylandShmBuffer.cpp
++++ widget/gtk/WaylandShmBuffer.cpp
+@@ -67,36 +67,37 @@ static int WaylandAllocateShmMemory(int aSize) {
+     return -1;
+   }
+ 
+   int ret = 0;
  #ifdef HAVE_POSIX_FALLOCATE
    do {
      ret = posix_fallocate(fd, 0, aSize);
@@ -13,8 +20,12 @@ index 9a73326399bd5..9e42a7f1c5d18 100644
 +  if (ret == 0) {
 +    return fd;
 +  } else if (ret != ENODEV && ret != EINVAL && ret != EOPNOTSUPP) {
+     NS_WARNING(
+         nsPrintfCString("posix_fallocate() fails to allocate shm memory: %s",
+                         strerror(ret))
+             .get());
      close(fd);
-     MOZ_CRASH("posix_fallocate() fails to allocate shm memory");
+     return -1;
    }
 -#else
 +#endif
@@ -22,20 +33,18 @@ index 9a73326399bd5..9e42a7f1c5d18 100644
      ret = ftruncate(fd, aSize);
    } while (ret < 0 && errno == EINTR);
    if (ret < 0) {
+     NS_WARNING(nsPrintfCString("ftruncate() fails to allocate shm memory: %s",
+                                strerror(ret))
+                    .get());
      close(fd);
-     MOZ_CRASH("ftruncate() fails to allocate shm memory");
+     fd = -1;
    }
 -#endif
  
    return fd;
  }
-@@ -265,8 +266,8 @@ bool WaylandShmPool::Resize(int aSize) {
- #ifdef HAVE_POSIX_FALLOCATE
-   do {
-     errno = posix_fallocate(mShmPoolFd, 0, aSize);
-   } while (errno == EINTR);
--  if (errno != 0) return false;
-+  if (errno != 0 && errno != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) return false;
- #endif
  
-   wl_shm_pool_resize(mShmPool, aSize);
+ /* static */
+ RefPtr<WaylandShmPool> WaylandShmPool::Create(
+     const RefPtr<nsWaylandDisplay>& aWaylandDisplay, int aSize) {
+   RefPtr<WaylandShmPool> shmPool = new WaylandShmPool(aSize);
diff --git a/mail/thunderbird/files/patch-bug1628567 b/mail/thunderbird/files/patch-bug1628567
index f48f78bcfd0d..32b0dc260d22 100644
--- a/mail/thunderbird/files/patch-bug1628567
+++ b/mail/thunderbird/files/patch-bug1628567
@@ -1,8 +1,10 @@
 Don't pass --target when CC/CXX contains clang
 
---- third_party/rust/cc/src/lib.rs.orig	2020-04-10 00:57:23 UTC
+diff --git third_party/rust/cc/src/lib.rs third_party/rust/cc/src/lib.rs
+index 9d133a0..273e520 100644
+--- third_party/rust/cc/src/lib.rs
 +++ third_party/rust/cc/src/lib.rs
-@@ -2344,28 +2344,7 @@ impl Tool {
+@@ -2667,24 +2667,7 @@ impl Tool {
      }
  
      fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self {
@@ -10,11 +12,7 @@ Don't pass --target when CC/CXX contains clang
 -        let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
 -            if fname.contains("clang-cl") {
 -                ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
+-            } else if fname.ends_with("cl") || fname == "cl.exe" {
 -                ToolFamily::Msvc { clang_cl: false }
 -            } else if fname.contains("clang") {
 -                match clang_driver {
diff --git a/mail/thunderbird/files/patch-bug1694575 b/mail/thunderbird/files/patch-bug1694575
deleted file mode 100644
index bbc563272934..000000000000
--- a/mail/thunderbird/files/patch-bug1694575
+++ /dev/null
@@ -1,33 +0,0 @@
-changeset:   569030:f875a4ffd653
-user:        Mike Hommey <mh+mozilla@glandium.org>
-date:        Sun Feb 28 17:47:27 2021 +0000
-summary:     Bug 1694575 - Don't include mozalloc.h from the iosfwd wrapper. r=andi
-
-diff -r d31bf2fc599d -r f875a4ffd653 config/gcc-stl-wrapper.template.h
---- config/gcc-stl-wrapper.template.h	Sun Feb 28 14:59:31 2021 +0000
-+++ config/gcc-stl-wrapper.template.h	Sun Feb 28 17:47:27 2021 +0000
-@@ -27,7 +27,11 @@
- //  # define _GLIBCXX_DEBUG 1
- #endif
- 
--// Don't include mozalloc for cstdlib. See bug 1245076.
-+// Don't include mozalloc.h for cstdlib, type_traits, limits and iosfwd.
-+// See bug 1245076 (cstdlib), bug 1594027 (type_traits, limits) and
-+// bug 1694575 (iosfwd).
-+// Please be careful when adding more exceptions, especially regarding
-+// the header not directly or indirectly including <new>.
- #ifndef moz_dont_include_mozalloc_for_cstdlib
- #  define moz_dont_include_mozalloc_for_cstdlib
- #endif
-@@ -40,6 +44,10 @@
- #  define moz_dont_include_mozalloc_for_limits
- #endif
- 
-+#ifndef moz_dont_include_mozalloc_for_iosfwd
-+#  define moz_dont_include_mozalloc_for_iosfwd
-+#endif
-+
- // Include mozalloc after the STL header and all other headers it includes
- // have been preprocessed.
- #if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
-
diff --git a/mail/thunderbird/files/patch-bug1729459_comment12 b/mail/thunderbird/files/patch-bug1729459_comment12
new file mode 100644
index 000000000000..dda42170f71b
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1729459_comment12
@@ -0,0 +1,93 @@
+--- modules/fdlibm/src/math_private.h.orig	2021-09-30 19:32:33.764224000 +0200
++++ modules/fdlibm/src/math_private.h	2021-10-02 22:15:33.265122000 +0200
+@@ -30,7 +30,11 @@
+  * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+  */
+ 
+-typedef double      __double_t;
++#ifdef __LP64__
++typedef double __double_t;
++#else
++typedef long double __double_t;
++#endif
+ typedef __double_t  double_t;
+ 
+ /*
+@@ -630,7 +634,37 @@
+ 	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+ }
+ 
++static inline float
++rnintf(__float_t x)
++{
++	/*
++	 * As for rnint(), except we could just call that to handle the
++	 * extra precision case, usually without losing efficiency.
++	 */
++	return ((float)(x + 0x1.8p23F) - 0x1.8p23F);
++}
++
++#ifdef LDBL_MANT_DIG
+ /*
++ * The complications for extra precision are smaller for rnintl() since it
++ * can safely assume that the rounding precision has been increased from
++ * its default to FP_PE on x86.  We don't exploit that here to get small
++ * optimizations from limiting the rangle to double.  We just need it for
++ * the magic number to work with long doubles.  ld128 callers should use
++ * rnint() instead of this if possible.  ld80 callers should prefer
++ * rnintl() since for amd64 this avoids swapping the register set, while
++ * for i386 it makes no difference (assuming FP_PE), and for other arches
++ * it makes little difference.
++ */
++static inline long double
++rnintl(long double x)
++{
++	return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 -
++		__CONCAT(0x1.8p, LDBL_MANT_DIG) / 2);
++}
++#endif /* LDBL_MANT_DIG */
++
++/*
+  * irint() and i64rint() give the same result as casting to their integer
+  * return type provided their arg is a floating point integer.  They can
+  * sometimes be more efficient because no rounding is required.
+@@ -644,6 +678,39 @@
+     sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+ #else
+ #define	irint(x)	((int)(x))
++#endif
++
++#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
++
++#if defined(__i386__) && defined(__GNUCLIKE_ASM)
++static __inline int
++irintf(float x)
++{
++	int n;
++
++	__asm("fistl %0" : "=m" (n) : "t" (x));
++	return (n);
++}
++
++static __inline int
++irintd(double x)
++{
++	int n;
++
++	__asm("fistl %0" : "=m" (n) : "t" (x));
++	return (n);
++}
++#endif
++
++#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM)
++static __inline int
++irintl(long double x)
++{
++	int n;
++
++	__asm("fistl %0" : "=m" (n) : "t" (x));
++	return (n);
++}
+ #endif
+ 
+ #ifdef DEBUG
diff --git a/mail/thunderbird/files/patch-bug847568 b/mail/thunderbird/files/patch-bug847568
index 88511da00630..3f688427b494 100644
--- a/mail/thunderbird/files/patch-bug847568
+++ b/mail/thunderbird/files/patch-bug847568
@@ -4,7 +4,7 @@ diff --git config/system-headers.mozbuild config/system-headers.mozbuild
 index 7620b4d00623..09d3db5ca8c0 100644
 --- config/system-headers.mozbuild
 +++ config/system-headers.mozbuild
-@@ -1299,6 +1299,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
+@@ -1292,6 +1292,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
          'proxy.h',
      ]
  
@@ -28,16 +28,16 @@ diff --git dom/base/moz.build dom/base/moz.build
 index 8e19020315ae..2fcdbb6f7b42 100644
 --- dom/base/moz.build
 +++ dom/base/moz.build
-@@ -543,6 +543,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
- if CONFIG['MOZ_X11']:
-     CXXFLAGS += CONFIG['TK_CFLAGS']
+@@ -546,6 +546,9 @@ if CONFIG["MOZ_BUILD_APP"] in ["browser", "mobile/android", "xulrunner"]:
+ if CONFIG["MOZ_X11"]:
+     CXXFLAGS += CONFIG["TK_CFLAGS"]
  
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
 +
- GeneratedFile('UseCounterList.h', script='gen-usecounters.py',
-               entry_point='use_counter_list', inputs=['UseCounters.conf'])
- 
+ GeneratedFile(
+     "UseCounterList.h",
+     script="gen-usecounters.py",
 diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
 new file mode 100644
 index 0000000000000..24e8d7a03274a
@@ -112,35 +112,35 @@ diff --git gfx/moz.build gfx/moz.build
 index 771f652e837a..3b358d84e384 100644
 --- gfx/moz.build
 +++ gfx/moz.build
-@@ -13,6 +13,14 @@ with Files('wr/**'):
- if CONFIG['MOZ_TREE_CAIRO']:
-     DIRS += ['cairo']
+@@ -13,6 +13,14 @@ with Files("wr/**"):
+ if CONFIG["MOZ_TREE_CAIRO"]:
+     DIRS += ["cairo"]
  
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    DIRS += ['graphite2/geckoextra']
++if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
++    DIRS += ["graphite2/geckoextra"]
 +else:
-+    DIRS += ['graphite2/src' ]
++    DIRS += ["graphite2/src" ]
 +
-+if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    DIRS += ['harfbuzz/src']
++if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    DIRS += ["harfbuzz/src"]
 +
  DIRS += [
-     '2d',
-     'ycbcr',
+     "2d",
+     "ycbcr",
 @@ -21,8 +29,6 @@ DIRS += [
-     'qcms',
-     'gl',
-     'layers',
--    'graphite2/src',
--    'harfbuzz/src',
-     'ots/src',
-     'thebes',
-     'ipc',
+     "qcms",
+     "gl",
+     "layers",
+-    "graphite2/src",
+-    "harfbuzz/src",
+     "ots/src",
+     "thebes",
+     "ipc",
 diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
 index e06ae3457a47..93faa61594a3 100755
 --- gfx/skia/generate_mozbuild.py
 +++ gfx/skia/generate_mozbuild.py
-@@ -117,6 +117,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -98,6 +98,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
          '-Wno-unused-private-field',
      ]
  
@@ -154,7 +154,7 @@ diff --git gfx/skia/moz.build gfx/skia/moz.build
 index 2118677ca3a8..e4978b413784 100644
 --- gfx/skia/moz.build
 +++ gfx/skia/moz.build
-@@ -493,6 +493,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -490,6 +490,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
          '-Wno-unused-private-field',
      ]
  
@@ -168,49 +168,49 @@ diff --git gfx/thebes/moz.build gfx/thebes/moz.build
 index 56f1b9fe3f4b..0ac1100b0df3 100644
 --- gfx/thebes/moz.build
 +++ gfx/thebes/moz.build
-@@ -284,7 +284,13 @@ if CONFIG['MOZ_WAYLAND']:
+@@ -287,7 +287,13 @@ if CONFIG["MOZ_WAYLAND"]:
  
- LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
  
--DEFINES['GRAPHITE2_STATIC'] = True
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
+-DEFINES["GRAPHITE2_STATIC"] = True
++if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
++    CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
 +else:
-+    DEFINES['GRAPHITE2_STATIC'] = True
++    DEFINES["GRAPHITE2_STATIC"] = True
 +
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
  
- if CONFIG['CC_TYPE'] == 'clang':
+ if CONFIG["CC_TYPE"] == "clang":
      # Suppress warnings from Skia header files.
 diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
 index cb1233c56d7e..06fb1f9f174b 100644
 --- intl/unicharutil/util/moz.build
 +++ intl/unicharutil/util/moz.build
 @@ -25,4 +25,7 @@ UNIFIED_SOURCES += [
-     'nsUnicodeProperties.cpp',
+     "nsUnicodeProperties.cpp",
  ]
  
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
 +
- FINAL_LIBRARY = 'xul'
+ FINAL_LIBRARY = "xul"
 diff --git netwerk/dns/moz.build netwerk/dns/moz.build
 index 79c26e3e7001..c4d93bc5f7dc 100644
 --- netwerk/dns/moz.build
 +++ netwerk/dns/moz.build
-@@ -86,3 +86,6 @@ USE_LIBS += ['icu']
+@@ -105,3 +105,6 @@ USE_LIBS += ["icu"]
  
- if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-     CXXFLAGS += ['-Wno-error=shadow']
+ if CONFIG["CC_TYPE"] in ("clang", "gcc"):
+     CXXFLAGS += ["-Wno-error=shadow"]
 +
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
 diff --git old-configure.in old-configure.in
 index 95a58b634593..b614eef85c89 100644
 --- old-configure.in
 +++ old-configure.in
-@@ -2639,6 +2639,27 @@ dnl ========================================================
+@@ -2303,6 +2303,27 @@ dnl ========================================================
  
  AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
  
@@ -242,46 +242,46 @@ diff --git toolkit/library/moz.build toolkit/library/moz.build
 index 24f940e1ed7e..079a575adec3 100644
 --- toolkit/library/moz.build
 +++ toolkit/library/moz.build
-@@ -248,6 +248,12 @@ if CONFIG['MOZ_SYSTEM_PNG']:
- if CONFIG['MOZ_SYSTEM_WEBP']:
-     OS_LIBS += CONFIG['MOZ_WEBP_LIBS']
+@@ -247,6 +247,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
+ if CONFIG["MOZ_SYSTEM_WEBP"]:
+     OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
  
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
++if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
++    OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
 +
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
++    OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
 +
- if CONFIG['MOZ_SYSTEM_LIBEVENT']:
-     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+ if CONFIG["MOZ_SYSTEM_LIBEVENT"]:
+     OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
  
 diff --git toolkit/moz.configure toolkit/moz.configure
 index 9297e4d6f501..d8e273887e4b 100644
 --- toolkit/moz.configure
 +++ toolkit/moz.configure
-@@ -937,6 +937,25 @@ add_old_configure_assignment('FT2_LIBS',
- add_old_configure_assignment('FT2_CFLAGS',
-                              ft2_info.cflags)
+@@ -1055,6 +1055,25 @@ set_config("FT2_LIBS", ft2_info.libs)
+ add_old_configure_assignment("FT2_LIBS", ft2_info.libs)
+ add_old_configure_assignment("FT2_CFLAGS", ft2_info.cflags)
  
 +# Graphite2
 +# ==============================================================
-+option('--with-system-graphite2',
++option("--with-system-graphite2",
 +       help="Use system graphite2 (located with pkgconfig)")
 +
-+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
-+                                     when='--with-system-graphite2')
++system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2",
++                                     when="--with-system-graphite2")
 +
-+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
++set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True))
 +
 +# HarfBuzz
 +# ==============================================================
-+option('--with-system-harfbuzz',
++option("--with-system-harfbuzz",
 +       help="Use system harfbuzz (located with pkgconfig)")
 +
-+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.6.6',
-+                                    when='--with-system-harfbuzz')
++system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4",
++                                    when="--with-system-harfbuzz")
 +
-+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
++set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
  
- # Remote agent (part of CDP based remote protocol)
- # ==============================================================
+ # Remote agent
+ # (partial implementation of Chromium Remote Debugging Protocol)
diff --git a/mail/thunderbird/files/patch-comm__third_party__rnpdefs.mozbuild b/mail/thunderbird/files/patch-comm__third_party__rnpdefs.mozbuild
new file mode 100644
index 000000000000..1042cf20ce9f
--- /dev/null
+++ b/mail/thunderbird/files/patch-comm__third_party__rnpdefs.mozbuild
@@ -0,0 +1,10 @@
+--- comm/third_party/rnpdefs.mozbuild.orig	2021-08-11 20:13:25.176921000 +0200
++++ comm/third_party/rnpdefs.mozbuild	2021-08-11 20:14:08.855374000 +0200
+@@ -43,6 +43,6 @@
+     OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"]
+ 
+ 
+-if CONFIG["OS_ARCH"] in ("Linux", "SunOS"):
++if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly", "SunOS"):
+     CFLAGS += ["-fPIC"]
+     CXXFLAGS += ["-fPIC"]
diff --git a/mail/thunderbird/files/patch-cubeb-oss b/mail/thunderbird/files/patch-cubeb-oss
deleted file mode 100644
index 41185cf141fd..000000000000
--- a/mail/thunderbird/files/patch-cubeb-oss
+++ /dev/null
@@ -1,1324 +0,0 @@
-https://github.com/kinetiknz/cubeb/pull/600
-
---- dom/media/CubebUtils.cpp.orig	2020-08-19 02:08:51 UTC
-+++ dom/media/CubebUtils.cpp
-@@ -126,7 +126,7 @@ const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties";
- 
- const char* AUDIOSTREAM_BACKEND_ID_STR[] = {
-     "jack",  "pulse",       "alsa",  "audiounit", "audioqueue", "wasapi",
--    "winmm", "directsound", "sndio", "opensl",    "audiotrack", "kai"};
-+    "winmm", "directsound", "sndio", "opensl", "oss", "audiotrack", "kai"};
- /* Index for failures to create an audio stream the first time. */
- const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
-     ArrayLength(AUDIOSTREAM_BACKEND_ID_STR);
---- media/libcubeb/src/moz.build.orig	2020-08-19 02:09:19 UTC
-+++ media/libcubeb/src/moz.build
-@@ -40,6 +40,12 @@ if CONFIG['MOZ_JACK']:
-     ]
-     DEFINES['USE_JACK'] = True
- 
-+if CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'SunOS'):
-+    SOURCES += [
-+        'cubeb_oss.c',
-+    ]
-+    DEFINES['USE_OSS'] = True
-+
- if CONFIG['OS_ARCH'] == 'OpenBSD':
-     SOURCES += [
-         'cubeb_sndio.c',
---- media/libcubeb/src/cubeb.c.orig	2020-08-19 02:09:26 UTC
-+++ media/libcubeb/src/cubeb.c
-@@ -60,6 +60,9 @@ int sun_init(cubeb ** context, char const * context_name);
- #if defined(USE_OPENSL)
- int opensl_init(cubeb ** context, char const * context_name);
- #endif
-+#if defined(USE_OSS)
-+int oss_init(cubeb ** context, char const * context_name);
-+#endif
- #if defined(USE_AUDIOTRACK)
- int audiotrack_init(cubeb ** context, char const * context_name);
- #endif
-@@ -165,6 +168,10 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
- #if defined(USE_OPENSL)
-       init_oneshot = opensl_init;
- #endif
-+    } else if (!strcmp(backend_name, "oss")) {
-+#if defined(USE_OSS)
-+      init_oneshot = oss_init;
-+#endif
-     } else if (!strcmp(backend_name, "audiotrack")) {
- #if defined(USE_AUDIOTRACK)
-       init_oneshot = audiotrack_init;
-@@ -200,6 +207,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
- #if defined(USE_ALSA)
-     alsa_init,
- #endif
-+#if defined (USE_OSS)
-+    oss_init,
-+#endif
- #if defined(USE_AUDIOUNIT_RUST)
-     audiounit_rust_init,
- #endif
---- /dev/null
-+++ media/libcubeb/src/cubeb_oss.c
-@@ -0,0 +1,1260 @@
-+/*
-+ * Copyright © 2019-2020 Nia Alarie <nia@NetBSD.org>
-+ * Copyright © 2020 Ka Ho Ng <khng300@gmail.com>
-+ * Copyright © 2020 The FreeBSD Foundation
-+ *
-+ * Portions of this software were developed by Ka Ho Ng
-+ * under sponsorship from the FreeBSD Foundation.
-+ *
-+ * This program is made available under an ISC-style license.  See the
-+ * accompanying file LICENSE for details.
-+ */
-+
-+#include <assert.h>
-+#include <ctype.h>
-+#include <limits.h>
-+#include <errno.h>
-+#include <sys/types.h>
-+#include <sys/soundcard.h>
-+#include <sys/ioctl.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <pthread.h>
-+#include <stdbool.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <poll.h>
-+#include "cubeb/cubeb.h"
*** 1264 LINES SKIPPED ***