commit:     768b1646e0fe6d69a045a539911e40846df17f43
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 23 10:35:30 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jul 23 10:35:30 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=768b1646

mail-client/thunderbird: add 141.0

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

 mail-client/thunderbird/Manifest                 |   65 ++
 mail-client/thunderbird/thunderbird-141.0.ebuild | 1162 ++++++++++++++++++++++
 2 files changed, 1227 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index fb40bd2aa72f..aa4d276984f2 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -393,3 +393,68 @@ DIST thunderbird-140.0.1-zh-CN.xpi 507848 BLAKE2B 
4e29fad7bd7decb4e1c63d071b2f73
 DIST thunderbird-140.0.1-zh-TW.xpi 511140 BLAKE2B 
d213c5df245979d9401a80f3c9890439be250efaa1b16b4c620ae201740c341663ae851e37d9fd372d727a8f753145a33ab20845f52082f9142a2332eb26c949
 SHA512 
399c118445769321f8282b2b597ffe021747e4b67dd11caa70241c7c325a862920d03ca3c8a61995f3f27595059cd2e3f09ab8a5d56138319c83f0b4b533d334
 DIST thunderbird-140.0.1.source.tar.xz 760372872 BLAKE2B 
d96baa60b3e350bf205c838cb7ae825543a61694bb0337b653a0934fdfcb4386e4a3ad63a2d2effd6affd8dc04f6c194235193b14f6127b6f3e71f714cfb3503
 SHA512 
fbef1d0228c49fc9c11425b6be03bb7e44e6abc6f2027ee23317270ca2c6b0a935bb41b38667acf014bd9e1166cbe62754f1e919e04f2355dc4c833e015c78b8
 DIST thunderbird-140.0.source.tar.xz 755175976 BLAKE2B 
58c2bc3c5468e830c534134b9b4649ee4a3e7ab81e70052cf4ff902d518ad94a3293db3b6d9fdfd58e69133cb58febc424c7b97fcf9fcfc1413e58290acd29aa
 SHA512 
2e9a5fb44b21eba3e3295205142bfad666a65f9eea43118388968320597a940cf3c5675fbcf458fbbaa9e1bb85fe8a663feda6461b7e23f7103c5bb7a1103bd4
+DIST thunderbird-141.0-af.xpi 316528 BLAKE2B 
cf495fff6dce79f769348a1c403e8cc754320b7cbf73b1d06318da0db8de0f0ad533a6bb4b1f6e1bc7887d68cb05048af96064aea0ced8266cdfd92035d417ce
 SHA512 
9bf54ff65f9f607bfb44cb94cae11cdbb14fd2ee49bd1eebf4d0a8f4777085004f5e8e00e5719c514b09817c801dd3357138a2882a79e6c19626e818d9818fed
+DIST thunderbird-141.0-ar.xpi 435929 BLAKE2B 
e68e34ba41dd78183e0f1fe53b5bac475acdde75369a99e2cb86e5b13128f6b60a14d148bad1864ba2bf7b1c12df246a168601fe870694eb88d6ee004aa80ffa
 SHA512 
088d6d7868f60a77fda04c4bc39fa63fb1cb8a93e99a232ce2d0cf2e791e08f5f8dbf383095b848fb5ccb431c33aeeb8348b27fb647becf065d901f5f4a6fa4f
+DIST thunderbird-141.0-ast.xpi 340911 BLAKE2B 
96066df0a7b63f30cd39c7b6e125b99f6d615a62e5353ecb51f1385cee45b20daae1d3269169fa33ed5c54c678a813454a1e35f24234960758495e1bdfda399f
 SHA512 
bc48e9667d3c6becb2913bcd4d8204e9b9d4f902935d09fe859bc9d245be579dfc691786c5b6c061d25910d19604b4d63fd61bb0d833f9dfa1979ef4e4413b84
+DIST thunderbird-141.0-be.xpi 521191 BLAKE2B 
e2454e440f209f0b35c27a0f326d08cc72f21064d75a55c7c516110979cb4e1f9c50d4bf5ec27d6fee5d4beeb2d3752a676be175b840956e2567d3053e5bc86c
 SHA512 
1592028f6fe8135070e109623161eaca77db02f773ee3e2e32e4da31806d096f1cc4f287468cf246cdddcaa2f84dd2baf404835cb272473b54a9b3b17109ee08
+DIST thunderbird-141.0-bg.xpi 535651 BLAKE2B 
a22613d9a0a342a0c53be14cce1bb2a50df1a3206b9cbcf2292162236179435a8dc0f687912d9811f54b831c2f50364c16123717a37bc3ce3474fce23c6f4354
 SHA512 
7665cd25bbf261d60fe57af96e9d31ec1be16c220b0e9019265155dd3535c1eb57742b8c7311968330903b12aec0353a9446c636e0c1a8f58274a584384b6235
+DIST thunderbird-141.0-br.xpi 402969 BLAKE2B 
2fe78183745c13b87b67e47b599caf83a7d9e08c3d18181a500c50301ea64a95eeba20882db7528b3f2cb0401320c849e6b59c5f4d96a620515aac82d8884d6c
 SHA512 
29e45277a5f53bcf4dbb86eab90b245ae4672a8a86a9fd163ce722b47b15d9fea7874a84a0ede387f741e9c90a0641936f051da3e263e5e8163ce61822e09326
+DIST thunderbird-141.0-ca.xpi 440547 BLAKE2B 
e2b16039a1c84765089ce4748c6b2779fcd077574fc0f2d974703785343f8735ee0ecbfa07a2a5762e46eb31759cde6ddd5c4164f69665cab5c70767134271fd
 SHA512 
45ecef2445aa92ad9fb0f805d5259835f2dc1c6c3ddb5373c41a4cc27b9cfa2c41bac88ef91002cda23e42cc75e8616715660425bfd91670a1a2cffbc5e56914
+DIST thunderbird-141.0-cak.xpi 418330 BLAKE2B 
ec7572c2911a7d5fa0592030cb1750fb0c0d1526df4120b11cf83ea1bb1845f02ceb9e7fbe97dfee571761f9ee003bd20ed60a145b9d0f9141d7df8ac4a4c211
 SHA512 
37822e24592c7edde74499eb76e163728ceb51e34efa8c5c92767f5a0b13f9c788563ac98177f69af554f109fe51825fbadc76942367f8886861cee80d428ed1
+DIST thunderbird-141.0-cs.xpi 520921 BLAKE2B 
e5fffa3d4177a4715a3f00386597a44bd314bb4803158afb40f0154478503c3acb6ff5e6573f4d5844871b0afff4038680c6563c7d94cf54cb69074f246ec53c
 SHA512 
799f216ae05260a67bf530370d5e6852f818ffbecd75bdf57cd9b46c64088c5f0f77828689e9eaec0f916294355284a278b60bba0f3aecc999a0dfb2a1311ab8
+DIST thunderbird-141.0-cy.xpi 488989 BLAKE2B 
9845366dc2330c9702edc9ddb509a14ab525361584c76cb7013a653af17da53bd97a64db7b8c3e1e372df73aa6cdb4c6902f23a8ce86b5d1034093bd1f2ed490
 SHA512 
a9c11de34ff704459cd8e467974e438df4681c3735deb8c47eb9f1af8b9d80bad15008230e6a719e4cdb7972e0e3bc5b6dc4e74bf1c82b9d34611d494a22f37c
+DIST thunderbird-141.0-da.xpi 477708 BLAKE2B 
b975645cdd84f08a4855f848f67d8dfb12523a4af3b4987f5aad33d626f62dbfed6165a3f0844092d0bc155238b2f8622bea153a976577a5cefffc600b9f82bf
 SHA512 
40c07312c120d94c02b5a2817edb2786e937e063238107c21c00923c3b7899829a85cc58e283b262f120df334f10d85053fadadde7cfd9a66de914341e4d7c26
+DIST thunderbird-141.0-de.xpi 506362 BLAKE2B 
a907bfc8ba04740f71dc4ea5c5d4d2ae514ecef3e83d82da751b0a4f4d665c0c67a9a7a79c8adfb57202ef63d01aeeea5762893fb25b4500b1f6d67377f02328
 SHA512 
11c8506e05afc89d0e7679d81431b5aacf37e4459745961df923ead42e19fa6938f0f3aa96884e04200ffc84564ada04164956a7c3bd12d275db98540acbbb9d
+DIST thunderbird-141.0-dsb.xpi 519234 BLAKE2B 
6d46d78edd7814638675f2c766d11bdbc8b95b6b3dfbd26b86bf44532efac385013d8605a6abc1f1c4f30cf679688999331bf6543707abf1f023ec365b6f62f5
 SHA512 
f9302365e662954d13745e72e7f9d35ec71ba323f19b29552a27e9a81025175ae07a8a8cdfacfdb9a0a14e4d725b948a406fda0573dcbbac98e05f9d10a18ffa
+DIST thunderbird-141.0-el.xpi 610437 BLAKE2B 
49e58e38c6663526dd8560841a377a9eef547bb0c126cf9c3cca8314b2f84797a12c2f4966e79e5182014f358bb607b21fc90857fae724f389a4852dc9d47c28
 SHA512 
bfd2e604cbf586223905fdb278600f82292106ccd6a94ae9b06b36c644852e3f4f8047b27cce70fcf51c67f3fc5b7bc43083dd1fd6bc67906768ea2a28cae63b
+DIST thunderbird-141.0-en-CA.xpi 453284 BLAKE2B 
2b0100e07e9c2d4b28ee05a974d5930fe25f2e3b032d426a3e6ca86d4d70bc3824a0c13b88262c666e92f7fdf819e5ea00e15c6dbb57d14ff730adcd37884b79
 SHA512 
41a42f31c9ad38e0e7fd4a17447b3e9e66e5780f7f85461000b68ccc7f82234f247fc72a32dafae1490f0a117077f3c35bb7f31719610b3d76f0f87b8ad42c99
+DIST thunderbird-141.0-en-GB.xpi 453262 BLAKE2B 
6fcbbcf11d63a9b848ff82efadf96ff585fa4c2010ad08bd1c9186cb527607bc3a834413de1c689e8e53c4e6a1171ab31679352ffabf4eb7da61dbf24b93c9f4
 SHA512 
2efcbf1ee3da210505999c0359f9bba4658db97969a875a8ddced4cc9bc29a0b7fcea504843be68caddbc5ac94844a02163ac3a4d0227a67ef9eae8a718400a6
+DIST thunderbird-141.0-es-AR.xpi 496569 BLAKE2B 
31ef9d80bfa306a3fb5b4439f99988594d31a41d2daba66b792e62e73ac65111d3babf84b83cb17cef82b1b34ba580ee3787af86720e7cab30f8d14045956d71
 SHA512 
13fc23ada299182f56f023080ecbe206ebb03b73abbf045143fdb336891386ddb258b2693154b2700f4df92a058655788191d16212cea46b9afd049c5212c1a6
+DIST thunderbird-141.0-es-ES.xpi 498409 BLAKE2B 
f36b4083c2831cf9f1dbb75edffccf1dcb131a7807241bfb005ea928fbf12f9179523ececab5584c5f6e729498d439ad9192e1586fd6a857713c73162e551a65
 SHA512 
dfad9ce6e26ee5e42768ece447201934336d5d1bb47b0e732aca947c472baf46cf87cf3767e0670e37629bc730a9a9bfc88df1e2af1f46105b0f091f028e6c42
+DIST thunderbird-141.0-es-MX.xpi 488481 BLAKE2B 
830bde49e79d2b0db5e400dc7f62fcdba7eb85782ff8d6e37c2dca7e18d96ac88ed3dca8de55eff70c8d3274b7800f7508d044095b197c369217df3c16cbdacc
 SHA512 
55b1ec53de37ad118de21b81999acf60a541f2a7bbbf22fd393e82849403194400740940984eda7634bdde6353b6b97aed7e9192c8415859562c27af59e83802
+DIST thunderbird-141.0-et.xpi 443840 BLAKE2B 
eb7b90f551c99ae2f910d9cf0bc288c6e021d97c0a4037ca2075a07cfa52c41353356254f4497e9270c1cfa72cca08e03f24d3586552ce73ec191ff4144ec277
 SHA512 
a12db482c825067ace2b84b40760d6297a3afc1b1489d520fa2737cab5749147c52839f2afbe62bb269415b74402e6de7f0a40ef7624fd5e92578d0010beca6f
+DIST thunderbird-141.0-eu.xpi 473014 BLAKE2B 
e7b49b782756d33b2ec5bd53eb9a3f54532b2f44c7d40034f2278679595747ec19bbd6cf59269f5ebe6e195216596f7a8a96c95dff013939b352cf381eb025f4
 SHA512 
f72a0bb029f77bbf5396887ea42c4b4db19b6288ffdcc7bea865494caa3a0179067acdbaf379a63ba01acdf11de46081a79e8b6f35a89414017cd782245a6ef5
+DIST thunderbird-141.0-fi.xpi 475877 BLAKE2B 
033a3d010f50083128d2598f3d35c88d1d355c1a23bcc22000d891a8dd204b69bd274cdfcb9edf8f839bf7e96fd6871e48e5c46ebd3528ca79bcf3deffc9dfde
 SHA512 
96c921070858a6f4d52bf8a798348d52271a4dc23ac8dabe1fd62510ff72763750907659cbbe914ebd9576d975bdf7f1fef6dd9e08dc661dde8c90a1b5c88a67
+DIST thunderbird-141.0-fr.xpi 509480 BLAKE2B 
5b55d97e56e9cc51865a9b7065d3dd63e1568e850dab56d9c0b5e1029dfbe95c76cf444a661bdd5f380f50ff635c05977697d19719a5580bbd4919138f5fd678
 SHA512 
bf94ca465f09815ad1a1e4af49678d1c252e7f538ffe5d873e71eba0dd3ede1dc0cf1c66f90aad013a2a8b9d066d7c72dbbb09ad4517dfa81000a87e83283a49
+DIST thunderbird-141.0-fy-NL.xpi 491934 BLAKE2B 
5f788b7884a83627485c33e720977fe77a5610297ad65347cdf36cdd9cfb0bbfad372b0db728aacdd15b4bc6af6f01b545c143729f68727dfea4c3b86fe49df4
 SHA512 
e59ea10aa6b0d497a7bbf542515e0032a27a7aa342b69db2d91849e4876fefd994619787653667166e5281105021a9c6841201c7ee955b44ccf55dddfe03ff96
+DIST thunderbird-141.0-ga-IE.xpi 377008 BLAKE2B 
1bcda7910dbf076f160064525d1d070ded5e363b0e712a8bf20429f428cec5ad9df82298758e0bbdbe37ae075f07ea18e4fbdd3458dd1e2b3880067b193da16c
 SHA512 
8da90309b69c67555dc8d62c21765ad24395c7f7d92120b286238025c1224c10dfa239fa7084f0dddf63b96c07afbc683debc9166a5b917367974bb62fca392e
+DIST thunderbird-141.0-gd.xpi 462226 BLAKE2B 
85f7b10efeb48a1e2644d394c2e795450dc6ff254818ba93221033359ebf76610fdb44ffa84257cf8fca4def17cb68fe618743fdc7edb85c522e94643c89d586
 SHA512 
530ff82973a0db06db693f3865114c6127e225ff6a5b06a85bbf7130af181632fef6102033386e7efbfd313768f4d238f7ee87a950f0506629faa85f5e25e189
+DIST thunderbird-141.0-gl.xpi 490628 BLAKE2B 
577700431830ade60e430127c47ce2bf498ba4f7d805a501f11c004a57f5050e4adc8d74da96a713231c58d6d5e2db7e703f7fcac730c6fe2dd0eb8085bd4052
 SHA512 
9c3dc2984d502f8b18bf5049cd16f3603382c3b44e91120b1202c21849dc120576393d002cad69ae92211bd2b7453eb17cb1107eb0d16f7d0d3a76534e9edffa
+DIST thunderbird-141.0-he.xpi 442156 BLAKE2B 
2ac5b7457d934d16fd57d8b661ee05dacdf01a1b74cd6eea329c63f9d3266c4e12d2d5a9debec3b27d55f4cd9b9f38d556efde244680db123a0032667b475ff3
 SHA512 
93ac03c1c63292ff699ce079b77b2ddbfd9dfe73c2f8d65ba245f4cea60db77c031905dbbd23957334c1b3f3bcc86ec7247603477273bf66533bb3291078f1de
+DIST thunderbird-141.0-hr.xpi 464294 BLAKE2B 
582322cf04eb1c08c9c2ff9f624ea3b563f1479b689e3ddd64e81bd71d5fb07dd68c3f8afc649307dd6ef92d003772df9e0b61799d13c788bae4a72465b586cb
 SHA512 
77d346e78f5e63b84db603ac0d0971c0f92b70faf6f4840f6e537a8ca6abac042eef3452f91b2f11bb5a99f214077401e2a44b593e57ad086f7f8d6ee6019fa4
+DIST thunderbird-141.0-hsb.xpi 516280 BLAKE2B 
1439c4f8297ca9f56f1dcb1ba619d8c80cdf09b7e9dabd8b5c778e484b9ecee4181e714d9e31b461dcdab2776c82479031573c98b30c57116711dd63b1605706
 SHA512 
0377849e97304265aede5df59c294346abf47be67c8cb3f6693dc8dd9860e0ad77db0af387a3d4da6b8c60613591c921cd398c2c015b9e93b5e1223533233ffb
+DIST thunderbird-141.0-hu.xpi 518817 BLAKE2B 
6419a6280527ddc3d7d68955bbcd97576120e48af7eea01e86952e3a1935d8d816ddb5f54fb6beea40afd5f707caec55ae26834b8be019115f50e2a1363dad87
 SHA512 
9f5be68c06c78aab37c4395446ed3f89a50c3791930cd82ccfa0e9df1347b659c3ce7212ff89d9a19987ef4273fdc5981cb8c24fbd3d9600676ea58aeb1993cb
+DIST thunderbird-141.0-id.xpi 463723 BLAKE2B 
c36de34903a71873ffbd76d32bf4dca99aca85ec4fd3e5afb73a549c8dbf20bad80837cf5384726d5a2187b24210c9a9b42dbd494558cfb1067c52b30b430a64
 SHA512 
9c236195c5e28335880b5f23d35e810bedc9e56fcfd2d0b00f267e2a0b1aec2e715898baaba4f1994f8de7306b2716d883696843f0228e9f09dd5cadf35116ef
+DIST thunderbird-141.0-is.xpi 482442 BLAKE2B 
26f6788a1cdbe5aa3edb2e228e483a44748dbaf730d9a820d0e832c2e9fd56cd7246ee9a4a0967795ed46fcd1879b354294db3ab6f75f334e3519b3d004d13ec
 SHA512 
bf174a67738fc876cbb768fbceafda6241bb273c43df5de6634d94dc8e2fad3f4f4413f6045f139f86d7730cadd77b6df1a151cc40884af0464d4c36b68520bb
+DIST thunderbird-141.0-it.xpi 489728 BLAKE2B 
afc8fd3f04d53510edf694941c90799d52008bf125443e0b3a49385e5086cd45f49e27a00c23b77a817b9676b5217ee6f06928eedfcfa26e9fc81fe00b341774
 SHA512 
13cdc321be8bf39f02969cf0af938312458b9b3dc9d6e9679c33212687bb313a8f827be6cf0628e1f3436854ea7d04f6c7830d58b555914e67bd5c4c53815562
+DIST thunderbird-141.0-ja.xpi 540517 BLAKE2B 
2d872805e461193d96e4338dd492664c7e7e8c21accc88748b2c79aaae0fe9fcccc4439ff746fa377217a13b66412ecd844b6ddc8aa27ebc3d8dd803914f843a
 SHA512 
fd2cbe91970d32dbe3fb54800326afa3fcec6eb1e42e9f4746b5487f3259759a2dccb3e489d6281f4cb7e326319d65368f969bb40c0ed747e0c3b4ddd0986bd0
+DIST thunderbird-141.0-ka.xpi 556152 BLAKE2B 
dd487c40c81a0ed7c79c86e31734705d8e59ff453ec2c3517aeb388a93cb52c017383647c833d6196f1b0322327dcec60b97bc09a34521d35b9e05bb117d19c6
 SHA512 
e67c153824eb133eb1b399aee35e4b6cb118a6103b39dc10e8ded8775f7c33dd39d3790d5aac34e0ad2ece47b3f2b3f8848271c26a5651a2d9659cb07c27e965
+DIST thunderbird-141.0-kab.xpi 469275 BLAKE2B 
5e9b2b537761330d3988b52e192289c6e57cbf99535463285723282c57ce97ab7a9d17d2630aa325759ca277a1a29deb2c7facc0a595b83f5cd52214abf88cd4
 SHA512 
afb25997b59a1a85bbc1bbad46d8aebe81a18e31c1dc4aae9d3dd13225c63e0109a5c8bdf8da35a90a4d145daf79eb7ef144a5d796c4c649fa8f87c450dafb68
+DIST thunderbird-141.0-kk.xpi 573793 BLAKE2B 
4eea480c474e3f00cab2d2d4cb1b0ecff916da8cb32dc0ae676ff781aa7c4150bd8e7eb7232697e0baf0a90af495972722e4468f584c9a522e97fb25de5db0f9
 SHA512 
6029f97f426e52080d6c342622cc8b5411252c5078344b25158fd894abe229af874fed4d57e6e8876bab11bdb4c0ecf0c46836e60cc3866fa2e57a142d641a00
+DIST thunderbird-141.0-ko.xpi 515071 BLAKE2B 
44c64bca7c5bc01b90cb72d3289bc4302fc741022e15c620fc4ca67dc9663247f286b9e85845eab79333d453b423d25b5822bf791383edffc1b44b1b237393aa
 SHA512 
454610627f431bca3385c35c371988203819de601688a691eb220b24023b9e75376c9505f42a4ed477139c73ca85b4f8f33f010612b4850f1fb0404ff7adc717
+DIST thunderbird-141.0-lt.xpi 453786 BLAKE2B 
c1983a748e2af0d009515181970d854ba7102b6e149dc541e46ad58cf67d7ea06914bff95b4840729e6a8329bb1ca2f2595401bb2b4e3ebc5a7affd81841a1bb
 SHA512 
1e89a2576b5adf18de97c52cd17c8f319dbf2ea077d332dcf4a69adeb2e607b2cc19e25b9b58ad45800945a1f18d51056c244400c2cdafb5f309fccfabcb4e71
+DIST thunderbird-141.0-lv.xpi 392122 BLAKE2B 
75f17c95d3212556c7220b14f4470f2ff1b8e7acff926f7c5fa9fac90728670cd74bc07da6e83a519eee1fcc05e55f739f8ed8035da7376e8dbf675173447b67
 SHA512 
03cb6cb79e4fb342e68c7835385fbfcf6ed9603072a81a3db2fd18cf6b2eb15732bde6159dae802e32081db75d3c69b21b0720f2c4e252c5d0373e27a413af36
+DIST thunderbird-141.0-ms.xpi 352513 BLAKE2B 
45095a4e6f6b811f6b95a1187c958ee966a5f412b3bec67c858d6655dd845c9cc12acab6695e78ec70b52d92dd19bb795b91440a7c84db1eea3f0ee86eeb5472
 SHA512 
a9833f8ea0ce002d0659b429f925a24332728ec471811d5741a57d89f66b9edba67ff89644eb39aa86ca8c135464ab149bc37d4e0db754e3f86fcada774df0f0
+DIST thunderbird-141.0-nb-NO.xpi 477371 BLAKE2B 
e7c73e913254e2e23d145201ed9f0b2ffbd7795dd1c94f232370cd0cccd0bff9fb244f78783e1ec37607c78cc35d75d3d477bee844e22a00f1e2435e2039de67
 SHA512 
4cc0a9f424564be0db3b53cefe39f32c9252037073d920cbf1930b0bf219bd88098227e1c9c43eeb959b492fa93116670ce1d003bc0920a6886798556f1c4b65
+DIST thunderbird-141.0-nl.xpi 483351 BLAKE2B 
7216b522a09d92c1409c06e053992087710e5b6224f12126d68cf9f9eacc38abd0e9f539dd327d268bb0463cb4ce0c262f2b88b3fd6d04182dea6e2807f41477
 SHA512 
edfd0d07252ca68500ac72dad00f344c01326b740fb1d28696796620e4e09e089bddc9557a94e8ead3ce4fb8d2edcc6f81ffeced11158f0b82e1fdd52aadc5c3
+DIST thunderbird-141.0-nn-NO.xpi 468209 BLAKE2B 
4c9302f7f4b2576716ba52c99cb944575dd18472999941aa371a2d9b158a5d628382537357529ddc8dd7835059b54ffcc8753ef371246a2734326ed297b8f543
 SHA512 
4516ff9943074fcfe9ad43a9d62d8c315b39f26af5463245600293d137c98eba2c60d9973ba0291a6d84e69b4194bbd9376ed34698ff5b6696c20f4ae121e56c
+DIST thunderbird-141.0-pa-IN.xpi 434735 BLAKE2B 
ad224573e60e960a0795ee781acb2d4673723146061ce2de7732f00d82daba5466cd9f43b367d33b3a99e0648d1356c95b419a995bc4ac8ca6afacba0ba83b33
 SHA512 
b3a91e694fde83d76f4977aaab31fe79c284cad95f8528fc17407ffa78176cb8dcd2d6f8cdbe29130e015cae64ee245bdf7eb685eb123164692521f155f4b22c
+DIST thunderbird-141.0-pl.xpi 516914 BLAKE2B 
b271d5d1601733a7c826e65a278710af8f38b517944a645e4e958b7910a754c7cdf93741bdb695b1a7724a24b8cb0e27f007bb3207a92306a4d6bb6650211564
 SHA512 
6d15d669843ae95909c30dafb53ec20ddc86e6107be1f3ed3dbfea745c643d7e38ae18871d7374357fa8b7727decc4218700f6dede360e6a79d18cb94dc10437
+DIST thunderbird-141.0-pt-BR.xpi 491249 BLAKE2B 
6960791961a5c55d0ccea197ebd40c3c16521e40947f8239cc28776c3965d3d8d5341e2b97b4ad6b0d29f9f7c359c0275d630b73107388b1d975dbe723a2b74d
 SHA512 
48c7a18e976e13621f227e8158d57985350120dcb91a64a49a09d01dbf6096b2a06692f1b23d61460644d9c132109eb36400b28178c708811fc023090232356d
+DIST thunderbird-141.0-pt-PT.xpi 486942 BLAKE2B 
f5565f2ecdff1dc0d34ef4f38d65ce2dc90a3d12d3a50c44dddd7f0b9f1e11080f76e8a01096f6013a262e02a37e07e2fed394bb611dafdcef07525f42dfaad7
 SHA512 
c0d2b265fd00a3c165f945dcd8051d41dd7c43404333f714b6cc883daf4dea8a3f5c62deaa195012f472995cc1d02f966218aba9914ba451b4a6d559316a4406
+DIST thunderbird-141.0-rm.xpi 487400 BLAKE2B 
a2eea5e3376449dbfe77d1689ec15086e10172c7292daeebce0afcbc1a6548e201beff5a8f55afcf373c226d0c9f38552954e505661b13115018a5e3607cea5e
 SHA512 
37ce83cabad01a4499b79853b8ca61bf7cd8a79df4d742f32cfb2901037d470770bd8bfee73f3371c13f06ff04bb3806fdf5549dcd57f257728e4b883e010c64
+DIST thunderbird-141.0-ro.xpi 417584 BLAKE2B 
9cdbd7ed838b2f19106e77782c1f0b98034757e0ba742bb4904dd1f3569f1d858b98738a22b55841120c0f0c2392dcecb7f10b4b62f11b926662f7ec7fb1ef38
 SHA512 
444de7bb4a63155f529ea2444594e855d5e38d4ee95a7a9a78237c0eeba33ebd68bddf1ca216153ab1f8f8d9a5908e266de9017da61e50c9c97d962211faa070
+DIST thunderbird-141.0-ru.xpi 594634 BLAKE2B 
f636354ed042bef55a13ea96ee9fa6dbce6b007fe6b5491a3f83b34b72b46c247480c6b09ba9c069631f7c59c8483570ad2f0cdd339f1abd5d79bd3388a42498
 SHA512 
e502d4e64a6dadea00921c95ab37d81534b4558a75567ee9803b4396fdcdb8a17e409639ab537976731fd9a089468dfc381851f30f3e6e9d53c17a02c3b95066
+DIST thunderbird-141.0-sk.xpi 520579 BLAKE2B 
ea732755597a253eb22f249ef93bbd6b537a86bfb5f42d5e855720400f4a7f522776838b9d1f7eab33bf8cf9de52f8ccdb03f41941cd365ff84b153df0acc1fd
 SHA512 
9959c8280584e0a73b975fd9fa36637de2d49bc277448ad0af8edf4dce9f575ade64cbe1aab5825178b90de0a17226f106a2700388b11ed7dcb0beaed5fea5dd
+DIST thunderbird-141.0-sl.xpi 487205 BLAKE2B 
7fb6ab2fe1f7468f7a2eda2b81d1429a74629a2742feecc71b3b14e0ee89c3d047172fe38c35588336c8630d0827a601c2f7c2fad0928b49dc0f36f14722ef12
 SHA512 
377a4db8f6cf2f59a15ce190cc2020744c4ac25db2a9cd54a7ec251a8b1656fc3b244dde5cf06d87f927d52a8e25705687e05888d56c3d9eed0161417149aa5b
+DIST thunderbird-141.0-sq.xpi 504420 BLAKE2B 
e2b8b8a75f510c93c02697df774528ee241ddeacb902fdbb455406beb5cbb85d22701f9ad5dca79aa4ffaf880772e12ba2bf9d7761f062b7a72f76c519f614d0
 SHA512 
2af5c42985d8b68c38842cfd68838954e50746702494ecf0d6152e4cb970de7bf114a55a964314f66f75ba6957cbbb0e9a7f2cc2bd61e86b71e217e93430d97a
+DIST thunderbird-141.0-sr.xpi 496245 BLAKE2B 
e5393acab8c79bfd82a67aaa5eb24c2c77c75e136e2f929e0d501c2ef3ac196de89a0e8c884e1a601562ffbf310228c52281e9774fe3a8ccd73c114602a2e8b4
 SHA512 
06cd0689013f4dacb54ac3d9e57b0337aef8ae2b2f47575e77aa3edc0e27e91e3f63365d94365781a6e8cc94ee1806563e7be76a2bf3d6842e52552c1c22979e
+DIST thunderbird-141.0-sv-SE.xpi 485641 BLAKE2B 
640662db7d428ba12251ab38a3724fc2d2d2c8ebac433123a3e7a4f8befb76c2418ce183380b5367d44e4f2724fe5a81c13bb11a23199573f6226a3b3256dcb9
 SHA512 
23d648687f1da9dd0826f32cdf6dfe4de966aa1dbdd34e71ea821a6af8b37c05e423d22c0661ca5e2526abd776d7508123f745a7e7b2f266c8613924b648c0f5
+DIST thunderbird-141.0-th.xpi 568490 BLAKE2B 
e71aa17b0c74465fa331b9d5b424537a41872a085b66c9c5f57b4d5a9bf8e6833e9538f22c2476f86058ded369e57cfeefb9f1148039a2cc717e6fb0d6d756ac
 SHA512 
c4a8d12f938b714170121af3c15c6e04f2441a9ba04a0c0b2716ef2a2b39666847dca15a0a3f51f55fa382eb29d55bfeb58deb85492bc8d98ae9a075e62a344c
+DIST thunderbird-141.0-tr.xpi 496340 BLAKE2B 
2d930dc9add56eb1aa465ba0e958113990b986fea3fb8affad7f0d324097cd30188260aa39c8f6b649d8be4d5f4ac93070e098fcd63967d3ce4a90aa6804dfdd
 SHA512 
27b4a931dd04a045a8412c543aab4662528c27ebd706b596f1981042f0b1ce03226058161784771eefdd7048dd225c6f23995755c32b6a518576deb7cb0e82c6
+DIST thunderbird-141.0-uk.xpi 582853 BLAKE2B 
d7dbf39d47c53b6a3f088fdfafe04f09140477eb3bbc8969ea42bc83814a3533ed3b0d87e93e4a7405366877414d93d538d3c8b5689efb0d171e645b43ec2a0c
 SHA512 
39f8c1f788c64c7a3981d63150d7c97a814ebdee3ceeea2cd0705b95aa29b1906034f19f960d84987cd5f6410d0127a8747eb5b83361d8a4d10dbffd103f155d
+DIST thunderbird-141.0-uz.xpi 355593 BLAKE2B 
dae2c0b716c4196ba86427edac3f50d5e9e8291f3cc8f0892de0f38022c666842d05b1d6929f29b83ef376eb0f4de520ed0ad5800b9a786bf16558f047439bc9
 SHA512 
fe510174e7479df6d57ab12d6022b8467c2f084f6a4f92fe5e41c592ebcd2c29525aa85d94b2261f8736ae338a6d6d8d96c52ca97779b05bf59596d729b7be0c
+DIST thunderbird-141.0-vi.xpi 519920 BLAKE2B 
6d2d2764289592c7ec0632b4383a67d03974f9f953417b28db301079a374a3df39539c9126c4f1f9b0573f27c1decee08d8e9cde394a67dce04cd3b79dfd60b5
 SHA512 
ce3dcd0d5c46ae8aed49deb579b2a902770dae089f83d92d88a90e350f25f343fa287c24581eb601c87e457f7cb1536c6d082611ead3f884d620d6937d2c3825
+DIST thunderbird-141.0-zh-CN.xpi 509122 BLAKE2B 
17056ad0f44344d83c451ec33f56cb533eade4f958b793c298afc51ef675c95e7822d3b9b2effdb3c41a0115a4dcc684ec14e613e0c9990c31d6118e1b88158b
 SHA512 
626d0da2b56ed56605c2d346f955f55adc65f980e57709fdf9efc0eb0c053065b50f20521917de6a5c5ffc9d6b31449739b0d34c4da4c3d2bd8d8b2441735c63
+DIST thunderbird-141.0-zh-TW.xpi 512430 BLAKE2B 
ea0d41d04bcf6b08ccff1dfc2fd2ae8b7ff9e61c0edbbd8983ffee73ec948524a799a1d5586a2792e2a59ab4d9a3fd53b0d6dc84a75472cadb7a668263a2605a
 SHA512 
98146122cd0fb324ae32db470384c7109db6f6888a66b343535f39e5822a1ed601c574e3547550e806c6cf0af00c275be563f3d478c685fa853b6c9abff80734
+DIST thunderbird-141.0.source.tar.xz 756973792 BLAKE2B 
0d34424aa897cf9c5047a90384aa3b9bbf64bda6f73d188df0fcbb33e121b2c13f662015d11f62e0a8564ad6ed5705c6bd0f9cd87575bd3184e81ad81398d271
 SHA512 
cd747c0831532f90685975567102d1bdb90a780e21209fe4b7bddf2d84ac88576766706e95e22043a30a8a89b6d3daffb56a68c3ccc4a300b8236b20d4fca675

diff --git a/mail-client/thunderbird/thunderbird-141.0.ebuild 
b/mail-client/thunderbird/thunderbird-141.0.ebuild
new file mode 100644
index 000000000000..4cea8621cce2
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-141.0.ebuild
@@ -0,0 +1,1162 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-139-patches-03.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.tar.xz"
+
+LLVM_COMPAT=( 19 20 )
+
+PYTHON_COMPAT=( python3_{11..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 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-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
+                               <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.113
+       >=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/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 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-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
+               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