commit:     0d832b198ca3a5728b51a27ba48a9decf70e2ba4
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 10:02:00 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 10:02:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d832b19

mail-client/thunderbird: add 128.5.0

 - default back to +clang since all issues related to that have mostly been
   solved by slotted rust,
 - sync all relevant changes from firefox-esr to thunderbird (rust, lto, pgo),
 - update .desktop file name to be thunderbird-esr.

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

 mail-client/thunderbird/Manifest                   |   66 ++
 mail-client/thunderbird/thunderbird-128.5.0.ebuild | 1163 ++++++++++++++++++++
 2 files changed, 1229 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 5914c2c8bad6..f68aeecc609e 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -1,4 +1,5 @@
 DIST firefox-128esr-patches-05.tar.xz 16868 BLAKE2B 
4a170f0badd9bb3b0411005e6916002b54f1f66e2088d316cb8532f53b3b1ba33ae02d32bf0b7c7605bd65f098cf5d4651d9f8b59a4023e562fa0ac15f93f242
 SHA512 
7847cad2ba3bde5ec17fdc404c1c872b3e4ad9658895de9fdee12e20ff9d27cae2ff56a7e1142c6a727cee49420fe6f3550c9b999ef94bf6f07562f5489c89ff
+DIST firefox-128esr-patches-06.tar.xz 17168 BLAKE2B 
fc0a72af6a87519a86e44862a9c3d142cac600c9150b5bc4168cbc6de30beb0dde2a5985d74b51c9b977ee5272786c5a98804fb6d16968c4f517b28deae00fe1
 SHA512 
04c28f6f97a596e811e986bcbe9f5dd5045c24e7eb4b9bef6180d46948a9f3b978f44bb0b161a25f6217e9c0a18d88726b82737a72b711b90876da26d947a256
 DIST thunderbird-128.4.2esr-af.xpi 530350 BLAKE2B 
7fdd80b97f6f1895e6982f7bc4372378e7d3cfa0f23c6177a633d45f2fbc0cd7dcbe5b4e5808ac6d86d97b23129a36540f09679be90f8f100e0fcbb7194b5844
 SHA512 
4f09e6fbea7d3bf16ad347f61d625b185de3f9db79cbd3b9a76998b39496cb20e4ce5d637f43c2a16dcc7589d70e07ff71ff7dfd65a617fc2530c4f6c0ffd562
 DIST thunderbird-128.4.2esr-ar.xpi 686480 BLAKE2B 
d399a821141cebea5f105b3704276865c33af8bde734b6a3d41555cd0c8bc1c7c2202c02076d7ee0d9a8e3dfa1d04a6bf638e53633f69cbe0c9692229ec1cc2a
 SHA512 
be07ae8e01ced8974d955d7e25719a4eb577bd4d0bc0160754c3aee23b35d56c878909f29827ec3688f399b5d0b972a6c97b53bd11e689406192ee675b73bf65
 DIST thunderbird-128.4.2esr-ast.xpi 561055 BLAKE2B 
699e7fd2d8c774ab34898146e552771feb9863b6e89443dcf73c0f4173611210feaa18becfa274af5706e781dacfd1e44409866aa04c62ff43df4db9f9c35d52
 SHA512 
949996352b4432ccd64c43cd5bf03b4a618dbe2e82d3ececdff053bf83fdaf7fbc2d28be2c42283ea29a19dd0e458b3e045a9d88e71ebf66e0cf30eff83ff55f
@@ -194,3 +195,68 @@ DIST thunderbird-128.4.4esr-vi.xpi 790930 BLAKE2B 
4dfe68aec8a41ffb4baa48cbc27aaf
 DIST thunderbird-128.4.4esr-zh-CN.xpi 790746 BLAKE2B 
a9190edb5c4be0afbba068791559bb9b1b3699f29dc770120c7e9e7b8672bacd7595c53790af7a7b4c042df01f84ee58996a4c50ae8e434eeb6b152329a8edde
 SHA512 
ccdfc3016201d3bd89f6970e22003ff9253ceda879be068d42bf43322148fabc125ffa1c9368715f0405c9c06a7259fc81029b21551547e6d5e804babcb86a0c
 DIST thunderbird-128.4.4esr-zh-TW.xpi 794100 BLAKE2B 
9266ac41e404554f1268887a00b146c6df1e1d9715913c0f25b1ab4761ed57517871bb71f8a14d4dbf8489844cee01300afbd59af6c0f0326087b41431415aa2
 SHA512 
310a77fd1ef840fbd995821cb615194bc0776505d5aa53f9a691481a85ef32d6cc4498aab4c1a9b70f0229376a64699bc2f6dec873985156465d64298b0248ea
 DIST thunderbird-128.4.4esr.source.tar.xz 677533120 BLAKE2B 
73a54041068d2e2e824f64a34754345c2c020e63ea2c2767049d119580cdd0c3d587c7e841e2845f4220a7a4721158e51a67cd679d020a10bb2313d5249607fb
 SHA512 
1affd4049fd014116a5a3f5693f38245a21adef498213d72c1d0d98ec9ead152448f5ec089b2a5e91d19c41a90857f8c134ae30a62a44dd68c680a1ddc6b111a
+DIST thunderbird-128.5.0esr-af.xpi 530351 BLAKE2B 
9acc5f6ff8550ea7e8ec4b66eb2d8b1fa5e03a6b1d57284ccc660f0b644ae57b100810a5323a7095e8cb715f7a2658cb6b699bfb78fc0277c0c34b4e547a710d
 SHA512 
53dc9a9acf7eb2690f4c87f9845cdca3ffea5ba0e7fb4322048fd28a819d6dc7aa22be8eb7f2da069535e9c44873f3141176195e86c03ca2673ea886f53ed9a7
+DIST thunderbird-128.5.0esr-ar.xpi 686986 BLAKE2B 
0bcff3b9818f9fda817411e6dfd991bc1e7cabf51e0796c83cf2b56855f26954089fff42ef9eb9435e88f01ab75295b0e49c03b3c7cff10bf1ec634d5108de31
 SHA512 
495b539e3458da7e643d210d6d4171bd9b2eacf1aa1ea7a65a7ce3b9edee503e71f5955bb44d0721b75e9ef54f87ca72375820d19542912f147dec75fd313094
+DIST thunderbird-128.5.0esr-ast.xpi 561056 BLAKE2B 
fb337bc98db615a407b23ba82cdf72413fbb4267c40791fa15e0e3742fedb44730ab93c7b69cba76c8fdbe0b4217fd7a7f88b54f0d5b7591d2b548ece9b15c78
 SHA512 
b9795142448137f46823d6468a31bc2c8527657bb8ab51eeacdb87d4edb9d24795fa5e4c6b0de3c46c21284399f9abe05271900f019317af937cec1addeeeb64
+DIST thunderbird-128.5.0esr-be.xpi 772992 BLAKE2B 
712aa5e3b6b90ce3951fc44405485f077f14b65981f8794a3af50a683057a356e5f8bf1f160b877b6fde46172f58dff66609147a6af541cc7306c71ca9596db8
 SHA512 
65c3bd401c119c4bf5f64ac70ea836301a732968c095de0a34646546a1f02efe32a88f37f0882459086165517b1ad485c7baf478cfc8f5bb697fe98f33dab640
+DIST thunderbird-128.5.0esr-bg.xpi 812325 BLAKE2B 
5bb9ece3032c650665b5459690e2f4971451dd91f567e0fad7befd223980d50a8dbe04105e110bebdc1d7e8d56dfd17e87ed70a6759e87ab89b6ce4fd732c5ee
 SHA512 
124d1bbfce7eb2e9f7f940b40a8111a7458e1a3a62a550f99380c8e9de0546d6e9a6b6336bca30f54add6acf2b6819fcb2850a1979cdae6df41ae4410f401b29
+DIST thunderbird-128.5.0esr-br.xpi 655128 BLAKE2B 
d02bcc8259032269a0c07dec22e0d53468e888ab3f9157b76b24d1ecbd15377138cb3e9f7db240b38ca62b67aa08fa734f780634f26089597b54fcf8293384b3
 SHA512 
83484a9094e3a996e13fabcc1fa440fb1c4b0ea9adc129fbf099a2495a1d2fb4a3e21e54dadab30b786b9a975cf99fe3b53468cdaab0251c69d3826c699a1ef9
+DIST thunderbird-128.5.0esr-ca.xpi 711079 BLAKE2B 
fc175acd0a21f22f9170b869d972537c26f24796b66ef95de4b364eb3018b2320bcba3009c7a05eb20e1975c806b940c42c5cb877959eb9dc2bef016c145eb24
 SHA512 
d9d614b0d75bc0531cbb0739fbcaaadc26ec97853bf584d07ceaaa29d77678838f43702ea62878f8d146c17cb5ff020cccb3a5b4ac6c5074fc790ea9cedaf865
+DIST thunderbird-128.5.0esr-cak.xpi 672198 BLAKE2B 
3a8638ab7eb2fdb04472a266b942896badf27a2a764af83a2e31305a3a4021816df00eb3d976fe3997a9ee6b5fb0752a8576ef5b83db4e28ac1a6efcdc595d1e
 SHA512 
4c9c343466631f29f1f1c32eaca6bcbc7eadac32b633387d5918bd9644fd0d82449c73814c254fe6ee3d935684f9b14312676da2b4c051eb2bf5e57a3fd7342c
+DIST thunderbird-128.5.0esr-cs.xpi 791610 BLAKE2B 
1935e0bfe24c2f9bd993d619a49b2b10df48a0f7d83787b2473369eaa7180f59653cd6e38a908b6bb75bd6137f5e2db85c88824a9140883a5548411723ab5507
 SHA512 
897877870dad29513c0efe962dd55eadc9535d61d610586bf9c43e8772fa03575a141ac9653d302f3e371319362831dbc9206673515547659b939908b73bf187
+DIST thunderbird-128.5.0esr-cy.xpi 756816 BLAKE2B 
79033eb79c2f2d1a06d9f9faa502fb083c25663cbc312284bf44a12c925c0c9706b9608b0be00a6dccc70a3bb85256d3c93a1442cd9fb0aa5a28de1f750c4998
 SHA512 
02229021b3360fe10e661a83c4ad015881c577907ff8f7422720edefed229b6fe03a1ee20df2a824a79877321167c28b973100d02abaa04bd6de252c64a2137e
+DIST thunderbird-128.5.0esr-da.xpi 740058 BLAKE2B 
a27b3fe97e4cd511cc2a546d40bec3226fa00c86c29e57b2f311dbcd17eb4623e9256e5d9c3971f5fd49f5d30890f843dfccff1bd2cda2bab366601ae0fd222c
 SHA512 
277f9afcaaacf9eb866fcd5dc05fe04a5a94200fb76d3ad1aa7a5b2322a963b41391998d8c4850e9947b99c80d200bbae5b9d32084e5d1bc6fee2267b61b41c2
+DIST thunderbird-128.5.0esr-de.xpi 772209 BLAKE2B 
185dd86b68a2da15ea86b911b2aebc6584167da476a3bd1fa9e959290f69f70e1654950a86c3336041108069b8eae3432dea39a9925499d49fa8326a8392e15a
 SHA512 
8d40e5fd0caec6431ea3efe087e5380b13e891544e5e262edb417787f88c4881ed920078fddf6ccb52d2602e355f48f4a04b277607534309952cc962a7da8687
+DIST thunderbird-128.5.0esr-dsb.xpi 790370 BLAKE2B 
7c4349a14f84a7be2c84c18b1ff9d1eea1916b64250ba4bb6f37b7491d9bb09d93b1bc19292b01add899cfbbd203253676ae3677aef68a0cd767e572fb0c9fd7
 SHA512 
d53e828a20e2de21980e497e5f1ae36eef5097bffc1ce4d62a62d6ac7463308e9ab65dbabc5905874c3ddf4f474a6e6836cf756d09ceeca0280aa52960e04329
+DIST thunderbird-128.5.0esr-el.xpi 895923 BLAKE2B 
0be00b93d4558f746a3fcd1f4d77756273987ba7a7a31d77ac55f56d46f81e3cb8eaaf7f2e685be44bd3f6833ebeb7c8d8a74fe3d5ef4e712a28e62fd5d66c06
 SHA512 
0c77cc86bec4f8b798db55daa4d8c426eab2f417200d74ca2c9d4061b689fce2d88f921e3f4896f4917e37f0dc5a3b53e9716eba437bdc088ff65e930645d108
+DIST thunderbird-128.5.0esr-en-CA.xpi 705215 BLAKE2B 
7f29282cb82886e1306251566ada7b43f23f39af60bf5328bb9760443962b3e4acce7f39a74961750414e9ea079d0f3c57c6f4783f6d4f685c0d08b138fff6c1
 SHA512 
5224060e611d899eb492b55958d436e7d5e7930d967519e2dbf80a7c0c6f7b6fc4ba6e1c53ac0156e8fcb86e0f37af38a0a1a6bb48a106cf36f8b3de1609db99
+DIST thunderbird-128.5.0esr-en-GB.xpi 709688 BLAKE2B 
464e2804800a3dc7b8268b402c9d255713f056db1d2d0ebb153c98d7faa5e28802f956fdce576335a9b472ce76f9fe96128f76b7c4d32f1a14fdd8ca1bc3189d
 SHA512 
b680aa9cdc4d1179bc0b0da869043842c1abd9a696b05d24f76eea79373a66a2497046ff07c1f43373d71a28efd238a96fef463b1c4de7ae0b085bdfb31ad051
+DIST thunderbird-128.5.0esr-es-AR.xpi 765756 BLAKE2B 
7d274a6489a2616e2f1808536722817a11fe0048f4c93b5b6bc994a333f87db85a8666a6841c40adfdb5ed682bae7f67ae2f2b96787caf907e0382d2b3484392
 SHA512 
45635ca51aef8e514e1b34f31e7d85ff07a2b169f3bd29e329f093a68110e822dd05675626e5d961355cfec99b89dd3a7cc432fb2b1a90eaefa0cadee5ca116a
+DIST thunderbird-128.5.0esr-es-ES.xpi 733785 BLAKE2B 
23e75d0c77f24013c6a17337e1b73d3d9bf1d628632cd361b60acdd77242057a56c11ee50f2ffebc0806095a7fd886ef37e64d0afba150d4c540886e7416858d
 SHA512 
3fea33e325904ae5db375fca4b84bd7fd9bce2a9db9ffaa778d919e384a43424bdf1f0ff6fe1768f5413a7457a5db9eef6ae3e7c8ae878171a900cfa40c04c10
+DIST thunderbird-128.5.0esr-es-MX.xpi 749784 BLAKE2B 
b9b51d7c3d21fa009a65acaddf0c844a10524e99defd9387797ea2450e8a20ffe19f521207dfd42d71bb6d62e3a3c7a54157da9106aff88672997b2a80c86cef
 SHA512 
f41e4e374db535eaa8edf1a0ff67941690f58fba24186e07954f30393c7b3a5c24e18df71beb8b9af98393d9c1b0e6f161be59c2b37ae685a3f8ce0dd2781980
+DIST thunderbird-128.5.0esr-et.xpi 696776 BLAKE2B 
6f41b573d2df2784e82c216a3f482698dcc59a667d4508e4cee3ba371626e1bcd924acc784bf609a2f85b18bc5d312e90df178d004901e0e3b3c7f8288ab2011
 SHA512 
cef57f9e3f16a09a973aabadd73181ca0661366ccc951ec68b081ec477643aecfa2ed4801d569860c4c30ac7b837ea07cc077df5ef29336734be5b71376fc1d9
+DIST thunderbird-128.5.0esr-eu.xpi 740306 BLAKE2B 
ca209367087e3c4891532fda772c6c8e431b57e33d8aebcef26e36498d45221677fc7276351538e3739a17dc3df63a05e0f322918288c097c67e5c1a9c9c8e96
 SHA512 
d612f6d922c18b276b0d7204a367563880fe410eec911edc9ca885c941ee503eb9734d16211f45041ece597dbfb9ea275ce4d726f81566a46f37221c090cd938
+DIST thunderbird-128.5.0esr-fi.xpi 738932 BLAKE2B 
6f8cd071a845f81f3ebeecd57bf163b66f5e559ac585d99f763f836313b7de869d099ada483039f8e120dd43b68b198864142b91695f74ecfa03f4a3215ac3ce
 SHA512 
de3857547e7ad9261ab7f292395c998db6dfbc163d82073ae8fda9f49bb29646a53cbbb9bafe30edfec1e592fd55a900c42b762b12cc46815bcef5df576cd0aa
+DIST thunderbird-128.5.0esr-fr.xpi 777366 BLAKE2B 
7abfac7d9284a319001ba8f52e5ab9bae1bbf7ff390eadbfc724a4039318f51ea521f6413fd8d6dd0efea59df5c2a48447fae5abe45f757172dbf0767563311a
 SHA512 
78e92d88a9f858af5b99dcf312b6e8d08ea058ff731d3ca54a5ac08dd5e7e475899324f1c2a4d047ebe447721c16757c650f6c67755aa434ec4651a85d889262
+DIST thunderbird-128.5.0esr-fy-NL.xpi 759930 BLAKE2B 
6679249ab2f4583404d11ede703d5326324773177bfcbd8824756a77f50b253c237bbf94e6cfb987b1bd97873ea0d9aad19cb3bcb69788f59b511e862372eb59
 SHA512 
e5666cddff99b559da7239de8571ac9f5b8f145c3d890b3bec7a673ca30312cb89a27c7684f4e14fec0b6bff6872bb169576892f21364de08f58de2f3f29f027
+DIST thunderbird-128.5.0esr-ga-IE.xpi 616370 BLAKE2B 
93d0aa8873eeeb2370519ab65f262e1403c7ab6ac10091070b6143b2e1c6ecd3e24d651868a78d996887b083e36370caca9832d87818db3ab7e8051e63fdb7e9
 SHA512 
52ee03469b4cad6b2e610cb10f8b648a3e072a414360dad9b22101b0098313031e5e346bdc4e3a8a1736f356fe5288be939cd1d12ead8217cd535b21f72be899
+DIST thunderbird-128.5.0esr-gd.xpi 729140 BLAKE2B 
b734186fc9ac7e82cca224534ada1c39d5203d5f88d4a4b2e6649f67d995d506733b9506c93a27df58df124f29636841ee053d552862d0dc4c15df0fc858565e
 SHA512 
54f668f9a480b53b6909525e683589f95f8d4ba51a4d85bf70011d80ef4225605b3fba26b2c722b249c9efcbda519df155025be9ae7df9d73cc627d5eae535f7
+DIST thunderbird-128.5.0esr-gl.xpi 742178 BLAKE2B 
ba026bc4ca3d769c36a509da64eefae6adfc1bccd4dc28a861bde513a42f8e29f901230cbfc89d36ec67bcf0fa65092972c220e3c56d2c47e8a12370a4053273
 SHA512 
428757d7f1d326bb7db92d833a1a682a9353a6dbe22e1c7fad6b90769b0cdc515bded53c2c4ccdc2d17b3a8d36e0484e85782afdaecd49c9fe85ef63c8e09fd5
+DIST thunderbird-128.5.0esr-he.xpi 703449 BLAKE2B 
41d0e4317bddee2eea5b3265cbd1dc3ed4984efb54f650e5c32935e5f0601b324c2dbab7a4a68c6f2f50831d71e6db2bb6836a7bf12aebbb467dc2f5bc0b5c7b
 SHA512 
09eda7809f69292236a9e2bc8d270734af7f2ce8c922b5050c982c7dcaabaf46b6ae172a3eb7094298407741a34ffddd1ba52ea50e5a41bc7ea18c272f355a14
+DIST thunderbird-128.5.0esr-hr.xpi 720120 BLAKE2B 
7f55fe2d024664d72a727795ed442f06ae6ef3a1ac82b04b5520cd61af84988b4062cf35de9ff214bc9b215bf090db6e7b7647b07fc665b3b20b334b5ca64849
 SHA512 
1936d093e37fe1b4bfb94240f231b938674deca55cee33691531d9e11ba0892b1a8e4b687371eb5d9a9d1dcfb2f84bb5ca6e9bf2600e97243373be909fc8760b
+DIST thunderbird-128.5.0esr-hsb.xpi 787750 BLAKE2B 
0aadac53c786f42d706f3c5c8af9addaeb1a22cd707e9656996c4711179a85596caf95a1616cb9a7229bfc3f759b8283a02cf614b5a3b4865397d75bba2de10c
 SHA512 
e91fb57d82c42f0ba123464650f43f83ec43c4d18321fbe9200828b0f842f4743d8a7e1451ad85cf16cef0c581d9ebc620558a279db33dd3f0d6ba8630de9fef
+DIST thunderbird-128.5.0esr-hu.xpi 790232 BLAKE2B 
a62278a31d39f3253e4de51738ba3ea76c5984deec8217a21f916d0795a9dad02a66e206df845399c733dab7accb1bd6e10b8ce91796cf55f33ff33a72d8757e
 SHA512 
a2a790b3d325885159f025007d747a00d32c212a31b946783cfc89cd3f899a5ac9285d69f099ec1b3c449ab7b34506d9e664ed0d1732aad3a1911983cb244487
+DIST thunderbird-128.5.0esr-id.xpi 710328 BLAKE2B 
14eb7be38883b8bb8a1a755bad836140ed535615ed705b3d8eaf919389cc3558eef34607ad46eb6bf3c4c9e48193b21ea82fb9ed2b91060f8da85106478f21cf
 SHA512 
ffd20753ba6d3e588ff373a9d989169963634b69e5f45ab7fb8afe1222e2acc6e278fd85c9542fdfcc341e857f1fb8aa640d3b1df53096502c64a6ee5a94c539
+DIST thunderbird-128.5.0esr-is.xpi 751189 BLAKE2B 
34196fed2963f769ed594fb4f11530c432959844b1c99ad23810aa9053f6c0c0a3b7b51f2935132c877c4c167b71e7c012ce7349cca84303fde3a382eea7ace4
 SHA512 
b7c9e3b6e05bbf71b0220c60f6d3fc494aa0d912567057048fe30d7194ede7d8be7d10e015a307c1e90f68070674a8be21bf0be5ef05e008bd9f4bbb8fe509b4
+DIST thunderbird-128.5.0esr-it.xpi 697097 BLAKE2B 
e391d713ebcc6351c23d58aa638cbf2654640e7568645d010cf6984b3ec518219337f8ae460a2e8b42ae9c675248015e6e56c7603ffb01bf561fab9681f1dae9
 SHA512 
1455f0c7525f5bf73ef6f23aa6cc79f010356017b617e878443477a6903531423610540c913e66922cb91c43d4d54c83d65bdba2a7dfa58fb8bfea77b95bc39d
+DIST thunderbird-128.5.0esr-ja.xpi 817724 BLAKE2B 
e46cead3eddf054093641f2fb36d1237966491403c044d7c1c770510fe3befe12b80860c262f436db4c9571e68b09712751723a8ef92ad0cc1f29d00910619ec
 SHA512 
95e35bcf147188072b02cf8728d611efb84c0b64e10f5e3bc04040be6ebf8df471cf237615fc38c68de8149f03c56802bd3c1fe4f6da238f3b4c875e2e741ffd
+DIST thunderbird-128.5.0esr-ka.xpi 796715 BLAKE2B 
d9f31df4dc2e741ecf9c8415a49f67ad31a17155dd65e02fcd40b6da5ebaf083d91c34bf83769f8dd322fdb7260358e934b8a78fc24aa0b015e37238c9de0b3c
 SHA512 
90b87fcbf08449102130df7e39e8c6cdedf5009f0af221f98aeda87ec3748e1e90c972c111f4188cdc77bcac99291a245bd718765604fb11afbb182bb36a84e2
+DIST thunderbird-128.5.0esr-kab.xpi 735477 BLAKE2B 
21f3513331db2d486853e7e2855d1ecf92defbe387e3f5af196643907bc3a9126abbe50d72975fee8efd665911fb14e39a6a5fcf62a4224acb8d49af115bd75d
 SHA512 
48160ddf97c9524de221474f5ebdac2a90d1fbb3b6f599e45bfeca192b89f65ac907ca33999f23abbf3cf4a4b7720c67d0e5743c73cc8048ee20055cd7c81fc3
+DIST thunderbird-128.5.0esr-kk.xpi 865514 BLAKE2B 
91200efb052caabd1487185553de69b6018ce2742a6c703333188cbab49df0bf4487f8f26d68810f4b5ef0ed6a64dc6d01cd962d9af345d468094a6639c38f27
 SHA512 
34e959175eb5863cc90c58c5a003b600844bf0acb590ba5af317a4069b7395a36dd45a7bfcd30f5e7c823c58340974a6094aae24efce818e90f2af40a75bffc2
+DIST thunderbird-128.5.0esr-ko.xpi 762643 BLAKE2B 
be9bc064944399f977766cb304dec46411ac945b03d37121711dd318ceabd6c939792171ff437eb44888b9f7764b662b4d8a97a12d33defb1bd83412c9e55fdf
 SHA512 
41715c1959e4f6e922f42ea4e41bac6acae6f9e293fd6c1e3fb9274e2b2d821a9a177533727d33544f1b63f5e4f9a20d3dc49dacdf63cd9f7ed4e863c5f33af6
+DIST thunderbird-128.5.0esr-lt.xpi 701412 BLAKE2B 
6333eb7793aea6418f22266375f564291e3d97f9a9426567acf137213c4593945baf91799fff3616de31d21a51fe584934a08eb429f9163c8c8da2c45b1d509d
 SHA512 
b30bd733412c85efbaa78e3a8a380e0379bb6060ff36a9fc6d02ee8cd4005eabe4351b97e5742626185c4bf22fc901a18ae6a41b3d7986bf3c2b08bf006d3702
+DIST thunderbird-128.5.0esr-lv.xpi 625982 BLAKE2B 
6c9c66ab777a196952b52a6925c5a41706c36083d69eba1d8795f910da5e782d729dab909e4dd8063846c5322106837b2b92d0cf474453edec8118cabd99082d
 SHA512 
c42f8342384f4d3521a6f2bf352c6fd7e33f9efb5713365be9144f3ffe3452c95fd2861735ab2b0b7c7175f2799dd47433f91dc1ec10bc9241b9ee88e6425413
+DIST thunderbird-128.5.0esr-ms.xpi 581576 BLAKE2B 
87e439d4c3ed3bb158aa40efa5bf9f65d62d6cffaa1b70fe9793d5e954270368ce115df6a7917c07240744a5da13c318c9d285b1016f9c9eb2d2e3b536c3e168
 SHA512 
6429586e01f65cda33b316465c67f47b6620409171068bee6c20e478bff571c3e84fd0e64b2dd70bfb853a4c0de25a98da76f5c8e0581d3c42f5827b79c9f9b5
+DIST thunderbird-128.5.0esr-nb-NO.xpi 708562 BLAKE2B 
db83a3937ccdf9892acaacfe43eeed431bd9a9caa18b67548e51dc6d9bff070a62b854f0f6cecd95cda463e4112f8827a12e65705614d001db81e878dee963bb
 SHA512 
1ba398a72982bcbc26fbed402b4c13828ca21a5c439014489ebd22858c0b03b5a5d9a9134bbfde3657fb7b618f60a4ff71919d9e41dfe20b1ba43bccd1173f47
+DIST thunderbird-128.5.0esr-nl.xpi 751614 BLAKE2B 
8fd5974d028c305f572fd0d59abbb383039ba90e972830dc7199aa9fd752f26ced405187e511f6e76c1e20273c309fcc54395c407cb3b002c233d71032858b34
 SHA512 
0e320d39ff82d13c21cc99743ef8fa44fa3d809a287adc5e928f27d63873dba239ca0b9c734d8b1b4d13f43ba7db52dcf6f5f752974997232ba9bcc63f9c1ae1
+DIST thunderbird-128.5.0esr-nn-NO.xpi 729658 BLAKE2B 
ca264e70b4192dd923d4293cecf1cb40d41da9d682041ba8e9b9f4b1a4c14b34b15eebe07f764ed4ba95d49d9b6e50b11cb41a2911a795efe0f5667497801b00
 SHA512 
83261113c60145cb67583b9760d2aa639e639dce889fa64a5d39d686c4f58b53389b68a29f7b0c13a8e1eadc5f335cdfceaaf7ed69e6956a4b7960c6026f104f
+DIST thunderbird-128.5.0esr-pa-IN.xpi 688140 BLAKE2B 
fb4064ccc8959136bb34760e5ac59fc65ca01a402bcca7de082be4c2323da0fa590532fd8ae1bed576939882425b6bf0717a08572055d5b3cc876c65aacbb5a2
 SHA512 
023421c6a2e57f2a5f32416ac174bda5210e8c2c7ff681f3d5cb29cab5498d2a3929efe7969f2c6f71daed22b689b758d3e3bb1b5ea56656fdc3c10dc6ec5f77
+DIST thunderbird-128.5.0esr-pl.xpi 770781 BLAKE2B 
2e7e1307d1f9cb85ad48bf551517aa61e216a2f1306bee1810b0d2cae62c9dee9518e7c25ce6813572d162e81f3d3770e06e1cff775402a0324066d327e3888e
 SHA512 
872381484d4ac166080022af38d1a33d97966215607a64cd4f2df88b8357eae961a9d1e2ddd71ef78dd90dab5d35523aac65a9ea5cacf6e2fc05074f17f5d28a
+DIST thunderbird-128.5.0esr-pt-BR.xpi 758847 BLAKE2B 
06cadbe89004117ea21ec5eb5042491f6204755a904b6bdee507058c149d826a38a7b4bdfd7e8539164eb8a0e297deae75d4f7f04e1153c8a0b641b9076efbcb
 SHA512 
09c5fe1b13ebbcdf01c6166fc8fd387d233eb7c2b64dc4fda6db0a6849093d8482615483f2eee0544e8c1db2e22319616eac9b600d77987447952ba8ac0e78ab
+DIST thunderbird-128.5.0esr-pt-PT.xpi 752026 BLAKE2B 
67498c3a84b797ed6347f26290c79efaad9caa650fb2019b7b301d199eb7c509843695dd91effaf7b77c6829bfee2ad8bd5b417e2bc1fd5ba019a41a37a5b31f
 SHA512 
3d6ae68ab6746adc9c5c20c522ce515bfbae47d1e4678b7e69a0f367a492e07221ac7e3ce889e62bb499cc71cbdb976f8e6f59a73f442fb2c35abcbdbea493de
+DIST thunderbird-128.5.0esr-rm.xpi 754446 BLAKE2B 
ef5c4e987d3b278088fc267dfacfac0523fed60e8a4c657306da071eee79d15bf1e9fe10bd7ddb0dc9e245f2809f6ac148b2d10032159950fcf6cf7fcb59ad9e
 SHA512 
9b848d3185d91fe59c3e3fba4f438ce8e417199a0118e8c6144f670aa86080777d2917267c37137a0807255d88838a419ab6798719d9bda71a45d198210d26b6
+DIST thunderbird-128.5.0esr-ro.xpi 670228 BLAKE2B 
2af2cae7ef0f095c8250bb918e87863b9d6e4df0a1ce8e85f7e34a2e729f19106159fe633a72a5911dbfd52aeadc5ca4d5c272ded9685cdf0f02de838d3346c3
 SHA512 
7c1a69b5bb81e46f31e0edfa947367211a70f518a98890ecce86509cb19689cdd3af8e9c9fa356c0577ad34340608f2aca08fbb66507aef6453e205363962f9f
+DIST thunderbird-128.5.0esr-ru.xpi 880798 BLAKE2B 
56cc9968bd14d7b9b8d909912ac3895d9d146c4a8b35b53616c402f53dcddeedd41607b31a16a39e8a21b0fba22f4afc9492bb6d3bba974327c9048ad4f24aa0
 SHA512 
87d4899ac1b6ebf4b78f0583920e6038cc639263409d173cd8cddb7f0fee2f0a5ac33fcb02197b81eecf4b19f8c9e287f23008771fe283c3f2e59bf5bfa890d9
+DIST thunderbird-128.5.0esr-sk.xpi 792221 BLAKE2B 
9378ed3b730397aa29678230d6aa188718173125d1170aa894e16c302c37df96c5c4e7d655c48cd4008308284ce7b071cb922b4421d97bf3ead0900b1c00e6e6
 SHA512 
c4587bd9484047cff5434052fc4e168b86b68f51bfe926b49fc6008ce21531cf6dfef0f4315c58e5e3757c5f651f4b95c385403cc6cfdd3655e3842b477133d6
+DIST thunderbird-128.5.0esr-sl.xpi 751650 BLAKE2B 
39085ba3f54b3228b21f2cbe73b0f98d204045375f815624ebc0c3f366ec1d02b69f0bd80a18feeecf43686b648f443ae51c069f6e5be3287b9b9dcb6ee47d5a
 SHA512 
ede871661fc6ab45c9fe99a58878386fd183137760bd820d2df5189219a5fe1bdddaafb9c60a794cf6af617d78f0bdfd80629546dded280f54f1f80a15cbc9f6
+DIST thunderbird-128.5.0esr-sq.xpi 774998 BLAKE2B 
f224d82e8380670bf08ad5a91e5b767105460fad824d9bef844cf06797ec37c188f78db58f7bdf21417a44b06bdc6fca9a351a4d345eef3ad23347e72f51365d
 SHA512 
ca1ecc11733d655f1f70abb396ebb721c8d3e2163c6408ffd4007c0b163c33d758c92db66f5957032445c9242c295f36f0af26abef6c49d9159a309c7ee45131
+DIST thunderbird-128.5.0esr-sr.xpi 771753 BLAKE2B 
4b8abbf773465662da651782abaec4610d4cf13ec222bbdbe695437096e0aaf2150985fb3195b0e586b17c1e4453b3fcbfceb6fb31b20c67ee1ead7e40ca5f39
 SHA512 
205595572298fe1b802fd46b9d1cfefdb2d28db31fa71bdc715ffde01bc8956489c1237f5f3512d963d043298556bc4aeb72528edc5b434126e1ccee72a0fc84
+DIST thunderbird-128.5.0esr-sv-SE.xpi 754940 BLAKE2B 
315d0d89444fa5c0757002bb77e2bf0d2ce063c7a67924b331202675248013f71401931dc837e0b3127d5d1cb3c9e3c63b9f5bbfeba9ea77abd32bbf710ecad2
 SHA512 
eb0d42e82d48127c2e4ff03cad6b54440bfc3106487406daf3ce6568d4884d065393703f2ebf7469dbe08bf20fd913b685dcb54f49fd053628cba2888361e6ea
+DIST thunderbird-128.5.0esr-th.xpi 819693 BLAKE2B 
14b200b2d2a47e8659db606adf127424d4f2ecadb80f9616e51ef195869fed683673c364a94d61e8c5d9af3bed35bbc1cb738edcb88bc12575d7a7ece57868dc
 SHA512 
ce16cb2f8b3f23ed4fbf8732e21d608bb78af4c7760d16fa458260e70c8eb64b93eff579130c5a3dd9daaa71fc51389f88839a69a3366224226921f399c91f89
+DIST thunderbird-128.5.0esr-tr.xpi 765550 BLAKE2B 
9a0d07affab58372e5396160e4bb4e184e139807f08acc7fec7fcdd0adce67198036262822675967e33d841184f5a000cc932d38e7e4d7f388ef217fac7d238b
 SHA512 
68a93b2b7158a724b17e06fec1e62271ef0b0375cff1f2258e8e65eab29ce8c3de507d2213a566ddea0326ddc835c66bd92954672cce80cb668044888334cf76
+DIST thunderbird-128.5.0esr-uk.xpi 871379 BLAKE2B 
611f5a546b09dfe84aa7782fd33cbd0cbb7609e959e26f7ddeb541ea922c338312e8b19a275cde9c9f398ae836ee1a98cb5a79450248a0803225b83fa6607121
 SHA512 
bb4e3ca4b698d9d0674a7ab096b3148f4741d8ef695ef287d0bedd2fbd4acc673eede95eef8419b3723552537655fcd5779c2f7ce53db72013fbfe704ecea82f
+DIST thunderbird-128.5.0esr-uz.xpi 592622 BLAKE2B 
de28c34e857a8abc9af98aabe80eec61f37da934c7ecd5ca8480188e89eadf411642207eed66ecf895ee910d027cd25444577ac174cd160d6b52a2fe7f9a7466
 SHA512 
bfeb43cdd5cb57d03df66c16a0b5ad841a45785af3c39b65e0277e9adacdba57e82dfc82ae4842727ac9c826a972e6289acfca752d1af9f4b68564bcf20929e5
+DIST thunderbird-128.5.0esr-vi.xpi 794035 BLAKE2B 
eb1bc807cde185c90477f619aa93273101ad62f44e98d282fea4b3828f06b55cfa1e56a7f46a04b52048c8ee6d1add1460402164c685934e24c2cdf2a7c82e99
 SHA512 
8fea85a9c3172b7ea4dee2b1aa4d79fe14f21fef7e83889669d94f9902aa803c7b1775d34b8ac9f12e0e1cb045c3120b1fd71e97a26d34314e440cca04251803
+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

diff --git a/mail-client/thunderbird/thunderbird-128.5.0.ebuild 
b/mail-client/thunderbird/thunderbird-128.5.0.ebuild
new file mode 100644
index 000000000000..9c6ef65e5cba
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-128.5.0.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