commit:     eb57fff3ee8923f786729474107e8a206aaa18a2
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed May 21 06:17:40 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed May 21 06:18:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb57fff3

mail-client/thunderbird: add 138.0.2

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

 mail-client/thunderbird/Manifest                   |   66 ++
 mail-client/thunderbird/thunderbird-138.0.2.ebuild | 1159 ++++++++++++++++++++
 2 files changed, 1225 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 0efb15892138..393ef58ab68f 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -1,6 +1,7 @@
 DIST firefox-128esr-patches-11.tar.xz 18696 BLAKE2B 
0f35eaa29f1daf9beb09c7303b3e92676eea84337683b8f7393e8b52e36ec1f37683a050e1e8d7939ebb1bdc190acaac887bebe88812c1b64785e38980f18be3
 SHA512 
04bf8bbf3c4e7901a6681fec66f179f797615613be838cf35a4b03cd9a347656b1264524ac7355f0c3978a5e740ddc5dc438610e5cae6ffcad73a8988cf0e572
 DIST firefox-138-loong-patches-01.tar.xz 2948 BLAKE2B 
a88a68418b747206a50b3c7d90c447aaa2a3ae762d7d5d32bd03f3af59d0b9051c278de8b293275758844560f1f275461afbc07e40f449fe5060d47ccd5b0938
 SHA512 
cd80714cc7142edb1a3dd83a7ddcb11e65f6b3ae2c44c299a6ad6a7636514cbb0ba8bf95446553c028b3a80713825110438727c3308c810358b2483af3340a24
 DIST firefox-138-patches-02.tar.xz 13236 BLAKE2B 
cda86ec5a89d591e7a294cea611ecf84483e28ddca9ea7087f4161ac7589d2e26255a7a1e78e3690dbe97adc5a2d07eefa3b2d2e032eea82f6722f9a6089dabb
 SHA512 
0211e40595a59db168ee6ebdcde398cd9cde6200306ad08633235d8a85bbe367c6a5cb758fc4a9a646af7c33f6bb9a6cf403c47c62be954bc35949356d1e9f6f
+DIST firefox-138-patches-03.tar.xz 13284 BLAKE2B 
825aed6ebea3a7c48140f9e050662ca07c93782dcd287c1e61e7a62d715fb9689820c283810f608a80a5221c366fb54ae06f41df16b317b010e17a014b2fbb6b
 SHA512 
eaed91f322ae6151605579d4b1189e217f881a442239fd887d268dcb1a9d76099d501abd3ed16248ffb0a415214974a340dbfc47756a062cf083d5e57a6c655d
 DIST thunderbird-128.10.1esr-af.xpi 534915 BLAKE2B 
a9bf637027672d7cfed377a8447cb9cf679f4d57439f663e5f8a09f589b75b32180f2bc9fc7a0d972e9c1157fd96b8f56f87afd5250d4d6e1d35f7887886add0
 SHA512 
bddca968f0864eb6b8feea8547a4552f12ab42b076b593aaed075c0c7a6214240f1767090e17333800929329b3779954edbbc420588269e06817d46b14733146
 DIST thunderbird-128.10.1esr-ar.xpi 686463 BLAKE2B 
33b2c690e058a1b1c470f0375e37463eed9623f69136c26d6186733b28b4914e8f909d4d7dea20b57e6b837298318b6ccb3416f9bb226b1b55485d06122eaa36
 SHA512 
887db2fe338f7e7ae79dc05c1afc8bfd7f7bce20cc644cbfb7d7e645fdadc0975aeab638ddc415f2f4b48ec9e7eb60737878f1f2a9a858663a793303a3f4300f
 DIST thunderbird-128.10.1esr-ast.xpi 574780 BLAKE2B 
2a99cab2c52577f88c226bfb2933502510ad06c68fb4e8f6d6b9f59e8d210a25387d423269cf1fcedc67af7209995da77eb6d9a376137e04fde6dcb56699d930
 SHA512 
38fc3cd80ee2394364bc1c76e1b7e157b2b082f65208a4b5e2e3b4afdadac230d13866cc8cdce0c8570e1cccbc0377f856a1c324df8e561bec478293786d03ec
@@ -131,3 +132,68 @@ DIST thunderbird-138.0.1-vi.xpi 514978 BLAKE2B 
2489c67f3a67f587698173b11ec1784ee
 DIST thunderbird-138.0.1-zh-CN.xpi 504310 BLAKE2B 
0e730bbfd844196dcf3e574e59bc274db302e3cd69610fdeca83e2973fc746b204ccc043559fd6595af7171356f7f5660b53a66f6da531ff1ddd143ec5fde921
 SHA512 
90e6bd4fc7aae932254d81f031ac4731d45d439d9858154a4c1fcc0439db9e369a7bd2f458a1bb4624ea15fb8e2fbfa64047b7ef57db6d825fa0876fc9138dcc
 DIST thunderbird-138.0.1-zh-TW.xpi 507440 BLAKE2B 
1a8bc27f94071ef10b55170b0110e11e5e8edb51f74b8f450e939e89a7a3b794799071651df296ffe7dbe75abe56eb305ed5b5ac2f077ece3f0d30583f5e3aa1
 SHA512 
9cef9db818799611a66b493212845b803358d1c1ff02b7259fa013c403c72f74e8de3b223681138e4a5a4352fdd7eac21a4f85b07d82c247065d09c7ff4a258d
 DIST thunderbird-138.0.1.source.tar.xz 758760604 BLAKE2B 
8c1e6d4e834ce3128c97211c8b73c0af695d722509a292b06c08848408863177d51adbf0779029595010c515e46014d00a7391bd3b5456cf2e406c773cdfd353
 SHA512 
2e71ee537292ec1a49237e93c43ed4c1a9eae58becfc7fa9ca0daf1e982c38704cb6d44e92b1bf7b45c5b8c27b23eb3aa7f48b375580f49ee60884dadc5d85b5
+DIST thunderbird-138.0.2-af.xpi 315687 BLAKE2B 
e79abf6a840180ab58ee5af2fd5a394d8a15fd338238170c4a5c3c412912517b1124215d99c61a9a1aaef9fc982bb45ef9983f60522c896bcd886e0d999368b5
 SHA512 
2f814657066344ae26164a00b09cb3e5c43f02f433e5294c5e20ca029f4d0a95a59a9da6ab72914037c81aebca4a43e8cf903e6bd4986e07c0919cfcdf2e2e10
+DIST thunderbird-138.0.2-ar.xpi 432652 BLAKE2B 
025734f2591450a7f23af7d9811d333b3bae4d743dd573c1cf34153d2147b1b8f2dae2533e0906e8dde152e50bf5d6dd9c24ade079119f3e85bad168fe41079d
 SHA512 
e412447de69fd504d2814cd548531f9f99b69c0d1c2ba676ded4d86b2fbcdee3778e71ecb753a4cef80632c936aed5579a15e4a30608c3b7ea10fc65ecaeb19e
+DIST thunderbird-138.0.2-ast.xpi 341395 BLAKE2B 
eee53212c60188048625c282b8c998d58baa7bd40069a69392d159ff43dd92c4603ace6fc14e832a3e8c54f3f7f4f5b93ab8670718b9b4b2370b923d272f9dce
 SHA512 
0d151a3d147322a8e8cd15cb403cec769d9a04d23280dfada10d4f65700047ba895b4c150a619bc6c0727e068b90201bd6b5f2138ff911173f6639871511be8f
+DIST thunderbird-138.0.2-be.xpi 516622 BLAKE2B 
1c4c889bdb1469004d921b36b5f2f7c3941d7f28eec5e7492c7dab0631e9e4006827a8a1243d62db2c9b2c17e1df28766dfaa54452ee79bed598ea2378b35ccc
 SHA512 
876d1cf90361bba30c2f16db9e48996907dd4ed225e1ac81619a285a2c8098c2047cc578c89e44f092a093c7a3c500cc9ff73e85785f0f9e1b411d28d7589de7
+DIST thunderbird-138.0.2-bg.xpi 533874 BLAKE2B 
c01dcc55f036ab6e6298575aa62cf64911cec94ec5e2a81cbdb45b8c24b59cc5071939f0b49bc8302d55501bb36ad7786149a1b0e424ea3b880d5f1ed91d49b9
 SHA512 
2acec17a7f7800336a9e4a103d83de12d0e2c552b78a1f76ec9eca82c5d9e9935a9b5ee2e21638d1d5d6a58ba2353deca97fc6ae1e32e61641bad88e79636abb
+DIST thunderbird-138.0.2-br.xpi 402266 BLAKE2B 
33bd7f7fd159ea1e75f795ee2de922f88bb51c9aae4425a7082cff2caaac9fd8fac217fd73d2752394177874a2b771639cc7b36e9f9d50f3623fb3e190dd86ea
 SHA512 
01af8237e3e1fea1aa07c618a6346a6dc39ecec18721464c86d22f1f9594360f61a2a3d0e6a461fa6b9a7b64468c0940b32f18d298b75f3237e11c0ca624205b
+DIST thunderbird-138.0.2-ca.xpi 440426 BLAKE2B 
b1ce08f497c6d32998125f695ba227de30302ca17ef5bd59049ab7008e298a59666f7a5ee93adb9342958a4758ae78e7e55f84715b314eda5d1fcbad73526fb4
 SHA512 
5b70d160f4e756d8d941cd68ad1281a6c6f5cbc315f436fda69cd24767fbd94877b6e28a6bf352d3060ddee453b95bab84034194da610915999d122b65707fb0
+DIST thunderbird-138.0.2-cak.xpi 418138 BLAKE2B 
0f5cfb918cd94a2378097dc3e8fc52512fbe6b27388b179fe7f9b7e4b1629d29486d4c0d9ed3fb63bd9b6b0cf104ac48252c3dc63a022d61c6cc74feca150e5f
 SHA512 
1f46aad2309adc64ae3a448ae0d44cf26ea571cb0c6b099ad0a9354da13f0ac2896f057f8d1f285d801e1a5a1fc67d404f9bc3d63425a2a895f1ea240a3cd999
+DIST thunderbird-138.0.2-cs.xpi 515257 BLAKE2B 
54d17880536f083cddbb53a59f65070f24774e082174dd93acce55544a6f6c459539a0e70ff4d02a186683fd791d8ced9d9405cf9ac1a298eef4d8485750d8f8
 SHA512 
4fb538569c330dbc06560e7b37f4857e745c59ed297b5cdb4128016abc57dd1704c8b6b43ddb31b9eec4eed3f1b518ac29138045fd8b32139e2bc69e3dfe322d
+DIST thunderbird-138.0.2-cy.xpi 483840 BLAKE2B 
051ccf6de4c525683e3a124b08bbd9d3d6429bc1923993ac0f4217038ac76a8c0c284521704f927335132504eb16ec79a6d70cc834ca119be7c890cf66eb7d23
 SHA512 
dec9319dd1b2d91c4b7e502225beea42991ffa65fc84e4ded0186048222844188cc8042bbfc5b107fc6e0545f3c63039df74ee0355f466f78588fa1712065057
+DIST thunderbird-138.0.2-da.xpi 471377 BLAKE2B 
8acc0bf54dc0dcaca4f5680ba3db68c73becdad65fd4f231f9b1a5a7d3501735fe7b78ba13619cf5d095eddcb25eaf3c57664421e5fad9ff14df54fd5ca2c076
 SHA512 
f1a95c6b9b189fc1b9bf09ba7e624e1309d64fac989dc7bd8af3bd5812831925336d3110c6ccad3b83616b008be09ab9cc08b9a7ae0ea051ec468fea229d298e
+DIST thunderbird-138.0.2-de.xpi 501141 BLAKE2B 
aefde8fe1bd126ba51e3af300d96c2ac0016e9f962acec4bd62b6c688eec9dd3ef49d14ffc1b75f71bc8440c1f282dbc573eb7da20e5218b5d05b9c7eecf488d
 SHA512 
a93b06ebfec7cf94b67a7d24c7a51fb8e60980efec9fe342fc0d7dfb6810c10711995b73880996e570147a77e9e855c1584ea5aac8ab3253445ce23b8e92a1f4
+DIST thunderbird-138.0.2-dsb.xpi 513829 BLAKE2B 
1bce56517b23fc5f4e601384da8597b0fe3f8c98ebe7c5aec2f1f88257fcf9a910f9bc01cba50cfed19b725238d59f0a556013a4f987c5346e808707ce4caf84
 SHA512 
673fdcaa7bbf9c116043b9eddea0affd19f312791117d7879da93ec8ddffb36ebb01b2da4c4f6fe709ec49c37cf1d145ee32ae222ecf377fff7c34f87bd0533b
+DIST thunderbird-138.0.2-el.xpi 604267 BLAKE2B 
9ffb124f26afb3dd33380e57f193acc932f6a05b6c234db8bd7f81f912de50656c358f090dc354efbf4e8c9648a0c7ce9b8dbc56b4f1d2f3a197004ca6a02d94
 SHA512 
8b2178ed6b6f85a7d11ff09fb39b0e60a6e7f05410b1a594414c31d0ea610b61ba4eaac0e869568cc01d14b26c3a6fbcd734cb420a61b5929e7931be97f5ba2b
+DIST thunderbird-138.0.2-en-CA.xpi 448564 BLAKE2B 
31bf61100efcd8fc1ae65574976901b3ae77f53a22d97948e09d23407da984c1c63e29d091fa99b062be6af38100a81dd76262480c168f0c9547ead2bfd4e77d
 SHA512 
4827ba544b0b6697d61e941d549a0e888a7bd90faab8eabcd081050f2368e0672d07e23608476cf912c45f24458a1c23a84b7e57b460382978997e3bc6624e6d
+DIST thunderbird-138.0.2-en-GB.xpi 448928 BLAKE2B 
9e52640d54f2ee0bf920fa2f090d62131251996a25f44b91105d84e07a318d7db95855137630ef2b836a805caf4790157e3e151ed5eb16cc30c1d086648f6f8c
 SHA512 
c7cbfc99404ee4b12a1d3409c0d0a582cb712ee14cdd746491b3d592057804248d092d5d1797f7f3862fe2be4f9981676a548f18eb4436d0cff279b904b5dbde
+DIST thunderbird-138.0.2-es-AR.xpi 491742 BLAKE2B 
66cf9c6c5a1de100c1a6ca1300f684839e83221bd381af1e0b724b38db5857b02a6b402a43a0dd29996685d9a462a6bde5661c418c36574ad483a9850519fcaa
 SHA512 
93369bf18bf2b8ea7fe4a2f2c07063cc96104eecb6c36a95101342abed1ad93bab7f3eb015beb6106ac2a262c44b127e1d533383cdde6d8c562cab81a24a70b6
+DIST thunderbird-138.0.2-es-ES.xpi 493687 BLAKE2B 
d07b406dd5c00d653d78e61374c627cb980c459b9e9501d2804e647217cec1c46df0ea412cf71b8195e37737fc562933fc242924b213e86797a7be0c24a5f5ea
 SHA512 
132e8e1135e5962b211e3171b4c19b2752e78f0f77d774231785b9146f2b8ffdb1009c9bf0e6f3251b5773a58e09628988a45caa96250623785f91b4fddb5891
+DIST thunderbird-138.0.2-es-MX.xpi 488411 BLAKE2B 
a6fcdbe1ace030578f3c48f85619df98842b6a99f2e2440227c46d31348da8b690d336a86b4344f7d28966a941b8b0d137ee79aa1feb5d6dbc083de2d64e59b7
 SHA512 
0442ee2d1c71efb67e7e27011a4a3487ad975da141dd4d5b7456cb1dccfb71064ad9c0f55f86181a08e7c1fd17429a0da8280e1824586711c09bc06a856bd1e2
+DIST thunderbird-138.0.2-et.xpi 438746 BLAKE2B 
14a689c898eda3d88ba6860ae717a9e9f039d1e7934c2fc424cea8ff6832557f2f081d26d4bdca0d97ae6642b8907af94819c7bbbe029d32d9e7bda77aa13588
 SHA512 
578ef2e7c1658c6e318d72b6ae2267d581e93fd18eb0ee854e1f46d251ab9183a35b3e7a0d62dfd7f5397a746c05e2f75084fed93b5cb13693d8a20555fe88e4
+DIST thunderbird-138.0.2-eu.xpi 469450 BLAKE2B 
b9c9cdceb0f7feaa3d047fabe9f9dff957f8d2551b34197937a8f0f6b78d00e0017b9ca570dc956b8712cfc0324e1ce7bd48915b8edb6e965fcaa1559a6bb174
 SHA512 
6ce9b4619b705c74499ea9cbb2221ec8bc25e25e1c92ba510159369378fc36154491f5dae76b81aade4b27a73d345032fd2f87bd10d8af517bdf63e8630cf2b3
+DIST thunderbird-138.0.2-fi.xpi 470782 BLAKE2B 
cad66adbace7363e5cc030706bc03db2f968f10790a863a6fac8ed85cc41b95807aff9268584a6c3e2739b5d343b95c5b7544f2123e8919054c842ec767d2368
 SHA512 
ae6e221076db03a04e12e6cada74635bdd2b35a8036e3180f6ad74d16e3cc1b5cbcffe79b5ec23e34d30c175320f7da94d9b6753760c9a5ddac90773eeb2b7f4
+DIST thunderbird-138.0.2-fr.xpi 504512 BLAKE2B 
6aae3781b1eb785125a13673610aae694c3282bfb35b1dfb715129094876aa56abe53440b077b0c27961140e9dfc5cd80c19b2ee1538ce592de6cdada973913a
 SHA512 
ca9bef589a514f8d2f8d444e9de6871ecab77b4641deda011430f16c214f9fb20de09dce088becb88dd19ced59e3891c1a368de3c54bd1b9180c2216eaa81cbc
+DIST thunderbird-138.0.2-fy-NL.xpi 487021 BLAKE2B 
f567d6152dacbd9835179ad60d6797078112ee4ede9d06f6732d153fd3f78e1ec8b8c569379858ef57de856d6502e52f4c4d2e7540e93b30593aea211d0082d0
 SHA512 
8eb592b1cf9c03ae0e40300a46d731e13b7c5fdb53014110a9bf176427bd92791190ff5dea2880767fb00238abd2d828954ee070c0f36f7accc8f3407cfe74bf
+DIST thunderbird-138.0.2-ga-IE.xpi 376472 BLAKE2B 
7a7c7551b0b3cfd5c4dec105056febd3c458674628f96af6598154248806b83a5cf574823bcbd5ee9445f6247163e065fa764fa831a6f6ae26b6209f13e1f73f
 SHA512 
f444630f8337b7fcc5bbd59619a38ab3ccbc1bb7774598a72f88b76fb06c6d3ec47433d2c0116b6f8737dd1a4c2b66f589c7d97b4e2828b442d2b70b19f768fc
+DIST thunderbird-138.0.2-gd.xpi 462106 BLAKE2B 
6d249dd9398ef0a50884cdfcabaec1331f12d78becb7a6c858265f94ea3fb5fcd48a19e05e659ce0fe0263c97dbe580a0d6d0c02f6fc1a8f33b73dc6b0193afd
 SHA512 
3f6da283b37f5abf1a0d0aec9560af5186454b907329d47477d728ef4edcdef8227f6b51e2c57e1af2bfe3e6031a62a9dff881300ca9cf101ba9921dd479e048
+DIST thunderbird-138.0.2-gl.xpi 470882 BLAKE2B 
d87a9c2fbd623afdc4bb20286fb621e49ad4e6b29976df9a4a72de94f7d1765858fe1f27fe5a7868c9e1843954edf7056f5dc4303824b7fb8faa9d41125b9194
 SHA512 
e0c5b4f261c04e7ab04d54e1c161d692180a1161c37b1846a378301c8fc7e00aa4a14b344f3fc104041085385075cb9df2b1bed96376bdbe725b61748893ad09
+DIST thunderbird-138.0.2-he.xpi 438481 BLAKE2B 
6a5f2dfd27a47c97f959b49ea62e90a6741fef6d3dd132d1e3f22ec22990ce4bb0fa0e6a55491728eec7d0f5990303c328b309d66e203d52b8960779fa289612
 SHA512 
dffdaf45f3d351f2ce0d7dc7db5aae0e55fef432def15ec8ecf8749fe72644ec84ee5470dafc4b20ebc728425aebe6cb032c0ccbb08b1d69e851eed4786e0858
+DIST thunderbird-138.0.2-hr.xpi 458123 BLAKE2B 
2ff94b9c6e0b31e6cd94e7d3424a8e8d114355053d0cd5a1af81533f10c08665a49a1c5590f331d482132fcf35113f99b61a8fcb8aa2b9f10d6680134b279ac2
 SHA512 
60e23bde8f3cee2455a08515a974eee88cc3f787d865fdfc61aefdc7fd3d2353404b87da6e24a3a10a5127663559de44fba32cf4e693ab9e79248922fec8e2f8
+DIST thunderbird-138.0.2-hsb.xpi 510913 BLAKE2B 
e0502ff8006d1f5b15f0fb0bbf16c26ad55f3cd3d67b2d85c7a8edcb7a2ea0497573dad11c74d6a55751204b3e4b18560b74f1d570547173967bb6f4db8cfc27
 SHA512 
385729a52369272ec671799f5e9b298be3531facd865bcc769a3c5e369c7a642dec59cb897cdac4c6926f01589378b591a3bc8db2ec6e46533284f4445f6bb25
+DIST thunderbird-138.0.2-hu.xpi 513727 BLAKE2B 
cc15fe8f6e53693be8efa234f8289c471d0b3c13143bd4e991523aa6b465ef063dc07f2c3fa8885d7fa5e9aa849e37fbbe05a857b2e99c8a4433fb46613d161d
 SHA512 
1eb8dd9906e0d2429b06bfdf8600ce0c233934a86bb33f34f8dbd04a02569f4beafe9bf4ba486e6a89ed4c586d61b4ce6b32dc40a54bdd3679fae85459c9a778
+DIST thunderbird-138.0.2-id.xpi 463635 BLAKE2B 
6fa52cdadb48acc3a027a49594d9b1dd4d7bcfd605fcab4482246d7e127304b4d56ea8a0453948ec84ed97b39b2cba70f332637c6c9485d1ffbe04226215cd5c
 SHA512 
70a8303e22576d9ee2aaa02a0c106aa4fea06fdc25429abf6b6b5d070eefb5145b70d03c4bc1d50c5ca2241c0e1831041af9984686776b9bc845317f762128eb
+DIST thunderbird-138.0.2-is.xpi 480773 BLAKE2B 
ccb6d3f64ea5b6ff2c6df0b26614316770f9e13a80dae7f47851d0e9cefd4597c9dfc05e17f7154ac911a08cbd5b8155cf1ea21b4b8341eb91b1a51bea1d4841
 SHA512 
cd2d8df646c3e1ce622c24a58ca1ad1d2c3e390a04953e2f53586c87aacab8276e31afd683f560b90ef8360d15d231cc13d13a85d335b1b4d078c679bd8e1ac6
+DIST thunderbird-138.0.2-it.xpi 484896 BLAKE2B 
931f51a95235dfb6030448d1fc655ac3415b1f951813fde635063f3751fa9570bf4b9e9edbb744202aea71bbc3e7e36fbbc591c89cf6a00fb5fcba56f5b21725
 SHA512 
60d87b9bd1a1d2e415ca930cbbe3cf5eea01441e1dbe5583d383ee0bf19dd5a1ac609ddafcf4db87f8f77dc920e600565a315db5423520a4d0aa6de96f7a7334
+DIST thunderbird-138.0.2-ja.xpi 535301 BLAKE2B 
d9d4704f936a39b2fd3301d418dbfda3d704185afac4168bbf311ead2dfce60c3db4da6a79f5c8f216b40d9ad7d8f8f465b99d82083e0bf09a5af9c6ebda0103
 SHA512 
b12cbfade31c9b7c776b8f2faecbab0c3373b0c7b25a8e00ebc7dbf9d42b4e45a6e445b6b85effe040203ee2d24b8de8a26375e8f8ce4c7ab71e41395b5e3b30
+DIST thunderbird-138.0.2-ka.xpi 540337 BLAKE2B 
362c62dded7693ee154991ac2262f018263053506f24767e79b7fd6bb685f31cf13bc81d6b52ae753566530ec58c331ca0751afa1aaa36bd6b7c2d700be7a80c
 SHA512 
964fd534aa4a678493d089ae0d0006438fd5115496b8e419f609fe8f5c5c87b8d941bfc408ad4b0ec40e12afe51f8a65d9a3dcd2464645727450eb5eb28de062
+DIST thunderbird-138.0.2-kab.xpi 463061 BLAKE2B 
b3584781461e06efa38a62a987d33036271c648dbe2d9b7dabd6fb66e4e3446c68dd752811c204bbf7b03b902b03e9dc484bb058c59aec3ec773d529aa3092b5
 SHA512 
50898fe41118f27d5acc53264b83aea026ad926908786ca3f71c991ca8582c4e9a21536f4cf5022f2b231568d94c7e6fb3711c6278c595611eec16e0c66410c3
+DIST thunderbird-138.0.2-kk.xpi 569096 BLAKE2B 
72622583abb862346dd8a133b618c09b0015a392136f5afc1a4901b9c220278a6cbfef3c0383302ff99d8422dc08185fcccac57628a398a2708e4ec6946f5f6b
 SHA512 
fb04541fdc85ad009388c8dfc4eb39b4e61f3f5d4588623e2e5de976ec7c0d677828836dd597409e03d80fa630c23381834ab80d723b3ba434a70811ff8ced28
+DIST thunderbird-138.0.2-ko.xpi 509787 BLAKE2B 
b757994d7e629d803b81cec5627a7a28ca9945925f6bf01875ead25f777f0f745083170154049ea1a4c62a230ab0780b19a466471991d72825fdd0d992361740
 SHA512 
5b1c5756488d4bd507ae1c7736c087010ec092be225392edeb618c45cd7657dd871123943220706982cbfcf3c6f340c2cfa204a80cb997d757a5450fc856d17d
+DIST thunderbird-138.0.2-lt.xpi 441911 BLAKE2B 
7b9866b55951ac4374ccd0cb631424d026da7f179a619cf0427bdc07de0501dcc52b07848599691755a5c58be032d5ed52785fab02a59867bfdc25f1c98fdf34
 SHA512 
30fbc80d10a6fe4f3cb746341d27db89eb58f5d6caa9678677363ab6c9b1df13411c2db6962362b030fff8983b26aafda0893bb489c22198d4f3739f6fd2078d
+DIST thunderbird-138.0.2-lv.xpi 391656 BLAKE2B 
56805cb6d2c6f6a528a1559ab61feef5fc74fb78fa711f229f50ab290ef1b9017683e24f62593e58e4d53a81f9eb62903fae6a618afe1c00b0feb37105b26d50
 SHA512 
15fa2cafb55b5357e8fc7f378ab61780a195036e10a257219dcf2f9979046c27f3d4bc7bdd465b711a25172d7772b54d1972326fc3881c2a4a4f4647bffe6d4e
+DIST thunderbird-138.0.2-ms.xpi 351835 BLAKE2B 
c05ca640870b9c4b8a15a17f39245f2e54617e8f69ff531a39662357344dc62b96055d9a3fd0d1aca12760f72832a53cc10b6868c31af3eb8478d161f37b1363
 SHA512 
9368c1646e408bc40a67d01efbb6fe81312b6aeb91f86f5348c7b5a08517e1efbe7af3d934f482a3fa45f3e1175088fbacd50040ac257184a1dedf0d4e29f5fb
+DIST thunderbird-138.0.2-nb-NO.xpi 443701 BLAKE2B 
4be96f61488956e8619a1aef76f398bd59ab7cc3215b1daed4e65f27d0d0976a65fba69d6458cd26218a08573ebe00a273c891ddc1ee6a0d73f3ce6e1111db9b
 SHA512 
90089d53ff4d837ab52cf6c78a6a0eaf4268305ae1920e307dd08ed912a82047e309d64f6c2de78bfb4dd51b2c0797e4a476d3e6ef537448f7e54e7f592406c9
+DIST thunderbird-138.0.2-nl.xpi 478550 BLAKE2B 
906414e0b615538ee4a71457e68b6f709e8df85ea4c99fe88d27a925428b2c7ac1b412aadd8093a669d44748ca0c602f5bc3f0e746c90b484111717d6d4c3b65
 SHA512 
b412e93b21d330f4e15169b711aec783f22dddef5cac1cb9dc05dcfcbe17b63fe421b93cf966e1efcc48b45a33bd3449e35dbb8444b0e5e529d3c98a35f0e8a1
+DIST thunderbird-138.0.2-nn-NO.xpi 464542 BLAKE2B 
fb38706793168c00238a0d719e09de351c991c78d3e8ade79193ed69743029986692fe373a6ba5d0bfd78b9b54c27d660a894652ae63b71d2e7b4c3dba318396
 SHA512 
43aba28674abefeb6a1c4a1a428ded4e797a55b44ad9a588081c2750d29e85c380b0d7fe6774714fd4357a1ecf5b71fe7d61f1225f91250d513882b0e5204d71
+DIST thunderbird-138.0.2-pa-IN.xpi 432789 BLAKE2B 
af8fc6be9e784ed7fe305d70bb7fb7237f6c7955ce897818bab505e20074dc44fbc487d3160448447c3fb70adb463d698dc0467c08ec419735a4a93ce85fb8c2
 SHA512 
5468c5cb60d8a1c5ed70a5b1d27fb73933d990d82966b6a27dfb83ff16a86449e9c8ae8d89f500485bae4a74b120aad556ece3031ca3f12e99e10a9813765eb8
+DIST thunderbird-138.0.2-pl.xpi 511052 BLAKE2B 
79a9b015080eafcdc8fca81fef71f99609bee255c8d75a2ee6b27b316a1a19437f2e263c126cc5e2eea2c347ef57bde17ab03575824f4e2e83c28168e6c482de
 SHA512 
b2441137db1d4a8ddc03fef67fb2ddaf827d7db76266b293979f5a6d39de8dac55296b405cf0160c934195ae8eb358da636812c77fc4196c53d08e4b31119662
+DIST thunderbird-138.0.2-pt-BR.xpi 486094 BLAKE2B 
e39e571348bc795fbdb363427646a0db49f36b37d9a880657c7ae998e721e491193bd5314063deee1b22607d8c8baa4239214d02e681d5fe0f1527dc3c945bba
 SHA512 
7e49512f6d472627db3e9ec39789c517e7aa8b2d79a318b5c0a3c7ff72c9ca07f221f62dfb24a27512a9cc96ea978cf094129ecefd2943ec702412dd23fa466b
+DIST thunderbird-138.0.2-pt-PT.xpi 481030 BLAKE2B 
3ada7efe0b531eb1157ce4023e970643960d7d10df2723545a0a0e52e1e487d5db333a94e34b8521e8e648455ffb45e216b753b68f895282ec1700264c2e1261
 SHA512 
0422189e9761f607f6af9e7f42e46e548534bbca408d8f5dfd3e9eca4b04d3d5b3a53b50e7b1ff02a740ab401bc091a3f4d08a4ff41c3b6515c91937588ec48f
+DIST thunderbird-138.0.2-rm.xpi 486827 BLAKE2B 
62fc65f818430fd326ca1405fec4cdc2ae10f9cb113ba766f2656af70ff26ba9104bd5b6580fc6abc0f29595aa459c1e4af44529e72924c3e1ceefc7f3debf13
 SHA512 
aa1587ebf45a827c19c33da7fe858d35519ef8e33a9c99cb495883e42fc9c4ca02842510a4bcdf9ebcb24420338a9d1eca74f10b49751587dd3f07754a455a65
+DIST thunderbird-138.0.2-ro.xpi 417512 BLAKE2B 
41c5cce55298c3a939479c03bfe07a2a03ee6bb742084b6867242618ad53a5c37b4d27f1d556358b16d71eda98da4efee53e85d87de284115a4ceab340767a91
 SHA512 
e0b6f35d0611ed692e839dbcdb477f80feaef35f476a1284b646049e4f2b502be8a1e6d411116c45dbc615819e40cfcb15e7e78c4e18a5160adfe002c5c94601
+DIST thunderbird-138.0.2-ru.xpi 588301 BLAKE2B 
dab33365798cd6872d7b4d3efb7e9a47348db20618ac52872806eb5c04e86a46bba81ad4f7c4e05ece97ae7525ac11ca7ee11e45743bc81d6b7b3fa5f296e62a
 SHA512 
edb51823fa459573e8dc252351d6879ce14edea9d1684b0cc95319e9ee40c3cd3fa828ab97358f945667ff14cb1feb6fc37ab02fc1d208a70363276d71c1e1b8
+DIST thunderbird-138.0.2-sk.xpi 515103 BLAKE2B 
4e6ea1b14564be95138c471ace8fcb5d3b091db74b4ab23ed8477e6d2074009a924da0485f318e26e9d5b2fc4fb38446fd460368bd98dd2e414244de96647cf2
 SHA512 
8ce50cc7f15910c3dfb9f7542dfd7303590dc706c7565f2b1bf46a7e79e7f1116adaa779d2f8a906a69f23586361b401d7b736498aa2bb1a5e21d37b766a1535
+DIST thunderbird-138.0.2-sl.xpi 481928 BLAKE2B 
e0dc051c690dc9d31cbfb267788531c22a798e930ddef48436d392f3e55b8d5b6e45b3df5c8baa4e5030e0ce53cfe0fd405b0a5188b799b9ac2227d9c2bb7a4d
 SHA512 
45de16103ced57a1e0e8ea278e6f3cd1dc6a135df2278c13982a6c289e59a57179110189e59b49d7eee43c993ed664447ec8f141a52d4d794a2a4f2a2df7af47
+DIST thunderbird-138.0.2-sq.xpi 501793 BLAKE2B 
7a1906c935db03692055494078b5c52d5fc2780417b5f3f05cbfda979bd669a4af09f7198b02e423f7f7232ddef1576486a5733fac3b57983ec0876cbe692d16
 SHA512 
f22a491529477d4737fcac11159a958f7d002c69dfc26d9d67307dabe986a3113538aa25370ae05c583f9a7a7b919fd1df4074597480c0662034143d35e90c95
+DIST thunderbird-138.0.2-sr.xpi 495833 BLAKE2B 
c54075fb672b9fe3f1f6208966f48b1a6964e04c65c13cbcb181ae25cf555f6b8e97f09c728c217f3f4058320d6bf72777602fe55fa16ac2a6a1a142548b03f4
 SHA512 
6a9d022236ffd2acd9729e1e22c1b85a7aa0c36a55a5120db1f8ed5d39685bb7b6733259c58ac8255e4d4598e8613050fd1d3af0515657be2255ca49d3b68e03
+DIST thunderbird-138.0.2-sv-SE.xpi 480917 BLAKE2B 
0b6551548fce50270738ab1948ae637b0a050731766f9118f4e012fd71953df7c727648e4c18f049401168557aa3fc1a551f5a8d56d0f3b5726e0ebcaccfeee8
 SHA512 
825e02a6b250a13c1a8dd41e6d06f190ec20f9d16f76729c0bae3651afad094b0835ff9cceb4574fb0080d714504e5bbad636e17f643bd62f6b4e480373c0f24
+DIST thunderbird-138.0.2-th.xpi 561778 BLAKE2B 
93741c69439cf199ff6c6434b1aa6f9e50f5f96c5dbbee0d4986fadb07d11248a740fd5eb9a7c4c7cd8920800990bbe288cac157bb68633ad2fa911999f99b2a
 SHA512 
ee6d3176f25a53a755c6002a814046196af87b141df0621898d9f7070c290c25bf2f56d982bdcd5754399dfc2d8a9c1850aa1b6ed6c6435834107b73f7a5be54
+DIST thunderbird-138.0.2-tr.xpi 491037 BLAKE2B 
6dfe7b43ab0e653417de5bf8682cb77abd85eeec704134544ecc814b764e052e075b5e4fcfcdb8702393a4344ddaf37adedbe026e09582ef3e6deff3a1b9c7a6
 SHA512 
67e39fcb35f737ebd91bbbc08520565d0f30567c4391011fceea445bc1d8ed68849a765e2e3bb95aceaaa088784d85ba79fe2ec1c5d71a2d2146f45963a64036
+DIST thunderbird-138.0.2-uk.xpi 577319 BLAKE2B 
04e6d71fbe111da10ecdbadb16e21fb1e2ca13e20d728e8237e860f5f146179f21e3eedfaface516cf960ee583f5e3b85e67df45583257cec0a81de938435bf8
 SHA512 
4c76233ba653fb2d4dc91954572a6398f6b8fd27f769e1a53fa4c46919d3316c9cc9e94521f32113b403f6af52cd0150b901753e889b8d8ff200eff042db0581
+DIST thunderbird-138.0.2-uz.xpi 355028 BLAKE2B 
40fa718a1bcf9559fe98f3f503f8ebf1d6a10a69a037900c7a2b7a7ceb7c98848dba6127a1e0f6ceeb00c150822246af9e7f8ee192e9d10b230f7589721aa403
 SHA512 
d549ae0f0109484d56e2d3d0ef67141d5864ec77e9629f8bf9ec486cc0e4a4d6ef6b6b07450cac3a7f90843c5305dfa3ad65b223ec55ca6994890a2331e3232b
+DIST thunderbird-138.0.2-vi.xpi 514979 BLAKE2B 
f54db8bbf66f8c8a2230a2d32f1621f6f23393bcb0ca84bf0fe78383c23e78d8668b5e22bffa219a5fcd99fc33b730d598f458a75a2e89ac381a09037fb78052
 SHA512 
a90b3bdb830864b0c9fe0e8edcbf8e4037f3df9dbb211a42ba98f1a4787aca26aff86a6539d680a2ce4237699d214ab9860b5229d77d69c243b3283c8887a3ff
+DIST thunderbird-138.0.2-zh-CN.xpi 504313 BLAKE2B 
359bfe6a39fc2cae93b6771791e2100bb04996c7089dc1de896b5c9b52226e48038ef1bc8ec5aa2626f15ad978e1fbc0444b273502cc5dcf9310eaa71b919bb5
 SHA512 
84840d0d6f957d1bef4e4280f0aff37dfc420081b2cbc123d3b38300df23d4da7e8e4c4a3a3293f607796e9302ed12bd33d27f11bf0411c502f14550c54999b0
+DIST thunderbird-138.0.2-zh-TW.xpi 507439 BLAKE2B 
7e7ccdfc2e55843f53c48c2bffd86d40e1c1301d28a2faf9bc88691482a1ca922d1364ec1d74784c90d5e9af2822407b9b9ca24c9d58ddba2c2458f24af8b218
 SHA512 
ec790f66facbf9cfbdfee9e1b01586a97f00685d2016c833d310b6aee98e2e8e7cd990e88246fba09cb0991e69facdacf0e243f576ba5083b23224e68af02c1b
+DIST thunderbird-138.0.2.source.tar.xz 739227692 BLAKE2B 
372a400392d51b1e4c79c0bf3dfb24e792cf25596b195e86093f30ae253ba78a8911b10b24edbac92737481a248302d6651a27c38c981725e1990d794231c21b
 SHA512 
6d6295cd2d2a2993a85a67750a127b0cd6305ded37a78f65427a544f2aa63e336414888d3562f911282f9b28c9ae7c005f305e241df6133f3e111b621da3b0eb

diff --git a/mail-client/thunderbird/thunderbird-138.0.2.ebuild 
b/mail-client/thunderbird/thunderbird-138.0.2.ebuild
new file mode 100644
index 000000000000..db5800abb991
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-138.0.2.ebuild
@@ -0,0 +1,1159 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-138-patches-03.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-138-loong-patches-01.tar.xz"
+
+LLVM_COMPAT=( 19 20 )
+
+PYTHON_COMPAT=( python3_{10..13} )
+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 autotools 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[@]}
+       loong? (
+               
https://dev.gentoo.org/~xen0n/distfiles/www-client/${MOZ_PN}/${FIREFOX_LOONG_PATCHSET}
+       )"
+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-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.28.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
+                               <gui-libs/wlroots-0.17.3[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.110
+       >=dev-libs/nspr-4.35
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-apps/dbus
+       sys-libs/zlib
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       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-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 on musl
+       if use elibc_glibc ; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+       fi
+
+       # Enable jpeg-xl only in Firefox.
+       rm -v "${WORKDIR}"/firefox-patches/*bgo-928126-enable-jxl.patch || die
+
+       eapply "${WORKDIR}/firefox-patches"
+       use loong && eapply "${WORKDIR}/firefox-loong-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-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-nspr \
+               --with-system-nss \
+               --with-system-pixman \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system \
+               --x-includes="${ESYSROOT}/usr/include" \
+               --x-libraries="${ESYSROOT}/usr/$(get_libdir)"
+
+       # 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
+       use system-av1 && append-ldflags "-laom"
+       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-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
+               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