commit:     71f85e2cd6a3aa1fb34f6aca1da785189c57e46d
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  3 20:54:53 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec  3 20:54:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71f85e2c

mail-client/thunderbird: add 128.5.1

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-128.5.1.ebuild | 1163 ++++++++++++++++++++
 2 files changed, 1228 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index f68aeecc609e..9f0a5d95f846 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -260,3 +260,68 @@ DIST thunderbird-128.5.0esr-vi.xpi 794035 BLAKE2B 
eb1bc807cde185c90477f619aa9327
 DIST thunderbird-128.5.0esr-zh-CN.xpi 794062 BLAKE2B 
89ca0af506881a6e5b2d089db7551be0b85e73b5a96ed7b8ab93da57914f2714955da084cf50c081d2869aa1ae2f0ea755d960b4af6f83bfceebbb68f9688e37
 SHA512 
278b742b60e7e5ec1ca3e2c3cfb0fa28bc5d37a067b607579629afc40a672bf008f69a8d112d32c533421fab2f4488afd0995ff4d42f74d6f702b137efac6023
 DIST thunderbird-128.5.0esr-zh-TW.xpi 797336 BLAKE2B 
7aaf362ff7e01cd8891571800d0424be58ec27af730cdcf1a30bd24b22358cc64f9292f18e5ceb8f3d2b9f474296f913d7faba1bc35448555ed07c9503b85bf4
 SHA512 
cbad9528c2f815a7356ab0b396ed6a382d43d9b7310f82bfd1fb358a5d1dbcf54d4a1c97a7149b58895e9fd006f59abb5488423d228c604d3ce38ad352b3a53f
 DIST thunderbird-128.5.0esr.source.tar.xz 677426000 BLAKE2B 
9dfcd4f0337f3dbe07355f0c52ca42e9701c5b0d4bf81c69c8e7165e9e9826d6c9a3e0419b667982da543e8b62bca3c4dbe8666b7f889bcecb668059a1fe16d0
 SHA512 
f035028fb18a8a60150aa0168a0d02485276f579e8a816e99896f70989751ff71e54761dc6be74244a931c5b26c7ed1d6bfeb4ae6ca9cc536ed77df329f21fc2
+DIST thunderbird-128.5.1esr-af.xpi 530348 BLAKE2B 
ec809f88dd16a61f96bb190ad006346a4bd577939cf4759fe1ff2f87648581fb2050677faba3db5542989d4e2599ba239c9ebd52d3e83847c5b5190efdf9dc4a
 SHA512 
be414eb2d703621a5e6fb4a4c9463215bb73c2618a17b1773509457e364118cad4633000874726785d183118ab54031bf5ddedac4f3b40bb6f766ceff16625c2
+DIST thunderbird-128.5.1esr-ar.xpi 686984 BLAKE2B 
a1aad0b086b3241fcf848c00787fc7c2b173fa26a172ad81a947429fbc873372c9f483d06689699225b515fa17d965b851a75331cee346cbf35ebed17025602c
 SHA512 
8b31460f62279c72697b3425d8cb4fbb4463f28292410755872a460bcb3ac5bfdb938b64446fd3b52f3de9351aad04bb8a7d6a29c9e24a35b434c24ac3bc4e49
+DIST thunderbird-128.5.1esr-ast.xpi 561053 BLAKE2B 
4b63fceef75d494ca8e1442fe8c692fcb7ad7dfc65a61cd0d4b0a98ebdce1e67f70f277f774eb76ff8494d57473de9525dbe8546d1f2105f6f4aca6fd81c6773
 SHA512 
e489a0f4aa62598bd467f786a595faeebf3ace3416e33a997912ca5fa6387c3b45ac023b2eabe7195a3d6071842bb7da2d21e518e171d60fe3a6ea7703d6c0c6
+DIST thunderbird-128.5.1esr-be.xpi 772989 BLAKE2B 
3282b3980f410b1d125593e23232fa3645a75ca25452f74da407bc52b034983d9c0b9e5665bbaa23bc354c41a4e3cd2c74fa5aaa465346120979e0df381de27d
 SHA512 
9eb937644e1614138410dc6fcad08f6e7fa33d02dc40eb36a17261bfc5e5b438638edaf47fbeecaf2832c5ca900c3bcf59146710353adcd3701f6598eaaa0139
+DIST thunderbird-128.5.1esr-bg.xpi 812322 BLAKE2B 
3f3801b210ad79cdd31e2ea455365292579261cd42c319d372e15b708ffdaa0a48371709c501621c16a2dea33490a99eb07cd862266f9b73833507ca06a1ccce
 SHA512 
4114df87f32d4adc34be64ecc42ba7c6ef4bd44e2d877600309aa7883a6bded0bd7f3de97cbf1806c427cf5a221484bf9b3ae430cb5d8ad19f772a402e9bf74c
+DIST thunderbird-128.5.1esr-br.xpi 655126 BLAKE2B 
c7adc3dd907e6d475f129aa155d150c8dded60691957b278e7bcba603eec4bff3d91de4402c74a95d9ff3dc72bfde98c15d9d2e27d61b10647e84611de007278
 SHA512 
e98603951fb3395aa7339f163be3078834d209da60bc392a1868b256b1247a050eb54104e489979d934e793844c0c8812a94e03ee070aa3a16aa6c5910170137
+DIST thunderbird-128.5.1esr-ca.xpi 711076 BLAKE2B 
c63c6c67b558cae52dc1e575d9fe05cb70161a25210728204012ef3a3f388f6b0bc3062fbe2dfb050c92e2d454009a731cbcf5ca6a38056b3895a031dcc8203d
 SHA512 
08a7a9e48fd02eb515519dbbb24932df46bb27b29adc88d90f6da8280ad1fbe2e0256d2d339cf22dadacd60a3000d7b24369db11c1abe72df59d352ab8cb9ebd
+DIST thunderbird-128.5.1esr-cak.xpi 672196 BLAKE2B 
9999ae99b06534504aee7a7e28982c0dae4af40211d81df66ff318e6c63b11b874baa7f60d87d3cc171a0244d7a900f810f1e8e21e87204c8b3f23b5d0fe5d5a
 SHA512 
30c835ab48300ec3cfa36cd54940394e081c3abda4bc8b6a26d33d302ec41f6702e36706df68728b31f04c52dd437f8e81b404fee8bd5d1921870149d0dc8c84
+DIST thunderbird-128.5.1esr-cs.xpi 791608 BLAKE2B 
51841ccfc39e515c1e1fec1df4da3409f6f0f388a55d9a2ebeca48b973874b5c2a4b9436a9a0c6fefb130cdae846dcaa4d16d4fd938807a3297d8c6cd451aaa8
 SHA512 
6f1ba23f005d3b9682cf999366c7f3ac7a065021211441f0106290d021e70c2c2a51617357bd454f4095fb7fe6906e156148e75d6789be23ce3599505f3d2454
+DIST thunderbird-128.5.1esr-cy.xpi 756814 BLAKE2B 
ec4b7a8692c944b4411dbf226f24f79e797bc0ad1c1167ecdbbba2012cc3d71033853e5ca5f9778927fddd8e80f176bd6f3b9019da535bf3ba1968d4c1828292
 SHA512 
0bbeea98091e4746b705173b11131afcefecea5be94030ebb205bf09317389cddf8bf2005b2b695a9d4aa7772c452466e304f5002a9f399aea74929f1039d162
+DIST thunderbird-128.5.1esr-da.xpi 740055 BLAKE2B 
e70a4e1427e5453197b2c8a81f50f33cf41bdba22704c67ccc522984f4de712e390ddcafdc8114df3804e614e25deaa330052892909eb0501f3d020cffe2279a
 SHA512 
b58f9458cc4976121179223814646bd2df67e7359aeea508e6b48e65cb03fc51408e60932b9d12955aca60539ec1159fd878a0d5cea4098f5e909ee16856ba2f
+DIST thunderbird-128.5.1esr-de.xpi 772205 BLAKE2B 
cc8b611f605b3157b4eb4ec94fa93325188358420caf9a9cabd8d378f697fd64bbcfe820c6626b745cdf099f75a9debb8d65704524d5243a40e7846b1a391887
 SHA512 
3a0f1dfd873d6d7e1e5359f8a104a750ba2e2ed2ba4676bc20099afec8fb405f7c9b175f01cc396549f279e101d0755a44a185660a4dde6376d9ffbdf47c8921
+DIST thunderbird-128.5.1esr-dsb.xpi 790368 BLAKE2B 
a5f025cad42cf5699e618bf205092e76f064d23ddb87c9a0ad35a32183095df98ea2f4174ed360f53f2c3946d73432dd6133036da60ecf3fcf9116ca9bb60d91
 SHA512 
d7e8d254434acf0c8aeef3bf50f5e84c8b8c942e2cfd7b4465b895bebd0644667cd30423c0173175b7a28bf163faa139b2d16a028ae97487ed01405210eee5a6
+DIST thunderbird-128.5.1esr-el.xpi 895920 BLAKE2B 
4c1c5e69124f698668446e58a4b6c2e0465044c4ff35d34bdb98278e98a162700d41af558e5a843bb7be3dd81876e6a42fd3dc66b7e27839f9dc22d84d1be342
 SHA512 
2a8548e43519feaba21acb51f0d6bf7c36fa6dc3c48267a0a8ad1ca2527dc4ff1a782f1678e28d5e3d247e50650e940506635695919738433095c7d388ac473f
+DIST thunderbird-128.5.1esr-en-CA.xpi 705212 BLAKE2B 
408922b2d54cd780be413f79af1f6c0008eaed5da1ee55f985c80767ea99894a59870ee301d5650477c862047296e0fdde113ff6089659221c2937dbd8ebbc2e
 SHA512 
448f6520deb90cd3126ed512ed50f61052bfc61161376fe7eb22f6bdca13ed873f277e541129e006d458f1922bfadcb74fe4d45b220c3812a64efdf07ac88a62
+DIST thunderbird-128.5.1esr-en-GB.xpi 709686 BLAKE2B 
0318845bf29f47f2937a38b2098c24039d6734a2935aa489a0501827913390256cc5bcc155457294cd174b277a40467cc11f768c1b0e0a20070cf5f7a4de110a
 SHA512 
7b936594612374ffe8a96f5e282d78826d77624fcb631ffdc6fd4e7f23b5fea66582182cd1dc7d9e72864dfc902db945ebca7c08dec870e5e7d039e862630a58
+DIST thunderbird-128.5.1esr-es-AR.xpi 765752 BLAKE2B 
4a1b61f7f169e3b06fa181dc647866217197a9d6fa2270e0f1cf49505905f7510cc5f36b311ebe1cf75e04cc800f29a1465cdb33814cd319defd6584926fef42
 SHA512 
663d79051bd41dad4e13e3e22c8d4d511acffdfe4f250c8a79c6276704263bc9ab009b81dbece7911fe6397ab0196f150c3a877e0c6dae00534bfeda0e80bc95
+DIST thunderbird-128.5.1esr-es-ES.xpi 733783 BLAKE2B 
08c17a6bdd052cee4db9fbe82f405ef1b385fccde086b655fc612a271d2fc9382d7de6debd3117392e0c66dd5050ebe032e04c8360d6a8c005b42cda1c15f5e6
 SHA512 
4cf0163687d29b56d4c7f1f7fc2bbeb3d8bae02ab86bba992b4bf1e5dbc77adae44b159e9b179bcddf777cc2ff1f196d7c9eccb120d59eede9d324287e5fb037
+DIST thunderbird-128.5.1esr-es-MX.xpi 749781 BLAKE2B 
822f0121590f5459e0cc113c43e6447c2144aea54c28543a7ef17de963406cbed695fa27e76e1e7b79637aae7e214c1fd783ac387a4e3badff44a12537d84e1b
 SHA512 
64e2555d32526cb01abd9ae8d6d75a41f0f8ea9b44cf3642e0199a1a476c8ca896fd6777745f6b3670eda6380038419692ec5386c4eb14717bb8e0f556c17d6c
+DIST thunderbird-128.5.1esr-et.xpi 696772 BLAKE2B 
fb0c92df40ef682d97206bf307421b3e29420ae436dc0b55a6cfccc5fc93f72060a5ffff8eb7b876c840b03709f052e174a51e56294ba10593ea186f507248d9
 SHA512 
2f5ef8b31c3d5629f19644dfa1387df0f0224353adc720c25d2e947f4ea7b8c56e78f64b197242a448336729f0188e98fe1a0b225491dbc5a754bd8c175a69d7
+DIST thunderbird-128.5.1esr-eu.xpi 740304 BLAKE2B 
7a52d32458d432de3b5006aeeec9dd649c36b6b956221a172a77903df06b42b10ac5696570f52e07394e36f4cffd065f88db4f6b246dc53a3feedfa40cea727a
 SHA512 
97a7a09bc06a2fd3b68f571f87e183a7596e98b3684235b339d53e2c39f58e1dc8797905f6662b8c9b518a6d0eb6bd05200e0c2ca5f2a3fca13f64f3ec81442e
+DIST thunderbird-128.5.1esr-fi.xpi 738930 BLAKE2B 
2e653f54d2e9bd8ec3c3b65340be05dbc1c23dcfce39f470d6bb921e14cdb09405a892a4b6632f27a71c35329be4c9bb35035f7ba805a81f1c66e255994bd237
 SHA512 
e595dd127e1f83358af4a189a2f4dee1348fbd7f0ea1d0bea2344595a535433289c4c097c5d43186ed1c0d37cc180dbd67b15ec2c8cc09ecfd4588b7c943afc8
+DIST thunderbird-128.5.1esr-fr.xpi 777363 BLAKE2B 
569d01e77c14b5b649e0c7433a23cee3eef8ee5beafd9ac0ccc0cfc0df65ad211fd84223ebd52c3851ce876bb30055a6106929be7daa358820e5a0fcdf9e08fa
 SHA512 
bc0dc068cf0f42df5c006b01cec84d09abd7a51a5c965ddd424aeeaf365c560ab15963a0c15588773e517742eb80e979b7098335049678ab9d26a42431b20eae
+DIST thunderbird-128.5.1esr-fy-NL.xpi 759927 BLAKE2B 
c4ec6bef6b7b5895b0fe5c866eb3e7c495bdb685cef3cd0f999054894a8aacd4267f1a7f043b2a92fcb30966b4ec72171a221f73e7ad8020efcc31179c6a58d0
 SHA512 
7792036b5c61907b456b9bf2f07283c35fc98c3657401000c1e356971ef715f2c1301b7ecc21c3711c79580e002d43497f82183197c86ae4cbc2fa937c12bb04
+DIST thunderbird-128.5.1esr-ga-IE.xpi 616365 BLAKE2B 
2401b5a75838e6732944ef3a01df98cc651fdb8fa4067684b48f7b01c2969f2f5fdc227b0c22e7d4abccabfaaa736ccd689214604e4f9794470323000f3366b8
 SHA512 
7cd34d062dadd047e048cc41b91f28981f15e9ce79c818373aa0875f6cc48ce67c5c330a09885d001d0f17e3e651f91c472d44064369ab0ef553dbc4dea4d126
+DIST thunderbird-128.5.1esr-gd.xpi 729137 BLAKE2B 
2dae90aaad1de37992dce0b15d85548cc28bab44f5bdc4de33ae1bfbd899cb961978f428bf9070c8d07e062dfa5d3d9bbb8cb25146ce37b1b625c3898ab2006c
 SHA512 
c0d4e52df16e091bd88d335fe11f06b3b0ce1b4b3b60eacb6c854b2311d62b4acf6c02eaf4fac9079d4c6d7f7e7b07b6696e1ab0d93b1bff64fe0a61357090a9
+DIST thunderbird-128.5.1esr-gl.xpi 742174 BLAKE2B 
8d854b1f7f79326e0283db2f1d66c504393e360381a2870239b3c3bf63e6744244f99522706414972b3c365f0dd600a7b5430d9338aabdb37131810b8e430099
 SHA512 
1e1da814eac2c042b73ad144a7501eccfd8304e43c47dcdeac5cdf579922e9d48f94314ac63e5da7cc6e38c5e81fc61a7303c89c40633ebdce91ba1cfa78e9f9
+DIST thunderbird-128.5.1esr-he.xpi 703445 BLAKE2B 
4a66140b68c7b500c08fbc321e93235c432318db0ec902a69b209b4a4665b550923cfdc83eac4fa662da59428ec45c332b015cc4311fc1dd241611ce8272da22
 SHA512 
84927255c98a65fd5f1feb7e3177503ed1782ec1cc927e043577ee867639aaff20a52e1c5a099b987484e455b9202cd86b6759a25eddeb38d1ccd72f57279fd2
+DIST thunderbird-128.5.1esr-hr.xpi 720117 BLAKE2B 
429559a75eb24e0783b8e3eb40bcfc126448bbb182edc298054ac293e87a1a83d9007bfd62211d5d6c777b6a04ef80b70ac564c791407e1553ec8c5cf7c185be
 SHA512 
a04237261e3b077daa027cb2c1180514f97cc4e1ccae192467c1ab3dd5f69c2e91217f786b1da565bdd09a0660fa62ec504907a5604d00bbd48d5fbb40b91db5
+DIST thunderbird-128.5.1esr-hsb.xpi 787747 BLAKE2B 
a09df22e4d1d0fef6124a7ff9f2068c02d5d42d3ef2a9b7ea4cec0cdb6df63fcf86c66f444fa6ba6f845827bc1a411c4f51f75f740cc523b659be831383517e5
 SHA512 
51f2f360aee58c41ec4fb027bb47dbe9e2485642dac8dd2a8b0f48d63d4e436631882d4d3c34d59ed1fd3f98e5f943273df89070d456cf007ed04e62a4433c94
+DIST thunderbird-128.5.1esr-hu.xpi 790230 BLAKE2B 
a491fe64ad28e1ab159dcd2caea201d02652728e314776713c56b0a7e6720721cce1970542baf4ce44d1eecf90685e2e94cb0c924dc63ec3c22fbe104351677c
 SHA512 
cb356fb454e01b1cf0b089c51004f2c46d7fd34b0117a58167c9a2ea00984edf578d15b600c47c5fa4ae14d38b3bba8dfcea8a5577ab7e58d8a2e563dd10c0bd
+DIST thunderbird-128.5.1esr-id.xpi 710326 BLAKE2B 
f36fcc4d0c1cede2e154635e5ee0d0bc2780fb8f4ddbc7b9d7cbe24e0103102b41c15da7a6fbd33172db4920c05f101132869bc2ab6cdfe1e92a0cd62d67d6cd
 SHA512 
074dd5616003b0648898a0fe83067a8acffd4744e1c1fcf75ff7eb6f0d672b1b1753fefbd196d00daf657ca1de3f8cc72e728468ebd0d8b059b689f3d5b43a20
+DIST thunderbird-128.5.1esr-is.xpi 751184 BLAKE2B 
86da30310ca63b31e7e913763e63f28384bcefb935258e64e1e38bd8089274d2a92715f8b810ea330d0bc7987adb89b2a522ef856cfebc18fbddb17986e663e2
 SHA512 
99d23373fa3497db72864826a6479e5f3d51491b4c70330493eed4099d2cf3304d29bf4f990b1e632f9fa596f9529090183a1e1fc030701c14d1dc00998c32c5
+DIST thunderbird-128.5.1esr-it.xpi 697095 BLAKE2B 
02d08e5a69ac119c60f5e86b383fbc64fddad584466fe2be4be505ada532ffcffd89bf97c9c5619b6d5eb30632596eded87bc40074e9a960fea27bdc452abb50
 SHA512 
78cf8ccdca5bad8601485a5289c41ac161441ca4822654459f2f0bca2fa6ead0e8127520af27306eb13ee190acf17bf5aac06754545ad33ff7ea813688949361
+DIST thunderbird-128.5.1esr-ja.xpi 817720 BLAKE2B 
8216c31a914ae5b99af209b9bcb1f29bba0d4b0e81b138cb7ced101b007a169e71b0bdd1e203747a71d90a5df5319b261669b0bcb2750882c616d6b284a57e73
 SHA512 
3e9517643b0dbbe8a398701324a6a47c07645fddead2a23c0d83e74042b7d740b4dd1fbad671b440a26b4dd12004efe9e25a13f77ebd9271fb5ebf5c6e052ff8
+DIST thunderbird-128.5.1esr-ka.xpi 796712 BLAKE2B 
7518e87996cd237f60b347dd6e346b66d88c8347860af97ec69e0afdef5815479dc7ce24eced8230d352ebc29cef13f30903a5b4f8c1f269d08089b369caadca
 SHA512 
43a6b372f774e2588c6517e4e1154b6b50cbfc120ab757f9d02a0d6e69feb00e509b0301adca7655c364f81a56a2b29091e698a608a62e24e678687341f63e40
+DIST thunderbird-128.5.1esr-kab.xpi 735475 BLAKE2B 
123ea4bc1323ec6af3ed4349723464157ae37582009a953368028d66cab4277f7b7eb00101f0652b9f78108f4b313809b29c45897c184db56bbaa998bbdcf37c
 SHA512 
b82858da374d83998d8008ce8b981ef855d1d1cc0ba7930f9e065620857ce9222e26806ab1e9f5192427e185d721035c989742fc71a2892faf2d5932f3f0555a
+DIST thunderbird-128.5.1esr-kk.xpi 865510 BLAKE2B 
fa57b127f1299a9fd82f9475084b52341ef1c4aa82aa7bc6086a4dbafc57c8d65a053e9b9535c413d7d3e24b85bbdcfaca5516ca67a33fb09892753735fd512f
 SHA512 
588203c0ab2bc1e94933d31db3a7ec2942499fb51a9583aacd4e45c416e5f2456f17e4fdebb3bc5a1196ec75b92fe1a7d5956da3eec60e0e33d47d2f833b5a2d
+DIST thunderbird-128.5.1esr-ko.xpi 762640 BLAKE2B 
eb8802292a8e0cb0460da405357c66c1e5da80d646c3d2382b34bf77f3a1a03f60171645cddc3a7fa57ab0b8bb17bfe55b09b4690dfba7ede87ff4562863c1cd
 SHA512 
5bb7e696f5b392e2b085339c65ad2c31a415f4deda76bffb2216c32a86bab08696aa17e75e04a6557c427d6dd71c99305e0a73799ed14a30fc184c84191212bf
+DIST thunderbird-128.5.1esr-lt.xpi 701408 BLAKE2B 
6c6d1e770fc3b9835ad6c1faf4c73be8ac1adaf5008552a88686a5f2055378244bc50f1d06d8f7264edf0c9f5519cfb47b6bb875d9220a5ea9d73252285d2825
 SHA512 
03f66473edf86a45fe4762881244a4cc859180ce40ff8aff1601a63338a0f60c5d3134ce7eacbd0b02e2a37e0efab1a72a17a9d63e85de699df8fcf295f48e9b
+DIST thunderbird-128.5.1esr-lv.xpi 625978 BLAKE2B 
29e7bb28993c7833c2ecc8bd3138cb485f74682ceabc44999dc77bb2226040cdd764b55cd460b23378d097672f47709f6f8049f67707fc27401a5046ddccb3e2
 SHA512 
251c713e5068a00a6e2b9c540f33e3e40294f7e112df9b88758083bfa3697c6d9a661450168b4d87369d2f7e504d148adbcc8f8bb74166afb58d36eb1849131b
+DIST thunderbird-128.5.1esr-ms.xpi 581572 BLAKE2B 
c6f9fb5c25543c67b9574d58f9b0de7582f4a63b6feaa00cd39ea82d46d291f4da1e496cff2382011df4db53ee8b47af9c0da2e98a5f6c78d5a85dacb90f1a6f
 SHA512 
4e0e1b2413ae4f840253f27fc53c2426ba28bc1594d2a64a44a70d537f0c6f58bb179d72214282f7880a7f7ec38f2dee69f443b52ede6c8cb52e8573495c77c8
+DIST thunderbird-128.5.1esr-nb-NO.xpi 708559 BLAKE2B 
2a5931af73ea8179f1acc3a0f84ba157933afd35d74453d26ed9d58771f941196faf4d1e8b9a0d0ab580555af4a3d671380d4c8a24febef726a75621a6f1f7de
 SHA512 
162fbbfba540ca7509e86c724272f259a8473dbc3747984b52a4660cf29714401954d14fe491fca4fa5a5e38f17e81e7b83a35122f7dc6c4004d1479c9e95a3c
+DIST thunderbird-128.5.1esr-nl.xpi 751614 BLAKE2B 
29699da4dcf8b890d7c7d6b425870c3d868db19db212dd8954ed3514e4b210648fcaeada536f9781038b396f492d670da85747d34382befb43663e05f46fad5c
 SHA512 
6336c26f686cddf0d53a7f7baf2ecc1f48729c8d910e45e1d8c1b262e0e39c978f2503332f4c14465768e2ef170fef3c682230c4badf59787b3ee901e7a989d0
+DIST thunderbird-128.5.1esr-nn-NO.xpi 729656 BLAKE2B 
19d69640e6880b0bc961f0413541d72a922e5f10901ac334a84d5ab2972ac2c97eb4a3984eabfd0e1d848e63551f75a184c183b916abbfa8b522c5c596b30420
 SHA512 
c5b55240a735d1e18856d662cf879951731247239bcc86e47dbbc94b85a3db920584257f6a49b880d2598f16ba0e05ecf63d80c0702c7ea169927403e1df5937
+DIST thunderbird-128.5.1esr-pa-IN.xpi 688137 BLAKE2B 
1c7b53142113d527c34d64c1a511b73c22a793317bf2ebd81a72c080752597ea565a4cdecff4e5f9be60e894997ca94eca7310a3f381c55f0bfd5f215d29cc1a
 SHA512 
ed7372ccae0666e330c341700abb697486c8a0e0a054946452f798d679623f1fe7b2a83e3ecfa1c40420937eee22b5b49c24130fac2d822c83bd2ae88375b6f5
+DIST thunderbird-128.5.1esr-pl.xpi 770777 BLAKE2B 
65eb8fd550f5a091ace2f85812748b1ee86ebc846518aa36c7141ab03f45c525203e96ca9b5ab81be9e7037ce716d9059a430f9588a4e0c360106bcc81ec5a19
 SHA512 
7be207c39e0f4bace08ad90fde2dc499a22d5273c784e2496297528263fcb0e11094ed6de540538908b7f4b3c129eb267063c0e76e01af4708090ec1c39f5867
+DIST thunderbird-128.5.1esr-pt-BR.xpi 758844 BLAKE2B 
88d79a4a9d9ae8d714f374b0aefaf9dc8d21967a9b15842708e49b67da14ce71a1130c0d90e41cc4720cb1d5f0836898daa3fdcdbd86a287fb03c74622d61e48
 SHA512 
685ac0f22ca9341d4530141264ae225853a7542d7f1576575ee675cd507c691c2e24cc0a1cff0a868404f31b4b97f69f062df147096af0c7b1d261e39f87447e
+DIST thunderbird-128.5.1esr-pt-PT.xpi 752023 BLAKE2B 
3dbcbf4570fef237498889a551f58c9b500c5b84bd9b0abd1f3afd4b26540634ee5e6588923261e32c2152cc616ef5158a93ad1cc5e01e0a2076d0804b37a422
 SHA512 
e37a72c46b4d9549bb1f491729716694261484504c445baa3183a3ec33fc6511471b05f080575a3c2ebeefbb982749c16bd935eb1df5fa41d09e4dd822120fef
+DIST thunderbird-128.5.1esr-rm.xpi 754443 BLAKE2B 
4aace4ae4177892653452281a9f115d344f261dd101721ee817133d1604cc780fc733bca1478d1fd15af4dad82465a8f4c2df4b51e0ee2bf146bf91c73a80a8e
 SHA512 
02646f213b51661fbceff73c713adb9a204d93a8ea492af994b50b2ec8d043bce06a98efbc0ef0efec98d2543ac11a8c6d18871d5c0839cf2adab39328eef37c
+DIST thunderbird-128.5.1esr-ro.xpi 670227 BLAKE2B 
b057edb4d9b04621c9dc375756cdde0cefc2cedfb372120429b13177975fc008fcec5b1bfbb8552150d09f44704fa09f963bbba8dc82a67852f460c3a69860d6
 SHA512 
834a5352e95f91332fd0e0fc16fba71266f0f8ba4aff2b0925f6f5da47951317ec6b4a5858a9745329ab63049fb8b386313d94086cf5d8af20a1fdff2262d5b1
+DIST thunderbird-128.5.1esr-ru.xpi 880795 BLAKE2B 
94cb72fa18a0235feb3763643b7714c13769841b9d0691e8e7d34b30031846f902e5c5a7efb91c8ed3a8ff4e790d90d7fffc06285dadfd68d460f3d8121d0277
 SHA512 
fd0656c33ae145a870490407e0394d2c5acc080727443f00414765f89e5a0609c0781eb71050d8415e951561461c1bc4e534836532c7bdea8c54e6aefb46d3f6
+DIST thunderbird-128.5.1esr-sk.xpi 792216 BLAKE2B 
3b5aaef538528533b03125f70886e22d554a1887f82af67926485ac4deb717f363dde03759b2dace05b0773cce09aa050ca1e4db3e67e5e3d6fe4960dfdb0e49
 SHA512 
8e09162f135b8211f21a360b9170a027b54d17fc2d173b5cd198de683303dcf023f068d8d45cdc3b4f1f16afaf83029065daf8389a6f88ea4135d7afaeb68790
+DIST thunderbird-128.5.1esr-sl.xpi 751648 BLAKE2B 
ebe45093cab74b46ccb5f24e362f60b89fa8dc69c03cec0fbc5014adcbf7a12e051026734ced73d4c2af67385342900a61ad5667442d35b132c587f636c1510e
 SHA512 
f75425a0069c3ab47b58076b09efaecc7dd1b8ec39cde2d680aec67c565202d91dc7cccdd9cf39d9dfcb5c58cdfc36aab8019c6aebdd22b8a3b0345a6b11c5be
+DIST thunderbird-128.5.1esr-sq.xpi 774995 BLAKE2B 
db469d0299a787461affbf213aaecd9360193af60dfb38f1ba8dbf114992b51f9a6ffe8deebe0307320e449641ef978cd71b748f69e5940fe1e39cf4891cafbc
 SHA512 
ff6ca769df3c2b73dd0676917e4d3913823804f22cca68d1974dfde73c91c19b9f7f9c73bf0141a3b1b5eccf361966267b85ffa4e5681d68dd654922e0b4ca0a
+DIST thunderbird-128.5.1esr-sr.xpi 771752 BLAKE2B 
02e08e5fba69a7d78625fc44b335d47c509f09bc54531a2937ca8b7e62628eae03c02e7402bf35108144bd95f90d2c5b16fb6a3d4e3c8e073bb3d65976c57072
 SHA512 
bd0ad23fe3d6f586689b677706eda8244ec6a89922fa756829c80a0e0114ff2ea35693344e8cbde76bee43d485b1e8db5296db28be7232fd39250fcd2850ff2e
+DIST thunderbird-128.5.1esr-sv-SE.xpi 754938 BLAKE2B 
9449273e387c510f6005e23a7bbda11706b4f8e5587ea1027739e7e6f8f3e1f8ee7514ffd818f310a62ab6da5db78e4cfccd81bf02a7ee5cb1ba1be7eca4d145
 SHA512 
b8752f1f76197a60e03bedce4c5e6b4d2121311e8b24faea8c667636f1d1d74a7aba536a430ca63d6e057ce00e39afb1a74a80509ebb249a44c40c3401bb2728
+DIST thunderbird-128.5.1esr-th.xpi 819690 BLAKE2B 
1992c458ce17adb627f47662e30fdb12f30ab8bc1005f436c4db635ceac25d02097e96c5f9b05bd0f6acdbfec6cc4a88534305f9c00fa547683ee47ac1185d96
 SHA512 
c6778ae4a5fbbeadf1e8d727bda3824a6430a588cf2c44cd920806f57d1f7578a854c609ded93a17f57b78cad10ff33c51bd0c152ef1080e6a4bd0169817e6e8
+DIST thunderbird-128.5.1esr-tr.xpi 765548 BLAKE2B 
e69eeaebc32e230d0a92814e2f6dfaf01389f7cc33fad129ced6ce7ac270028cdf7b4a0c22d3bcf1d289fa4260d8684da6d1d5b566eaee46b691c85b321e4b46
 SHA512 
e77a92ab670e56b51aadfa9e7b9d7bf3ef88e7c3d44f2e996d6406104c5114302a64b0277ad12f468df83d66560542878e7ed98204641cdd75e7f92e7c4f90d6
+DIST thunderbird-128.5.1esr-uk.xpi 871375 BLAKE2B 
6f0cf1220428325a5a730177f96d3a04fbf35bdab12ef49a6b8e34441de60616239524388ed1c7e47f33374747e4fa092ec75a75e87655e7ac10df574a822246
 SHA512 
3db374871fd3f7698aaa010302ab676c7ae1c6e4bd2094e3087515a7a9aa5d022af43fd8a372cdbeca62a36468e20e1d35f052640af740673c5de985faf885d3
+DIST thunderbird-128.5.1esr-uz.xpi 592618 BLAKE2B 
baf82bc6ba47555338be08475adb0588c4934e754f1389ba5a1cabe2f3dee9db822dba79475bca94d84685e3f7af6a6ed9c69ee0daf8317dace8f846500e161f
 SHA512 
3ef76a1a7c135db4a7995d479739807ecf8bf5a1b77b6673fad5406cb1e903bb49c10c062939941c692e9f4b2c6fe4650ef17910651c81ccfa2d827282530a9a
+DIST thunderbird-128.5.1esr-vi.xpi 794032 BLAKE2B 
0ebbf0c3d3b55881d89d1b7caa5fada14833a90f88ccef71625b80d7aab368fb7b2a5b136ffe048ce9c8c969bd3948e05749fc8cdda70dce9f3a45f3d9fabde7
 SHA512 
3024bc7f56b5cfe26cb8297c1163165a7827e227a5ed5a72cb2de61e5cae868dce6f2674fc8c4c2128ecbade6f3aa513936b4ccbae4135c66934d0f46786e753
+DIST thunderbird-128.5.1esr-zh-CN.xpi 794060 BLAKE2B 
fa0f838e68ea27a51371ccdaab279bff130759e34e83581881f22d569139c02e1e8b36c18b809b93d4de827fe8f09648370642b53f734030a326ca6f0355d44c
 SHA512 
75cec7ad9ee4ea5752cd19111a23957e76052fb4cc97078557e495718afe64c98ad1de37dd83e77b523c66e780de85d3318130e62110171467167a754439c303
+DIST thunderbird-128.5.1esr-zh-TW.xpi 797334 BLAKE2B 
eb72fecbf3bff04d5c9daaead2a539fd540f6008e24f52b4c0b0ae0eb1115d4ed15bde3d801d5e40b1f92812780f6516015369814a9e4adbf93bc60a402dd018
 SHA512 
860d5328279195bd70dd91ee8f4bcd6ac8fdba413fbb2a4fcf6020955a53fe9452cbf6105e2b2583174d49b519bc9f3663e1400d77ed7e365f0ff6411486da2d
+DIST thunderbird-128.5.1esr.source.tar.xz 678670780 BLAKE2B 
8f91be4b015f1258709c04deba847e958716888d0d6cbb7b57ffc4528076cb2c9553e3efd3b4423046a433a486daa96b00768390ea0fa2547ff47ed4898da919
 SHA512 
1dfa0752a1dbfc4d7516beab13e188aa40c145f2eb0554441ecc4dff739cc862c15fdfdd8c0cc026d010ba3caa57d6168da35e484c04989fb6c81f5c09215831

diff --git a/mail-client/thunderbird/thunderbird-128.5.1.ebuild 
b/mail-client/thunderbird/thunderbird-128.5.1.ebuild
new file mode 100644
index 000000000000..9c6ef65e5cba
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-128.5.1.ebuild
@@ -0,0 +1,1163 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-128esr-patches-06.tar.xz"
+
+LLVM_COMPAT=( 17 18 19 )
+
+PYTHON_COMPAT=( python3_{10..12} )
+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=yes
+
+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 flag-o-matic gnome2-utils linux-info 
llvm-r1 multiprocessing \
+       optfeature pax-utils python-any-r1 rust toolchain-funcs virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+IUSE="+clang +dbus debug eme-free hardened hwaccel jack libproxy lto 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+=" +rust-extensions +system-librnp"
+
+REQUIRED_USE="|| ( X wayland )
+       debug? ( !system-av1 )
+       pgo? ( lto )
+       rust-extensions? ( dbus )
+       wayland? ( dbus )
+       wifi? ( dbus )"
+
+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 '
+               sys-devel/clang:${LLVM_SLOT}
+               sys-devel/llvm:${LLVM_SLOT}
+               clang? (
+                       sys-devel/lld:${LLVM_SLOT}
+                       pgo? ( 
sys-libs/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.101
+       >=dev-libs/nspr-4.35
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-libs/zlib
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/pango
+       x11-libs/pixman
+       dbus? ( sys-apps/dbus )
+       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-74.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.35: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]
+                       )
+                       sys-apps/dbus
+               )
+       )
+       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 "sys-devel/clang:${LLVM_SLOT}" ; then
+               einfo "sys-devel/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 "sys-devel/lld:${LLVM_SLOT}" ; then
+                       einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       if use pgo ; then
+               if ! has_version -b 
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+                       einfo 
"=sys-libs/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
+               if use pgo ; then
+                       if ! has usersandbox $FEATURES ; then
+                               die "You must enable usersandbox as X server 
can not run as root!"
+                       fi
+               fi
+
+               # 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="6800M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+       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="6800M"
+               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#917599
+       if has_version ">=dev-libs/icu-74.1" && use system-icu ; then
+               eapply 
"${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch
+       fi
+       rm -v "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch || 
die
+
+       # 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"
+
+       # 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 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"
+
+       # Make ICU respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/intl/icu_sources_data.py || die "Failed sedding 
multiprocessing.cpu_count"
+
+       # Respect MAKEOPTS all around (maybe some find+sed is better)
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/python/mozbuild/mozbuild/base.py || die "Failed sedding 
multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/libwebrtc/build/toolchain/get_cpu_count.py 
|| die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               
"${S}"/third_party/libwebrtc/build/toolchain/get_concurrent_links.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 -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/python/mozbuild/mozbuild/code_analysis/mach_commands.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-gpsd \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-release \
+               --enable-system-ffi \
+               --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-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 '' --update-channel=${update_channel}
+
+       if ! use x86 ; 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 ppc64 || use riscv; then
+               mozconfig_add_options_ac '' --disable-sandbox
+       else
+               mozconfig_add_options_ac '' --enable-sandbox
+       fi
+
+       # Enable JIT on riscv64 explicitly, since it's not activated 
automatically via "known arches" list.
+       # Update 128.1.0: Disable jit on riscv (this line can be blanked to 
disable by default),
+       # bgo#937867.
+       use riscv && mozconfig_add_options_ac 'Disable JIT for RISC-V 64' 
--disable-jit
+
+       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_enable rust-extensions thunderbird-rust
+
+       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-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 dbus
+       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 ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on 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 sys-devel/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
+
+       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