commit:     e3edf8c934c375feeed42a3fe52150e1e9e3a01d
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 14 15:16:00 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Nov 14 15:24:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3edf8c9

mail-client/thunderbird: add 145.0

Sync changes from Firefox bump (llvm compat, patchset, nss requirement).

This is only tested with gcc-15.2.1_p20251108-r1 so the lto issues might be
present in TB with an older version. Running a fully updated ~testing Gentoo
should show no issues. Will add the gcc checks/requirements from Firefox, if
the build fails with an older gcc (open a bug).

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 mail-client/thunderbird/Manifest                 |   66 ++
 mail-client/thunderbird/thunderbird-145.0.ebuild | 1156 ++++++++++++++++++++++
 2 files changed, 1222 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 7b1edac6b362..edd2828b31f2 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -3,6 +3,7 @@ DIST firefox-140esr-patches-03.tar.xz 13452 BLAKE2B 
f1e5da9400ae5d15dec852f0d68d
 DIST firefox-140esr-patches-03t.tar.xz 13772 BLAKE2B 
a62d981c81690306845b28375d1db9526e26a59d9f08fbfe3bce9711fb90567ecf502e398f929a7d98d3c563d8b98ddae760ffb7336be8fee96703cf13912637
 SHA512 
f357bfcaa4f51fd67c8278cb42b4fa9fa2595288a1ed44009dedc4080a7e1b70dba8495ea19c9f18a482b83a5ba261b5fbd91f29ed257cc80ba043316b95b573
 DIST firefox-143-patches-02t.tar.xz 14036 BLAKE2B 
7d84726e1d4ababc088052382e72aecce413ac02acb0ae0aaa974d258ebabe971a622b9c765f3f03d3a58a80e053f5d3c831c845b357df02bf88135fd416e7e4
 SHA512 
8d66d77a04b68018eac734b4eae4618d91b1a1f069733276a2187577ff13c4d08baee9fb0532159aaa3e3269716583ffc8af9f26502376907e87e3ed58bd6845
 DIST firefox-144-patches-02.tar.xz 11860 BLAKE2B 
94fc2a688a938059cb4127c20d674b042418bc994714becf815780c3c775cd3bbd6ee12a267cb38ae3b5b5daba045a692600881afa2b4435031a55838ff9de48
 SHA512 
187fdf7e8d094b89a17bac55448ef4e32879573b05afc4e21b2685fe0bf266526169614ff41516bd3fb05a02406f4c7c5dad680720913a964aebba23801ab334
+DIST firefox-145-patches-01.tar.xz 10908 BLAKE2B 
b5ec713e92609c44c58303e296098462f2a28c075394ad90cd9d0a5d3c54022f9d84a60cf95f521ef03ab14229fcf99d2bf0c95b91cae6851f5e87cb8d419e56
 SHA512 
4a99db63b9e24035e1bc290cc33cd7a01cb0e95ec682886828d25d494163bfd24f945e0743c60f2bcaefa168b825a06f4398ecafec603ba523bab0956515916a
 DIST thunderbird-140.3.1esr-af.xpi 316218 BLAKE2B 
bd4889a7accb2ff53ed2edcf31201729c94e05c8d5c6b3d9e1e1fdd4d760fd8cda4e9a0a66dd49c0fc53cb3138c03aedac724bf0ae24ead496a2eb19ba22c782
 SHA512 
4bedb9733204c0551245c18e7ffc5435ed0686812c50030351fca7dff277581747f0722c41fa64851c68e56aaebd9c99ee169e3b7ea465e5f7ef56ec6a768ea4
 DIST thunderbird-140.3.1esr-ar.xpi 436173 BLAKE2B 
27febf9e2424b7780fa9b493feda00bc376795d0b2d00a8f1be0a84346f46444fa841485a1a47face821bc670e634243af3819bfdaf6f50f6ecff9207be12be0
 SHA512 
5f6552aceea9c2fb67d104d4a08adfc6de5ef547d5c0debbe2fc61d71a2e6572c1624eb93ab542a67aeddfb8670c0bc2eabd4782da25b53cbfa3932cb53ab2c1
 DIST thunderbird-140.3.1esr-ast.xpi 340599 BLAKE2B 
9f6ccbbb78f4203b76cad603d1372ffc9b786ec3a02408c660fc492ca849ed91f342fc02c72853071a5fb3b62ec44196d65ceb69ec1c5f02a6a6c1920444a209
 SHA512 
dd2ec3b9f01bed8c0c2689b5b63e60a791fda2313dc67428030aaf6455bfdf7a60eadfc1288a6033f9651e7916078bdcdb4d868d570db687a8fb66112c735b27
@@ -328,3 +329,68 @@ DIST thunderbird-144.0.1-zh-CN.xpi 511831 BLAKE2B 
ffea3f5cba9957586d1459b7de5627
 DIST thunderbird-144.0.1-zh-TW.xpi 515420 BLAKE2B 
7649b3fe4d56640e85d15fa367b9ac19d5e5a0ce0d9c6e8043003b51566bd391a1db677e5da1ec75345169e130275b5370fdf6930a197140fa2b1dbba628b39e
 SHA512 
ae454845e85a70a30758707c730c38313be0ed1a2d268b58ebb6083d0af6dc6b2c088fd5289c868962d76f127554e2ddc0701ea0b0778f4a388c7ea8da0aad76
 DIST thunderbird-144.0.1.source.tar.xz 774861288 BLAKE2B 
caca9857d87bfb14ca1ce8a0f6a28bde82d0af3ba9777b7b3c535f570d68cb071b7a69f37be0e246f3ed8291dce068b70e116d70ef9017b99ab4823fdca3bffe
 SHA512 
e1859ecd247260c9303a335d14f51d2b80bca7fe0125c41cf6f6bdf1331072dcef490d75fba588b37db5410ce2e7084bbe1c8f568d40c46303891ae2bfbe431c
 DIST thunderbird-144.0.source.tar.xz 762262852 BLAKE2B 
835bad05e2c4c4e04a94659c8e008002ddb9fdbef701f22677046799a45de0b71b2d9b139bc3ca728f2a19b9dd16b346876d4e144812ff1d4408dd36d6dcfe95
 SHA512 
8557262b5abe8f1445cf2f8714b2241b4a4ce007c5e81a1d4b199aafe55cdd660c88d3ad4c210b5f96b2a4a85ba3f90650f6d3adea0bc756a344079efc0e4ccc
+DIST thunderbird-145.0-af.xpi 313958 BLAKE2B 
a5695f7984d3bcfd360cdc7062472e9b15f786b1827e75989dff318fbd7640bd03cd7c53ff36ec6a254a261fe45a66df03e5287d023940e9ff3042446ce2f52d
 SHA512 
63e42c530c94f0b1fb5e048dcdf5f38c168a82fada3a8bbb975f70106601abced53e81c4a87a7f33b107401aca96032e873b245ee42c9546a6222144161ec760
+DIST thunderbird-145.0-ar.xpi 435145 BLAKE2B 
a287970c6f738be8a36a28da032421d1a01f775bc8a262883ee767c01c22aeffb4f41bdb4b67d64d53c958bbecb2cb3c933f296416c67e3f3e65047cda051933
 SHA512 
c177734b7495f9b7c49108f2e50449106d4072c78de733ae0af65dc49ed0f210b5a2ac648fb28d4d7f45f28d5cf9714dad20503565a71fdcee121e3cbd6a1101
+DIST thunderbird-145.0-ast.xpi 338016 BLAKE2B 
f4b905a031d8d66c1c116ad329315415be240daaf3f7425aa2492186d078ad7c6bdd51c772ed2f83fb2ea5f3e3b8f4fd09583935c048503b83b38c601e054dbe
 SHA512 
4bcf28fce55e49148274a7e6ee08bec3a16709d7e64a8ff26397969cde0d81993a6ea9122f25ff36ecb557ba367828edcdc9d591dffab5fcc5d217cc720e6bf9
+DIST thunderbird-145.0-be.xpi 521683 BLAKE2B 
d1e135cbf51c8fefb3ea3b85ef3f5a94e585699ab2b07bf2d7a01981bef9a7bde4a89039242408903947503bcf27cc8a8e0568e45008fe35e2b2c90e55960a99
 SHA512 
c95ed98b9c9cd2c5646b22af0d23c7b225e1cd7d334f5f432d20e0cb8f9e03322328431f9a0bb803c317f10c0cea92bf71db237764eaeb76badd3e1894df6689
+DIST thunderbird-145.0-bg.xpi 543624 BLAKE2B 
6d0e717c581f3b982dbe5019404abc9c1b3f0a0a09994da106149cb65e31906c3610b353250ace6a8c48f8196c9f00d7c8edd46503662e183e518c94179459cf
 SHA512 
4533e0226a4803517fdd89aed6f92a40a287b1990152f44501232b7762ab8e49d6412085c60210d31cf27993ad8e6441d32ddacb424cecf5fefd9f16798792a9
+DIST thunderbird-145.0-br.xpi 402053 BLAKE2B 
a5b52c9b989a0076aa64996ab2ac6608d144b90696f9352d0702287c1dec363c8e24e6242c7c1089ca721ac7d98d74bddf5c61f0a9e924a4923c55877ef2dcd1
 SHA512 
0b920c8013f4abdd5b4477047944209f60a8d7b1d4cf80b3f67f9b19e65c2d270b3c999dc1e18aba3d13ed2c1aded31d0a45ae18bc1f784c8fa4dbb3d6b87941
+DIST thunderbird-145.0-ca.xpi 439345 BLAKE2B 
e1e672a005f6d3870b9cfe2bfeb27d619812c193b90d48c66f7838a323e2bbd0fe077fd7ac0f7184d5419da7834e6984bb38834b2fc4ea3e2bbbb52f2bc0c272
 SHA512 
5c932957844c95e31e0bab7c30862964c0072c444d7c8e66801f225869cd4b38878d6f2ff1c9061a370933b511efc1f16728c1999befefe45650fd68a4a6e2a2
+DIST thunderbird-145.0-cak.xpi 416110 BLAKE2B 
73d01f0a4f3eed7a4a06d7e9a26f3b224399cecc4fa2d148472ee33fa985aa58b57aa43c0d0cf17f251d29e05af017b5628c3b5acc23904aa92251b93f227094
 SHA512 
bad7305fa44ed269ad34bb139982daa89df85f582e452c0f04302ce1ea50ab5c53f76f6ed943c12d71de1255fcf7e7fd8b04588c26d508cecadb0703bcff2bf1
+DIST thunderbird-145.0-cs.xpi 526252 BLAKE2B 
6860cd262870deec22984ba075dcac4223db8e1638242dd5415934161b3dd8af07fcfe442e3aefe2b6845a040dacd10fee967bc54c7f1ef75ffdd16d3ae9f965
 SHA512 
7d58878d1fae29860beeeef11229738ad50fc4dfd70fe249e24731acdd39c7ebb45a102a7ab8a9bd102b8f6ca5d1996f1b5007401c87c000e089d2f737a984ce
+DIST thunderbird-145.0-cy.xpi 494020 BLAKE2B 
2f8dd1c19992d9f0d94045f301b12b666c654cea939fd83660383dee324ec17ae6fa903a46bc5989e4ecf5db6f9ec0e0429237e0be21b6d5212ab8afdf4cfd00
 SHA512 
006d8c33cf328775297c7dee20b41f4f16f37b78b82e0339e561953f891a84bc994a26f22cb8adf084d57112b399711aaa9d801eb0be8656c06a55ef6c08e88d
+DIST thunderbird-145.0-da.xpi 482440 BLAKE2B 
bd29fb7e799732a23ddc1591ea8fbd2daaef0ea4b5b3d1f79d10e1c7fa8c0c95b325e2b0cd8baf98cbde5f3cbfaba1a73d8b9a638313c1cc3f2b8ed7383f0beb
 SHA512 
52473cee41f9d38948a3af2416fd45b28a2e7fe97c8adb4ac56a0bdc59f2968f5cabf50c2b7f2f7761590896b1f8927e0106d8181a9ac76c237bde779f7cada3
+DIST thunderbird-145.0-de.xpi 511313 BLAKE2B 
57bec14b1803bae22d76edb37b9a32e2a27309a0fb9ddfbbf64a4f43d7c954c822b291c44f7a3d51ce42d71dc37c2ccff9a8847443370f1ffc78abe75ad11df7
 SHA512 
9169aed7a3fff9dbef7286f845149d99c719d36151a4866c1f9d5f34dca69e529064dd337ee6b2d4041911b4ec3ce4bd0905c5c1fc1314b71456e61b6b0e837d
+DIST thunderbird-145.0-dsb.xpi 524134 BLAKE2B 
b043109bb1c42a1c2c61f2a07d7642d28c0365928b74476bc702c8f4298d53b0b2f35d2ecefa9097cb702c7929a3a5a9578836869a86f49e40a06efb312ae655
 SHA512 
e036f45401151180b5cc3d6890956b455efb48d66599c3fc0d4b833a713197d64243d5f2eea15b20dff2d470124dca1331e5b75fb6f998592f40697d40f994e6
+DIST thunderbird-145.0-el.xpi 615714 BLAKE2B 
99c96f3e34c51d7c1fad3762809de5388027d8ffd8519253c690e326148dc7b01330fffcebb3c8921dee38ea72fea42663d16982ae7e40131d0636f4bf1749c3
 SHA512 
3c881c5453db41d4507bc5e5ee8ae4083885576f521fb99b10d8d52ff7f6e298c006f9f27b2d8eabe716aa11e542a5c11c09146e159bf0a3e25304f02a52d66d
+DIST thunderbird-145.0-en-CA.xpi 453338 BLAKE2B 
a5a0554fd9578136aa8412cc7ca1af3997db285d3d256bdaa906808058726bc1fa42f2d68493b336f08c77d523aafbec6981586ea982f69cd918b508f520fd36
 SHA512 
b3f45f2706779fa27ba3d8951867c22e1c7ec1c1496ad81dc6bb46eb91498b11ed240d21cd573c0dd9c56529dfe6c4ef2159251f7cf5fea1bf0be5921600ab70
+DIST thunderbird-145.0-en-GB.xpi 457720 BLAKE2B 
6f0d774cb2cc28628b4b8e718e26c7441d6db0cd8316f48b9adfbd3ed0fde5b123bbed3a17f372ad2f5c1c14c842065809ddd3b0ec599940c4c7477d384ac2bb
 SHA512 
2f37e494d83d69f2cd023863bd4ee2d51d60200e29bfd627ad78ae1c1df7b33c07ea9667fb8b74ae27c667bd8940e53069530892e9e56e42a050d249d7c726b2
+DIST thunderbird-145.0-es-AR.xpi 501257 BLAKE2B 
64390e5cf1942e4dbdc706792b5c8a425e62fe7c176b31fbe1cd81c11c11b53e37537a14f7c93179cb50f8331bac3a98d61761818fbc4455ba7356a33ad45ee8
 SHA512 
0209b84eafe5d80e3b56a4846ed8f316123bad629685f6599645f688de6c72f71bbffa50572ed9015507c3198e4785d83ea7d28be2e982e34131c98b98c386f4
+DIST thunderbird-145.0-es-ES.xpi 503413 BLAKE2B 
6cd8c0e680fd8f0ae395ec3c5f215e9c049f45a4088e8fc37775d58739ea8af360c2f6c7f26e9416c227fb00094382e37daa0d0e6c301d8ced31cb3f0c736128
 SHA512 
a6106ebf41d96debbae9311306bfd36a551a3e8dfb58b5c21daa5d24f0d715856052ef528c49cdb70184b7985b93b4b6f9ffeadc5e7d79e46c33b3e1052f1949
+DIST thunderbird-145.0-es-MX.xpi 490994 BLAKE2B 
1a9c1620e431324fa5c9a34429e8ab7250a48f073a6207e4f63ef9636f9eb6a1b272177b129341568dcc31583d4b760d4f68f7bb29b28f6bc68ea73f122ed6d5
 SHA512 
576fe043c436d414863777d1a39818c131ae429a07cfa96410cf2fdcda3d8976b606f2dd60cd95bb237dbcbb2d459eb022700e2092a5ee8c64cc5ee9dce55c07
+DIST thunderbird-145.0-et.xpi 442335 BLAKE2B 
5f061cf753b595a092c631ce5cc45ffc73b2be02d31ed368c06f0329ee786ae888ceaedbca96b9d5135006ebf9c655cb5ee077795b14c4befc2867c7fbe77f34
 SHA512 
ca24f7a17c1fba456eaaed4732f25ff348b28cbfb787cc9ca1960addbe9cd108eb93e477e0e6b320410a8ef7960d6c821dc4d239ccf8818e1e32b4380cc96ebd
+DIST thunderbird-145.0-eu.xpi 476241 BLAKE2B 
5deac0b4abdff4e46a42dde8378a109d873e55ea1c6ea1320c22ac7b5eafdbea8b5f5fe898e6572115b2e088ff986aab84b8f22b4349e7f53855bc907f71f5ee
 SHA512 
4971e745ea020d9b2917fc396ac2d66becbc73e80e019f1aeee6ff304a06b688ea8afcf781a88d98fc6ef835784f3b61fa8e4a9ce4c3ac5ca0e0cb241543d0f1
+DIST thunderbird-145.0-fi.xpi 478100 BLAKE2B 
ae92a0236af225a1a962799fa89f1ecf7d9fb1e64bbb75a830b82e76545649787d61d08e96cceed20d4f78a4008c1f67bdebf4759543e5d90a2203ad57357437
 SHA512 
44e3e1c595e95cd3fcaab1a9ac8b1b1284b860041acbced6eb0d1089aaeb5aa68af65f540ebdac9b3b219eb0a90e818f3610c8a149b033c3780b1f5e35926a28
+DIST thunderbird-145.0-fr.xpi 514412 BLAKE2B 
cc671f8cd14144ad23fd1643f6ac21bd1182246ae16fbc4a2a821386da3b4bd0d528d5296c74de8d171f5062fa333967e0f2a89a1faf5a15c6cf85c1874cee2b
 SHA512 
4b94dde744d6e997863b229745eb15669dba84768e8a6c1a99319cd6f03a4cb8d7c4e8802289e1029155b8105fe7b4a0982bd2f4a1ff231164d8cc343c488094
+DIST thunderbird-145.0-fy-NL.xpi 495217 BLAKE2B 
9a6d7a75d52411016877bf06a6a7ba04884a0781c3ce642b55d0d090450a253d4e9e211b97f692e37af30452a6d59efa96c0edbaef92d212b90836e2ace69394
 SHA512 
5b977c76b986f93ae8b7bccceeb7f3ff6a4aaa3f2fc79ae2dd7d0c2a0d31ee359ec49ae3f6a5e7cf6b4f83652ec172f4807045f4182b1c724b8b970e54067ab2
+DIST thunderbird-145.0-ga-IE.xpi 375683 BLAKE2B 
ff1807076b96569c85d69a7e30b2ab7379c0933935bdf57a9715c8b307f04c7d08005eec3511488a21d826298fb1d39fff0e69ed342d418720652202c991ca80
 SHA512 
82c2c155099a92cc0ddb724291344b6a10bed385c32c7887eb2975b46d496ced19f3ae78de4256f77ae5fdb110ea87f2e590e40f63e82b82aa6ecf2a60ef9c93
+DIST thunderbird-145.0-gd.xpi 460664 BLAKE2B 
a6eb0c164804952ca342d602a2be0d30107e84a41828a9331bdaa33ffadbdd6ca2e38af04d898957e93e1ab4a07b7ce99003988857c44133e3e7a628152f7d4f
 SHA512 
ba97b3c7159cb6292b3a5c5fad5c616a139b2a42a2c65647e87a84489675e62af6c0e741755f74d2d3b3a061140ad6bea492a7d0ccfcbaeceb24de94a639e4ea
+DIST thunderbird-145.0-gl.xpi 490170 BLAKE2B 
2f7c50ece8cab0855764b6e96082d6a7d609432524d104254e884042bc6e588780f9bd609fa96982f9a6ab13567d4b72cb22bfb3bb7319173c52c4f461a465de
 SHA512 
250b1ab36e208fb4683c413acba911f203a326c6037a58956de06602cd20ec174aeebdbdc15dcaa7224aa31cb00ecfee38d421929b9c4c8772cd291b0891fc29
+DIST thunderbird-145.0-he.xpi 442325 BLAKE2B 
20aa1c83ca22e0bf96a780ac8828048268638a4e37c4993a9891cb3d42d296391c863d4acd66f47958789a47ba1102d2ed025044147d29a6af040f1e2b897013
 SHA512 
0ea907e3052341d0415343159d35f8030986a69be859db1ce3cd0763c36a7f8d8bf474711c263951197b94afd3a01984b53be210d45a329ca540c0801ce4a0ba
+DIST thunderbird-145.0-hr.xpi 469630 BLAKE2B 
641c6b1acc4385cc67c77c68c6b6bd7a12235e5822461b095ac193eb034cf96f2c9e07b209be5f1d1bb1ef43cdeb0b76bb174b1e73e9d9699b72a3272d14eb2c
 SHA512 
367302c573c854aa515a37961818538d5d9911fcba949c03ff1e2c998c08136d35c6f01d15068fc5587ccc689de91274a6a7011a5a50ed18a5d92982e0091e67
+DIST thunderbird-145.0-hsb.xpi 521157 BLAKE2B 
df5efe172a8ad5692aaa92a109cd23d17987c2909a741afa6f305c3f5b1802a50a59ddbbc761fefae3dd326b857ff5db9fbb2561ef9bbacc1b39aabd2e766f2c
 SHA512 
26e5290c860c93cf7d56a5f150e8142e38c6ddcf8a57f69b1c37003a07166f30aa935f21dc7f0dbfc4f1f495d4db9af29013344056447450f5cc5bc3741310fe
+DIST thunderbird-145.0-hu.xpi 523704 BLAKE2B 
b8c7dd54228ca8d858776b1e425771315a7a1d3f671695ef16d3ca3e8afb285f2de658df2f2cadda9bfccdf9c56d0c2c810b28811d2235900fa8736b064e25e9
 SHA512 
9f15ed6dc21122c8522902a64db0299ebb64def309a71ca75e3e4e5600059cc80550901cf474da5d914ca51d11057c9879164701bd3c22f3b7a21b401c21bc88
+DIST thunderbird-145.0-id.xpi 469206 BLAKE2B 
d64a40e2d742eb7bc42497c727a31f596f32d0eefaa8d660a6c853893c17775394e9374c11d66277240083345c739aa95ddaa6ae929bf3949efde6d385e4ca43
 SHA512 
ca0e6b47d4f7ea5e09b1a9e14dd1e2485e32f833ce03568262155c491b049fd862e9fc3cdef23dea3b4886e50f83ee127aa70772dc5477f1b1ca23382fe1e7c6
+DIST thunderbird-145.0-is.xpi 486538 BLAKE2B 
dfb5b9f7f481c7dd80bcbb7741977feacd7b2ab808fd274644006c5e85ad1b42ffbff73101dbd74b74335dffa65cf500524b0d9947feac3a786176310b7ef53c
 SHA512 
2d427097b3af8876eab5d026bd3a2685ae255a6ed9888f9035817227e2d23add565924eb72630d57730a483520acc916d5d4cf45ee0e3b9c7893265e503abaa5
+DIST thunderbird-145.0-it.xpi 494365 BLAKE2B 
eeb98b34b40f55cb248a0d4573a0291a9208a0218d5a0dc31241df3ed950426860cc548e95559e86f46641e9a3cae7c55f68a6dd0bd0c88a8f78d8a726325382
 SHA512 
a2961cc1b685d0a81e48d3e720e141ad15fbdeaa6af8f2e9cb585b12e790622d8836e10d99ef5c7a9592225457bb8ca9baaf37136bfc78f7be531dca90e3a9db
+DIST thunderbird-145.0-ja.xpi 545381 BLAKE2B 
48da9dbc8d8a8577e4775e39045a9f3509bbe8465d59d79800f0975de3072203760977143abc67e46cdf8cae22cbe981928ca99d28d2043b67f97c3ce8466bb0
 SHA512 
3bb52b60a46d6bf45a88ab23442b04bfa4db73528eaf73c1b7b9a278642bb58188135e591bceee9d82c2d3318e970979fa50c60ec522ff3d8b5a0d8ea2348acd
+DIST thunderbird-145.0-ka.xpi 561673 BLAKE2B 
5272e59c2a78191e6c56897e6533f222f863e467442ab5dad6af780957e9154fc4c3ad7d6b426cffbf302255919e95e72ca8f8e49c6fb00839456f0aa15b630b
 SHA512 
5b68108f7d1af473c8e8beb04e9d8f4fd11d3e30e7c2b5599f6e691caad76bdbefba8230728b3572be06668553551c5572c9f27f186cd758c702af85ecab904f
+DIST thunderbird-145.0-kab.xpi 470294 BLAKE2B 
abbec3c8a51df08f7dd0c1b730d2407aa5dc3e91936afc226afa26bd55a92997be6f0c987dd234b748ada40ac8f3bf716e246fd6a9d1fc464a15ede30e2fb769
 SHA512 
7480ae468c785572e47de0f80df1b3be2f3a393839145b6e0400e627744109c8eab096598f84c0ac8d713f5cdbc976e7efbe55071509df86e335138f70bd2c1d
+DIST thunderbird-145.0-kk.xpi 577065 BLAKE2B 
7740c5d5052dcc170b168760c11539bd5860ed5336fa798094b963a80166af5fba145c88d32dbf4ad9d68a0753b7bac5c59717089b33fcf58420953e1304d4b2
 SHA512 
61f92236f90c5fe75b251f6f3ad4488d46d27da47d66085c43fe5a8533bce6326584bb0e2b2f83f080889e16b997a1085190b3df29f9630395223dfb875a79c2
+DIST thunderbird-145.0-ko.xpi 518032 BLAKE2B 
e24bf1050b8e1154141fc83314573055ca5d9fd50245964cff8a82b4b42f959a013cb4a82d97b54d07b5e5221a216c8550229c384eb61bf22427a856cddc03bb
 SHA512 
624d498b2411a5033ca5e9d869f90cfdb7aac00b45964d980a8eb6fbcabc2d141fae745e0cd02fd99e33a1d8018ee8801f909000eb50c1113486bf5dae7d3e4f
+DIST thunderbird-145.0-lt.xpi 452229 BLAKE2B 
4a25a112f7bbd951bfb4b278f19192fc74f6335f5f19465801e9b8054b94c8257b0852624b7ba7e1f250474f486a27107cb38d137b5deebe85fbc9d174eb3fb3
 SHA512 
32246c0feb8a36745fc3745f5727336654adcfe9875ac328db3c49aee2646b919ba3c6c3f0f7432ee8c16869dce8be68f7266326ac5e0701fed46f8b4b84e756
+DIST thunderbird-145.0-lv.xpi 390281 BLAKE2B 
581722f69299c0b82e339385a1fc13f64da335d1f382f92781c33e9d73adda3980c5e828584d451c320382d426228432eebcf998d0a01ac5c3d1052e2be70599
 SHA512 
75b41951fb6ff0a06dc4da6ca5102bea1e15940deacbdc38670fbad0a469fea3f08ec83e3e21be162bfbdc5de0b5d9e6e48ee32a297a2376c5da5bb5de52f8bc
+DIST thunderbird-145.0-ms.xpi 351411 BLAKE2B 
3fda89213dd6ca778f68c8a6dfbda97688ba49d2801213e87148e874b9f124de5e860cb18569a25e21ed6aca135ca06723fbdc865f60ed5cac1374d99398b17a
 SHA512 
1860e5c651c1b074d7cbd5c476623db1072af569d2e38191aebfaf1955db78de0c9524a4a4868ad405d06c563a2e95bcbd8bc1812df9db7bf8d3f7156a1b7afb
+DIST thunderbird-145.0-nb-NO.xpi 481983 BLAKE2B 
e79d56a36e1ffd9adee3bfa2203206cb7b35968268c26f9ad4ca2fe7ac6c6d08b32b86fbe0785259c943935ef376b4c16ac40c9b34983261de137461a25981ba
 SHA512 
7d774b299d862d5699d3d0901be841822165ce65e6f04c34ca3a5a5fca1ca76a494f6182bdfbac38a9ca2fad72c1bccf8deb578d503dd5a95fcc09dbc2a439e4
+DIST thunderbird-145.0-nl.xpi 487911 BLAKE2B 
91934f91b140b309c1f98a21888e090760ad4be899d25f72cfce9d8951fea9ae3112ccf25f8ac839363542d2da6f223886172a5e1b2c4b447f332547e084fcb1
 SHA512 
af31e26968e83f2aa105b4ab1040d0cc562789252a3f0b4643bf6a96198f7e4332fa3b5c0bae99f26237bed4597245331ac781f915d64efd21ce678bb44289f5
+DIST thunderbird-145.0-nn-NO.xpi 484833 BLAKE2B 
8a976940b911f544f68ee2daa58301bf02d6fc492a67596e4fe22a6a9012eba2d5ec4bdaf1747ff6af81587a5a711924accf61374c419ed2dd4256d8e6a44e23
 SHA512 
c2b2ed990a84d08cea11470341bdf74ca87fe3c5a6dc2569d15be18efbb19b9e4fad54d9242acc026094463fc94809244f4a4835f901628e5b97960cc3c0220b
+DIST thunderbird-145.0-pa-IN.xpi 435281 BLAKE2B 
39a7296695a24556a2ab6edc35742668cb593aca102de6beda428ff892d91b351030cb227999e414da4a4bcd5c3d5a37fd5fdb31004b73a93b0b1c866791d84a
 SHA512 
4a21d74080a1d0d1e07a308fef9f005e0de4ebe23ee1e26a6330db70fceef0ddaaa6b53263dc66b716d080c0dba7c66252425d84c80b710a403c2c4271a98a4a
+DIST thunderbird-145.0-pl.xpi 521831 BLAKE2B 
6276a3dfa11930e002e567bee69296fc17cb04622da1b7d64ef42d36309f5a35660841a4dac0a3d1b0f08a9c17b62e9a580bc17a2b5044262d9e91afd5ef2c9d
 SHA512 
dd31e3a84878147dae205381976c59294f1f910fc52f0f93ca3cca561ce052429b81fa8ae18b7aed391d81ca8950ed54327a19ec962182b30b87402717296af8
+DIST thunderbird-145.0-pt-BR.xpi 496163 BLAKE2B 
dbd9af834145818c194393ac6ec80467b1e6c04797b1f7cbe655a141e83e00f535bcafa7e3ab45b53ac44e96043e7ba2b6592426d9d0647951e8c05e8f68820c
 SHA512 
4a2bc44a7a26dddd99469de1b0b1b0b3a2545316136b204d26e806deb18e66e18becdc21af2016a85b804bf521d7f16048dd77a5617ade52e0e6ace5c2b57584
+DIST thunderbird-145.0-pt-PT.xpi 486904 BLAKE2B 
3d50dc34c9fe1cd21a08f12641c8f36d134c1f320b8ce34a709db2b1cb4dd6632b4890a81e41950c3e2e8deff90693bf98e9535a1547482340053557a035a3a8
 SHA512 
28f605f02881e766d91c823e446abc26e7cb503d714ffeb8ba5e96621440ae9e13da3d861d55d75890b5613b84e55da083df79d1fa7011124f10a041bf03f576
+DIST thunderbird-145.0-rm.xpi 488760 BLAKE2B 
3ddba3bc77cbe62f250897666eceff56d71d60281c4af7230ea26d935c9d6a95baaf01e6e96632b15c8fd9b98dc9b6ccec2a6d7163a36add5422bda950897c94
 SHA512 
d5d62a8eeb159b59489f4f3f02801aae4a25bedd5e2fbddea5781ffd29a2d3878128675232161d69802a6be032c2c614059c8e3da340fcbb97b666f8ebb83fa0
+DIST thunderbird-145.0-ro.xpi 468263 BLAKE2B 
96e2fd72fbfe09a2aa590163b1df4453a5596521bbda0c7277c58a2e3cb8b78a346615f554166a0db1398715d77ebfe73b7aac8eddc2fda76b894977e290a238
 SHA512 
3c80f2687dbce6cc90cc856a0a46ab12f167ec3bf48c4315a3424d0acc0ad591e927ea4a37bcbd19ce8595d88653258392e59dd66bf079be0832b77854594492
+DIST thunderbird-145.0-ru.xpi 600035 BLAKE2B 
54c7d7bbd241a671ba004311a19b0406e0464b21871aea2d0ab438cf08d7e138f95e68586324b8a7f906126d7df08b3d2b2aa5daf8a0a9d5ae59083e972ca1c9
 SHA512 
978cd8c6bc66a4e65ed84861f1f6f91c4b275dbdb46dfbf89c0f2fc1ff21728153ac63cb355d5f6d8a7fd572013538aa2b86f34acdaf3a56d07476527a0235b6
+DIST thunderbird-145.0-sk.xpi 526067 BLAKE2B 
9cf3b9f3159b5f68a961db543f675d8dcbe704e123f7307d650f1044b38672fba1be5bfcca080ded692ebac101268f5d6f70bd157e82ffd230ec25f38864352d
 SHA512 
54a736d7b2b593f9023e4f80348953191cdf6c7a805ecafa51ab00e4a8b22679b015b0a625a9176f65336d49844db878afcda79b4add2560bb324bcf4daaa47a
+DIST thunderbird-145.0-sl.xpi 490470 BLAKE2B 
533862429e1d2b08a52569f8d2b1ca856d0685b0233a3c487eebbd875bfeeab4846480e96fb60e913d306608045310f393793dfdd4a7b15d98773592d4ff1695
 SHA512 
0a80d3da96c034c93bd4d0fd910d2ebc0fd909a287b5e9dc6c48ea2fa4573b25616b425aaebbe5c054af479ec01ff51796a70ec4bf05554a6907409752a5d58e
+DIST thunderbird-145.0-sq.xpi 512397 BLAKE2B 
4eac9fa852e0a692b5633212ad42ff63f80593930d0df2d3b11183dc867c2d40ae70d549b446b6d1e285e5db8e997d9cdefd06a6e7318d14fadbf9781774e22e
 SHA512 
ff35a2410a73bc8e7bd3152245e3e146886b1d6cd6f3930807ac5f4b4611024796759c82ec71f771917c4b7fe9cf14d67fa43c8b737462b73f1471f732d3d6e2
+DIST thunderbird-145.0-sr.xpi 494332 BLAKE2B 
a124714bd76e280d3361bad200c70c1eb204cf47e96180047be0ede8a8433fa2bd2e6e0a033cd7b2dbcd7e8d3572db045023fdd1ce4a1c49f5b17f4b637c037b
 SHA512 
4008cc70ce0ee05e42c5362f7e4a1c17734884d4cefe85ce56a14c3c62a38418a9c9c5eaa80b6c721f3e7c21c14ceb292148d408c4dc9b81624433bf76da070e
+DIST thunderbird-145.0-sv-SE.xpi 490387 BLAKE2B 
fc75d34e0666678325ece9aef124dd7c9f377d12b5285d7d0c08d664de8cae8bf21e232f8905af90a9854d44a26549dc5d7a4f134698804ba37efaa3bf0af62c
 SHA512 
9881b654aa5d75bf55698c3d259c683e5ba124710a844031460fa3c0dbad163a208571c949c7b2184be44557c02e2ca42f55b242018263b926295d7732f4fc2a
+DIST thunderbird-145.0-th.xpi 568020 BLAKE2B 
120d75353958938c66f449bd84fbed483a29418cad061261ea31283a2122c2567e612d7e56eeae4a0f1443803c2d85bf4b1d3d6d4bec63d0592c0436dbd81768
 SHA512 
706badfbcea67694629a2f23124331875fd4a15f71703045398479f9b151d9c3a2c57362c3224e9f0ece36e8a60f879ecc0f415c8cd8a24c41f01d5bbed241a3
+DIST thunderbird-145.0-tr.xpi 501450 BLAKE2B 
3ef94f5f629a7f824cc4a09e6fbc0c4be6735b88df0b170fe47383fa05d8600c4dcde42b73f5cc691c6c1538d674e373e02462f3af1204dff7b4c4bffd750c49
 SHA512 
f146263d12c3377c0b62306709f9d5214866b0b954dd320e6831424c165c7a5237cd7ee81e2f695a356ebdcf5ed57a598e9b37108517c552b8fafbae74a11a8b
+DIST thunderbird-145.0-uk.xpi 580472 BLAKE2B 
f30635e17b6e8e6f4e37797cb7731f74dd37415fd16c452232335afc35ddb836afb608fb91fbdb235e7c321feb00a143ee451c2582323491b783a7c6a5acaa16
 SHA512 
1fb4adf5d489a6bbaf39c562f40cb2a735a44181fa480126ff69f96fe063adbac8e5d3067e5addf7811adc97675c6f33b8a15f46822ad1ce1a077e9ba713d369
+DIST thunderbird-145.0-uz.xpi 354256 BLAKE2B 
e96f99c3da7a0dd3a13231bb4e4b17f46188c579624ab2077a8c2137b258b80cc248821d8bf3f1b8fc580df930e2482f24f90075c73f4998968740a871ab6134
 SHA512 
f1ce60363ed68da61f721431c9259b36b4786556795c5bc7dc8a40dbcc41e3e4549abb473ad4b702b9662fe38f11bc5a489cb4e9ec99c39d08818b6c3b6e40db
+DIST thunderbird-145.0-vi.xpi 524700 BLAKE2B 
1facdaa111376af78f76a6661fc9ca92367bf6b7b8d43b9c031f89183e8ff1757e635c2fe766009b54cebb21a9be5efbcf8c8a120aa08c4e37d7afecdf25dbae
 SHA512 
b5bd24a95fcef9fe3cba855eead5e87a51d850379b8e9ae42d9ca78ee41bcbc4926d74a50c4f7da304c87fadbefe26937074eb4396b4de97d8080fb910eec550
+DIST thunderbird-145.0-zh-CN.xpi 513582 BLAKE2B 
a49a67791c43220ff5e1a483cbbc63212d88f22ae7595749f01d4e95c84e32f3c01d57e8949a8df44b2d0b11dfe507919938e2ad9c20ee3a5b77cffa16a81b0e
 SHA512 
85390855bfe54f3988a627d027574fa28e27d4608fc338cafed204b7a4d15b4223c8bc238dde50e894cb91b2b9197b6e866371cdb7a383537403c5bb56bc73a8
+DIST thunderbird-145.0-zh-TW.xpi 517231 BLAKE2B 
29cd5e4e6bed9f98e89b74caae40006cb88ed2c12cfdef61e4ba158cf97e5fe3cd8183c1166d830fd60d10ed46560ffd7556c1b07494d29f3860f144918677fa
 SHA512 
18282da3d0cf2efddfefd79933d30ea073165fb93c0823dd10d1c50eebbdcb8149400583bf708d75f2105a440f59c6e29af3bf2c8300189216bec848ace8bab7
+DIST thunderbird-145.0.source.tar.xz 782126204 BLAKE2B 
1e7efa10abfef84dd6bc77a920f258c35a71349f96c2270f59c1bc92ca1f8f7e3a22168d230450fcd6945631546116747255d3d1ea4fc530ec1e325643ead02f
 SHA512 
f33835e4d740b32d072ac915124d988ef9d4cbe55d7c972c817991d19b64e8bc95b75b503ad3cb9abf4fd1d220fc7cb61720ea84dc49482faa13da1690d7d80e

diff --git a/mail-client/thunderbird/thunderbird-145.0.ebuild 
b/mail-client/thunderbird/thunderbird-145.0.ebuild
new file mode 100644
index 000000000000..30d7d06d4f54
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-145.0.ebuild
@@ -0,0 +1,1156 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-145-patches-01.tar.xz"
+
+LLVM_COMPAT=( 19 20 21 )
+
+PYTHON_COMPAT=( python3_{11..14} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.82.0"
+RUST_NEEDS_LLVM=1
+
+WANT_AUTOCONF="2.1"
+
+VIRTUALX_REQUIRED="manual"
+
+# Thunderbird will have separate release and esr channels, matching Firefox's 
rapid and esr.
+MOZ_ESR=
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit check-reqs desktop eapi9-ver flag-o-matic gnome2-utils linux-info 
llvm-r1 \
+       multiprocessing optfeature pax-utils python-any-r1 rust toolchain-funcs 
virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       SLOT="0/esr"
+else
+       SLOT="0/stable"
+fi
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+
+IUSE="+clang debug eme-free hardened hwaccel jack libproxy pgo pulseaudio 
sndio selinux"
+IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent 
+system-libvpx"
+IUSE+=" system-pipewire system-png +system-webp wayland wifi +X"
+
+# Thunderbird-only USE flags.
+IUSE+=" +system-librnp"
+
+REQUIRED_USE="|| ( X wayland )
+       debug? ( !system-av1 )"
+
+TB_ONLY_DEPEND="selinux? ( sec-policy/selinux-thunderbird )
+       !system-librnp? ( dev-libs/jsoncpp )
+       system-librnp? ( >=dev-util/librnp-0.17.1 )"
+BDEPEND="${PYTHON_DEPS}
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+               llvm-core/llvm:${LLVM_SLOT}
+               clang? (
+                       llvm-core/lld:${LLVM_SLOT}
+                       pgo? ( 
llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] )
+               )
+       ')
+       app-alternatives/awk
+       app-arch/unzip
+       app-arch/zip
+       >=dev-util/cbindgen-0.27.0
+       net-libs/nodejs
+       virtual/pkgconfig
+       amd64? ( >=dev-lang/nasm-2.14 )
+       x86? ( >=dev-lang/nasm-2.14 )
+       pgo? (
+               X? (
+                       sys-devel/gettext
+                       x11-base/xorg-server[xvfb]
+                       x11-apps/xhost
+               )
+               !X? (
+                       gui-wm/tinywl
+                       x11-misc/xkeyboard-config
+               )
+       )"
+COMMON_DEPEND="${TB_ONLY_DEPEND}
+       >=app-accessibility/at-spi2-core-2.46.0:2
+       dev-libs/expat
+       dev-libs/glib:2
+       dev-libs/libffi:=
+       >=dev-libs/nss-3.117
+       >=dev-libs/nspr-4.35
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       <media-video/ffmpeg-8.0
+       sys-apps/dbus
+       virtual/zlib:=
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/libdrm
+       x11-libs/pango
+       x11-libs/pixman
+       jack? ( virtual/jack )
+       pulseaudio? (
+               || (
+                       media-libs/libpulse
+                       >=media-sound/apulse-0.1.12-r4[sdk]
+               )
+       )
+       libproxy? ( net-libs/libproxy )
+       selinux? ( sec-policy/selinux-mozilla )
+       sndio? ( >=media-sound/sndio-1.8.0-r1 )
+       system-av1? (
+               >=media-libs/dav1d-1.0.0:=
+               >=media-libs/libaom-1.0.0:=
+       )
+       system-harfbuzz? (
+               >=media-gfx/graphite2-1.3.13
+               >=media-libs/harfbuzz-2.8.1:0=
+       )
+       system-icu? ( >=dev-libs/icu-76.1:= )
+       system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= )
+       system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] )
+       system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
+       system-pipewire? ( media-video/pipewire:= )
+       system-png? ( >=media-libs/libpng-1.6.45:0=[apng] )
+       system-webp? ( >=media-libs/libwebp-1.1.0:0= )
+       wayland? (
+               >=media-libs/libepoxy-1.5.10-r1
+               x11-libs/gtk+:3[wayland]
+       )
+       wifi? (
+               kernel_linux? (
+                       || (
+                               net-misc/networkmanager
+                               net-misc/connman[networkmanager]
+                       )
+               )
+       )
+       X? (
+               virtual/opengl
+               x11-libs/cairo[X]
+               x11-libs/gtk+:3[X]
+               x11-libs/libX11
+               x11-libs/libXcomposite
+               x11-libs/libXdamage
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXrandr
+               x11-libs/libxcb:=
+       )"
+RDEPEND="${COMMON_DEPEND}
+       jack? ( virtual/jack )"
+DEPEND="${COMMON_DEPEND}
+       X? (
+               x11-base/xorg-proto
+               x11-libs/libICE
+               x11-libs/libSM
+       )"
+
+llvm_check_deps() {
+       if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then
+               einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+               return 1
+       fi
+
+       if use clang && ! tc-ld-is-mold ; then
+               if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then
+                       einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       if use pgo ; then
+               if ! has_version -b 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+                       einfo 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2
+                       einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+MOZ_LANGS=(
+       af ar ast be bg br ca cak cs cy da de dsb
+       el en-CA en-GB en-US es-AR es-ES es-MX et eu
+       fi fr fy-NL ga-IE gd gl he hr hsb hu
+       id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO
+       pa-IN pl pt-BR pt-PT rm ro ru
+       sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW
+)
+
+mozilla_set_globals() {
+       # https://bugs.gentoo.org/587334
+       local MOZ_TOO_REGIONALIZED_FOR_L10N=(
+               fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
+       )
+
+       local lang xflag
+       for lang in "${MOZ_LANGS[@]}" ; do
+               # en and en_US are handled internally
+               if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
+                       continue
+               fi
+
+               # strip region subtag if $lang is in the list
+               if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
+                       xflag=${lang%%-*}
+               else
+                       xflag=${lang}
+               fi
+
+               SRC_URI+=" l10n_${xflag/[_@]/-}? ("
+               SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> 
${MOZ_P_DISTFILES}-${lang}.xpi"
+               SRC_URI+=" )"
+               IUSE+=" l10n_${xflag/[_@]/-}"
+       done
+}
+mozilla_set_globals
+
+moz_clear_vendor_checksums() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -ne 1 ]] ; then
+               die "${FUNCNAME} requires exact one argument"
+       fi
+
+       einfo "Clearing cargo checksums for ${1} ..."
+
+       sed -i \
+               -e 's/\("files":{\)[^}]*/\1/' \
+               "${S}"/third_party/rust/${1}/.cargo-checksum.json || die
+}
+
+moz_install_xpi() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local DESTDIR=${1}
+       shift
+
+       insinto "${DESTDIR}"
+
+       local emid xpi_file xpi_tmp_dir
+       for xpi_file in "${@}" ; do
+               emid=
+               xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
+
+               # Unpack XPI
+               unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
+
+               # Determine extension ID
+               if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
+                       emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; 
s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from install.rdf"
+               elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
+                       emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' 
"${xpi_tmp_dir}/manifest.json")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from manifest.json"
+               else
+                       die "failed to determine extension id"
+               fi
+
+               einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
+               newins "${xpi_file}" "${emid}.xpi"
+       done
+}
+
+mozconfig_add_options_ac() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_add_options_mk() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_use_enable() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_enable "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+mozconfig_use_with() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_with "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+virtwl() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument"
+       [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to 
be set; try xdg_environment_reset"
+       tinywl -h >/dev/null || die 'tinywl -h failed'
+
+       local VIRTWL VIRTWL_PID
+       coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo 
$WAYLAND_DISPLAY; read _; kill $PPID'; }
+       local -x WAYLAND_DISPLAY
+       read WAYLAND_DISPLAY <&${VIRTWL[0]}
+
+       debug-print "${FUNCNAME}: $@"
+       "$@"
+       local r=$?
+
+       [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
+       exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
+       return $r
+}
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+               # Ensure we have enough disk space to compile
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif tc-is-lto ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+
+       # Get LTO from environment; export after this phase for use in 
src_configure (etc)
+       use_lto=no
+
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+
+               if tc-is-lto; then
+                       use_lto=yes
+                       # LTO is handled via configure
+                       filter-lto
+               fi
+
+               if use pgo ; then
+                       if ! has userpriv ${FEATURES} ; then
+                               eerror "Building ${PN} with USE=pgo and 
FEATURES=-userpriv is not supported!"
+                       fi
+               fi
+
+               if [[ ${use_lto} = yes ]] ; then
+                       # -Werror=lto-type-mismatch -Werror=odr are going to 
fail with GCC,
+                       # bmo#1516758, bgo#942288
+                       filter-flags -Werror=lto-type-mismatch -Werror=odr
+               fi
+
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif [[ ${use_lto} == "yes" ]] ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_setup
+               llvm-r1_pkg_setup
+               rust_pkg_setup
+               python-any-r1_pkg_setup
+
+               # Avoid PGO profiling problems due to enviroment leakage
+               # These should *always* be cleaned up anyway
+               unset \
+                       DBUS_SESSION_BUS_ADDRESS \
+                       DISPLAY \
+                       ORBIT_SOCKETDIR \
+                       SESSION_MANAGER \
+                       XAUTHORITY \
+                       XDG_CACHE_HOME \
+                       XDG_SESSION_COOKIE
+
+               # Build system is using /proc/self/oom_score_adj, bug #604394
+               addpredict /proc/self/oom_score_adj
+
+               if use pgo ; then
+                       # Update 105.0: "/proc/self/oom_score_adj" isn't enough 
anymore with pgo, but not sure
+                       # whether that's due to better OOM handling by Firefox 
(bmo#1771712), or portage
+                       # (PORTAGE_SCHEDULING_POLICY) update...
+                       addpredict /proc
+
+                       # Clear tons of conditions, since PGO is 
hardware-dependant.
+                       addpredict /dev
+               fi
+
+               if ! mountpoint -q /dev/shm ; then
+                       # If /dev/shm is not available, configure is known to 
fail with
+                       # a traceback report referencing 
/usr/lib/pythonN.N/multiprocessing/synchronize.py
+                       ewarn "/dev/shm is not mounted -- expect build 
failures!"
+               fi
+
+               # Google API keys (see 
http://www.chromium.org/developers/how-tos/api-keys)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then
+                       
MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc"
+               fi
+
+               if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then
+                       
MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ"
+               fi
+
+               # Mozilla API keys (see 
https://location.services.mozilla.com/api)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then
+                       
MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005"
+               fi
+
+               # Ensure we use C locale when building, bug #746215
+               export LC_ALL=C
+       fi
+
+       export use_lto
+}
+
+src_unpack() {
+       local _lp_dir="${WORKDIR}/language_packs"
+       local _src_file
+
+       if [[ ! -d "${_lp_dir}" ]] ; then
+               mkdir "${_lp_dir}" || die
+       fi
+
+       for _src_file in ${A} ; do
+               if [[ ${_src_file} == *.xpi ]]; then
+                       cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die 
"Failed to copy '${_src_file}' to '${_lp_dir}'!"
+               else
+                       unpack ${_src_file}
+               fi
+       done
+}
+
+src_prepare() {
+       if [[ ${use_lto} == "yes" ]]; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die
+       fi
+
+       # Workaround for bgo#915651 and bmo#1988166 on musl
+       if use elibc_glibc ; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+               rm -v 
"${WORKDIR}"/firefox-patches/*bmo-1988166-musl-remove-nonexisting-system-header-req.patch
 || die
+       fi
+
+       # Enable jpeg-xl only in Firefox.
+       rm -v "${WORKDIR}"/firefox-patches/*bgo-928126-enable-jxl.patch || die
+
+       eapply "${WORKDIR}/firefox-patches"
+
+       # Allow user to apply any additional patches without modifing ebuild
+       eapply_user
+
+       # Make cargo respect MAKEOPTS
+       export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+       # Workaround for bgo#915651
+       if ! use elibc_glibc ; then
+               if use amd64 ; then
+                       export RUST_TARGET="x86_64-unknown-linux-musl"
+               elif use x86 ; then
+                       export RUST_TARGET="i686-unknown-linux-musl"
+               elif use arm64 ; then
+                       export RUST_TARGET="aarch64-unknown-linux-musl"
+               elif use loong; then
+                       # Only the LP64D ABI of LoongArch64 is actively 
supported among
+                       # the wider Linux ecosystem, so the assumption is safe.
+                       export RUST_TARGET="loongarch64-unknown-linux-musl"
+               elif use ppc64 ; then
+                       export RUST_TARGET="powerpc64le-unknown-linux-musl"
+               elif use riscv ; then
+                       # We can pretty safely rule out any 32-bit riscvs, but 
64-bit riscvs also have tons of
+                       # different ABIs available. 
riscv64gc-unknown-linux-musl seems to be the best working
+                       # guess right now though.
+                       elog "riscv detected, forcing a riscv64 target for now."
+                       export RUST_TARGET="riscv64gc-unknown-linux-musl"
+               else
+                       die "Unknown musl chost, please post a new bug with 
your rustc -vV along with emerge --info"
+               fi
+       fi
+
+       # Make LTO respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure || die "Failed 
sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || 
die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed 
sedding multiprocessing.cpu_count"
+
+       # sed-in toolchain prefix
+       sed -i \
+               -e "s/objdump/${CHOST}-objdump/" \
+               "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py 
|| die "sed failed to set toolchain prefix"
+
+       sed -i \
+               -e 's/ccache_stats = None/return None/' \
+               "${S}"/python/mozbuild/mozbuild/controller/building.py || die 
"sed failed to disable ccache stats call"
+
+       einfo "Removing pre-built binaries ..."
+
+       find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) 
-print -delete || die
+
+       # Clear checksums from cargo crates we've manually patched.
+       # moz_clear_vendor_checksums xyz
+
+       # Create build dir
+       BUILD_DIR="${WORKDIR}/${PN}_build"
+       mkdir -p "${BUILD_DIR}" || die
+
+       # Write API keys to disk
+       echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
+       echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || 
die
+       echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die
+
+       xdg_environment_reset
+}
+
+src_configure() {
+       # Show flags set at the beginning
+       einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       local have_switched_compiler=
+       if use clang; then
+               # Force clang
+               einfo "Enforcing the use of clang due to USE=clang ..."
+
+               local version_clang=$(clang --version 2>/dev/null | grep -F -- 
'clang version' | awk '{ print $3 }')
+               [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 
"${version_clang}")
+               [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
+
+               AR=llvm-ar
+               CC=${CHOST}-clang-${version_clang}
+               CXX=${CHOST}-clang++-${version_clang}
+               NM=llvm-nm
+               RANLIB=llvm-ranlib
+       elif ! use clang && ! tc-is-gcc ; then
+               # Force gcc
+               have_switched_compiler=yes
+               einfo "Enforcing the use of gcc due to USE=-clang ..."
+               AR=gcc-ar
+               CC=${CHOST}-gcc
+               CXX=${CHOST}-g++
+               NM=gcc-nm
+               RANLIB=gcc-ranlib
+       fi
+
+       if [[ -n "${have_switched_compiler}" ]] ; then
+               # Because we switched active compiler we have to ensure
+               # that no unsupported flags are set
+               strip-unsupported-flags
+       fi
+
+       # Ensure we use correct toolchain,
+       # AS is used in a non-standard way by upstream, #bmo1654031
+       export HOST_CC="$(tc-getBUILD_CC)"
+       export HOST_CXX="$(tc-getBUILD_CXX)"
+       export AS="$(tc-getCC) -c"
+
+       # Configuration tests expect llvm-readelf output, bug 913130
+       READELF="llvm-readelf"
+
+       tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG
+
+       # Pass the correct toolchain paths through cbindgen
+       if tc-is-cross-compiler ; then
+               export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} 
--target=${CHOST} ${BINDGEN_CFLAGS-}"
+       fi
+
+       # Set MOZILLA_FIVE_HOME
+       export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+       # python/mach/mach/mixin/process.py fails to detect SHELL
+       export SHELL="${EPREFIX}/bin/bash"
+
+       # Set state path
+       export MOZBUILD_STATE_PATH="${BUILD_DIR}"
+
+       # Set MOZCONFIG
+       export MOZCONFIG="${S}/.mozconfig"
+
+       # Initialize MOZCONFIG
+       mozconfig_add_options_ac '' --enable-application=comm/mail
+       mozconfig_add_options_ac '' --enable-project=comm/mail
+
+       # Set Gentoo defaults
+       mozconfig_add_options_ac 'Gentoo default' \
+               --allow-addon-sideload \
+               --disable-cargo-incremental \
+               --disable-crashreporter \
+               --disable-disk-remnant-avoidance \
+               --disable-geckodriver \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-dbus \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-packed-relative-relocs \
+               --enable-release \
+               --enable-system-policies \
+               --host="${CBUILD:-${CHOST}}" \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               --prefix="${EPREFIX}/usr" \
+               --target="${CHOST}" \
+               --without-ccache \
+               --without-wasm-sandboxed-libraries \
+               --with-intl-api \
+               --with-libclang-path="$(llvm-config --libdir)" \
+               --with-system-ffi \
+               --with-system-gbm \
+               --with-system-libdrm \
+               --with-system-nspr \
+               --with-system-nss \
+               --with-system-pixman \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system
+
+       # Set update channel
+       local update_channel=release
+       [[ -n ${MOZ_ESR} ]] && update_channel=esr
+       mozconfig_add_options_ac '' --enable-update-channel=${update_channel}
+
+       # Whitelist to allow unkeyworded arches to build with 
"--disable-rust-simd" by default.
+       if use amd64 || use arm64 || use loong ; then
+               mozconfig_add_options_ac '' --enable-rust-simd
+       fi
+
+       # For future keywording: This is currently (97.0) only supported on:
+       # amd64, arm, arm64 & x86.
+       # Might want to flip the logic around if Firefox is to support more 
arches.
+       # bug 833001, bug 903411#c8
+       if use loong || use ppc64 || use riscv; then
+               mozconfig_add_options_ac '' --disable-sandbox
+       else
+               mozconfig_add_options_ac '' --enable-sandbox
+       fi
+
+       # riscv-related options, bgo#947337, bgo#947338
+       if use riscv ; then
+               mozconfig_add_options_ac 'Disable JIT for RISC-V 64' 
--disable-jit
+               mozconfig_add_options_ac 'Disable webrtc for RISC-V' 
--disable-webrtc
+       fi
+
+       if [[ -s "${S}/api-google.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 
}') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-safebrowsing-api-keyfile="${S}/api-google.key"
+       else
+               einfo "Building without Google API key ..."
+       fi
+
+       if [[ -s "${S}/api-location.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 
}') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-location-service-api-keyfile="${S}/api-location.key"
+       else
+               einfo "Building without Location API key ..."
+       fi
+
+       if [[ -s "${S}/api-mozilla.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 
}') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       --with-mozilla-api-keyfile="${S}/api-mozilla.key"
+       else
+               einfo "Building without Mozilla API key ..."
+       fi
+
+       mozconfig_use_with system-av1
+       mozconfig_use_with system-harfbuzz
+       mozconfig_use_with system-harfbuzz system-graphite2
+       mozconfig_use_with system-icu
+       mozconfig_use_with system-jpeg
+       mozconfig_use_with system-libevent
+       mozconfig_use_with system-libvpx
+       mozconfig_use_with system-pipewire
+       mozconfig_use_with system-png
+       mozconfig_use_with system-webp
+
+       if use system-librnp; then
+               mozconfig_add_options_ac "+system-librnp" 
--enable-compile-environment
+               mozconfig_use_with system-librnp
+       else
+               # This controls the backend of the bundled librnp. Choices are 
"botan" and "openssl".
+               # RNP Upstream recommends to use botan. In Gentoo it's 
preferred to use system-librnp.
+               mozconfig_add_options_ac "+bundled librnp backend = botan" 
--with-librnp-backend="botan"
+       fi
+
+       mozconfig_use_enable libproxy
+
+       use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme
+
+       if use hardened ; then
+               mozconfig_add_options_ac "+hardened" --enable-hardening
+               # mozconfig_add_options_ac "+hardened stl" 
--enable-stl-hardening # not available in TB
+               append-ldflags "-Wl,-z,relro -Wl,-z,now"
+
+               # Increase the FORTIFY_SOURCE value, #910071.
+               sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' 
"${S}"/build/moz.configure/toolchain.configure || die
+       fi
+
+       local myaudiobackends=""
+       use jack && myaudiobackends+="jack,"
+       use sndio && myaudiobackends+="sndio,"
+       use pulseaudio && myaudiobackends+="pulseaudio,"
+       ! use pulseaudio && myaudiobackends+="alsa,"
+
+       mozconfig_add_options_ac '--enable-audio-backends' 
--enable-audio-backends="${myaudiobackends::-1}"
+
+       mozconfig_use_enable wifi necko-wifi
+
+       if use X && use wayland ; then
+               mozconfig_add_options_ac '+x11+wayland' 
--enable-default-toolkit=cairo-gtk3-x11-wayland
+       elif ! use X && use wayland ; then
+               mozconfig_add_options_ac '+wayland' 
--enable-default-toolkit=cairo-gtk3-wayland-only
+       else
+               mozconfig_add_options_ac '+x11' 
--enable-default-toolkit=cairo-gtk3-x11-only
+       fi
+
+       if [[ ${use_lto} == "yes" ]] ; then
+               if use clang ; then
+                       # Upstream only supports lld or mold when using clang.
+                       if tc-ld-is-mold ; then
+                               # mold expects the -flto line from *FLAGS 
configuration, bgo#923119
+                               append-ldflags "-flto=thin"
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+                       fi
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+               else
+                       # ThinLTO is currently broken, see bmo#1644409.
+                       # mold does not support gcc+lto combination.
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # lld is upstream's default
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+                       fi
+
+               else
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "linker is set to bfd 
due to USE=-clang" --enable-linker=bfd
+                       fi
+               fi
+       fi
+
+       if use pgo ; then
+               mozconfig_add_options_ac '+pgo' MOZ_PGO=1
+
+               if use clang ; then
+                       # Used in build/pgo/profileserver.py
+                       export LLVM_PROFDATA="llvm-profdata"
+               fi
+       fi
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+               mozconfig_add_options_ac '+debug' --enable-jemalloc
+               mozconfig_add_options_ac '+debug' --enable-real-time-tracing
+       else
+               mozconfig_add_options_ac 'Gentoo defaults' 
--disable-real-time-tracing
+
+               if is-flag '-g*' ; then
+                       if use clang ; then
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
+                       else
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
+                       fi
+               else
+                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
+               fi
+
+               if is-flag '-O0' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
+               elif is-flag '-O4' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
+               elif is-flag '-O3' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
+               elif is-flag '-O1' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
+               elif is-flag '-Os' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
+               else
+                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
+               fi
+       fi
+
+       # Debug flag was handled via configure
+       filter-flags '-g*'
+
+       # Optimization flag was handled via configure
+       filter-flags '-O*'
+
+       # elf-hack
+       # Filter "-z,pack-relative-relocs" and let the build system handle it 
instead.
+       if use amd64 || use x86 ; then
+               filter-flags "-z,pack-relative-relocs"
+
+               if tc-ld-is-mold ; then
+                       # relr-elf-hack is currently broken with mold, 
bgo#916259
+                       mozconfig_add_options_ac 'disable elf-hack with mold 
linker' --disable-elf-hack
+               else
+                       mozconfig_add_options_ac 'relr elf-hack' 
--enable-elf-hack=relr
+               fi
+       elif use loong || use ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on loong/ppc64/riscv,
+               # see bgo #917049, #930046
+               :;
+       else
+               mozconfig_add_options_ac 'disable elf-hack on non-supported 
arches' --disable-elf-hack
+       fi
+
+       if ! use elibc_glibc; then
+               mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
+       fi
+
+       # System-av1 fix
+       use system-av1 && append-ldflags "-Wl,--undefined-version"
+
+       # Make revdep-rebuild.sh happy; Also required for musl
+       append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
+
+       # Pass $MAKEOPTS to build system
+       export MOZ_MAKE_FLAGS="${MAKEOPTS}"
+
+       # Use system's Python environment
+       export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+       export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+
+       # Disable notification when build system has finished
+       export MOZ_NOSPAM=1
+
+       # Portage sets XARGS environment variable to "xargs -r" by default which
+       # breaks build system's check_prog() function which doesn't support 
arguments
+       mozconfig_add_options_ac 'Gentoo default' 
"XARGS=${EPREFIX}/usr/bin/xargs"
+
+       # Set build dir
+       mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}"
+
+       # Show flags we will use
+       einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       # Handle EXTRA_CONF and show summary
+       local ac opt hash reason
+
+       # Apply EXTRA_ECONF entries to $MOZCONFIG
+       if [[ -n ${EXTRA_ECONF} ]] ; then
+               IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!}
+               for opt in "${ac[@]}"; do
+                       mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--}
+               done
+       fi
+
+       echo
+       echo "=========================================================="
+       echo "Building ${PF} with the following configuration"
+       grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do
+               [[ -z ${hash} || ${hash} == \# ]] \
+                       || die "error reading mozconfig: ${ac} ${opt} ${hash} 
${reason}"
+               printf "    %-30s  %s\n" "${opt}" "${reason:-mozilla.org 
default}"
+       done
+       echo "=========================================================="
+       echo
+
+       ./mach configure || die
+}
+
+src_compile() {
+       local virtx_cmd=
+
+       if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then
+               # increase ulimit with mold+lto, bugs #892641, #907485
+               if ! ulimit -n 16384 1>/dev/null 2>&1 ; then
+                       ewarn "Unable to modify ulimits - building with 
mold+lto might fail due to low ulimit -n resources."
+                       ewarn "Please see bugs #892641 & #907485."
+               else
+                       ulimit -n 16384
+               fi
+       fi
+
+       if use pgo; then
+               # Reset and cleanup environment variables used by GNOME/XDG
+               gnome2_environment_reset
+
+               addpredict /root
+
+               if ! use X; then
+                       virtx_cmd=virtwl
+               else
+                       virtx_cmd=virtx
+               fi
+       fi
+
+       if ! use X; then
+               local -x GDK_BACKEND=wayland
+       else
+               local -x GDK_BACKEND=x11
+       fi
+
+       ${virtx_cmd} ./mach build --verbose || die
+}
+
+src_install() {
+       # xpcshell is getting called during install
+       pax-mark m \
+               "${BUILD_DIR}"/dist/bin/xpcshell \
+               "${BUILD_DIR}"/dist/bin/${PN} \
+               "${BUILD_DIR}"/dist/bin/plugin-container
+
+       DESTDIR="${D}" ./mach install || die
+
+       # Upstream cannot ship symlink but we can (bmo#658850)
+       rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
+       dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
+
+       # Don't install llvm-symbolizer from llvm-core/llvm package
+       if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
+               rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die
+       fi
+
+       # Install policy (currently only used to disable application updates)
+       insinto "${MOZILLA_FIVE_HOME}/distribution"
+       newins "${FILESDIR}"/distribution.ini distribution.ini
+       newins "${FILESDIR}"/disable-auto-update.policy.json policies.json
+
+       # Install system-wide preferences
+       local PREFS_DIR="${MOZILLA_FIVE_HOME}/defaults/pref"
+       insinto "${PREFS_DIR}"
+       newins "${FILESDIR}"/gentoo-default-prefs-r1.js gentoo-prefs.js
+
+       local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js"
+
+       # Force hwaccel prefs if USE=hwaccel is enabled
+       if use hwaccel ; then
+               cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
+               >>"${GENTOO_PREFS}" \
+               || die "failed to add prefs to force hardware-accelerated 
rendering to all-gentoo.js"
+
+               if use wayland; then
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel wayland prefs"
+                       pref("gfx.x11-egl.force-enabled",          false);
+                       EOF
+               else
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel x11 prefs"
+                       pref("gfx.x11-egl.force-enabled",          true);
+                       EOF
+               fi
+       fi
+
+       # Set dictionary path to use system hunspell
+       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
spellchecker.dictionary_path pref"
+       pref("spellchecker.dictionary_path",       
"${EPREFIX}/usr/share/myspell");
+       EOF
+
+       # Force the graphite pref if USE=system-harfbuzz is enabled, since the 
pref cannot disable it
+       if use system-harfbuzz ; then
+               cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
gfx.font_rendering.graphite.enabled pref"
+               sticky_pref("gfx.font_rendering.graphite.enabled", true);
+               EOF
+       fi
+
+       # Install language packs
+       local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name 
'*.xpi') )
+       if [[ -n "${langpacks}" ]] ; then
+               moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" 
"${langpacks[@]}"
+       fi
+
+       # Install icons
+       local icon_srcdir="${S}/comm/mail/branding/thunderbird"
+       local icon_symbolic_file="${icon_srcdir}/TB-symbolic.svg"
+
+       insinto /usr/share/icons/hicolor/symbolic/apps
+       newins "${icon_symbolic_file}" ${PN}-symbolic.svg
+
+       local icon size
+       for icon in "${icon_srcdir}"/default*.png ; do
+               size=${icon%.png}
+               size=${size##*/default}
+
+               if [[ ${size} -eq 48 ]] ; then
+                       newicon "${icon}" ${PN}.png
+               fi
+
+               newicon -s ${size} "${icon}" ${PN}.png
+       done
+
+       # Install menu
+       local app_name="Mozilla ${MOZ_PN^}"
+       local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
+       local exec_command="${PN}"
+       local icon="${PN}"
+       local use_wayland="false"
+
+       if [[ -n ${MOZ_ESR} ]] ; then
+               local desktop_filename="${PN}-esr.desktop"
+       else
+               local desktop_filename="${PN}.desktop"
+       fi
+
+       if use wayland ; then
+               use_wayland="true"
+       fi
+
+       cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
+
+       sed -i \
+               -e "s:@NAME@:${app_name}:" \
+               -e "s:@EXEC@:${exec_command}:" \
+               -e "s:@ICON@:${icon}:" \
+               "${WORKDIR}/${PN}.desktop-template" || die
+
+       newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}"
+
+       rm "${WORKDIR}/${PN}.desktop-template" || die
+
+       # Install wrapper script
+       [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}"
+       newbin "${FILESDIR}/${PN}-r1.sh" ${PN}
+
+       # Update wrapper
+       sed -i \
+               -e "s:@PREFIX@:${EPREFIX}/usr:" \
+               -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
+               "${ED}/usr/bin/${PN}" || die
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if ver_replacing -lt 136.0 ; then
+               elog "In this version of Thunderbird, upstream introduced an 
in-app notification"
+               elog "system. Setting pref 'mail.inappnotifications.enabled' to 
false and nullifying"
+               elog "'mail.inappnotifications.url' may help you avoid these 
messages, if you don't"
+               elog "wish to receive them."
+       fi
+
+       optfeature_header "Optional programs for extra features:"
+       optfeature "desktop notifications" x11-libs/libnotify
+       optfeature "encrypted chat support" net-libs/libotr
+       optfeature "fallback mouse cursor theme e.g. on WMs" 
gnome-base/gsettings-desktop-schemas
+}

Reply via email to