commit:     28e5a4c829167c9b043dd950e5610ec6de17d8d7
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 19 09:33:49 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Mar 19 09:41:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28e5a4c8

mail-client/thunderbird: add 136.0.1

 - add subslot to differentiate esr and stable channels,
 - tb-136 can not be compiled without "--enable-thunderbird-rust" option,
   which in turns requires dbus unconditionally (bmo#1951918).

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

 mail-client/thunderbird/Manifest                   |   66 ++
 mail-client/thunderbird/thunderbird-136.0.1.ebuild | 1157 ++++++++++++++++++++
 2 files changed, 1223 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 9e96c8c814f8..fda51bef18c9 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -2,6 +2,7 @@ DIST firefox-128esr-patches-08.tar.xz 17564 BLAKE2B 
d904b74fdae2e76866ded11de537
 DIST firefox-128esr-patches-09.tar.xz 17976 BLAKE2B 
78f64f5086951f7bf2b304c1148154647aef5c4e699257cba5e94a83d8d8c159a591d0b2a7a5f8bc0f8ec28d5eae66a0783b45f94b4ef713282a6f88e46c75be
 SHA512 
159d8c94af0f90c10baf7446e573a37397b3be7103e7001fb6b38845a28a41793c21ad24c23e0b3cfc4daa2c3a6040ef701f612693c9f4dfff8534f82e7b18a1
 DIST firefox-136-loong-patches-01.tar.xz 38508 BLAKE2B 
2508fdb9de68bb90edfb3f4a15f79579cd8865cb87ef0a9073c3b740152d857b791cb53c4520a2bdc466f083e7aa6e028a90d44b61b3eea46395f62115b7272a
 SHA512 
e4f83d6a98eb25335de80bf396bfb2d0a362e7509efa898291f524d6fbf20754a278a930d61b3b9727e6b08d8e4959b001c75c2e3f648ce70444b39950307157
 DIST firefox-136-patches-01.tar.xz 12568 BLAKE2B 
9056b1c750eeb7c226bd4ff5ebdb03d491177d93bbee95552f7176903ec8796131a491c39304030370ed55281f92585422e28926b5f7491081d33912360d999f
 SHA512 
48548637f6152fd3a72e283e3d16708a563fe84cd22d84129d5bd58f6b6baf7a6e50d521cb371ef21e7b9f95c13cc72531a3e1ab735abb70c51e5c02424fb2ca
+DIST firefox-136-patches-03.tar.xz 13356 BLAKE2B 
b69e64235b2ef72839055a91e9ffc881685675b46884171dedcb13f68710b083318e15ecfe8667652255074ed45fe722c91fa4f54ba457f33774af33a7ebb33b
 SHA512 
b7301a60ccee7b8e870ac57200cd7242e5e2b8fbe8110d539a038f6b74d6fef86a96fc9f3dc2aeb387e636cacc875828d2b02287b8f5f7dbc6c333a900ca75de
 DIST thunderbird-128.7.0esr-af.xpi 530351 BLAKE2B 
665e3c36027491ec674b4d11f668de264b9e7fdb476930dd151a7df7449759be5768986ac83ad348f6a9e1495ce34faea05a3647e31503a0a531c5ed35dbf516
 SHA512 
18dd42b98b74e951d624a868c89ae9713d5e5b1e991170506a880d2ab8ddb22e834b11a42bf9ab01c2664742eb503afcfbae93dc6baf3c0c2b5ce1322e545632
 DIST thunderbird-128.7.0esr-ar.xpi 686986 BLAKE2B 
4b219c2ddb940ea9363f86167d1d94acb68ebb280a17c761d8a54b09dab85939f4fe861b82c6ffc90b79be061b85167b35e9e96abde1ebb5732d82f59f9e426a
 SHA512 
f9e314831d230b1488b64056caf22a410f4e883c50e697746965949775333f785ed0316d0baac1df460c33f7724eb93a8e0784d7ee99d5fc9513245552f7749e
 DIST thunderbird-128.7.0esr-ast.xpi 561055 BLAKE2B 
14f2c12ee192d153d665f3637352bc5b5964661ff96db6d4c67a07cad2bd7650f3e2ce2fc687c92ea3480edd4fc5bd748f7c10d08cf8fd19f5cddba08b12397a
 SHA512 
4a68c5a10b38496c654d27e4ca82c10804f739ab526e6644509a8dbb09928c1a2d2182e003e79a4276a92bf62ebe6195c292662acbc3e21f633eb00abeaa843e
@@ -261,4 +262,69 @@ DIST thunderbird-136.0-uz.xpi 354651 BLAKE2B 
1b1298a3e3eb328589ba98e9e76d98efc1b
 DIST thunderbird-136.0-vi.xpi 511066 BLAKE2B 
5bd84d25a90f4bf99422544605b1e5c7d4eedbda662494e2e4a19c3cb62fba95bab4e829094e30ab2b271da0d1bb5502e6c22d7c5655b6157ff244e20a305a1d
 SHA512 
5456eef9e20aa4d5e57540c9ad79786b12dab2f5bc14c3c172dcd8c3bd432870f0a244e81d09ecf382d51692e9fd85060f8dc0ce21f8735f802851b7250fa3e2
 DIST thunderbird-136.0-zh-CN.xpi 500523 BLAKE2B 
cb7891a99f679ab9d61a02099a81087e6f6938948ed735abf85dffdd1ea09ff4aea46d3ef6cca11492a1af3699e583c210ea90165325256e37cb53d465102b30
 SHA512 
517dd3e3fab2ffbe6e2f47d8e0b690b3b3a3180e5200023d7745f52e218f14fbc628f67908655e6022c27ff3a9d0865f69d1d499d5588958abb853b7f06a582c
 DIST thunderbird-136.0-zh-TW.xpi 503558 BLAKE2B 
c943c3883d0442e7faeba9502f2202ccb58e08551e8f0904a0ac34baa79a5f72fd4dacf4d22df14e78448cca3a7d0523a2dd9b44048ae0f3273d658e9c08b413
 SHA512 
a95e42f58a1fcde06f5509a723dfd0f3a097c95fb8dc9b40fbac2e81e9f8bd62976dad7fdeb16f2a67f136eb83427b73773ed12b41b522a22011be8e1255f3f7
+DIST thunderbird-136.0.1-af.xpi 315235 BLAKE2B 
913082a4a8b02fb6ccfd9f7f2d78ac25f36064129724b8fced7ab2784f4f87d717bda8843f01e611879431a43c0d21a81dbb6c11aeb7880481399623e3e19a60
 SHA512 
b5809ce531ee8e8a8410f467ee51535c22e1041c7cdd3db8d432c542a400a4fcb9ce338ecbc8f26c4316844351021a3c6f7e34fa65a734a5dd87ac7513d60298
+DIST thunderbird-136.0.1-ar.xpi 430240 BLAKE2B 
9a3673856d56462ef4600f884b5c27f0ce78ad8ee7205bbcb98eefa72b3c2d636f780283958785e5c831b06cbb5b2bdeb30f0eec2042c2460475b4fc8a8d25fc
 SHA512 
4afcd597d70db6286fa600095c4dc9d74079d210f769a010b16c9d1cca414755d75b51d691c598259cc5c50ede6d63fc9e5d1be6f5d585bdc0d44937b43eb287
+DIST thunderbird-136.0.1-ast.xpi 340880 BLAKE2B 
ff5cabec03d867fea103d1b93127aa78933bfb5e8dcc5083249d472a10f60ad35912cac2375e9cecc98ba6d464427a1628199f5efca327e6fb7591943e59aa33
 SHA512 
37761e5a69b8c38268e25ab79832638577ec3c91c7cc4b8626750a9e1a4ca64c19cda9ddaba2d19d4f02847c1b140340fbf547031fbef95e972d9499935f4197
+DIST thunderbird-136.0.1-be.xpi 514008 BLAKE2B 
5935d05c4f425e18ebda7bb6709508f9456502c0931f1ba0eec9af5fe44fde7db5c2d6c8a7d8f3b02e4c352ad24db0216e89e115c0abd360d7771834c880a389
 SHA512 
03809f41693bca06f7f34a274d6fa28959ecfd89b44f8c0deda8f6413f184f05442c1fddd43827d4d62635233e8ff620c97b1bfc4343acd13dcf710a7c95199d
+DIST thunderbird-136.0.1-bg.xpi 533574 BLAKE2B 
b57af1bc22ad9a439b9119bca4b3b8ff8685a7e7669fda8f638b4ca1e566a2afb694a71266492a0d7a177dbd24568e1341916a73d3fcad572c740ed2b40ddc1f
 SHA512 
d1a1634e991b1174342be85764b57c3221131302471745f27d2e041a0ba97caf607fb4a2971cfe6db056173ba6e26e5feef0e782e2709e9f84f209dd85f4680e
+DIST thunderbird-136.0.1-br.xpi 401902 BLAKE2B 
817223ec996a796bd2960a66c7fc00c2f909364e2ac56493834153ba36dfb505c9e026c5f9a4fae521ad9c17dc77c8952fcf580a313e9b213dc3902d6b8eeb45
 SHA512 
5d0e9f903b29c1acfec76f1d23a91a97874a834f761f3c770dd8bf2db8125e6c02346495ef203a6e55b8b5d832e1cb7d3b923753d80eeab0784a36126234cff8
+DIST thunderbird-136.0.1-ca.xpi 439983 BLAKE2B 
fd8b83f3c17cb3c79afe754ad49b6311ee0325a1259e137b9bcc92ca09328b34b54d03869cd71767725eacbc0861353dd51752e192934bf4d1efa175c06abaec
 SHA512 
043c893888a1afa018fed847b38e51b15ee29f788c882bc897fd4b1a2594dfef7ffec076871e1dbdd9a99d046b56f2900a823c1f0b6c81257e23bbb7c6e59ee9
+DIST thunderbird-136.0.1-cak.xpi 417796 BLAKE2B 
1046d9ac9be83c95a0ee94cfe959a6ae34c3764381b8e43c356daa517954f4d2012de8d682c4ac3a2c4de0afb4f1394b8ef33d003bf806b7346b8fddb1c3e4e9
 SHA512 
996d36255597bf59fbcd7828b626b294c29a2f88313afa79c09ac133d951cc0053300984f22df52fa438457a8a5d2f07df47d34054e64a1caa25bec78a906667
+DIST thunderbird-136.0.1-cs.xpi 511345 BLAKE2B 
627fd4c295e82a79e702b67257a3cca21c688ebfe986c62ec2013101b0bb29efc7ab76da1b3a7c95cef46f20642110d34e10226cfd4de163a8b91b18f7992f3d
 SHA512 
f23cf6848eae02a18c75c4b194fa255f914e316d039b360fb8f67d98bbda549416862df69518198bd49652b76555d05f534aa12ff895516583295d117f9e87dc
+DIST thunderbird-136.0.1-cy.xpi 480179 BLAKE2B 
cb3d7b2bdddd5cf81849f70dd1ca45fcc504cab4e4c181c4e5f6593c6c801aa11e37d6909219aed785ee1b5b476b0ab6e9a67d4787ac8b8706ae2c3c99c291d5
 SHA512 
762912957a52df2fd9aa63ffc12a64f409e107cd438fb88d00b0f59d43cbd47696d9f7af99fae3c1d835c01734db5e137a2b3e65c971ca1b0dd2bb2f503aec90
+DIST thunderbird-136.0.1-da.xpi 469406 BLAKE2B 
a75074fb7deef4ed9615b2660bffba48700a44e9781c123748716087046123316404760534f921324e7fd9354e941031a8eab6521a5d2f4829e545847034b978
 SHA512 
ef490616222d32add8f03de5571c4ae66b77d8dd3abcd863c21b16cc85c99653ded6a4f9ecb5c603dfa0a16ec129da4048950ad469e9f52ebe39872762a5fc01
+DIST thunderbird-136.0.1-de.xpi 497358 BLAKE2B 
e6fb9b5454c79fff1045a2cfa212fd959d02d71788e1bade419499e102ea10c5213d5688f2ea1a95fbcadf9472331e2bd49034bbb70b2b402c89b7d43a7fc80e
 SHA512 
cc213128f0ffe5e05f761721f0c5b46e2fd7fb70ebeddc0cb793427e94af2b743bc6175a6e43a87493ca4a7318cfa663fe1d3aeee278874ac4b7ff8eec6a3ac1
+DIST thunderbird-136.0.1-dsb.xpi 510105 BLAKE2B 
a494516c9b266e0a1c961b9787b17c1c230e82464e525e4e433e30ea2986f41a1eb86c929a44ca3002eb8f72c48319368106f1de684495f4dc541e24be6028b5
 SHA512 
f21892610c51bd921ba8a3b5adec23aef02f893da63c50f8d7a1aad5fa907f8a9024a9c2c17acc301820bfa76100c7463a7ecade6a735b550f503e4ce8119f94
+DIST thunderbird-136.0.1-el.xpi 600370 BLAKE2B 
d1c72c8a1cab578d96792cb4f93ad1fefd02c2594d5b5d43fe0727eeff3b1286d48bdfcbef2a160744cbee630701a0747a14680dd9706303016e5b3fac3b5975
 SHA512 
3b6182a5cca984139fad09891366a054d0cd8208ee73389e4bd8d1016926879acfe18eae70d84a4888d77794c520c8065b2e3877ff540ab67c52aa3e2892b00e
+DIST thunderbird-136.0.1-en-CA.xpi 445699 BLAKE2B 
13be2c7340d829d935db228e82fdcfc8b7b2e525bb54e84cf1e8c3c282c917de4086da4b181495f6f7b285b03a66432a2879ce7b6cf6b8e85e4fa1a66e18504a
 SHA512 
da3b3b8d08f7d5aad6eb11033c25d9908b6afc19d1291879c05c28c9a795113956e8611f7fcbe6fdac61249a25c4ca88935fe962a3607f15705a98c8ead8b216
+DIST thunderbird-136.0.1-en-GB.xpi 445528 BLAKE2B 
3e884e3ea1939a4ae4a6a241f555d403aabc2037e9bcd4deb4f3c65652d939c28faa3f71a9c1ba424cbd75d9cd676e457f3e5eb91df6237df9978b573ccc87fc
 SHA512 
d465ab33edf44244d898a57c4a7cd679112d6724b45a175750cd6f745e32a94d41546a71622cdd96f64c4e8d7a448097ea6769c36c3c386badbd32ced0d7b57a
+DIST thunderbird-136.0.1-es-AR.xpi 488023 BLAKE2B 
b536287c7cd65d4b3ce618582115a72e7c188ba273f5f3d797c2ab28a6b1137f208ea0fa751be9794a52313d7ad12c8c1a85e03fd26df8f95fe645acdc3d311e
 SHA512 
5071d673b7c7a9e8b93c6021a48d3d36eab2ba1bcde9512af9d736042a7adb3e579e4f97711249b4e07e1d31d5cab3626f1272e20b64e6b66b978e82e810c1ae
+DIST thunderbird-136.0.1-es-ES.xpi 489905 BLAKE2B 
ac2c2b979b2b2b6b30cc99777b4c347b3a87de9945e81bda25296bcadde0dc2071eba42acfa65cbfaa6cd7654c6895448bacedf7db34ae26cadb100f12c8080c
 SHA512 
7c1df653c68eea338807d21db083f634bb2fde5a0887509c258c4fee6c9f822f472e283088921fe7d0d2031e7a566e0c68b471213a87b6c843a18a0a15116c4b
+DIST thunderbird-136.0.1-es-MX.xpi 482600 BLAKE2B 
22eabef71aa4adefaf531cb4e0a422bbed93d8afb785edf25e9c2706a8652dc53874614ec39e16f2e41ffc682f3bdebd43dc5f3329c3aad9b648d8805fe32875
 SHA512 
afa65dbbcdd979f7dda81db893053747d5471c81f0f97d35ee449ecd9040b54507eca9918117e6c18e5e40cf49ba64699acf2ab58fa3ca9a1078e7569dda18f9
+DIST thunderbird-136.0.1-et.xpi 434537 BLAKE2B 
39fc882d917f41aceec5969cdd958327638366c2f936e2f7d76e27d56b4fda12dc70e6008d6ffe4a731e11f6286a6fbfe5cb4aced8466a5bfbfe7b450d9eefef
 SHA512 
e5a4d541a1ed3487fab731978652fda997c5b8f3d0af01cb15b3ad385136dc0d9273c18de6923dbda0e9909b87fb33e32a0d9c4d5d32fce952f9dfac8d1c49e7
+DIST thunderbird-136.0.1-eu.xpi 466221 BLAKE2B 
5b11285ae109a31d9786b870f628b2bad5915f776192ce964643d27080a25183b69802bf04c50bc2e95860e61a4bdc3f905c3a8f788a90c12d5f0483f954f8b0
 SHA512 
24ad34a3cf4091359478a4d1cddd7f3266438f0bbf1285ab0a91808de30c8d2283574a818460a513ef2f38e8b8aa002f14b75cec2cfd01ff2d99186b92ee4dbd
+DIST thunderbird-136.0.1-fi.xpi 467724 BLAKE2B 
073f1e4be5a590b6ec8b0ac8f287ede881fb5bf8c96e5f9ba8eaee91ab5ec97c64787b5d027db1e18a0a9786c0c19f8d3bc58448cff22df2a2e961cfd93721a8
 SHA512 
41e1c041a2d42ecd713c713597a2fe788bd0494c664ead4fa54d4573d18aeb8f35968323824d4e5b6c88b03c103046739e649d9bac0b7d124417743618a826f2
+DIST thunderbird-136.0.1-fr.xpi 500567 BLAKE2B 
3e7bbf01689f7769fd2e8691382c45770e1938c279298e1587f919f4e94a49792405ad603da979ef8893a68de4c3050f8bc973719c2c8ae970b03fb1e8585036
 SHA512 
2fe312cb0b167420b51f5da92dc370b78fffa236c1fb26076f75107b7d409257a442bdb60f292223c574e8edb83af2c57ad05dbaedec84567084da346b50ea5b
+DIST thunderbird-136.0.1-fy-NL.xpi 483362 BLAKE2B 
78092aa678e6f4f4edfab392ce4b17cd9e3674ecd8341b4d914d7a9a49765a9a5ac058162271bb60315b64ccd765c6027a326d0b06124faa83be0a15b4dc53d1
 SHA512 
046f261c62cb6583a6bcbb911fe577dd189a60d124f9c532dfd23755cb8aa3f83f67210cf6289d845de2a49921c46d7c6f3118402517ffdd64e5b7cbf4362763
+DIST thunderbird-136.0.1-ga-IE.xpi 375963 BLAKE2B 
4299b31d47e7b3c3ada951ee151991f75a03061b94683d9459de239d41a817b6b57227493b0aee0fd075dcd5639decc94c700f51e4535f029dec5bc3af0ec5b2
 SHA512 
14c2c452777d78d2179f413ddb71795725be28d571f7c37e289dfb416924d80613ac6e3b5b47a40b49bb6ae6e7d5d7fc1cea7e504059c7651e02b867c620a41d
+DIST thunderbird-136.0.1-gd.xpi 461926 BLAKE2B 
d6e61be0cff5dcd348f83565990f5a25015dec94622f91b738f5ce3d22d27ec6fa248cca771ce3a751f014526dd0fc0b4dea608da5db7865f51fa76dc4398d1e
 SHA512 
e2d2ff34c75f4bd7aa024c7acc5e39625774fe7b05d6df65d97b238edc302828204e8cbecfecab519b0f71c5d5b09b87ddd6ba2eed369aa9591d886ec4b33204
+DIST thunderbird-136.0.1-gl.xpi 470691 BLAKE2B 
403064b40b87b749d904e2d9346bc4fe1d0f1fc7f43e79c3814dde7b3ef343159462babaa7a5ab99ed763af4b10675052b97c65407452402e03d6a5edc4ac940
 SHA512 
49d35b48a893cabf630c77a46b40b7c79d8f47dc81fe68b863781ccca4083e0ec3a34ef8f58c72705c039de10c229109eb30e41f5d921308955bdeeb0e74e600
+DIST thunderbird-136.0.1-he.xpi 436335 BLAKE2B 
853a0c46df80f3f8340e82aafa0a20a8981edbdeb161a72753c6088ef57e2e6f9e98421eb447baf0c5b975f98e719c116075f203ba03b611e19c12439a5febf9
 SHA512 
3102ea4e50f23a64d1a1b40668f8d4673e4a68837a1a7c903c9cb164a4efe36226ce1285e0612c6f3e6793140beace6568ba7ff3da7ea289ceeaf552539e4650
+DIST thunderbird-136.0.1-hr.xpi 455954 BLAKE2B 
06c2e102d3189326a5f74a09aec3ed4f216e4e1a5e1b4bef2ce7f24d2b1a867c738ffebe74df24ddb9f7ac5c5fb008b72038a851425aaa46a721fa24468b2b35
 SHA512 
662e7caa4fe60914422e337abc377fedcdcbe06bfe72195514ca82601a6c59437306ed11027673fb885ae446ba3d296e37b96c13d36869f08b38623fe7ba3f75
+DIST thunderbird-136.0.1-hsb.xpi 507188 BLAKE2B 
b8c09b608c28b28c07aecbc2753e735165f1f77139d9745a5e7eb8a577e8c428f7fcf76d3aa6de7bb7e965dbd09c116d2722aa90f466d2ba8c5370087d200f15
 SHA512 
2b4e91a6f832d781ea3206ac786f388373cd185b3585c97215e2fe59cbd935f8c03457351b0fe608c9c60d97c992bc7e5057138063b3f2c815fdae3889b9ecaa
+DIST thunderbird-136.0.1-hu.xpi 509900 BLAKE2B 
34940357e40f8a5672628b82f13fb9fb98fa3325678dd9d66cec675a7c250423154e27d408401fa75786b5052ef14296e3468b3fcd9aa940b1a5c5d683a65d0c
 SHA512 
c5f3c6d1cd5a6b6bf87af337f8ac6c15149125bf7b5eb93f4e1c79774fd2e5843b89a5706125099078c0e1c6d29bca6dfe20b84d87f66be2ac5429957c5a0311
+DIST thunderbird-136.0.1-id.xpi 456733 BLAKE2B 
fdca745e9c5ef4084e4c9d61a509e777a770424da4224ea17f9663495e2196c0d86ef5474008730ec2c276e2aea752bf4a612069747b1f508e63a746851622c0
 SHA512 
ae18293c85228449b8512aeca289e299667951dfeca30076cfe434c927d41331ec04645f446aea936d46a9c7040799d8d7fff9a48c1ce3ed6b3cc9db7111e1be
+DIST thunderbird-136.0.1-is.xpi 477553 BLAKE2B 
b401fe4ab51dce549889b0d97c4e979c3936c6506c0c74466aaafe8ec065331a0e535ebf44f3ce9b20444be9e4576cfe0e4b2959b4aec82603771db70c7a8370
 SHA512 
a77cc2fb0c2ca721e08fdaa374921684a618798940f71071cbbbb5a4355f9292d7a1ba2e50a9b5ef87056c94863f198dc0626bee0d3c5c7a7d07ee635d90203f
+DIST thunderbird-136.0.1-it.xpi 481202 BLAKE2B 
f775e0912d62c10ddf7107b97da26b8ee83756cdea8eb04a34fa9c2ba3093cea11c08b8cc1a3b7a16b6ce3be3d56e1367f996c5d4fc493dc37fb7911843329ee
 SHA512 
bda434c8b5e3d7393ad697de005a00f5ed6793066bac09dd417a44a2e89614f523ab2d7d5f5805183341507192d2b2cefcfec2c73b87cb5a5e3fcfa171529ecb
+DIST thunderbird-136.0.1-ja.xpi 531330 BLAKE2B 
7da8a190ddfd21464b5fccc242204eaaed43364d4aa45897bafbcc10e595f92f340a02ef9c88bd2cfd61f88b91a39295b5c34361d6749f385a5e04d69fcc8916
 SHA512 
21fd5cbb59f2e7f1f3a53b42f1e4571b222ac59213e2b829571134a5217983558e6774872a530feb1765814a831ceeff2c9ce662532440b530c57aae5d55228e
+DIST thunderbird-136.0.1-ka.xpi 530549 BLAKE2B 
9d9465ef8f4381fd2bdef57b2c87ce7085d2bccde52720ba4571e102a55c3c6afdf8a3a9dc23c7f3940d33578c87332ebddef9c8d3ced0c862f64ccb380c936b
 SHA512 
a911052368e0be6b4ace7e6dd79e7c4e8f5a95b483d34ebc3f11aff9a482d81ea9810010cab5ddcf3746167e11b9672d1230aea2a5b285e8d5d6828d4a3848ae
+DIST thunderbird-136.0.1-kab.xpi 462907 BLAKE2B 
4a32501e3147f034b3a5fa873a5125c032a47dadba69c1b24ced727aad12e6d2e84b8a2ce02129b5832574a33d2163da50a3472845b0fe308a6a40746183ab0e
 SHA512 
b93e369fde1e977052bed25eb3da5eccb0168f4eb068572730ff40edb85549173e6ea349eedd39d76a35dda3cc533ff3e694be34dc22dd162a63d94fb337ac9e
+DIST thunderbird-136.0.1-kk.xpi 568322 BLAKE2B 
b56208f66ee2b09418ea3010cb69b04c09371261aebf9aa91641002490e7ed23e56a9bf6a5ae1692495d14bfdaf0bc632f2c6355e8bc5752d737a7bedac1b8e3
 SHA512 
9af6be7cdf54650cd5b2650c874284867b384abe5107399d6aa5b91e4c211e501915b149542ae869998444c9edaf691bb33aa151a4ce1911434ddf5d4055f90d
+DIST thunderbird-136.0.1-ko.xpi 507761 BLAKE2B 
c5455c9012d2ad9486266245cbe070b7eb974b8ab7a46e8bac13caa9cf1c0b0ade111199dd3f3ac5fe4cfd7a9cc25a8c9a924a01db6e2ef6a5060616bfe89cca
 SHA512 
63af88d0e5f227665637e8b0644d5c7e38a9b2a9056cd19e2744e4d1230fbd9b23846c6bfd271b3d6411b8111bd53170a92a4918f261c2be035be3bd98d28891
+DIST thunderbird-136.0.1-lt.xpi 441638 BLAKE2B 
844cc1111bc4cf275bf5c01aff9aa965cbb48982f6aa7d4be9288b8b7ccb5c7ebe968fffb6dbe0ea67059e92032ebbeeb4db3404d0abe9e3e7a4b1d966abf5d6
 SHA512 
917ab65d0b00d13e64af38aceeddbe86865d31c0aa6e72b9100741bbae94c7c10cefef3d6205bedaa2bb25adbcb05a552508253ee82e73e133e7f362448dc041
+DIST thunderbird-136.0.1-lv.xpi 390956 BLAKE2B 
6748ab98ad6778ec99f691ed06ca55e916d00c82aabf2a900575b275a9acd9dafa5b87edde0d09036855be308ec85d0b611787be4da9431a0271eb4212287a12
 SHA512 
502853ac0fc6a65d8b87d96efc59a26806f4485c7d5d9ae5403252324eb2f8bdb0e202a598cbba42f7a38ee72b3c09fbdddff5a161ce951aa88699ba4ea77166
+DIST thunderbird-136.0.1-ms.xpi 351080 BLAKE2B 
0989e800693bc26064e012beaf00b0d683c398e7e6b575f946e2f013cb17910173d3771b1fd0566b9be326fe3d0f735205219167f9f1b10370a91c4cb14ff678
 SHA512 
e04f79ad6f99321913fcae7c830d5dfa96d3f75c94b6731dcce06c4dc701ced4357aa9323f5c9ab5bcc443a11a648a31b28c934db052fd7883da5df883f8185d
+DIST thunderbird-136.0.1-nb-NO.xpi 441360 BLAKE2B 
aee472b0bc9b25eb49a681b3bc473cc438b7e14ce99aa8b2d8dde0ac84d943086f00e51404caf5214cb689c06041796b74c6edfe266d9037c0686b1e64490aec
 SHA512 
1ec4ddcb6e753853ab8cfae6955201b630b4cd6746be0b9be184f182fc8672beae7477e8688738e84ae735affc3f182448848175ac3759672566a7dfd6ed0f4d
+DIST thunderbird-136.0.1-nl.xpi 474916 BLAKE2B 
cd1c7067341b3e74f4246d76d7dec4dc781a1e02fe94c42fd6ac814e9f9947df44fd6e2b28f6a944f3566c13bfae430733ef0ca7224fe794047099b37620417f
 SHA512 
be77b355e4cf1c1890c2af269b040af6f4c31c02bdd8db088023c35e02d126eba0d774b7461f4f51c707117874a06a4ecd885542efd01d76f736064266762ed2
+DIST thunderbird-136.0.1-nn-NO.xpi 459879 BLAKE2B 
7817ed963fb1fe824991f21d3d492f78ab25cde5f6226867b0bc3183a91f5b64f0fa0f173e1dda9fc4aee572d9d8cea6e8142197595d20e1cbbb3fa4058d9a73
 SHA512 
b4b7a3209c0947c2edb56289c2d10871f727a1db49a062e1341710f49a27379c895e3cf2ebbdc9e5416332e28377c4f481b2cb10eb4912e760ff4cc78256d372
+DIST thunderbird-136.0.1-pa-IN.xpi 431272 BLAKE2B 
4043a7cb426db6bf29ca56061851568de37d7c7339072f0c9746f1b972c20b2c4ca91d9de8eba061eed14560a93573d271c6171af3417730b1fd00a98cda4811
 SHA512 
548745b2ba8119a5770ba2fc5fe79f1822418d307685a562dab367fd93b1c367cf11d3a0d4d479bcd874575cdb0a304985bc75d96df6a38393f0a617a9ee0b04
+DIST thunderbird-136.0.1-pl.xpi 507838 BLAKE2B 
566ef539f923435b4a4b5d9c3b5b014cd8871d834bd9f031921d85f963aba821c236ea0b2545efeb421e36558c04af6de5be5dadea296d6319412f90d3b713af
 SHA512 
773acdfca9ad70543d9830a38b95fecbd6548b82dcc683d37375b52ca6ee78a01b125730231d74b2cb4616dfb1d99c5919843402add1da4d20046882cc77536d
+DIST thunderbird-136.0.1-pt-BR.xpi 482872 BLAKE2B 
909679af4ff378226d634a168ec9a9edfcbd81184a056d663526b92d3d0e8786869ca4d547e90577bcbc3f5451199b9065f90a1ba0a32514bce6fd257aa37394
 SHA512 
2be50b79e0be4c6eca1fbb7be9d5a6b56750933dcd787a9b2f867914655f0eb451c5075e5b45871cacf6e35d84e756d96bef5f9050560b066b1453778d544650
+DIST thunderbird-136.0.1-pt-PT.xpi 477513 BLAKE2B 
017110b6d0532137f856e4cc98481573b727360def0a02dd4bb17f5d83fb735e778848c774df624b312829212b476e264f2e771c652d526099fa84405e962f26
 SHA512 
df71c08bd7f32ab7880c24768e4d90c4b274e1a15828026d2ddc3a02064ebb52665f2fb908e8c6307f262ffb1149018a93c52083c24b686ef22e51921bf583c8
+DIST thunderbird-136.0.1-rm.xpi 483302 BLAKE2B 
4b763e38b9eb02a61f2368408943f0b60ef5949031515543457e41117264e9e24487488358fdf9035dd7d47cf7753dc035441a8278e07e3350c94b533ca18bbb
 SHA512 
028f85d11ca64bd2b8eeae692fa4170d7ce76e8c724780095fbb38d852eea0911f84b4cb02aa283c97d3d5898a1d0a35423e6c7897053e2b9a6b7632b165d333
+DIST thunderbird-136.0.1-ro.xpi 417116 BLAKE2B 
3f444876bd7e50d85004e68b3a3ac8d30af2e33e575740cdb44a2db89f0ca68d764bcc57da2e894b51a2a04e102a8b3379d034c2885183777087748e389a6292
 SHA512 
df063ac3108ba616d13ad557efd1d5db419b6af5602b76bbee7185381b6bc653f9afb391c5e810569097aebe63ab1efb776be5838480ded1cbf0e33e7a1149ce
+DIST thunderbird-136.0.1-ru.xpi 583973 BLAKE2B 
13356dbf6e0c0d962c48f211ddaaf80cd2bf6cb613efabec25acafb8d5cb4801e75c18ecd8f61e1e54a993feecdb7c147b3af46df8dee9dfe0b87019d35a8eaa
 SHA512 
de18ac06327cb0ca5a927e461999f49c81e89f94cd735ba990789da95d4abcd510396faf4fb76a4ce9922879f35ca6444cdf42fd2d1106bb386a6c0dfce7db81
+DIST thunderbird-136.0.1-sk.xpi 511217 BLAKE2B 
6a3981250c0374d4e31ab638ffe3307357b2930b88b72f61aad63aa20c6ebb97421c2c36e27eb850e51a2286e4a28a597e32ee3621b4ca2403bf4abcce292522
 SHA512 
3c2486c411716d81a6fd5916dda5a4ecacd6cc1a2564e06a335b0cda21c46335b71ee0ec29d60d5daad5a50f993a8f587f86c9f8639be07bca64f7d649afd918
+DIST thunderbird-136.0.1-sl.xpi 477413 BLAKE2B 
5e7ff805f9051d386bc8d5055cc94d8cb649bec3c7d1d8908a63d386a39f3eb0bcecb53870bab410223e0bb74b605093da49e25bf39f9653a491c51f06ded61c
 SHA512 
7b632a343aa18de1f7defbdfbfd337480fa3568fb6c3d75ec88749d23925fa0975786c63298cfaa53e0885a69cd2372e9ac44b252dc43ef24efd85f772a82df8
+DIST thunderbird-136.0.1-sq.xpi 498452 BLAKE2B 
94cb4ed5f3f9731d4a03e4be42144cd25033c3d16aa109e29296d87da6f453f61edc41b503c3124bd5c2cbadffd652ee56d987d7611844a871f9a9ee683bf817
 SHA512 
4a183fcc05318a45e480cf715b59217c729afc275709b1bb74c0b78b1ea93806fe8f44607d650d7e433e89bfa7ffef20149acbf19329acc0c79508b617966ad0
+DIST thunderbird-136.0.1-sr.xpi 495678 BLAKE2B 
d2258a3d4eb76d7152d78adff3c831ebdb56a574fa588deaa310211aa36178c70e9be5d6dfdf3444902455f4a9955dafa2fcdccbac2252a1e0d8c9abe92270c5
 SHA512 
99e505cc82fd7dc7b9bb62a0817ea9d232bc8e17c1caf91b53a070f379637f9fe13acd4e3f183213fa7d663831f92dbf2f24ccb259c8fb0177827577326857bf
+DIST thunderbird-136.0.1-sv-SE.xpi 477340 BLAKE2B 
c5edb106451f9d62a220a24398df6993ef72df27730bc7d338df438e27519a4177286e8cdbc8c489a9db3895dba18e843c0984a9febebe19d780357b1014abd5
 SHA512 
35dadd12a2bfdbb0cae33a67d754e69ecf0f6ee3ab44fe5d35756a0056fdd040548e4da9ce55e90a157c99b46436c0134890de674a27208d4b117e55eefacf7b
+DIST thunderbird-136.0.1-th.xpi 560620 BLAKE2B 
443c237b64d1a50dc2008bb8f11a817e4f5ce4d14bea2e235fc22ea6314391a5e0e2003f98246130ce4dcf50b762b990488fbd0f737f52c89de67e188a84bd24
 SHA512 
b871d9e646348fec02dd9994cd6d1139b58c11bdf1839f81614a8109929b838c874b1f410450d29f8cf087b2ae1cdbe6cc3a61e84af7633fde2e92c74ce0ebbc
+DIST thunderbird-136.0.1-tr.xpi 487412 BLAKE2B 
e6780a0fcc9c2513587089718bac014800c27ac7885e56a6a0e7ec1591f4d785d5c6d411f11c01e6871aa9703ec30a339aeb2e6bad9275f33aeedb67ce5d52f4
 SHA512 
a604651d04c79b3f24eee4b8efa2f3829d4146a993d93668a614b076b0c7629e151becc420fb0efa3127c988f91af6e07601ba9c6d00e08b257ae283e699da00
+DIST thunderbird-136.0.1-uk.xpi 575501 BLAKE2B 
7d0c79ef331a6c97e52a2f27560ccccf4c5ad7a27e2d39f7f04706ae972f1eb5845da4c9c15fdf51e010aeb46c13dab41f03ffb27d08e78d5657e001d727dd62
 SHA512 
cc7803d8196f04bd4ba03613792964795ca16e6bdb96ce6105cb2c396e262a422f6e4de6a7f7d81571d5dac3bf8ef000794eebfb07b2ce80f53160720a96975b
+DIST thunderbird-136.0.1-uz.xpi 354652 BLAKE2B 
54debd7fadf3132fead8d413d1792ed52c61e65e09d6f63174a826ef9a33200ddc17793ccabe0e6b4ff0b0eca3b03422795f70d9e5beb8963010ad17b0e12d7b
 SHA512 
586a724719ef6dc7136edcc264feecc506c210cabba0435fc917fb11dcd5630387838df7bbfe4f7da1c7b0c03b1823b59023ff79eb59a566dd0713ef56b9b794
+DIST thunderbird-136.0.1-vi.xpi 511067 BLAKE2B 
29ba6aed21a17213e06232b46a7065a8ec529107a9eb35d5e5f8b6e836c4028b569cd147de0f7d707d7996f96a748e1202cc9917e338dc6f5351253d1d347525
 SHA512 
cce7cba5597ffcbff94fe32000c4b85b24234f946d494567ae04c97ca9ac93dd811437a5be9ddde47e4e3c3b12798b271b552f6aa18cd23cfe9508783b55bf3b
+DIST thunderbird-136.0.1-zh-CN.xpi 500524 BLAKE2B 
0dcad66dd9e37ab0ec98ffa298ad8eca03f69ebd454d0ba3d71bbe2aaa685234801c8d4d50edb485c22e0ca1feb8a40157f97bb472888d1132fa915c7459dd14
 SHA512 
fe709b517b1673f6a15b4213c0d5dfb40096d40a9d9dcf6a248b1e2e66ed88ba3e8eb0ffb0892cb3c9f7c83afeda56f31547c2df50edb7b9248fe2696cdf75d4
+DIST thunderbird-136.0.1-zh-TW.xpi 503558 BLAKE2B 
25644015536e9150ccdf0c5540a41f33866d01faa77327c0f736f17e7deed49de526f7fb9e4c013746739ad4889e5326d76035361915b29e45ff79d1b7297687
 SHA512 
2f1cce2b00b795145e96303db922521e27c581cae4b4c2b9df883b52cb541a824bc30867bcb9a2a23652f07dcd1861b4dd2f2925899205cdc2bf0d4e975251d6
+DIST thunderbird-136.0.1.source.tar.xz 718489556 BLAKE2B 
941cbfecd5094e91b8b661167f04674335272f7e5ebe0fbcb1d7307ef733ca8e8cb80fd0306ae9d157f3a2448250e6c254c8665fe61cb844e7b466d33fcbb6a6
 SHA512 
cc217f3e07620442714337ea396a7146d9d80cc973de862990a9fac7c4343e900419b71ff8c6575e563deda6daff90bec5809a9a94376cbf1019c834f4e1b1e7
 DIST thunderbird-136.0.source.tar.xz 724177104 BLAKE2B 
32a1c23efb28625bf900840ab5eeace63f98c10f95b3e4f665a6fb6b8c653319adec522bbf76d60bccb0f2673ac12c6623ec1cca37eae02aafa08594419d1479
 SHA512 
37c94258b49a7e87b24b4cffaa6eae81698356ddc3f0f49ea675b885dea2c56a3ca758dac2ddb2720beaf2f34faa15a9ab9b5eda0b352c0c8f14167c01838714

diff --git a/mail-client/thunderbird/thunderbird-136.0.1.ebuild 
b/mail-client/thunderbird/thunderbird-136.0.1.ebuild
new file mode 100644
index 000000000000..6da31d787422
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-136.0.1.ebuild
@@ -0,0 +1,1157 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-136-patches-03.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-136-loong-patches-01.tar.xz"
+
+LLVM_COMPAT=( 17 18 19 )
+
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.77.1"
+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.26.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.108
+       >=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
+
+       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-thunderbird-rust \
+               --enable-system-pixman \
+               --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-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