pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

thunderbird: import for debugging.



Module Name:	pkgsrc-wip
Committed By:	nikita <nikita%NetBSD.org@localhost>
Pushed By:	nikita
Date:		Mon May 15 23:06:16 2023 +0200
Changeset:	0bb3c52e6184d2f1e01141bf51d21886d663742b

Modified Files:
	thunderbird/Makefile
	thunderbird/PLIST
	thunderbird/distinfo
	thunderbird/files/cubeb_sun.c
	thunderbird/mozilla-common.mk
	thunderbird/patches/patch-build_moz.configure_rust.configure
	thunderbird/patches/patch-comm_third__party_libgcrypt_configure
	thunderbird/patches/patch-config_gcc-stl-wrapper.template.h
	thunderbird/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
	thunderbird/patches/patch-gfx_cairo_cairo_src_cairo-type1-subset.c
	thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
	thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
	thunderbird/patches/patch-js_src_jsfriendapi.h
	thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c
	thunderbird/patches/patch-media_libcubeb_src_cubeb__sun.c
	thunderbird/patches/patch-media_libcubeb_src_moz.build
	thunderbird/patches/patch-old-configure.in
	thunderbird/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
	thunderbird/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
	thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp
	thunderbird/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
	thunderbird/patches/patch-toolkit_moz.configure
Added Files:
	thunderbird/TODO
	thunderbird/patch-build_unix_stdc++compat_stdc++compat.cpp
	thunderbird/patch-dom_media_webrtc_sdp_RsdparsaSdpGlue.cpp
	thunderbird/patch-gfx_2d_Rect.h
	thunderbird/patch-toolkit_components_telemetry_pingsender_pingsender.cpp
	thunderbird/patch-tools_profiler_core_platform.cpp
	thunderbird/patch-tools_profiler_public_ProfilerThreadRegistration.h
	thunderbird/patch-tools_profiler_public_ProfilerThreadRegistry.h
	thunderbird/patch-tools_profiler_tests_gtest_GeckoProfiler.cpp
	thunderbird/patches/patch-Cargo.lock
	thunderbird/patches/patch-Cargo.toml
	thunderbird/patches/patch-config_makefiles_rust.mk
	thunderbird/patches/patch-python_mozbuild_mozbuild_action_langpack_manifest.py
	thunderbird/patches/patch-third__party_rust_bindgen_src_clang.rs
	thunderbird/patches/patch-third__party_rust_bindgen_src_ir_comp.rs
	thunderbird/patches/patch-third__party_rust_bindgen_src_ir_ty.rs
	thunderbird/patches/patch-third__party_rust_bindgen_src_ir_var.rs
	thunderbird/patches/patch-toolkit_xre_glxtest_cpp
	thunderbird/patches/patch-widget_gtk_DMABufSurface.cpp

Log Message:
thunderbird: import for debugging.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0bb3c52e6184d2f1e01141bf51d21886d663742b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 thunderbird/Makefile                               |  10 +-
 thunderbird/PLIST                                  |  13 ++-
 thunderbird/TODO                                   |  17 +++
 thunderbird/distinfo                               |  20 +++-
 thunderbird/files/cubeb_sun.c                      |   2 +-
 thunderbird/mozilla-common.mk                      |  12 +-
 .../patch-build_unix_stdc++compat_stdc++compat.cpp |  29 +++++
 .../patch-dom_media_webrtc_sdp_RsdparsaSdpGlue.cpp |  14 +++
 thunderbird/patch-gfx_2d_Rect.h                    |  14 +++
 ..._components_telemetry_pingsender_pingsender.cpp |  14 +++
 thunderbird/patch-tools_profiler_core_platform.cpp |  68 ++++++++++++
 ...ls_profiler_public_ProfilerThreadRegistration.h |  23 ++++
 ...-tools_profiler_public_ProfilerThreadRegistry.h |  23 ++++
 ...ch-tools_profiler_tests_gtest_GeckoProfiler.cpp |  33 ++++++
 thunderbird/patches/patch-Cargo.lock               |  33 ++++++
 thunderbird/patches/patch-Cargo.toml               |  32 ++++++
 .../patch-build_moz.configure_rust.configure       |   2 +-
 .../patch-comm_third__party_libgcrypt_configure    |   2 +-
 .../patch-config_gcc-stl-wrapper.template.h        |   2 +-
 thunderbird/patches/patch-config_makefiles_rust.mk |  30 +++++
 ...gle_checkout_src_compiler_translator_InfoSink.h |   2 +-
 .../patch-gfx_cairo_cairo_src_cairo-type1-subset.c |   2 +-
 ...pc_chromium_src_base_message__pump__libevent.cc |   2 +-
 .../patch-ipc_glue_GeckoChildProcessHost.cpp       |   2 +-
 thunderbird/patches/patch-js_src_jsfriendapi.h     |   2 +-
 .../patches/patch-media_libcubeb_src_cubeb__alsa.c |   2 +-
 .../patches/patch-media_libcubeb_src_cubeb__sun.c  |  12 +-
 .../patches/patch-media_libcubeb_src_moz.build     |   2 +-
 thunderbird/patches/patch-old-configure.in         |   2 +-
 ...n_mozbuild_mozbuild_action_langpack_manifest.py |  27 +++++
 ...les_video__capture_linux_device__info__linux.cc |   2 +-
 .../patch-third__party_rust_bindgen_src_clang.rs   |  36 ++++++
 .../patch-third__party_rust_bindgen_src_ir_comp.rs |  33 ++++++
 .../patch-third__party_rust_bindgen_src_ir_ty.rs   | 123 +++++++++++++++++++++
 .../patch-third__party_rust_bindgen_src_ir_var.rs  |  40 +++++++
 ...rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs |   2 +-
 ...-toolkit_components_terminator_nsTerminator.cpp |   2 +-
 ..._modules_subprocess_subprocess__shared__unix.js |   2 +-
 thunderbird/patches/patch-toolkit_moz.configure    |   2 +-
 thunderbird/patches/patch-toolkit_xre_glxtest_cpp  |  17 +++
 .../patches/patch-widget_gtk_DMABufSurface.cpp     |  32 ++++++
 41 files changed, 697 insertions(+), 42 deletions(-)

diffs:
diff --git a/thunderbird/Makefile b/thunderbird/Makefile
index 3c5880762d..a41b052167 100644
--- a/thunderbird/Makefile
+++ b/thunderbird/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.289 2023/01/03 17:37:48 wiz Exp $
+# $NetBSD: Makefile,v 1.295 2023/05/06 19:09:37 ryoon Exp $
 
 DISTNAME=	thunderbird-${TB_VER}.source
 PKGNAME=	thunderbird-${TB_VER}
-TB_VER=		102.6.1
+PKGREVISION=	3
+TB_VER=		102.8.0
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_MOZILLA:=thunderbird/releases/${TB_VER}/source/}
 EXTRACT_SUFX=	.tar.xz
@@ -34,9 +35,6 @@ NOT_PAX_MPROTECT_SAFE+=	lib/${MOZILLA_NAME}/${MOZILLA_NAME}-bin
 
 LDFLAGS+=		${COMPILER_RPATH_FLAG}${PREFIX}/lib/${MOZILLA_NAME}
 
-# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
-BUILDLINK_TRANSFORM.NetBSD+=	rm:-fexperimental-new-pass-manager
-
 .include "../../mk/bsd.prefs.mk"
 
 CHECK_WRKREF_SKIP+=	lib/${MOZILLA_NAME}/chrome/toolkit/content/global/buildconfig.html
@@ -87,7 +85,7 @@ pre-configure:
 
 do-build:
 # XXX for some reason it doesn't work unless -j is explicitly specified
-	${_ULIMIT_CMD} cd ${WRKSRC}/${OBJDIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -j${MAKE_JOBS:U1}
+	${_ULIMIT_CMD} cd ${WRKSRC}/${OBJDIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -j${_MAKE_JOBS_N:U1}
 
 MOZILLA=	thunderbird
 MOZILLA_NAME=	${PKGBASE}
diff --git a/thunderbird/PLIST b/thunderbird/PLIST
index b83750df11..0f13d5601e 100644
--- a/thunderbird/PLIST
+++ b/thunderbird/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD$
+@comment $NetBSD: PLIST,v 1.89 2023/02/16 18:17:33 he Exp $
 bin/thunderbird
 lib/thunderbird/actors/AboutHttpsOnlyErrorChild.jsm
 lib/thunderbird/actors/AboutHttpsOnlyErrorParent.jsm
@@ -32,6 +32,7 @@ lib/thunderbird/actors/FormHistoryParent.jsm
 lib/thunderbird/actors/InlineSpellCheckerChild.jsm
 lib/thunderbird/actors/InlineSpellCheckerParent.jsm
 lib/thunderbird/actors/KeyPressEventModelCheckerChild.jsm
+${PLIST.debug}lib/thunderbird/actors/LayoutDebugChild.jsm
 lib/thunderbird/actors/LinkClickHandlerChild.jsm
 lib/thunderbird/actors/LinkClickHandlerParent.jsm
 lib/thunderbird/actors/LinkHandlerChild.jsm
@@ -3212,11 +3213,11 @@ lib/thunderbird/chrome/devtools/skin/webconsole.css
 lib/thunderbird/chrome/devtools/skin/widgets.css
 ${PLIST.nobranding}lib/thunderbird/chrome/en-US/locale/branding/brand.dtd
 ${PLIST.nobranding}lib/thunderbird/chrome/en-US/locale/branding/brand.properties
-${PLIST.branding}lib/thunderbird/chrome/en-US/locale/en-US/branding/brand.dtd
-${PLIST.branding}lib/thunderbird/chrome/en-US/locale/en-US/branding/brand.properties
 lib/thunderbird/chrome/en-US/locale/en-US/alerts/alert.dtd
 lib/thunderbird/chrome/en-US/locale/en-US/alerts/alert.properties
 lib/thunderbird/chrome/en-US/locale/en-US/autoconfig/autoconfig.properties
+${PLIST.branding}lib/thunderbird/chrome/en-US/locale/en-US/branding/brand.dtd
+${PLIST.branding}lib/thunderbird/chrome/en-US/locale/en-US/branding/brand.properties
 lib/thunderbird/chrome/en-US/locale/en-US/calendar/calendar-alarms.properties
 lib/thunderbird/chrome/en-US/locale/en-US/calendar/calendar-event-dialog-attendees.properties
 lib/thunderbird/chrome/en-US/locale/en-US/calendar/calendar-event-dialog.dtd
@@ -3549,7 +3550,7 @@ lib/thunderbird/chrome/icons/default/default32.png
 lib/thunderbird/chrome/icons/default/default48.png
 lib/thunderbird/chrome/icons/default/default64.png
 ${PLIST.nobranding}lib/thunderbird/chrome/messenger/content/branding/about-background.png
-${PLIST.nobranding}lib/thunderbird/chrome/messenger/content/branding/about-logo.svg
+lib/thunderbird/chrome/messenger/content/branding/about-logo.svg
 lib/thunderbird/chrome/messenger/content/branding/about-wordmark.svg
 lib/thunderbird/chrome/messenger/content/branding/about.png
 lib/thunderbird/chrome/messenger/content/branding/aboutDialog.css
@@ -3592,6 +3593,7 @@ lib/thunderbird/chrome/messenger/content/messenger/about-support/accounts.js
 lib/thunderbird/chrome/messenger/content/messenger/about-support/calendars.js
 lib/thunderbird/chrome/messenger/content/messenger/about-support/chat.js
 lib/thunderbird/chrome/messenger/content/messenger/about-support/export.js
+lib/thunderbird/chrome/messenger/content/messenger/about-support/libs.js
 lib/thunderbird/chrome/messenger/content/messenger/about3Pane.js
 lib/thunderbird/chrome/messenger/content/messenger/about3Pane.xhtml
 lib/thunderbird/chrome/messenger/content/messenger/aboutAddonsExtra.js
@@ -5503,6 +5505,7 @@ lib/thunderbird/components/calPeriod.js
 lib/thunderbird/components/calRecurrenceRule.js
 lib/thunderbird/components/calTimezone.js
 lib/thunderbird/components/components.manifest
+${PLIST.debug}lib/thunderbird/components/startupRecorder.js
 lib/thunderbird/contentaccessible/ImageDocument.css
 lib/thunderbird/contentaccessible/TopLevelImageDocument.css
 lib/thunderbird/contentaccessible/TopLevelVideoDocument.css
@@ -6434,6 +6437,7 @@ lib/thunderbird/modules/ircServices.jsm
 lib/thunderbird/modules/ircUtils.jsm
 lib/thunderbird/modules/ircWatchMonitor.jsm
 lib/thunderbird/modules/jsProtoHelper.jsm
+${PLIST.debug}lib/thunderbird/modules/jsTestProtocol.jsm
 lib/thunderbird/modules/jsaccount/JSAccountUtils.jsm
 lib/thunderbird/modules/jsaccount/JaBaseUrl.jsm
 lib/thunderbird/modules/jsaccount/TestJaMsgProtocolInfoComponent.jsm
@@ -6637,6 +6641,7 @@ lib/thunderbird/modules/remotepagemanager/RemotePageManagerChild.jsm
 lib/thunderbird/modules/remotepagemanager/RemotePageManagerParent.jsm
 lib/thunderbird/modules/sax.jsm
 lib/thunderbird/modules/sax/sax.js
+${PLIST.debug}lib/thunderbird/modules/services-automation/ServicesAutomation.jsm
 lib/thunderbird/modules/services-common/async.js
 lib/thunderbird/modules/services-common/hawkclient.js
 lib/thunderbird/modules/services-common/hawkrequest.js
diff --git a/thunderbird/TODO b/thunderbird/TODO
new file mode 100644
index 0000000000..b4b6263ee2
--- /dev/null
+++ b/thunderbird/TODO
@@ -0,0 +1,17 @@
+Assertion failure: i < NUM_TEST_EV_ROOTS (Could not find built-in EV root), at /usr/work/mail/thunderbird/work/thunderbird-102.8.0/security/certverifier/ExtendedValidation.cpp:1246
+[ImapModuleLoader] Using nsImapService.cpp
+[NntpModuleLoader] Using NntpService.jsm
+[Pop3ModuleLoader] Using Pop3Service.jsm
+#01: aom_iwht4x4_16_add_sse2[/usr/pkg/lib/thunderbird/libxul.so +0x36a1f85]
+#02: void std::vector<std::vector<unsigned char, std::allocator<unsigned char> > const*, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > const*> >::_M_realloc_insert<std::vector<unsigned char, std::allocator<unsigned char> > const* co[/usr/pkg/lib/thunderbird/libxul.so +0x780c386]
+#03: std::__throw_bad_alloc()[/usr/pkg/lib/thunderbird/libxul.so +0x3caed12]
+#04: void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::c[/usr/pkg/lib/thunderbird/libxul.so +0x3cbf755]
+#05: std::__throw_bad_alloc()[/usr/pkg/lib/thunderbird/libxul.so +0x3ca997f]
+#06: std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<ch[/usr/pkg/lib/thunderbird/libxul.so +0x4253304]
+#07: std::function<void (bool&&)>::operator()(bool&&) const[/usr/pkg/lib/thunderbird/libxul.so +0x4204e98]
+#08: void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::c[/usr/pkg/lib/thunderbird/libxul.so +0x3cbe986]
+#09: PR_Select[/usr/pkg/lib/nspr/libnspr4.so +0x2a2f6]
+#10: __libc_thr_exit[/usr/lib/libpthread.so.1 +0xd2df]
+#11: _lwp_exit[/usr/lib/libc.so.12 +0x9b800]
+[1]   Segmentation fault (core dumped) /usr/pkg/lib/thunderbird/thunderbird "${@}"
+
diff --git a/thunderbird/distinfo b/thunderbird/distinfo
index ea6478fce1..f35074a9de 100644
--- a/thunderbird/distinfo
+++ b/thunderbird/distinfo
@@ -1,13 +1,16 @@
-$NetBSD: distinfo,v 1.253 2022/12/27 20:08:45 abs Exp $
+$NetBSD: distinfo,v 1.256 2023/02/16 18:11:40 he Exp $
 
-BLAKE2s (thunderbird-102.6.1.source.tar.xz) = a5a5e3a188e039669a404983d4ef55790a0882f8250cfc4557a3df3550260a51
-SHA512 (thunderbird-102.6.1.source.tar.xz) = 06ea2fce76c08609d638435869fddc1c4d7f4b748951ebfb2476b4dba9f1f76d3de2c11e5f62540f297a5d30bb0fc637852d8e57f4fadc2c905f299757949d83
-Size (thunderbird-102.6.1.source.tar.xz) = 508826308 bytes
+BLAKE2s (thunderbird-102.8.0.source.tar.xz) = 5d6de22c7e4aadb9937982915322f646913f7a1deb73492b68fdf6beeb56fa70
+SHA512 (thunderbird-102.8.0.source.tar.xz) = 2431eb8799184b261609c96bed3c9368bec9035a831aa5f744fa89e48aedb130385b268dd90f03bbddfec449dc3e5fad1b5f8727fe9e11e1d1f123a81b97ddf8
+Size (thunderbird-102.8.0.source.tar.xz) = 506030440 bytes
+SHA1 (patch-Cargo.lock) = 717351e88b0b58d21dd0159e4eb4a7d5b08d5afe
+SHA1 (patch-Cargo.toml) = 13f8d0bf2a1e2cab7c770c6783497ba923a21d9e
 SHA1 (patch-browser_app_profile_firefox.js) = d53fae5544563888d030af7483f00283a712235c
 SHA1 (patch-build_moz.configure_rust.configure) = 72c5fa2e9d1022325d038832cca2e35f7213116d
 SHA1 (patch-comm_third__party_botan_configure.py) = 262f560c514d221d0df15a1906100b5e716bfdab
 SHA1 (patch-comm_third__party_libgcrypt_configure) = c5ca8a8b44c485f81139b54d341ac044189d98d3
 SHA1 (patch-config_gcc-stl-wrapper.template.h) = ec0afe1b7d97dc0c305f9f7c197f9a7d7c32e629
+SHA1 (patch-config_makefiles_rust.mk) = 188178b184d79737247ed3770cc8f4370cd7f6c0
 SHA1 (patch-dom_base_nsAttrName.h) = 4e2326542d4dbba1ac2af5b33505267ee177b094
 SHA1 (patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = d08f170629dda585dc3e11706688527fe3dc0e78
 SHA1 (patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h) = 8ddf031923ea7edfd8e51c5ff334870d531fecb5
@@ -20,17 +23,24 @@ SHA1 (patch-js_src_jsfriendapi.h) = e013337469254e2a9e598bd070528f0f654acccb
 SHA1 (patch-js_src_util_NativeStack.cpp) = 338fdf6aa34101f6a41d07b303d4a8426c483d5b
 SHA1 (patch-media_ffvpx_libavutil_arm_bswap.h) = 5a7ad4d38165d49d44862ade846cb79de026867e
 SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 99e881e557430c1ef26060109f4b40c30d3b201c
-SHA1 (patch-media_libcubeb_src_cubeb__sun.c) = 3140751d6268faa03ded07cba8060f6a66687389
+SHA1 (patch-media_libcubeb_src_cubeb__sun.c) = 789312b0511f2667ab7ee581f066b6ecc129ad4f
 SHA1 (patch-media_libcubeb_src_moz.build) = bd3275f1acb6e439dee98b1673eeb65ec7797974
 SHA1 (patch-media_libpng_pngpriv.h) = 5c49119b0e555c9daca64799ff03f3fa8fa05ded
 SHA1 (patch-media_libtheora_lib_info.c) = 96f3d3824459186476102a4598d07cf6f6a704ef
 SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = 20b208c5ab4bfea5d49d79c19fc610867da0c4c7
 SHA1 (patch-old-configure.in) = d59d276124e1f95d9e144b8f7099abcf6de0489a
+SHA1 (patch-python_mozbuild_mozbuild_action_langpack_manifest.py) = 99b9e258a56a28610856298c2b80157668209f36
 SHA1 (patch-security_nss_lib_freebl_mpi_mpi.c) = 0cbf185955c77c9438ced0c294fbc8e4824797bf
 SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc) = 4b6b78b899b3ac4176aeba58b3d2af6d66c05a77
+SHA1 (patch-third__party_rust_bindgen_src_clang.rs) = e3b749622a95a93d3667588355480fc82a9e54f6
+SHA1 (patch-third__party_rust_bindgen_src_ir_comp.rs) = 770fc5cf5a25bb86cb7adb9379d3c63eed0d9d86
+SHA1 (patch-third__party_rust_bindgen_src_ir_ty.rs) = 8151426f3c633a16e51e71745689aed5995abadf
+SHA1 (patch-third__party_rust_bindgen_src_ir_var.rs) = d2701055a3cf74ac210c350f0ed823922acfd6ad
 SHA1 (patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs) = e9378a3868ddb628213c3a37e2177257c2344bc3
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = f80a0844ca37dda91a8cf38d6a542f152657901a
 SHA1 (patch-toolkit_modules_subprocess_subprocess__shared__unix.js) = d718759e59910228cc3729e359f328b47aff5eb4
 SHA1 (patch-toolkit_moz.configure) = b8907d57570bfd87708c5630e44c919710be0b9c
 SHA1 (patch-toolkit_mozapps_installer_packager.mk) = 407fe861dd9b82a88a6f5c0ed1e519a3c0e67251
+SHA1 (patch-toolkit_xre_glxtest_cpp) = 07dc19086a0e9d12bcb0c9ca0cc58bd0562bcfdd
+SHA1 (patch-widget_gtk_DMABufSurface.cpp) = aea8998364945f0a435ad63860ab50d56d5c0895
 SHA1 (patch-xpcom_base_nscore.h) = 6e6f2d564d8d6121c178c2567cce8ac2ebe8610b
diff --git a/thunderbird/files/cubeb_sun.c b/thunderbird/files/cubeb_sun.c
index 622f6091f5..64923194c1 100644
--- a/thunderbird/files/cubeb_sun.c
+++ b/thunderbird/files/cubeb_sun.c
@@ -740,7 +740,7 @@ static struct cubeb_ops const sun_ops = {
   .stream_destroy = sun_stream_destroy,
   .stream_start = sun_stream_start,
   .stream_stop = sun_stream_stop,
-//  .stream_reset_default_device = NULL,
+  .stream_reset_default_device = NULL,
   .stream_get_position = sun_stream_get_position,
   .stream_get_latency = sun_stream_get_latency,
   .stream_set_volume = sun_stream_set_volume,
diff --git a/thunderbird/mozilla-common.mk b/thunderbird/mozilla-common.mk
index c2e7eca5e5..f05cce2bfb 100644
--- a/thunderbird/mozilla-common.mk
+++ b/thunderbird/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.4 2022/12/27 20:08:45 abs Exp $
+# $NetBSD: mozilla-common.mk,v 1.5 2023/02/05 09:05:28 he Exp $
 #
 # common Makefile fragment for mozilla packages based on gecko 2.0.
 #
@@ -106,12 +106,12 @@ CONFIGURE_ARGS+=	--disable-updater
 # RLBox WASM sandbox
 .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
 # For wasm-ld command
-BUILD_DEPENDS+=		lld-[0-9]*:../../devel/lld
-.include "../../lang/wasi-libc/buildlink3.mk"
-.include "../../lang/wasi-libcxx/buildlink3.mk"
+BUILD_DEPENDS+=		lld-[0-9]*:../../wip/lld
+.include "../../wip/wasi-libc/buildlink3.mk"
+.include "../../wip/wasi-libcxx/buildlink3.mk"
 # NB the exact versions of the clang and wasi-compiler-rt dependencies must
 # be kept in sync, or build failures will occur due to path mismatches.
-.include "../../lang/wasi-compiler-rt/buildlink3.mk"
+.include "../../wip/wasi-compiler-rt/buildlink3.mk"
 CONFIGURE_ARGS+=	--with-wasi-sysroot=${PREFIX}/wasi
 CONFIGURE_ENV+=		WASM_CC=${PREFIX}/bin/clang
 CONFIGURE_ENV+=		WASM_CXX=${PREFIX}/bin/clang++
@@ -207,7 +207,7 @@ BUILDLINK_API_DEPENDS.nss+=	nss>=3.53
 BUILDLINK_API_DEPENDS.libwebp+=	libwebp>=1.0.2
 .include "../../graphics/libwebp/buildlink3.mk"
 BUILDLINK_DEPMETHOD.clang=	build
-.include "../../lang/clang/buildlink3.mk"
+.include "../../wip/clang/buildlink3.mk"
 RUST_REQ=	1.41.0
 .include "../../lang/rust/rust.mk"
 # webrtc option requires internal libvpx
diff --git a/thunderbird/patch-build_unix_stdc++compat_stdc++compat.cpp b/thunderbird/patch-build_unix_stdc++compat_stdc++compat.cpp
new file mode 100644
index 0000000000..e2939bbad8
--- /dev/null
+++ b/thunderbird/patch-build_unix_stdc++compat_stdc++compat.cpp
@@ -0,0 +1,29 @@
+--- build/unix/stdc++compat/stdc++compat.cpp.orig	2023-05-13 20:47:48.708400730 +0200
++++ build/unix/stdc++compat/stdc++compat.cpp	2023-05-13 20:52:07.029007269 +0200
+@@ -24,6 +24,7 @@
+    GLIBCXX_3.4.27 is from gcc 10
+    GLIBCXX_3.4.28 is from gcc 10
+    GLIBCXX_3.4.29 is from gcc 11
++   GLIBCXX_3.4.30 is from gcc 12
+ 
+ This file adds the necessary compatibility tricks to avoid symbols with
+ version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with
+@@ -69,6 +70,18 @@
+ }  // namespace std
+ #endif
+ 
++#if _GLIBCXX_RELEASE >= 12
++namespace std {
++/* This avoids the GLIBCXX_3.4.30 symbol version. */
++void __attribute__((weak))
++__glibcxx_assert_fail(const char* __file, int __line, const char* __function,
++		      const char* __condition) {
++  MOZ_CRASH();
++}
++
++}  // namespace std
++#endif
++
+ /* While we generally don't build with exceptions, we have some host tools
+  * that do use them. libstdc++ from GCC 5.0 added exception constructors with
+  * char const* argument. Older versions only have a constructor with
diff --git a/thunderbird/patch-dom_media_webrtc_sdp_RsdparsaSdpGlue.cpp b/thunderbird/patch-dom_media_webrtc_sdp_RsdparsaSdpGlue.cpp
new file mode 100644
index 0000000000..f073d56c9f
--- /dev/null
+++ b/thunderbird/patch-dom_media_webrtc_sdp_RsdparsaSdpGlue.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp.orig	2023-05-12 14:15:02.145219021 +0200
++++ dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp	2023-05-12 14:15:48.433146715 +0200
+@@ -3,6 +3,7 @@
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+  * You can obtain one at http://mozilla.org/MPL/2.0/. */
++#include <cstdint>
+ #include <string>
+ 
+ #include "sdp/RsdparsaSdpInc.h"
diff --git a/thunderbird/patch-gfx_2d_Rect.h b/thunderbird/patch-gfx_2d_Rect.h
new file mode 100644
index 0000000000..0c55edc6e0
--- /dev/null
+++ b/thunderbird/patch-gfx_2d_Rect.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- gfx/2d/Rect.h.orig	2023-05-12 14:17:38.303449723 +0200
++++ gfx/2d/Rect.h	2023-05-12 14:18:04.645202892 +0200
+@@ -15,6 +15,7 @@
+ #include "mozilla/Maybe.h"
+ 
+ #include <cmath>
++#include <cstdint>
+ 
+ namespace mozilla {
+ 
diff --git a/thunderbird/patch-toolkit_components_telemetry_pingsender_pingsender.cpp b/thunderbird/patch-toolkit_components_telemetry_pingsender_pingsender.cpp
new file mode 100644
index 0000000000..51cf0d5837
--- /dev/null
+++ b/thunderbird/patch-toolkit_components_telemetry_pingsender_pingsender.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- toolkit/components/telemetry/pingsender/pingsender.cpp.orig	2023-05-12 14:19:10.322882448 +0200
++++ toolkit/components/telemetry/pingsender/pingsender.cpp	2023-05-12 14:19:26.908660689 +0200
+@@ -3,6 +3,7 @@
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
++#include <cstdint>
+ #include <cstdlib>
+ #include <cstring>
+ #include <ctime>
diff --git a/thunderbird/patch-tools_profiler_core_platform.cpp b/thunderbird/patch-tools_profiler_core_platform.cpp
new file mode 100644
index 0000000000..cfbf14d8bd
--- /dev/null
+++ b/thunderbird/patch-tools_profiler_core_platform.cpp
@@ -0,0 +1,68 @@
+$NetBSD$
+
+
+--- tools/profiler/core/platform.cpp.orig	2023-05-12 18:28:37.639313036 +0200
++++ tools/profiler/core/platform.cpp	2023-05-12 18:35:52.993265195 +0200
+@@ -1106,7 +1106,7 @@
+         continue;
+       }
+       ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData =
+-          offThreadRef.LockedRWFromAnyThread();
++          offThreadRef.GetLockedRWFromAnyThread();
+       MOZ_RELEASE_ASSERT(array.append(ProfiledThreadListElement{
+           profiledThreadData->Info().RegisterTime(),
+           lockedThreadData->GetJSContext(), profiledThreadData}));
+@@ -4050,7 +4050,7 @@
+ 
+             if (threadStackSampling) {
+               ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock
+-                  lockedThreadData = offThreadRef.LockedRWFromAnyThread();
++                  lockedThreadData = offThreadRef.GetLockedRWFromAnyThread();
+               // Suspend the thread and collect its stack data in the local
+               // buffer.
+               mSampler.SuspendAndSampleAndResumeThread(
+@@ -4764,7 +4764,7 @@
+             aLock, aOffThreadRef.UnlockedConstReaderCRef().Info());
+     if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) {
+       ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock
+-          lockedRWFromAnyThread = aOffThreadRef.LockedRWFromAnyThread();
++          lockedRWFromAnyThread = aOffThreadRef.GetLockedRWFromAnyThread();
+ 
+       ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread(
+           aLock, MakeUnique<ProfiledThreadData>(
+@@ -5629,7 +5629,7 @@
+         ActivePS::ProfilingFeaturesForThread(aLock, info);
+     if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) {
+       ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData =
+-          offThreadRef.LockedRWFromAnyThread();
++          offThreadRef.GetLockedRWFromAnyThread();
+       ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread(
+           aLock, MakeUnique<ProfiledThreadData>(info));
+       lockedThreadData->SetProfilingFeaturesAndData(threadProfilingFeatures,
+@@ -5853,7 +5853,7 @@
+     }
+ 
+     ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData =
+-        offThreadRef.LockedRWFromAnyThread();
++        offThreadRef.GetLockedRWFromAnyThread();
+ 
+     lockedThreadData->ClearProfilingFeaturesAndData(aLock);
+ 
+@@ -6196,7 +6196,7 @@
+   // thread that is in the process of disappearing.
+ 
+   ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData =
+-      aOnThreadRef.LockedRWOnThread();
++      aOnThreadRef.GetLockedRWOnThread();
+ 
+   ProfiledThreadData* profiledThreadData =
+       lockedThreadData->GetProfiledThreadData(lock);
+@@ -6717,7 +6717,7 @@
+         // The profiler mutex must be locked before the ThreadRegistration's.
+         PSAutoLock lock;
+         ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData =
+-            aOnThreadRef.LockedRWOnThread();
++            aOnThreadRef.GetLockedRWOnThread();
+ 
+         if (ProfiledThreadData* profiledThreadData =
+                 lockedThreadData->GetProfiledThreadData(lock);
diff --git a/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistration.h b/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistration.h
new file mode 100644
index 0000000000..925a4a7916
--- /dev/null
+++ b/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistration.h
@@ -0,0 +1,23 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- tools/profiler/public/ProfilerThreadRegistration.h.orig	2023-05-12 18:38:17.497857025 +0200
++++ tools/profiler/public/ProfilerThreadRegistration.h	2023-05-12 18:40:07.902690604 +0200
+@@ -214,14 +214,14 @@
+       DataLock mDataLock;
+     };
+ 
+-    [[nodiscard]] RWOnThreadWithLock LockedRWOnThread() {
++    [[nodiscard]] RWOnThreadWithLock GetLockedRWOnThread() {
+       return RWOnThreadWithLock{mThreadRegistration->mData,
+                                 mThreadRegistration->mDataMutex};
+     }
+ 
+     template <typename F>
+     auto WithLockedRWOnThread(F&& aF) {
+-      RWOnThreadWithLock lockedData = LockedRWOnThread();
++      RWOnThreadWithLock lockedData = GetLockedRWOnThread();
+       return std::forward<F>(aF)(lockedData.DataRef());
+     }
+ 
diff --git a/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistry.h b/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistry.h
new file mode 100644
index 0000000000..ae7be3546b
--- /dev/null
+++ b/thunderbird/patch-tools_profiler_public_ProfilerThreadRegistry.h
@@ -0,0 +1,23 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- tools/profiler/public/ProfilerThreadRegistry.h.orig	2023-05-12 18:43:33.901805488 +0200
++++ tools/profiler/public/ProfilerThreadRegistry.h	2023-05-12 18:44:46.758075369 +0200
+@@ -177,14 +177,14 @@
+       ThreadRegistration::DataLock mDataLock;
+     };
+ 
+-    [[nodiscard]] RWFromAnyThreadWithLock LockedRWFromAnyThread() {
++    [[nodiscard]] RWFromAnyThreadWithLock GetLockedRWFromAnyThread() {
+       return RWFromAnyThreadWithLock{mThreadRegistration->mData,
+                                      mThreadRegistration->mDataMutex};
+     }
+ 
+     template <typename F>
+     auto WithLockedRWFromAnyThread(F&& aF) {
+-      RWFromAnyThreadWithLock lockedData = LockedRWFromAnyThread();
++      RWFromAnyThreadWithLock lockedData = GetLockedRWFromAnyThread();
+       return std::forward<F>(aF)(lockedData.DataRef());
+     }
+ 
diff --git a/thunderbird/patch-tools_profiler_tests_gtest_GeckoProfiler.cpp b/thunderbird/patch-tools_profiler_tests_gtest_GeckoProfiler.cpp
new file mode 100644
index 0000000000..fd396060ba
--- /dev/null
+++ b/thunderbird/patch-tools_profiler_tests_gtest_GeckoProfiler.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+GCC 13 fixes.
+
+--- tools/profiler/tests/gtest/GeckoProfiler.cpp.orig	2023-05-12 18:45:52.823502307 +0200
++++ tools/profiler/tests/gtest/GeckoProfiler.cpp	2023-05-12 18:47:25.421971082 +0200
+@@ -621,7 +621,7 @@
+       EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread());
+       {
+         TR::OnThreadRef::RWOnThreadWithLock rwOnThreadWithLock =
+-            aOnThreadRef.LockedRWOnThread();
++            aOnThreadRef.GetLockedRWOnThread();
+         EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread());
+         TestConstLockedRWOnThread(rwOnThreadWithLock.DataCRef(),
+                                   beforeRegistration, afterRegistration,
+@@ -1020,7 +1020,7 @@
+         EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread());
+         {
+           TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock =
+-              aOffThreadRef.LockedRWFromAnyThread();
++              aOffThreadRef.GetLockedRWFromAnyThread();
+           if (profiler_current_thread_id() == testThreadId) {
+             EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread());
+           }
+@@ -1157,7 +1157,7 @@
+             PR_Sleep(PR_MillisecondsToInterval(1));
+           }
+           TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock =
+-              aOffThreadRef.LockedRWFromAnyThread();
++              aOffThreadRef.GetLockedRWFromAnyThread();
+           ++otherThreadReads;
+           if (otherThreadReads % 1000 == 0) {
+             PR_Sleep(PR_MillisecondsToInterval(1));
diff --git a/thunderbird/patches/patch-Cargo.lock b/thunderbird/patches/patch-Cargo.lock
new file mode 100644
index 0000000000..c4cf8cf8f4
--- /dev/null
+++ b/thunderbird/patches/patch-Cargo.lock
@@ -0,0 +1,33 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- Cargo.lock.orig	2023-05-13 01:55:05.593291732 +0200
++++ Cargo.lock	2023-05-13 01:55:28.140873785 +0200
+@@ -394,8 +394,6 @@
+ [[package]]
+ name = "bindgen"
+ version = "0.56.0"
+-source = "registry+https://github.com/rust-lang/crates.io-index";
+-checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"
+ dependencies = [
+  "bitflags",
+  "cexpr",
diff --git a/thunderbird/patches/patch-Cargo.toml b/thunderbird/patches/patch-Cargo.toml
new file mode 100644
index 0000000000..84f57a0932
--- /dev/null
+++ b/thunderbird/patches/patch-Cargo.toml
@@ -0,0 +1,32 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- Cargo.toml.orig	2023-05-13 01:11:33.156937081 +0200
++++ Cargo.toml	2023-05-13 01:12:30.660636037 +0200
+@@ -116,6 +116,7 @@
+ packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd";, rev="f38664024b29d44c506431eada7c112629bb1aa9" }
+ midir = { git = "https://github.com/mozilla/midir.git";, rev = "4c11f0ffb5d6a10de4aff40a7b81218b33b94e6f" }
+ minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git";, rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" }
++bindgen = { path = "third_party/rust/bindgen" }
+ 
+ # Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2.
+ # There is not going to be new version of mio 0.6, mio now being >= 0.7.11.
diff --git a/thunderbird/patches/patch-build_moz.configure_rust.configure b/thunderbird/patches/patch-build_moz.configure_rust.configure
index c73e0ed5e6..cb777de823 100644
--- a/thunderbird/patches/patch-build_moz.configure_rust.configure
+++ b/thunderbird/patches/patch-build_moz.configure_rust.configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-build_moz.configure_rust.configure,v 1.4 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-build_moz.configure_rust.configure,v 1.5 2023/02/05 09:05:29 he Exp $
 
 --- build/moz.configure/rust.configure.orig	2020-08-28 21:32:29.000000000 +0000
 +++ build/moz.configure/rust.configure
diff --git a/thunderbird/patches/patch-comm_third__party_libgcrypt_configure b/thunderbird/patches/patch-comm_third__party_libgcrypt_configure
index c725eac3d8..632bb711b2 100644
--- a/thunderbird/patches/patch-comm_third__party_libgcrypt_configure
+++ b/thunderbird/patches/patch-comm_third__party_libgcrypt_configure
@@ -1,4 +1,4 @@
-$NetBSD$
+$NetBSD: patch-comm_third__party_libgcrypt_configure,v 1.1 2023/02/05 09:05:29 he Exp $
 
 --- comm/third_party/libgcrypt/configure.orig	2022-12-20 00:50:23.000000000 +0000
 +++ comm/third_party/libgcrypt/configure
diff --git a/thunderbird/patches/patch-config_gcc-stl-wrapper.template.h b/thunderbird/patches/patch-config_gcc-stl-wrapper.template.h
index ba07f06b8e..972b5923e3 100644
--- a/thunderbird/patches/patch-config_gcc-stl-wrapper.template.h
+++ b/thunderbird/patches/patch-config_gcc-stl-wrapper.template.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-config_gcc-stl-wrapper.template.h,v 1.2 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-config_gcc-stl-wrapper.template.h,v 1.3 2023/02/05 09:05:29 he Exp $
 
 --- config/gcc-stl-wrapper.template.h.orig	2020-08-28 21:32:29.000000000 +0000
 +++ config/gcc-stl-wrapper.template.h
diff --git a/thunderbird/patches/patch-config_makefiles_rust.mk b/thunderbird/patches/patch-config_makefiles_rust.mk
new file mode 100644
index 0000000000..fc815195da
--- /dev/null
+++ b/thunderbird/patches/patch-config_makefiles_rust.mk
@@ -0,0 +1,30 @@
+$NetBSD: patch-config_makefiles_rust.mk,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+NetBSD doesn't get along with parallel rust builds (it causes issues
+with ld.so) which are the default. Force -j1.
+
+Use less memory to fix build under NetBSD/i386.
+From: https://bugzilla.mozilla.org/show_bug.cgi?id=1644409
+
+--- config/makefiles/rust.mk.orig	2022-06-08 14:10:19.000000000 +0000
++++ config/makefiles/rust.mk
+@@ -58,6 +58,9 @@ ifdef MOZ_TSAN
+ cargo_build_flags += -Zbuild-std=std,panic_abort
+ RUSTFLAGS += -Zsanitizer=thread
+ endif
++ifeq ($(OS_ARCH),NetBSD)
++cargo_build_flags += -j1
++endif
+ 
+ rustflags_sancov =
+ ifdef LIBFUZZER
+@@ -90,7 +93,8 @@ ifndef rustflags_sancov
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
+ ifndef MOZ_CODE_COVERAGE
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+-cargo_rustc_flags += -Clto
++cargo_rustc_flags += -Clto=thin
++export CARGO_PROFILE_RELEASE_LTO=thin
+ endif
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
+ RUSTFLAGS += -Cembed-bitcode=yes
diff --git a/thunderbird/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h b/thunderbird/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
index f4119b17f1..aa643451c2 100644
--- a/thunderbird/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
+++ b/thunderbird/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h,v 1.2 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h,v 1.3 2023/02/05 09:05:29 he Exp $
 
 --- gfx/angle/checkout/src/compiler/translator/InfoSink.h.orig	2020-08-28 21:32:36.000000000 +0000
 +++ gfx/angle/checkout/src/compiler/translator/InfoSink.h
diff --git a/thunderbird/patches/patch-gfx_cairo_cairo_src_cairo-type1-subset.c b/thunderbird/patches/patch-gfx_cairo_cairo_src_cairo-type1-subset.c
index db80398958..5ab6a09e6d 100644
--- a/thunderbird/patches/patch-gfx_cairo_cairo_src_cairo-type1-subset.c
+++ b/thunderbird/patches/patch-gfx_cairo_cairo_src_cairo-type1-subset.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-gfx_cairo_cairo_src_cairo-type1-subset.c,v 1.1 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-gfx_cairo_cairo_src_cairo-type1-subset.c,v 1.2 2023/02/05 09:05:29 he Exp $
 
 --- gfx/cairo/cairo/src/cairo-type1-subset.c.orig	2020-08-28 21:32:36.000000000 +0000
 +++ gfx/cairo/cairo/src/cairo-type1-subset.c
diff --git a/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc b/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
index 9f917874b0..941ca9a526 100644
--- a/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
+++ b/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
@@ -1,4 +1,4 @@
-$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.4 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.5 2023/02/05 09:05:29 he Exp $
 
 --- ipc/chromium/src/base/message_pump_libevent.cc.orig	2020-08-28 21:32:41.000000000 +0000
 +++ ipc/chromium/src/base/message_pump_libevent.cc
diff --git a/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
index 2b73a307d5..9cdb8babb8 100644
--- a/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
+++ b/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
@@ -1,4 +1,4 @@
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.10 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.11 2023/02/05 09:05:29 he Exp $
 
 --- ipc/glue/GeckoChildProcessHost.cpp.orig	2020-08-28 21:32:41.000000000 +0000
 +++ ipc/glue/GeckoChildProcessHost.cpp
diff --git a/thunderbird/patches/patch-js_src_jsfriendapi.h b/thunderbird/patches/patch-js_src_jsfriendapi.h
index 60017c09af..af658177b0 100644
--- a/thunderbird/patches/patch-js_src_jsfriendapi.h
+++ b/thunderbird/patches/patch-js_src_jsfriendapi.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-js_src_jsfriendapi.h,v 1.1 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-js_src_jsfriendapi.h,v 1.2 2023/02/05 09:05:29 he Exp $
 
 --- js/src/jsfriendapi.h.orig	2020-08-28 21:32:42.000000000 +0000
 +++ js/src/jsfriendapi.h
diff --git a/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c b/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c
index e502c0f5a8..7185b1de75 100644
--- a/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c
+++ b/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.3 2023/02/05 09:05:29 he Exp $
 
 --- media/libcubeb/src/cubeb_alsa.c.orig	2020-08-28 21:33:11.000000000 +0000
 +++ media/libcubeb/src/cubeb_alsa.c
diff --git a/thunderbird/patches/patch-media_libcubeb_src_cubeb__sun.c b/thunderbird/patches/patch-media_libcubeb_src_cubeb__sun.c
index 17dff6c174..8c725acc82 100644
--- a/thunderbird/patches/patch-media_libcubeb_src_cubeb__sun.c
+++ b/thunderbird/patches/patch-media_libcubeb_src_cubeb__sun.c
@@ -1,6 +1,6 @@
-$NetBSD: patch-media_libcubeb_src_cubeb__sun.c,v 1.1 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-media_libcubeb_src_cubeb__sun.c,v 1.4 2023/02/16 18:11:40 he Exp $
 
---- media/libcubeb/src/cubeb_sun.c.orig	2020-09-02 21:41:01.178547066 +0000
+--- media/libcubeb/src/cubeb_sun.c.orig	2023-02-16 16:57:29.457010148 +0000
 +++ media/libcubeb/src/cubeb_sun.c
 @@ -1,5 +1,5 @@
  /*
@@ -504,13 +504,17 @@ $NetBSD: patch-media_libcubeb_src_cubeb__sun.c,v 1.1 2020/09/03 15:26:22 ryoon E
    return CUBEB_OK;
  }
  
-@@ -743,8 +721,8 @@ static struct cubeb_ops const sun_ops = 
- //  .stream_reset_default_device = NULL,
+@@ -740,11 +718,11 @@ static struct cubeb_ops const sun_ops = 
+   .stream_destroy = sun_stream_destroy,
+   .stream_start = sun_stream_start,
+   .stream_stop = sun_stream_stop,
+-  .stream_reset_default_device = NULL,
    .stream_get_position = sun_stream_get_position,
    .stream_get_latency = sun_stream_get_latency,
 +  .stream_get_input_latency = NULL,
    .stream_set_volume = sun_stream_set_volume,
 -  .stream_set_panning = NULL,
++  .stream_set_name = NULL,
    .stream_get_current_device = sun_get_current_device,
    .stream_device_destroy = sun_stream_device_destroy,
    .stream_register_device_changed_callback = NULL,
diff --git a/thunderbird/patches/patch-media_libcubeb_src_moz.build b/thunderbird/patches/patch-media_libcubeb_src_moz.build
index 66ffe72cac..ae3445af88 100644
--- a/thunderbird/patches/patch-media_libcubeb_src_moz.build
+++ b/thunderbird/patches/patch-media_libcubeb_src_moz.build
@@ -1,4 +1,4 @@
-$NetBSD: patch-media_libcubeb_src_moz.build,v 1.4 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-media_libcubeb_src_moz.build,v 1.5 2023/02/05 09:05:29 he Exp $
 
 --- media/libcubeb/src/moz.build.orig	2022-12-20 00:49:56.000000000 +0000
 +++ media/libcubeb/src/moz.build
diff --git a/thunderbird/patches/patch-old-configure.in b/thunderbird/patches/patch-old-configure.in
index 83d6da935b..d1b923972f 100644
--- a/thunderbird/patches/patch-old-configure.in
+++ b/thunderbird/patches/patch-old-configure.in
@@ -1,4 +1,4 @@
-$NetBSD: patch-old-configure.in,v 1.5 2021/03/09 13:31:48 wiz Exp $
+$NetBSD: patch-old-configure.in,v 1.6 2023/02/05 09:05:29 he Exp $
 
 --- old-configure.in.orig	2020-08-28 21:33:19.000000000 +0000
 +++ old-configure.in
diff --git a/thunderbird/patches/patch-python_mozbuild_mozbuild_action_langpack_manifest.py b/thunderbird/patches/patch-python_mozbuild_mozbuild_action_langpack_manifest.py
new file mode 100644
index 0000000000..90af465c6e
--- /dev/null
+++ b/thunderbird/patches/patch-python_mozbuild_mozbuild_action_langpack_manifest.py
@@ -0,0 +1,27 @@
+$NetBSD$
+
+Allow to override build date with SOURCE_DATE_EPOCH
+in order to make build reproducible.
+For more information see https://reproducible-builds.org, and
+https://reproducible-builds.org/specs/source-date-epoch/
+for the definition of this variable.
+
+--- python/mozbuild/mozbuild/action/langpack_manifest.py.orig	2023-05-13 02:22:29.641354307 +0200
++++ python/mozbuild/mozbuild/action/langpack_manifest.py	2023-05-13 02:24:00.832424983 +0200
+@@ -16,6 +16,7 @@
+ import json
+ import io
+ import datetime
++import time
+ import requests
+ import mozversioncontrol
+ import mozpack.path as mozpath
+@@ -105,7 +106,7 @@
+         dt = get_dt_from_hg(path)
+ 
+     if dt is None:
+-        dt = datetime.datetime.utcnow()
++        dt = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
+ 
+     dt = dt.replace(microsecond=0)
+     return dt.strftime("%Y%m%d%H%M%S")
diff --git a/thunderbird/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc b/thunderbird/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
index c1f4bd8e99..cf3dcd63f6 100644
--- a/thunderbird/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
+++ b/thunderbird/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
@@ -1,4 +1,4 @@
-$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.3 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc,v 1.1 2023/02/05 09:05:29 he Exp $
 
 --- third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc.orig	2020-08-28 21:33:15.000000000 +0000
 +++ third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc
diff --git a/thunderbird/patches/patch-third__party_rust_bindgen_src_clang.rs b/thunderbird/patches/patch-third__party_rust_bindgen_src_clang.rs
new file mode 100644
index 0000000000..fb4a8628b8
--- /dev/null
+++ b/thunderbird/patches/patch-third__party_rust_bindgen_src_clang.rs
@@ -0,0 +1,36 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- third_party/rust/bindgen/src/clang.rs.orig	2023-05-13 01:13:19.851639954 +0200
++++ third_party/rust/bindgen/src/clang.rs	2023-05-13 01:15:51.240925636 +0200
+@@ -54,6 +54,11 @@
+         unsafe { clang_isDeclaration(self.kind()) != 0 }
+     }
+ 
++    /// Is this cursor's referent an anonymous record or so?
++    pub fn is_anonymous(&self) -> bool {
++        unsafe { clang_Cursor_isAnonymous(self.x) != 0 }
++    }
++
+     /// Get this cursor's referent's spelling.
+     pub fn spelling(&self) -> String {
+         unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) }
diff --git a/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_comp.rs b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_comp.rs
new file mode 100644
index 0000000000..1d82afea75
--- /dev/null
+++ b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_comp.rs
@@ -0,0 +1,33 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- third_party/rust/bindgen/src/ir/comp.rs.orig	2023-05-13 03:05:52.709272405 +0200
++++ third_party/rust/bindgen/src/ir/comp.rs	2023-05-13 03:08:36.774355149 +0200
+@@ -1372,7 +1372,7 @@
+ 
+                     // A declaration of an union or a struct without name could
+                     // also be an unnamed field, unfortunately.
+-                    if cur.spelling().is_empty() &&
++                    if cur.is_anonymous() &&
+                         cur.kind() != CXCursor_EnumDecl
+                     {
+                         let ty = cur.cur_type();
diff --git a/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_ty.rs b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_ty.rs
new file mode 100644
index 0000000000..e9c27d2731
--- /dev/null
+++ b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_ty.rs
@@ -0,0 +1,123 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- third_party/rust/bindgen/src/ir/ty.rs.orig	2023-04-03 19:42:41.000000000 +0200
++++ third_party/rust/bindgen/src/ir/ty.rs	2023-05-13 01:43:32.212969772 +0200
+@@ -737,7 +737,12 @@
+ 
+         let layout = ty.fallible_layout(ctx).ok();
+         let cursor = ty.declaration();
+-        let mut name = cursor.spelling();
++        let is_anonymous = cursor.is_anonymous();
++        let mut name = if is_anonymous {
++            None
++        } else {
++            Some(cursor.spelling()).filter(|n| !n.is_empty())
++        };
+ 
+         debug!(
+             "from_clang_ty: {:?}, ty: {:?}, loc: {:?}",
+@@ -771,7 +776,7 @@
+             if is_canonical_objcpointer && is_template_type_param {
+                 // Objective-C generics are just ids with fancy name.
+                 // To keep it simple, just name them ids
+-                name = "id".to_owned();
++                name = Some("id".to_owned());
+             }
+         }
+ 
+@@ -900,7 +905,7 @@
+                                         return Err(ParseError::Recurse);
+                                     }
+                                 } else {
+-                                    name = location.spelling();
++                                    name = Some(location.spelling());
+                                 }
+ 
+                                 let complex = CompInfo::from_ty(
+@@ -942,7 +947,7 @@
+                                                 CXType_Typedef
+                                             );
+ 
+-                                            name = current.spelling();
++                                            name = Some(current.spelling());
+ 
+                                             let inner_ty = cur
+                                                 .typedef_type()
+@@ -1126,10 +1131,10 @@
+                 CXType_Enum => {
+                     let enum_ = Enum::from_ty(ty, ctx).expect("Not an enum?");
+ 
+-                    if name.is_empty() {
++                    if !is_anonymous {
+                         let pretty_name = ty.spelling();
+                         if clang::is_valid_identifier(&pretty_name) {
+-                            name = pretty_name;
++                            name = Some(pretty_name);
+                         }
+                     }
+ 
+@@ -1144,12 +1149,12 @@
+                     )
+                     .expect("Not a complex type?");
+ 
+-                    if name.is_empty() {
++                    if !is_anonymous {
+                         // The pretty-printed name may contain typedefed name,
+                         // but may also be "struct (anonymous at .h:1)"
+                         let pretty_name = ty.spelling();
+                         if clang::is_valid_identifier(&pretty_name) {
+-                            name = pretty_name;
++                            name = Some(pretty_name);
+                         }
+                     }
+ 
+@@ -1161,8 +1166,7 @@
+                         location,
+                         None,
+                         ctx,
+-                    )
+-                    .expect("Not able to resolve vector element?");
++                    )?;
+                     TypeKind::Vector(inner, ty.num_elements().unwrap())
+                 }
+                 CXType_ConstantArray => {
+@@ -1189,7 +1193,9 @@
+                 CXType_ObjCClass | CXType_ObjCInterface => {
+                     let interface = ObjCInterface::from_ty(&location, ctx)
+                         .expect("Not a valid objc interface?");
+-                    name = interface.rust_name();
++                    if !is_anonymous {
++                        name = Some(interface.rust_name());
++                    }
+                     TypeKind::ObjCInterface(interface)
+                 }
+                 CXType_Dependent => {
+@@ -1207,7 +1213,7 @@
+             }
+         };
+ 
+-        let name = if name.is_empty() { None } else { Some(name) };
++        name = name.filter(|n| !n.is_empty());
+ 
+         let is_const = ty.is_const() ||
+             (ty.kind() == CXType_ConstantArray &&
diff --git a/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_var.rs b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_var.rs
new file mode 100644
index 0000000000..a6f2af8e99
--- /dev/null
+++ b/thunderbird/patches/patch-third__party_rust_bindgen_src_ir_var.rs
@@ -0,0 +1,40 @@
+$NetBSD$
+
+rust-bindgen upstream (#2338 and #2319), Self
+Updates the bundled rust-bindgen crate to be compatible
+with Clang/LLVM 16.
+
+clang: Detect anonymous items explicitly, rather than relying on empty names.
+In Clang 16, anonymous items may return names like `(anonymous union at ...)`
+rather than emoty names.
+The right way to detect them is using clang_Cursor_isAnonymous.
+Fixes https://github.com/rust-lang/rust-bindgen/issues/2312
+Closes https://github.com/rust-lang/rust-bindgen/pull/2316
+
+ir: Don't crash with built-in unexposed types from libclang.
+This fixes https://github.com/rust-lang/rust-bindgen/issues/2325
+
+The issue is that `__bf16` is not exposed at all by libclang, which
+causes us to crash. It's a bit of a shame libclang doesn't expose it but
+there's no rust equivalent I think, so this should be ok for now.
+
+Unfortunately no test because the header crashes older clang versions.
+
+--- third_party/rust/bindgen/src/ir/var.rs.orig	2023-05-13 01:44:21.240433172 +0200
++++ third_party/rust/bindgen/src/ir/var.rs	2023-05-13 01:47:51.806534744 +0200
+@@ -301,11 +301,11 @@
+                 let ty = match Item::from_ty(&ty, cursor, None, ctx) {
+                     Ok(ty) => ty,
+                     Err(e) => {
+-                        assert_eq!(
+-                            ty.kind(),
+-                            CXType_Auto,
++                        assert!(
++                        matches!(ty.kind(), CXType_Auto | CXType_Unexposed),
+                             "Couldn't resolve constant type, and it \
+-                             wasn't an nondeductible auto type!"
++                             wasn't an nondeductible auto type or unexposed \
++                             type!"
+                         );
+                         return Err(e);
+                     }
diff --git a/thunderbird/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs b/thunderbird/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
index 74c6ebaac3..9e95bd8768 100644
--- a/thunderbird/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
+++ b/thunderbird/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
@@ -1,4 +1,4 @@
-$NetBSD: patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs,v 1.1 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs,v 1.2 2023/02/05 09:05:29 he Exp $
 
 --- third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig	2020-08-28 21:33:54.000000000 +0000
 +++ third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
diff --git a/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp b/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp
index abb213f972..485c25d545 100644
--- a/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp
+++ b/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp
@@ -1,4 +1,4 @@
-$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.3 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.4 2023/02/05 09:05:29 he Exp $
 
 --- toolkit/components/terminator/nsTerminator.cpp.orig	2020-08-28 21:33:46.000000000 +0000
 +++ toolkit/components/terminator/nsTerminator.cpp
diff --git a/thunderbird/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js b/thunderbird/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
index 31d60bb446..465db164a4 100644
--- a/thunderbird/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
+++ b/thunderbird/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
@@ -1,4 +1,4 @@
-$NetBSD: patch-toolkit_modules_subprocess_subprocess__shared__unix.js,v 1.2 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-toolkit_modules_subprocess_subprocess__shared__unix.js,v 1.3 2023/02/05 09:05:29 he Exp $
 
 --- toolkit/modules/subprocess/subprocess_shared_unix.js.orig	2020-08-28 21:34:00.000000000 +0000
 +++ toolkit/modules/subprocess/subprocess_shared_unix.js
diff --git a/thunderbird/patches/patch-toolkit_moz.configure b/thunderbird/patches/patch-toolkit_moz.configure
index f531ac3efb..5eaf098e8f 100644
--- a/thunderbird/patches/patch-toolkit_moz.configure
+++ b/thunderbird/patches/patch-toolkit_moz.configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-toolkit_moz.configure,v 1.2 2020/09/03 15:26:22 ryoon Exp $
+$NetBSD: patch-toolkit_moz.configure,v 1.3 2023/02/05 09:05:29 he Exp $
 
 --- toolkit/moz.configure.orig	2020-08-28 21:33:59.000000000 +0000
 +++ toolkit/moz.configure
diff --git a/thunderbird/patches/patch-toolkit_xre_glxtest_cpp b/thunderbird/patches/patch-toolkit_xre_glxtest_cpp
new file mode 100644
index 0000000000..c4d6215701
--- /dev/null
+++ b/thunderbird/patches/patch-toolkit_xre_glxtest_cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1776713
+
+Index: toolkit/xre/glxtest.cpp
+--- toolkit/xre/glxtest.cpp.orig
++++ toolkit/xre/glxtest.cpp
+@@ -258,6 +258,9 @@ static void close_logging() {
+ #define PCI_BASE_CLASS_DISPLAY 0x03
+ 
+ static int get_pci_status() {
++#ifdef __OpenBSD__ || ifdef __NetBSD__ || ifdef __FreeBSD__
++  return 1;
++#endif
+   void* libpci = dlopen("libpci.so.3", RTLD_LAZY);
+   if (!libpci) {
+     libpci = dlopen("libpci.so", RTLD_LAZY);
diff --git a/thunderbird/patches/patch-widget_gtk_DMABufSurface.cpp b/thunderbird/patches/patch-widget_gtk_DMABufSurface.cpp
new file mode 100644
index 0000000000..474df72edb
--- /dev/null
+++ b/thunderbird/patches/patch-widget_gtk_DMABufSurface.cpp
@@ -0,0 +1,32 @@
+$NetBSD: patch-widget_gtk_DMABufSurface.cpp,v 1.1 2023/02/10 10:04:54 pho Exp $
+
+No eventfd on NetBSD 9 and older, fix build
+
+--- widget/gtk/DMABufSurface.cpp.orig	2021-04-08 21:20:12.000000000 +0000
++++ widget/gtk/DMABufSurface.cpp
+@@ -18,7 +18,9 @@
+ #include <sys/time.h>
+ #include <dlfcn.h>
+ #include <sys/mman.h>
++#ifndef __NetBSD__
+ #include <sys/eventfd.h>
++#endif
+ #include <poll.h>
+ #include <sys/ioctl.h>
+ 
+@@ -97,6 +99,7 @@ void DMABufSurface::GlobalRefAdd() {
+ }
+ 
+ void DMABufSurface::GlobalRefCountCreate() {
++#ifndef __NetBSD__
+   MOZ_ASSERT(!mGlobalRefCountFd);
+   mGlobalRefCountFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK | EFD_SEMAPHORE);
+   if (mGlobalRefCountFd < 0) {
+@@ -106,6 +109,7 @@ void DMABufSurface::GlobalRefCountCreate
+     mGlobalRefCountFd = 0;
+     return;
+   }
++#endif
+ }
+ 
+ void DMABufSurface::GlobalRefCountImport(int aFd) {


Home | Main Index | Thread Index | Old Index