commit:     bee24db677559fc9759a40267c19b980a23c2217
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 18 14:33:43 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec 18 14:33:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bee24db6

mail-client/thunderbird: add 146.0.1

 - "-system-librnp" requires clang to compile, bmo#2006910.

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-146.0.1.ebuild | 1158 ++++++++++++++++++++
 2 files changed, 1223 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 655abe1a8603..113d11f98c61 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -590,4 +590,69 @@ DIST thunderbird-146.0-uz.xpi 352670 BLAKE2B 
235ef09c9e8b607991758468983dfc98bfb
 DIST thunderbird-146.0-vi.xpi 524684 BLAKE2B 
0ac58c75fb3630984477b8a2f71a3e028e07174f19a52c701deb62ff1ce9d90da52f2b2395c8f847f0d05d3fdabe6bca62e66a033afa0e450626f6f453ab7afa
 SHA512 
0b983752312b83c7c6bab36ecdb744502483501fe72e05311a16fdaac6d946c1df1c8b61e9ab77a70045a18bc6657251e36deb3d0c6d28b92fb1f465f477e138
 DIST thunderbird-146.0-zh-CN.xpi 513420 BLAKE2B 
96925ae9b65a7a6d366cb77b6e8cb8a9b1a0c6ef1ffbae6fa01f66cf7881e441ccf1b24c8657397fb85fdf4590cac8217a8c0147e931353bc97c6505590ffcea
 SHA512 
53f521826c2f9a391ef800ed6e76a65ceb3f3e5e80a7e06741db2322db80572728ea657ec9dd5ad865a5ffc93075a8a1bf096ca37d272b77d8ee8872035b3dd4
 DIST thunderbird-146.0-zh-TW.xpi 517241 BLAKE2B 
dcddb768702ac5f62604370840aaa5d24264e50213eab9021615e56a709953903a2597e96f28aef8d0833fdaaf616e008160b19906ec70e63d4d0d77c003c880
 SHA512 
2e2c08e229c7fe8e19bf694dc5870da6c3cb74e3e3355d5df9b620f0d91fbd09ec348e084f46a7ef52c0a483c47c4451f66470d099419726d4f61bf807cc3c88
+DIST thunderbird-146.0.1-af.xpi 312106 BLAKE2B 
67b39b9d237d0d699e612de41d0c98e95419b3733750cbb991107d5a802213a44ac9893398f5b9918bcfc42870292ce80c375cf98c6ce14117ad521ec4fe78f7
 SHA512 
c46c6850d8be131a79d0cd513487e4b12f01c91fc36dac58e55b488031018d5d212e70c3193896ed6770af2ac5744eedf8a3ef0b873048c4026a587e92a40dfb
+DIST thunderbird-146.0.1-ar.xpi 433917 BLAKE2B 
7d920780b545a2912412e067a5d59ffae5ebf326c882723649443b4b181cf9338d852062e8751dc4e65586705b101aa7b13c46cd82e87dacf877579d08f42193
 SHA512 
b61661f4aa47d658b454602f16a3f4fae5874f75e5973c39f969c5e06ebcdba413b2c7c1185c27582d933d9c1361ff994a529e682131d3ccb4dea424e8551f1f
+DIST thunderbird-146.0.1-ast.xpi 336131 BLAKE2B 
68db66b551cea594d159b24a43db686fb2090f8be45d937af36e0cf673a022e54823a52ce2a6249989aed713333515c26387a8f61f24e789b84a96b7c901468a
 SHA512 
3dba11b0997ae5892b969f54e418d3b9e0f4f4c32d894a43a477578c0849ce87c4b51d0c0d3a3b1213472fd81aa057d048a789b5bddff7fbcad2e9b5fc4d8fd1
+DIST thunderbird-146.0.1-be.xpi 521693 BLAKE2B 
af9525d3f72de92708a27514570957b44220ecbd36d19b6814892ea662c4a1c1c29bd8d29d32f86180efcfb965ff50cdfbee587c77da5b7ab63f357376d02f39
 SHA512 
b08d3c71f22f8e74cf3c2cfb7866f54848967a6876f15a94351d2a6222f9149bee7f96d2b7570a0309a6529d4b4797bf1f879b914e6d8140ad38f30e2d107ca2
+DIST thunderbird-146.0.1-bg.xpi 542826 BLAKE2B 
9164ef4b139fbf9743cdb76273f4f5004254811bd23cb795b6ba986c7ee21b6fa7ff764c0e326e834440b5a0e0dc173fcaf88f0afecc93ae575046ac776b5aed
 SHA512 
2f476544a17a67ee7457b934684957d97810d42af6ae012f96b057efc4f83b0964a1e4055e22b4104d198317e52b99a27a374753675018ae34db87a25af63e1d
+DIST thunderbird-146.0.1-br.xpi 400964 BLAKE2B 
59ffcc7f138d67172b1d52f5f5ee11cb900ab9550e226f95b6de1ab2de0e6c837e9442392b45edb10dfb796ec42612ed0f0c277d99765812d5629f52d52e3bb5
 SHA512 
b366073b6d1cf6f6ff18726aa50e2610d1269df7fbbb057414d368c4e2182d9e72be104b40e6948063b4e2f619cf7e42de88e7bbe5c570756339c587b59d5728
+DIST thunderbird-146.0.1-ca.xpi 438175 BLAKE2B 
19fcb0153f04978bf8fc72f2bd16fc61e606f12a115bac2e1eee5b100ce73c2f64f610c07280d2e07a1d9bb3f249597bb4c0d147531baed969a76109d7888f8c
 SHA512 
bde2ed3a487974b278ad8ca3e9fbf7ec654e1b371cb903a72e08080c32ad2f2165dbf75f92be112a3fcdf84f4233e6b912349156712b641b2d1c7e26e75782be
+DIST thunderbird-146.0.1-cak.xpi 414593 BLAKE2B 
e8938b7512dc84622385525e8db00edbf3e377350af03d493def2abce689df4eaee4946dc751b3b5702a8f8bef053c965c7114b419a82311357afd599349f3b3
 SHA512 
021e712ad73331b32dda5a3ecb28d961211c7259659317fbb002e6cb7006f08686f089a281421caa3ac899ca7be6ab3162d426df5a66270876d089f24b7d527e
+DIST thunderbird-146.0.1-cs.xpi 526519 BLAKE2B 
abfc27997a86939539069c3db3dafa0848c575d08e7f2ff4e2b35d75955cc7f4d9dda07fbf93f69ee2c1c284997d4192eea1e5ea384df6ce4bca20e34ca93d1d
 SHA512 
92c5b76f720f5091cbc14725e8211f4690a5291dea1d5b816efce56e2ee4ee2b3c50f05f47db896567cc036f9f2480cfc298c13c37a13a450148bc6f3b662df0
+DIST thunderbird-146.0.1-cy.xpi 494123 BLAKE2B 
ca18f09b0a794cc3e36fc08cab86a9570f81e9231663dd409fb23928a4e3d9c80e2677cc9eeb288c486576983d2451e337f802585eb67be03ad1ea93054b9565
 SHA512 
8f3b72cfaca48e739c61843a63068a815baa97083844d6ab44a40e770491fb0dae7b6fbf439364e25e4335324e5d7c85350c32cfde14a138ff278813da26281a
+DIST thunderbird-146.0.1-da.xpi 482470 BLAKE2B 
9ae07f4ccf0dab18b9f03f83265caf8a055aa4d21dd43d526806b0b8629085bc530f612c6cd010d1923480d8e2788bfe1846b6e036b9cf3b799de684d14b8953
 SHA512 
8daad513580c45e22c1ae21ebacb240324e45d96601d075b8556c790c8f9ecd14aa265e442262b2b30f05e92820b467b385d4d37805c8927d7b1138ce7465ff1
+DIST thunderbird-146.0.1-de.xpi 511100 BLAKE2B 
58dfb7516acfd9c86bbff913b2372728aaf96f42d195bc7ede097a28ee48852cc36c5be78afcf5007c73cb128a6f50fc257d903fce09979eebfa98df1d892909
 SHA512 
05251288811c0336d2a04635f64e5b2a5fd274c33e23cbd5d44957bb3e33e04527e38b97974b0f0e75f62c16ed4015573b2c79753f276bd74181be84b5c4cf59
+DIST thunderbird-146.0.1-dsb.xpi 524189 BLAKE2B 
8aa868c2658096e25a292cb2b753180d3120a914c24b02e92bf8aef16595d495c7102384314b886ee99c89d096b0427bc585df8cf68d4f1916c729beb0a90e56
 SHA512 
199cd18ff9ca35e32361d2816b79a15f2f1a257905211dd6c7883f0edb66aaf46a804b59670dce455fc2352431fb59b6c6654b227335d1f5f841a50a972e5c10
+DIST thunderbird-146.0.1-el.xpi 615880 BLAKE2B 
bf851154718a98316d52fe16916d11c2a92b0f49e28212ba5cc94c24f3367952aeb038a7b1b1e6e6a26379fe59b9e7831494b5a29e9cb212ea9757c08cb189f3
 SHA512 
b985768dde161defbc50b22db4b0a29343683130d435d42f50b10372b872b997ead8d1ed4b0070b6896ce0fe2eae29dbcc5667c7a5e4777c5f1f9c6ff4176b8d
+DIST thunderbird-146.0.1-en-CA.xpi 457748 BLAKE2B 
1ba6c6fb33bd70f4c8e9163e993de8d715199e6e39999cda436f120ebf359b40754ef8873cc5e8ca4d6a69d2840ef1349889d8b8ebcdfeab35a3c8ec66292f5f
 SHA512 
5bd01b3f9859817358b29ace468746acc586bbc8e98e4bb6c820f93ec61cc859b83f2d178be29dbd6f46a1e6823f1ae4810c9e47b5d2a05f1e89de0ac86a2fdf
+DIST thunderbird-146.0.1-en-GB.xpi 457597 BLAKE2B 
514332c7e11d8a5ad899daf90123e90987f3bcbfcc692f1e4a820b2f3649be20244ce5a659d68bfcc1e8401476df16408aca6287a4bbd8182e83639123dc8a16
 SHA512 
2bb42534cf1d8eda09b512799590f96b2adfe5c8873aa951fc699f57e15fc24e5d90dc154920b363753dd6fe8c433877a3c19bdb53021aedec6c336f0ebbfbc2
+DIST thunderbird-146.0.1-es-AR.xpi 501280 BLAKE2B 
abf72f1ce2176112193304d92977c38867ee8eb44d9c062b7e0185135bcfe5645e2fd21046331f95a5738d3ccab4e955cb0b4d279ba5f933ae1c0cb809c187fe
 SHA512 
6aa553211f28b160e5de12de9e864361e28c33309c5eb72f84e9bb10b21dea53b49af170daa4e7706806634eb467f96a371c44da4dbee59f6bf5e41d1f8b6fcb
+DIST thunderbird-146.0.1-es-ES.xpi 503406 BLAKE2B 
01d5e73bdfd0f373cec90352ecd26f7a94ee8741b56f27502633665c448aba41dab6400b42c044795c01745a649264dfd2183b74497ba243cbb9268e41e7c740
 SHA512 
d8f17936ec6d8214e48369b98a9c432c061756c4a5c72a4e9b4c3c6d0fea90e0c5cfcbef0d69444ae851f97d2603f4d3d81e962599213f9bef6226b2bc56173b
+DIST thunderbird-146.0.1-es-MX.xpi 489584 BLAKE2B 
15d9df75ab0c1123c8866c61442377871ed578b52a8d42ad23f67247318e2b8c56e21544cbb1b72dddb36e950198f9e890ed5569e11d3ae5b60acda83017c4bf
 SHA512 
a770c3c1d011f5a07de66fefeaa653993ef940b2af377045ffcd92f6792f43968b85edb769e5d8c2593374e0332dba957a294a648da356a52e2c33a3fa410984
+DIST thunderbird-146.0.1-et.xpi 441174 BLAKE2B 
deaf83d00a18d2eb5cdc82a7b7794661c6cc9aff90e8573743c9c9fcc6d9fb9fca14407e07807b368f0229a3dded1542c7ea6aed1e5f7ba0e2b3f327a6f52176
 SHA512 
99d993abfdda10a26636d4f43d9fdf16bd95fa737213da0e4d5efbd779ae0941a429e74930e146c3dc9c091aec253cf9ce2ca05b35caba14d45c13982ee60053
+DIST thunderbird-146.0.1-eu.xpi 475562 BLAKE2B 
b66731c70c4239faa8e61a6fd606db00a687d8ead7468f403f9983852d83fd41c0f0d1671870c5fae2999dbaaeaebb9a66c0443f2a932f1f950b52689618a317
 SHA512 
5dcf3e3d4be256b344ba9f35f39e117bd638149e7139bc2baf2ef8b83ddc64eb54991ae0ba94ed2d78a7c50be7135514135d38bd1af40d24598c382993f46549
+DIST thunderbird-146.0.1-fi.xpi 478478 BLAKE2B 
1360bbb40762f8c4b809a667373aad75ebb6a7288dbe2cd047412be2c7ce8e4cb428b307f3c8d9418ba4793e63bfa07ca9eed9098040a64bad07791345559f27
 SHA512 
a51cdc9db2f61ce247a433fd7b45233e4623416e6e708cea3dbc34211da1cbe938354cadff72e18a494c1e8a102809d6fffd38bbdff83ae24d9f1620d0496f13
+DIST thunderbird-146.0.1-fr.xpi 514484 BLAKE2B 
a7467991a52cb190d4d57c0af47a74b15b4b28697ec941f1ac1d14b549e5801e7f87621490605eb5f7b611e3fa73ec29be4e6f0a6af1d9eb60373ccaf310338b
 SHA512 
e0b9078568f7432dd64f21c1956854135dbf4562eb8682afb4e01ca658aab6fe7fc283a8fd5358336cf1bd3271e6f9d869b6bb45830fd5ebcccd3e30b154eebf
+DIST thunderbird-146.0.1-fy-NL.xpi 496788 BLAKE2B 
3a1c2fcc9a31c0a844fb8f843972f192f8b3c32a8290d98c696457849c7adfe9bd519ac9d615e6f24069da54efeaef666e435f9d856946f9daefacd74046be82
 SHA512 
878d208ac4c3da12f9ed523a57944aaa970d58943cccd28a3bca421d20d961364c91191bd99a845bfe58fb0f952a3cc6826dbd5ead317d0fbb4c52483c9bcf3a
+DIST thunderbird-146.0.1-ga-IE.xpi 374085 BLAKE2B 
9b49fc0b686985687965dab17b1221992b59fbca5d5ee54e55ee0859204058e9bb56825fd49fcc95a6d8864c438fcc4bf9aad8e5022c0998bfcce7ed6933dc7d
 SHA512 
d81ce0ef82a0680f8754a68c3241b4df9c832c8bb1967d8d2fac7dfd25289d95327f409f93afd3e20061aaea43480a6d70a19b741ce937b20242ee3f597ed4b1
+DIST thunderbird-146.0.1-gd.xpi 459532 BLAKE2B 
778889231201beb03bd712d9f17e7718d2484721f4fd1522ae561629ae32a16ef3d7be00a2e2aa16b78e19dd82a0f4468fcd2396020aea14c3fa81833e99e407
 SHA512 
b512ac4d909d983649f50ec93523695b58e355155a4f0f9bbcf3dc0bd66493c22ff86b2007d11a4276500953a742c900322674775e1ba8c2a7816c9455e5a879
+DIST thunderbird-146.0.1-gl.xpi 488848 BLAKE2B 
23e9d116c8a1c2e07833928abbf74d296f3c9b4f5cae418953072fd1fcec1f77f9df25e7248ac78800fd5549d4f528552d178f089290b1594f8a78fbdc439640
 SHA512 
f95dc333f74ae9eaa14ca60d44626da3b8675e5528698f55ecf1b081a0a3a0aa2c3ac59c9947b2c18fe7e2418803575aee65ff14a1c8c2a2347245cf19b52c11
+DIST thunderbird-146.0.1-he.xpi 441791 BLAKE2B 
ab92cafadbfc0b7b3504e72a8e1ffb6d3df9070a37a7d49032a2580d25e98b85639f543c4436e98923c5c3f798b1a00a3bfba73c93f30bb68c6d5875d291399b
 SHA512 
eedd28456357c461f3933d5b6abd610ea25eff54c279b02b98f72f59e81ac87d0b0b0e74848da708370751382396f5ae19e65640e2286d6d66c47811312e110a
+DIST thunderbird-146.0.1-hr.xpi 468251 BLAKE2B 
00a05331ada75eaef8e5471372021d4743468e7e05a0ee32ff85665451cdf0e6ab8058851c444c120ef415967870e00670428fc3b82caea26fb9d67b08443ab4
 SHA512 
a4b40911a2033bb5e3d211855e57bd5134774edc35db00d435b1f55dbe8ba6ab158133d180cdc3ab6c5acdbc606c64a84a93f5da2bf57a47b045447e2fe95a78
+DIST thunderbird-146.0.1-hsb.xpi 521217 BLAKE2B 
68117cc7d9d9007b95e3d634cb2c8ccaa045d22355a5d8a9e0da8a58f51137a0e68bf5063abc214d6fd06f2036b2d061556cf26834472ccfa7c0c11e779c8e55
 SHA512 
42cdbe2a656cb9ac7a9c99b225cc7a62a621a02292a153ba711b0ea5876f006c226033ff8ad0bd54440faefa98b5da482c4d6917bf2d9ac6bd76369ed73c24b8
+DIST thunderbird-146.0.1-hu.xpi 523855 BLAKE2B 
45dbcd41bcf438d0a69ba54df746310935f563c11fcf2246962087b31a9797e7e2e64a7885093d548435b89d2a8c7e8c78524265d2b40d1d282fb2d4968696c8
 SHA512 
fabb9063d508907043f0188c805942ad387425f35a2d6722c91dfd007a9b8459dba52dd1e8c8e9410bd4cb7dfc03b589d92a08a796eb1e29aa03d2a44bfa7c02
+DIST thunderbird-146.0.1-id.xpi 468899 BLAKE2B 
d390077a55c0e367449e3bf6a8a6c06dcb21acdcaba1c57a95c2a3288f00b2f4cd2f68835a556a3a9fc16240d594612445b897d4dcf1f3ba3d3165838d781ff8
 SHA512 
02fb21e73811c9ed7eaa21f4ccaae27ace2829025256c99f8cfff74901e068f2f5ef15682cc7795d40c4f5e76c3911e31aba6a5fa52a683562c5ecb0f9847806
+DIST thunderbird-146.0.1-is.xpi 485559 BLAKE2B 
c47b2fbcb1ddede88f57c119eb983e6417966562d8a8da9a49fb65f5d429a0861219f1ed9a8635576d86e59de64ba78cc4ba2c1be9b2830c1333d9242d938c42
 SHA512 
1f09555496e17d4e56bc24d9ab062aed79f6537e41d237b1a055a0df3005a2faf215448c35ba28188d5f9f32326378b9793296f90b115c82edb258a1ce847268
+DIST thunderbird-146.0.1-it.xpi 494397 BLAKE2B 
e2eb6f34fb522ca9de6e779790bb18459af21b34d71949746f80a520404358d8a9f8def0afa5a3c9ae8aa576273443b91e8c104c8644cf53cf725c7da053da73
 SHA512 
91a88d3c867f05af14108ff21ab4127a5f4a2cb6c50267fcbfaf4f82ac14185175572a5b5e6a8dbd63eb373153785c1cbee3adeec5dffefc7e7e2c2b8d387e5f
+DIST thunderbird-146.0.1-ja.xpi 545491 BLAKE2B 
f63e318611debef6e87ebb302b89ca6333665b2ac4ca4d2e41055bc1c17320c62eb06cb158886adcbc5a345a01d78bd77a9838dff74f7946c2e002e4254f9e9b
 SHA512 
e45729e6bf985e4dcd5bef36637e40e4e239700cc0f4ee3bddfab5da718924a02429f4997271d34fcb9d9ad4e232985804d6a57b65097321b380555ace78d99e
+DIST thunderbird-146.0.1-ka.xpi 561847 BLAKE2B 
a1d64936a1dee83ffae8478769e541f27942d6dc1c45ef442bfe8cffa6f4ee2e0100c83d466816f4ba62934e9a00fc4b4a420492434cd72a938e58d49ca628dc
 SHA512 
0569397b80b67b6ce32e8d468c3da28f7145c899e90a0659e4a3e1b2a6d07e816f5de8bb4cbe928bf9aec8401706c1c18b455f2aeb67fe591ff79ebed26b3d65
+DIST thunderbird-146.0.1-kab.xpi 468988 BLAKE2B 
f33bed798572a978901c1b550055e4f4678af51aca536bf02780410f169665764fe40bae7058fc49dc113ec9ca6bc48773f7c6db1632ec93c29373823ba5ebbf
 SHA512 
645a4e250242c3e9f79700fc58087a4d268d6d1ccb096a86a883ed838a6de3f6b648ed1c4500d1860105e0c83c8d0197b13169b08578feabe6c440a7fa4537e3
+DIST thunderbird-146.0.1-kk.xpi 576172 BLAKE2B 
0dd7ac284db76e590b52fec5793bb194681999d2ee1be3c106485f3068791d3b9eb6fe86a6eb95bc8e26dc1b2463c91715cc2516f538d74dd0efc115214191dc
 SHA512 
9778f8658a1ec85a045079b88dff13874841d9ca37644c8751af4c2cdda1eb116653dd86c0f52adfa3730c4fcad501bee7d8ade025c2b6f201cee7adbcd79059
+DIST thunderbird-146.0.1-ko.xpi 518739 BLAKE2B 
accc435fad96caa9fe90fae93f8d4b33c4ff8656be6bd5021af4da4786dde0a15b815f9ba01890e145c238c78554c45b9c35cda8c8aea58b984cf7f98ad2b4d7
 SHA512 
ee0235c0e136d33c41edd8fe53df0db5d6401c1623ac6c6d56cbd28d3dc9133d3acbb0ca62a6ca245c93e90589cd644deecfda0a81e4b234c049450925ace46c
+DIST thunderbird-146.0.1-lt.xpi 450966 BLAKE2B 
85edb0a76a9bf4e89dfe17cc639c53da7b30a422b0779dfecbef73c6f3c311f4bd4acfe5b74aa51c24813d921144b380d92698dc86b75816561c785662bbcef5
 SHA512 
ee2dc422783789a4b06571b600fb8d880f3ca6064a6c82394d8d926992240b7b44b6072437f41ec9adde7517bbf3e6ef62d44f7d0ae851af0ef8a5126698e4de
+DIST thunderbird-146.0.1-lv.xpi 388652 BLAKE2B 
f0b047e0674dc5e9fb75df71e76d94bda236310b79e7f52c1542676e298796ffe3f44ce5a0a13dd59942e60b5533da12c8f96931f9ca3e7c77c285a5b1f19034
 SHA512 
b050f16effcb7f22bb95bd7a922aa421a6cb053c2f587bc19790eb90540f1f23562906f27d942b7a0528f894f522655006a9c4aae69019ba4e77d40c06b21224
+DIST thunderbird-146.0.1-ms.xpi 350381 BLAKE2B 
d4ef7cb08c0f7b9331044bbe47827019e205bc11c64973624d4979cfa97879168542c959fc073f35243a0a956e0f6cc7d578eb31e59c19ae3a0abcb3e2c7508d
 SHA512 
3124f7aa57a91cc759a9a2b48dc216246d18ce5b698b3bcd6c1ced9f304e5f5f50ad7e3706819bbe7c9fd47f838b16262d7069f754f7572e46d61b4b7a73499e
+DIST thunderbird-146.0.1-nb-NO.xpi 481934 BLAKE2B 
a9c1859b639775c78764718764b8bc2c03de5a149616ea5432fff57bc45c59ed30332b6862d0c1e65ff3b02d28660288dd252e8bbdbf641426b6de3fc370ac25
 SHA512 
0d6bf553807fb038e0b7496f2d70e44ee67914eafa5824364f188ca00b4169a6e2457f79f97be2f7495a59acaffb140704c559c57826077198bf356ea17cd5f0
+DIST thunderbird-146.0.1-nl.xpi 488032 BLAKE2B 
01b2cf7b5feaceef7c4ab4cc0bbe0a69a5ed22cc0ed51ac100d13e28d7552427099cde8440a0d550189547ad8b8c836026c91461864caf12ac244e0abb40d43d
 SHA512 
78f06fcf9ac5a12eef7cc6bfc877e303656dff1d4b86590202097cb34006bfe27e131408648d7b0d9573815071951b9af22994c89e916dbbc2352a0a14adebed
+DIST thunderbird-146.0.1-nn-NO.xpi 484390 BLAKE2B 
c2baef77928a1374f88130846eba6adff07ebd46a30ae0833e3fe5d415d28767440ba45f4b2dc3788aec18c405d17e084e971094e104d61ff449e73d9e22412b
 SHA512 
134a0463797e841a506bce38dec2d378375fb97be7a0f2ca02b6d098f035608a1004ea266e8221cdf07cadb55fcc5ba9ff49dcfece325fab232aa1fdf1d6f694
+DIST thunderbird-146.0.1-pa-IN.xpi 433836 BLAKE2B 
718b9a13aeeacb9fee5f45337340a7f5215cd2a8b0889bf5254f82ae2de2fe7611d45d748595d7e838a960ada41604fddc5a91563aa5e2e1d3147201f067322b
 SHA512 
c7bf2e232a2f55ea1b29a5e3f4e59deaa71e119e213a9d91a24edc94ede856c18c2d7a925f2136b59c5ea044f1fe23c64371b0b24d4ad245fa16919b9261634c
+DIST thunderbird-146.0.1-pl.xpi 521917 BLAKE2B 
4ef7e91367e90aabf1084eabfdf9a4fcb446581f2c91a2ff2318c83c1ab120d8484bc1d6f92be7e6a318fe6d4326a782d3141f836a7adc4c4b1b86a40b96911e
 SHA512 
cdabe227d034c9708b859cee7ffbe247d0b0ef8a18831c3c55dfdf71a097709b4140a9d9d52778efa4747c2590be71b28e7d1e105214e083f14f1275c9219280
+DIST thunderbird-146.0.1-pt-BR.xpi 496159 BLAKE2B 
ecc4bfeff6f0440f0aacbd51a0b6ba6b7881bf9157059904c9157c15206d0fcbd352eb5d8428e94decf1fcf4aa9ba002d27b50733494265ebeefb12726af752f
 SHA512 
dda43b878a085097581205eba42600479d52f5b1a0c12c46301a24ae1515029478c4171e3db3db7a17d8977cad879f04d66b7ed67927d98d2ff91718de539019
+DIST thunderbird-146.0.1-pt-PT.xpi 485445 BLAKE2B 
7ab27252bc61951ccdcbd70eec41a1932ca36c917c49d268884a1187e2782614fc921f389dd9ef7ef8cf62c6acdd42dff3a307012aa21b81fcf999c9328dc544
 SHA512 
d408295e9571a4cc498a63f85958e80e22143c12e9040d6ede9383744fbccda27ce3ff81d5cc275eb0fa391fffaa7f661b4eb0082fcf1c0abb3b2cbfc4400377
+DIST thunderbird-146.0.1-rm.xpi 487494 BLAKE2B 
b59c2723f0d6a701fb055c6e22e08ac8a6d1225d96cb50ab481266ebbaafb524d92ad9b71258b549f48a42708b5937d9e8ea0320350fa3c4287c201f1c7f07e3
 SHA512 
4689589db4e5308fa8b73d54f2b89d93237bef1845aedeaf4470a42f300c7e3a2d1a7968b0fcd2f4f0dacf38a6960de0cb5f463a8f52490d609907888f209c85
+DIST thunderbird-146.0.1-ro.xpi 492286 BLAKE2B 
a9c3755e8c40e271995609ae8fb50eafb302650c01e6d69028c33538e312850d1ca3b7734d208939295c3a4bf803a17398a5948cd57456d3594536360b019d59
 SHA512 
5a8db67efa5011c8b0af61a8b4a5436b1d1c166086667565f89ddf199a32a02b6c58fc50ed1c86bb4797f7e45a5caae45dba4212cf4d35a0eb54f5c5eff311d8
+DIST thunderbird-146.0.1-ru.xpi 600248 BLAKE2B 
43483fa61c005ba7e1631a629b647eaf4accfbd66f31310dfb28440b801a6fd96b38012e7b2d7956fffb4e38a6f5345583305887c0e57ae2f816ff00aca02bc9
 SHA512 
6157f07f42e7b92788f685e52bd6418e4344dd399c3a63255831c6f8962f33d62a016201bc7da57f97a2c81030d83392847985579a030522a1265e38601e2573
+DIST thunderbird-146.0.1-sk.xpi 526272 BLAKE2B 
33a329a49e0a2f3394d4ac827217887a0bddd5ce05f5d21b18677a194902884ec37f44e84bf9063f21eda1df04e9d5f1e0390df2fbd67f89add8976577901d72
 SHA512 
bf8464c9c009f837bd6746932567af06513c22e0c11305621f4b90f8b16a553c8001d478258b08ce12ae4435926f770792f973aa769c8273529a33b7318af401
+DIST thunderbird-146.0.1-sl.xpi 490004 BLAKE2B 
3d50b3d83d68958acde3c0f7a5bc7529a1d0b1a054ecf1f4f7ce998717fa724d65b370bb83e5727279ef5f75f6ecf5349d8fcad689123e251274c64e8956abf3
 SHA512 
6cd39e46325917e0049d402e94011b4843d51b51ee33a8c09661f2a1ede9ca75d63499682f2a781545a31f968bc977e96e9c53d976c1d86fb3c65c3f8e7427aa
+DIST thunderbird-146.0.1-sq.xpi 512104 BLAKE2B 
02c359f7ad155b27edf9fbd590ae823c489e66330436f52af24f279a7253e927bef2c80c2c00553d324ad2edeb039530a7187424a92e88e5daef4287c0c9a7fa
 SHA512 
f69351026f782c0eb5be19c2639f4ac5ad55d6f4bb9853299b157866893fcedbc7e8bb26bf247bd1bf776a8413bb847059e51e3875db97b5aec13246c3ca8f77
+DIST thunderbird-146.0.1-sr.xpi 492962 BLAKE2B 
7314b6dce2c6147b81b60bc8ff78e300a20dad528adcd499528789a2af85dbe90a00b6de94c9be1a5a34cb0092f947181dd04ae4a5cf44d8ce3023d3c2f2f492
 SHA512 
d23fc374b4f6ca08ce3af35cb5c2ebbc4776de61777f7a74716fd9f93bcc7948a578c6b91daeaf9452c2a5a7f6b4d5718b06e221e4ed61010de3260cfc4d5008
+DIST thunderbird-146.0.1-sv-SE.xpi 490314 BLAKE2B 
023026f02eddaf4cb439b6cbf79ea4e05e0451dfbcf441e1d1c21e7bdcef8c0ef1610493afe8b87b95785b80980d79de305c3b81e2fbb14fb3d3a663676313c1
 SHA512 
b2b7a48d8f8959b570c0d1f175999bae8598af06c5ce431dd92b1297893c871b52e28760fc53ff20f0c75975277cbeb51fe27c1444dbcdeb0d51a57a10e91b9f
+DIST thunderbird-146.0.1-th.xpi 567514 BLAKE2B 
b81605a793bb5e36af65d9c197313e0438041865d400f1ec71911812a325c634c449cfed38980f064edca65748ab90ae114244474ed6d9f0a8ca642f2b5258db
 SHA512 
8759921e9667764520740e8b627e52bcb347570c3ac3de368eb9d6c50071518d799d9183d0248e3c04b3c50118d2e3391bd03d0f05c853b61e6d8ff7b1cce8ed
+DIST thunderbird-146.0.1-tr.xpi 501720 BLAKE2B 
88238c654191bb430a872c1ff55bc1a7719fd94b33b4c8a5b84ca4a7dd2d47cd8050bb187be67a97d54cc3ebce6a97c40cb2d813f30dce95d73a8eaed6cee35b
 SHA512 
f7e9e2d537d341fd2b79351cf039285d6b49838ad779de76e2c9e7d4e2cee994415db483e68cd012489bd6361067d5e86fce1cda52eb45d18e86d8b48c6ff42e
+DIST thunderbird-146.0.1-uk.xpi 579203 BLAKE2B 
8c577263ae25fbb8d2fa9f29f7a9c97399e7b50294e7fb8aaef5b869623b0bf75e459b46d8ec0a55620b802f6fd19e0029ed15a5346de9d27f2f6dd0c2873173
 SHA512 
558da39b0fb21b2ac5876c8ee5581b8b08b57aa5c8161853dd16163dc2f627a9ef5a35d6766fed7f00f8bc2b2191ea8ef52e6080953d16fc6a82207fb06fba04
+DIST thunderbird-146.0.1-uz.xpi 352669 BLAKE2B 
7ed6e43a207f3d55802a3ee26a44c3b3b77a77a1fd3ae4d97bf9e197f9338c9b69635ce753e262af1ac5f9765458a6b01e52f0003fb044a910e95461508a187c
 SHA512 
04048b5810fb22d3699ca09f70a5c7be3068093a01785dca60165857e72288e5fd1ac1c0821353658d7219204bdab648a67173b576c7cd32043a82c4eb483400
+DIST thunderbird-146.0.1-vi.xpi 524687 BLAKE2B 
1c9554c217392b27ce16dbed960e1f39d0e12abe0e39ac8296080ba039ce7ea75a5eacbf0db673bb6b53f9ede242500fbc304bdf4541565b21b68f1b742ed924
 SHA512 
7a298d4a816bf2a8ede4ac299c7c2e800ddfa0726aa88f42fbe089461bb71202eff0d2b170dbbc79dc161b467b547c0c282bac3e6797e8eef561c4cdb5a34ec9
+DIST thunderbird-146.0.1-zh-CN.xpi 513421 BLAKE2B 
e74df18e649754cf5f72eb241836c64603257d8ec4219887c1eb5778636fb7b4ac46806538ef09336bae1eadfd780520301892665c96748e1a75bc60f06e67f8
 SHA512 
9bd0b24efdc7015a93bf523de39435d4f116ba114674ba97677c0d047e32b89e0d028dd263e2ee5e1283666bcf99a5bdd59a1cc1e76a3f802f3958dd020833e2
+DIST thunderbird-146.0.1-zh-TW.xpi 517243 BLAKE2B 
1c52bcf03653370927fcc82bb3664a079468d352071d4bf69105b2a05164633584740e7b61717a6017bb78d0f90b2fae977f1bcf14bab6dd82ccb676696c3cbd
 SHA512 
051c8b0a55b8639c080e84a30f31fe09418e9fa877f3e659fa7c67e47ceced474dbb217b7b31af6d10cbf426a190439f747b1437875d8f54c6291f15c730654c
+DIST thunderbird-146.0.1.source.tar.xz 781793608 BLAKE2B 
4b3851dfd699c8652e65e96a64dc1659babcfa727c2931fc1392acccfc3fb7f555a69cfa152d37a538eacddc5230a2fc67fe2f91cb697e30c564e9da9593e71a
 SHA512 
8a3b2de246c7c597574fce596836c7ef7b24bd21573feb15c308003f34b82335ad865aa0f81b24d1669c8023c0448c0e273a63019aab13356b023c2e8adc2c47
 DIST thunderbird-146.0.source.tar.xz 775218464 BLAKE2B 
f45051ae82cf1b5c163619a28e8a356e4a32f86695d1a5f49f3137818dc13a3fa615dcf586484a8ac35d845c709cc9d1c194b4f8e8f5ebb8224958a9487b9d7a
 SHA512 
b135ba414f08e2867466e652c6bc5d2b9c60e047fe27e855e7373ab67940d7da8c6028b8467b0b449f6c87f13662375220b70a05570a87eb230e21ab5ed5a186

diff --git a/mail-client/thunderbird/thunderbird-146.0.1.ebuild 
b/mail-client/thunderbird/thunderbird-146.0.1.ebuild
new file mode 100644
index 000000000000..43ea885ad9ad
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-146.0.1.ebuild
@@ -0,0 +1,1158 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-146-patches-01.tar.xz"
+
+LLVM_COMPAT=( 19 20 21 )
+
+PYTHON_COMPAT=( python3_{11..14} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.82.0"
+RUST_NEEDS_LLVM=1
+
+WANT_AUTOCONF="2.1"
+
+VIRTUALX_REQUIRED="manual"
+
+# Thunderbird will have separate release and esr channels, matching Firefox's 
rapid and esr.
+MOZ_ESR=
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit check-reqs desktop eapi9-ver flag-o-matic gnome2-utils linux-info 
llvm-r1 \
+       multiprocessing optfeature pax-utils python-any-r1 rust toolchain-funcs 
virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       SLOT="0/esr"
+else
+       SLOT="0/stable"
+fi
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+
+IUSE="+clang debug eme-free hardened hwaccel jack libproxy pgo pulseaudio 
sndio selinux"
+IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent 
+system-libvpx"
+IUSE+=" system-pipewire system-png +system-webp wayland wifi +X"
+
+# Thunderbird-only USE flags.
+IUSE+=" +system-librnp"
+
+# "-system-librnp" requires clang, bmo#2006910
+REQUIRED_USE="|| ( X wayland )
+       !system-librnp? ( clang )
+       debug? ( !system-av1 )"
+
+TB_ONLY_DEPEND="selinux? ( sec-policy/selinux-thunderbird )
+       !system-librnp? ( dev-libs/jsoncpp )
+       system-librnp? ( >=dev-util/librnp-0.17.1 )"
+BDEPEND="${PYTHON_DEPS}
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+               llvm-core/llvm:${LLVM_SLOT}
+               clang? (
+                       llvm-core/lld:${LLVM_SLOT}
+                       pgo? ( 
llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] )
+               )
+       ')
+       app-alternatives/awk
+       app-arch/unzip
+       app-arch/zip
+       >=dev-util/cbindgen-0.29.1
+       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
+                       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.118
+       >=dev-libs/nspr-4.38
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-apps/dbus
+       virtual/zlib:=
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/libdrm
+       x11-libs/pango
+       x11-libs/pixman
+       jack? ( virtual/jack )
+       pulseaudio? (
+               || (
+                       media-libs/libpulse
+                       >=media-sound/apulse-0.1.12-r4[sdk]
+               )
+       )
+       libproxy? ( net-libs/libproxy )
+       selinux? ( sec-policy/selinux-mozilla )
+       sndio? ( >=media-sound/sndio-1.8.0-r1 )
+       system-av1? (
+               >=media-libs/dav1d-1.0.0:=
+               >=media-libs/libaom-1.0.0:=
+       )
+       system-harfbuzz? (
+               >=media-gfx/graphite2-1.3.13
+               >=media-libs/harfbuzz-2.8.1:0=
+       )
+       system-icu? ( >=dev-libs/icu-76.1:= )
+       system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= )
+       system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] )
+       system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
+       system-pipewire? ( media-video/pipewire:= )
+       system-png? ( >=media-libs/libpng-1.6.45:0=[apng] )
+       system-webp? ( >=media-libs/libwebp-1.1.0:0= )
+       wayland? (
+               >=media-libs/libepoxy-1.5.10-r1
+               x11-libs/gtk+:3[wayland]
+       )
+       wifi? (
+               kernel_linux? (
+                       || (
+                               net-misc/networkmanager
+                               net-misc/connman[networkmanager]
+                       )
+               )
+       )
+       X? (
+               virtual/opengl
+               x11-libs/cairo[X]
+               x11-libs/gtk+:3[X]
+               x11-libs/libX11
+               x11-libs/libXcomposite
+               x11-libs/libXdamage
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXrandr
+               x11-libs/libxcb:=
+       )"
+RDEPEND="${COMMON_DEPEND}
+       jack? ( virtual/jack )"
+DEPEND="${COMMON_DEPEND}
+       X? (
+               x11-base/xorg-proto
+               x11-libs/libICE
+               x11-libs/libSM
+       )"
+
+llvm_check_deps() {
+       if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then
+               einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+               return 1
+       fi
+
+       if use clang && ! tc-ld-is-mold ; then
+               if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then
+                       einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       if use pgo ; then
+               if ! has_version -b 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+                       einfo 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2
+                       einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+MOZ_LANGS=(
+       af ar ast be bg br ca cak cs cy da de dsb
+       el en-CA en-GB en-US es-AR es-ES es-MX et eu
+       fi fr fy-NL ga-IE gd gl he hr hsb hu
+       id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO
+       pa-IN pl pt-BR pt-PT rm ro ru
+       sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW
+)
+
+mozilla_set_globals() {
+       # https://bugs.gentoo.org/587334
+       local MOZ_TOO_REGIONALIZED_FOR_L10N=(
+               fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
+       )
+
+       local lang xflag
+       for lang in "${MOZ_LANGS[@]}" ; do
+               # en and en_US are handled internally
+               if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
+                       continue
+               fi
+
+               # strip region subtag if $lang is in the list
+               if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
+                       xflag=${lang%%-*}
+               else
+                       xflag=${lang}
+               fi
+
+               SRC_URI+=" l10n_${xflag/[_@]/-}? ("
+               SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> 
${MOZ_P_DISTFILES}-${lang}.xpi"
+               SRC_URI+=" )"
+               IUSE+=" l10n_${xflag/[_@]/-}"
+       done
+}
+mozilla_set_globals
+
+moz_clear_vendor_checksums() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -ne 1 ]] ; then
+               die "${FUNCNAME} requires exact one argument"
+       fi
+
+       einfo "Clearing cargo checksums for ${1} ..."
+
+       sed -i \
+               -e 's/\("files":{\)[^}]*/\1/' \
+               "${S}"/third_party/rust/${1}/.cargo-checksum.json || die
+}
+
+moz_install_xpi() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local DESTDIR=${1}
+       shift
+
+       insinto "${DESTDIR}"
+
+       local emid xpi_file xpi_tmp_dir
+       for xpi_file in "${@}" ; do
+               emid=
+               xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
+
+               # Unpack XPI
+               unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
+
+               # Determine extension ID
+               if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
+                       emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; 
s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from install.rdf"
+               elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
+                       emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' 
"${xpi_tmp_dir}/manifest.json")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from manifest.json"
+               else
+                       die "failed to determine extension id"
+               fi
+
+               einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
+               newins "${xpi_file}" "${emid}.xpi"
+       done
+}
+
+mozconfig_add_options_ac() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_add_options_mk() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_use_enable() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_enable "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+mozconfig_use_with() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_with "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+virtwl() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument"
+       [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to 
be set; try xdg_environment_reset"
+       tinywl -h >/dev/null || die 'tinywl -h failed'
+
+       local VIRTWL VIRTWL_PID
+       coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo 
$WAYLAND_DISPLAY; read _; kill $PPID'; }
+       local -x WAYLAND_DISPLAY
+       read WAYLAND_DISPLAY <&${VIRTWL[0]}
+
+       debug-print "${FUNCNAME}: $@"
+       "$@"
+       local r=$?
+
+       [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
+       exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
+       return $r
+}
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+               # Ensure we have enough disk space to compile
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif tc-is-lto ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+
+       # Get LTO from environment; export after this phase for use in 
src_configure (etc)
+       use_lto=no
+
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+
+               if tc-is-lto; then
+                       use_lto=yes
+                       # LTO is handled via configure
+                       filter-lto
+               fi
+
+               if use pgo ; then
+                       if ! has userpriv ${FEATURES} ; then
+                               eerror "Building ${PN} with USE=pgo and 
FEATURES=-userpriv is not supported!"
+                       fi
+               fi
+
+               if [[ ${use_lto} = yes ]] ; then
+                       # -Werror=lto-type-mismatch -Werror=odr are going to 
fail with GCC,
+                       # bmo#1516758, bgo#942288
+                       filter-flags -Werror=lto-type-mismatch -Werror=odr
+               fi
+
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif [[ ${use_lto} == "yes" ]] ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_setup
+               llvm-r1_pkg_setup
+               rust_pkg_setup
+               python-any-r1_pkg_setup
+
+               # Avoid PGO profiling problems due to enviroment leakage
+               # These should *always* be cleaned up anyway
+               unset \
+                       DBUS_SESSION_BUS_ADDRESS \
+                       DISPLAY \
+                       ORBIT_SOCKETDIR \
+                       SESSION_MANAGER \
+                       XAUTHORITY \
+                       XDG_CACHE_HOME \
+                       XDG_SESSION_COOKIE
+
+               # Build system is using /proc/self/oom_score_adj, bug #604394
+               addpredict /proc/self/oom_score_adj
+
+               if use pgo ; then
+                       # Update 105.0: "/proc/self/oom_score_adj" isn't enough 
anymore with pgo, but not sure
+                       # whether that's due to better OOM handling by Firefox 
(bmo#1771712), or portage
+                       # (PORTAGE_SCHEDULING_POLICY) update...
+                       addpredict /proc
+
+                       # Clear tons of conditions, since PGO is 
hardware-dependant.
+                       addpredict /dev
+               fi
+
+               if ! mountpoint -q /dev/shm ; then
+                       # If /dev/shm is not available, configure is known to 
fail with
+                       # a traceback report referencing 
/usr/lib/pythonN.N/multiprocessing/synchronize.py
+                       ewarn "/dev/shm is not mounted -- expect build 
failures!"
+               fi
+
+               # Google API keys (see 
http://www.chromium.org/developers/how-tos/api-keys)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then
+                       
MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc"
+               fi
+
+               if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then
+                       
MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ"
+               fi
+
+               # Mozilla API keys (see 
https://location.services.mozilla.com/api)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then
+                       
MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005"
+               fi
+
+               # Ensure we use C locale when building, bug #746215
+               export LC_ALL=C
+       fi
+
+       export use_lto
+}
+
+src_unpack() {
+       local _lp_dir="${WORKDIR}/language_packs"
+       local _src_file
+
+       if [[ ! -d "${_lp_dir}" ]] ; then
+               mkdir "${_lp_dir}" || die
+       fi
+
+       for _src_file in ${A} ; do
+               if [[ ${_src_file} == *.xpi ]]; then
+                       cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die 
"Failed to copy '${_src_file}' to '${_lp_dir}'!"
+               else
+                       unpack ${_src_file}
+               fi
+       done
+}
+
+src_prepare() {
+       if [[ ${use_lto} == "yes" ]]; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die
+       fi
+
+       # Workaround for bgo#915651 and bmo#1988166 on musl
+       if use elibc_glibc ; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+               rm -v 
"${WORKDIR}"/firefox-patches/*bmo-1988166-musl-remove-nonexisting-system-header-req.patch
 || die
+       fi
+
+       # Enable jpeg-xl only in Firefox.
+       rm -v "${WORKDIR}"/firefox-patches/*bgo-928126-enable-jxl.patch || die
+
+       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 loong; then
+                       # Only the LP64D ABI of LoongArch64 is actively 
supported among
+                       # the wider Linux ecosystem, so the assumption is safe.
+                       export RUST_TARGET="loongarch64-unknown-linux-musl"
+               elif use ppc64 ; then
+                       export RUST_TARGET="powerpc64le-unknown-linux-musl"
+               elif use riscv ; then
+                       # We can pretty safely rule out any 32-bit riscvs, but 
64-bit riscvs also have tons of
+                       # different ABIs available. 
riscv64gc-unknown-linux-musl seems to be the best working
+                       # guess right now though.
+                       elog "riscv detected, forcing a riscv64 target for now."
+                       export RUST_TARGET="riscv64gc-unknown-linux-musl"
+               else
+                       die "Unknown musl chost, please post a new bug with 
your rustc -vV along with emerge --info"
+               fi
+       fi
+
+       # Make LTO respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure || die "Failed 
sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || 
die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed 
sedding multiprocessing.cpu_count"
+
+       # sed-in toolchain prefix
+       sed -i \
+               -e "s/objdump/${CHOST}-objdump/" \
+               "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py 
|| die "sed failed to set toolchain prefix"
+
+       sed -i \
+               -e 's/ccache_stats = None/return None/' \
+               "${S}"/python/mozbuild/mozbuild/controller/building.py || die 
"sed failed to disable ccache stats call"
+
+       einfo "Removing pre-built binaries ..."
+
+       find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) 
-print -delete || die
+
+       # Clear checksums from cargo crates we've manually patched.
+       # moz_clear_vendor_checksums xyz
+
+       # Create build dir
+       BUILD_DIR="${WORKDIR}/${PN}_build"
+       mkdir -p "${BUILD_DIR}" || die
+
+       # Write API keys to disk
+       echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
+       echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || 
die
+       echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die
+
+       xdg_environment_reset
+}
+
+src_configure() {
+       # Show flags set at the beginning
+       einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       local have_switched_compiler=
+       if use clang; then
+               # Force clang
+               einfo "Enforcing the use of clang due to USE=clang ..."
+
+               local version_clang=$(clang --version 2>/dev/null | grep -F -- 
'clang version' | awk '{ print $3 }')
+               [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 
"${version_clang}")
+               [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
+
+               AR=llvm-ar
+               CC=${CHOST}-clang-${version_clang}
+               CXX=${CHOST}-clang++-${version_clang}
+               NM=llvm-nm
+               RANLIB=llvm-ranlib
+       elif ! use clang && ! tc-is-gcc ; then
+               # Force gcc
+               have_switched_compiler=yes
+               einfo "Enforcing the use of gcc due to USE=-clang ..."
+               AR=gcc-ar
+               CC=${CHOST}-gcc
+               CXX=${CHOST}-g++
+               NM=gcc-nm
+               RANLIB=gcc-ranlib
+       fi
+
+       if [[ -n "${have_switched_compiler}" ]] ; then
+               # Because we switched active compiler we have to ensure
+               # that no unsupported flags are set
+               strip-unsupported-flags
+       fi
+
+       # Ensure we use correct toolchain,
+       # AS is used in a non-standard way by upstream, #bmo1654031
+       export HOST_CC="$(tc-getBUILD_CC)"
+       export HOST_CXX="$(tc-getBUILD_CXX)"
+       export AS="$(tc-getCC) -c"
+
+       # Configuration tests expect llvm-readelf output, bug 913130
+       READELF="llvm-readelf"
+
+       tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG
+
+       # Pass the correct toolchain paths through cbindgen
+       if tc-is-cross-compiler ; then
+               export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} 
--target=${CHOST} ${BINDGEN_CFLAGS-}"
+       fi
+
+       # Set MOZILLA_FIVE_HOME
+       export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+       # python/mach/mach/mixin/process.py fails to detect SHELL
+       export SHELL="${EPREFIX}/bin/bash"
+
+       # Set state path
+       export MOZBUILD_STATE_PATH="${BUILD_DIR}"
+
+       # Set MOZCONFIG
+       export MOZCONFIG="${S}/.mozconfig"
+
+       # Initialize MOZCONFIG
+       mozconfig_add_options_ac '' --enable-application=comm/mail
+       mozconfig_add_options_ac '' --enable-project=comm/mail
+
+       # Set Gentoo defaults
+       mozconfig_add_options_ac 'Gentoo default' \
+               --allow-addon-sideload \
+               --disable-cargo-incremental \
+               --disable-crashreporter \
+               --disable-disk-remnant-avoidance \
+               --disable-geckodriver \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-dbus \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-packed-relative-relocs \
+               --enable-release \
+               --enable-system-policies \
+               --host="${CBUILD:-${CHOST}}" \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               --prefix="${EPREFIX}/usr" \
+               --target="${CHOST}" \
+               --without-ccache \
+               --without-wasm-sandboxed-libraries \
+               --with-intl-api \
+               --with-libclang-path="$(llvm-config --libdir)" \
+               --with-system-ffi \
+               --with-system-gbm \
+               --with-system-libdrm \
+               --with-system-nspr \
+               --with-system-nss \
+               --with-system-pixman \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system
+
+       # Set update channel
+       local update_channel=release
+       [[ -n ${MOZ_ESR} ]] && update_channel=esr
+       mozconfig_add_options_ac '' --enable-update-channel=${update_channel}
+
+       # Whitelist to allow unkeyworded arches to build with 
"--disable-rust-simd" by default.
+       if use amd64 || use arm64 || use loong ; then
+               mozconfig_add_options_ac '' --enable-rust-simd
+       fi
+
+       # For future keywording: This is currently (97.0) only supported on:
+       # amd64, arm, arm64 & x86.
+       # Might want to flip the logic around if Firefox is to support more 
arches.
+       # bug 833001, bug 903411#c8
+       if use loong || use ppc64 || use riscv; then
+               mozconfig_add_options_ac '' --disable-sandbox
+       else
+               mozconfig_add_options_ac '' --enable-sandbox
+       fi
+
+       # riscv-related options, bgo#947337, bgo#947338
+       if use riscv ; then
+               mozconfig_add_options_ac 'Disable JIT for RISC-V 64' 
--disable-jit
+               mozconfig_add_options_ac 'Disable webrtc for RISC-V' 
--disable-webrtc
+       fi
+
+       if [[ -s "${S}/api-google.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 
}') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-safebrowsing-api-keyfile="${S}/api-google.key"
+       else
+               einfo "Building without Google API key ..."
+       fi
+
+       if [[ -s "${S}/api-location.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 
}') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-location-service-api-keyfile="${S}/api-location.key"
+       else
+               einfo "Building without Location API key ..."
+       fi
+
+       if [[ -s "${S}/api-mozilla.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 
}') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       --with-mozilla-api-keyfile="${S}/api-mozilla.key"
+       else
+               einfo "Building without Mozilla API key ..."
+       fi
+
+       mozconfig_use_with system-av1
+       mozconfig_use_with system-harfbuzz
+       mozconfig_use_with system-harfbuzz system-graphite2
+       mozconfig_use_with system-icu
+       mozconfig_use_with system-jpeg
+       mozconfig_use_with system-libevent
+       mozconfig_use_with system-libvpx
+       mozconfig_use_with system-pipewire
+       mozconfig_use_with system-png
+       mozconfig_use_with system-webp
+
+       if use system-librnp; then
+               mozconfig_add_options_ac "+system-librnp" 
--enable-compile-environment
+               mozconfig_use_with system-librnp
+       else
+               # This controls the backend of the bundled librnp. Choices are 
"botan" and "openssl".
+               # RNP Upstream recommends to use botan. In Gentoo it's 
preferred to use system-librnp.
+               mozconfig_add_options_ac "+bundled librnp backend = botan" 
--with-librnp-backend="botan"
+       fi
+
+       mozconfig_use_enable libproxy
+
+       use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme
+
+       if use hardened ; then
+               mozconfig_add_options_ac "+hardened" --enable-hardening
+               # mozconfig_add_options_ac "+hardened stl" 
--enable-stl-hardening # not available in TB
+               append-ldflags "-Wl,-z,relro -Wl,-z,now"
+
+               # Increase the FORTIFY_SOURCE value, #910071.
+               sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' 
"${S}"/build/moz.configure/toolchain.configure || die
+       fi
+
+       local myaudiobackends=""
+       use jack && myaudiobackends+="jack,"
+       use sndio && myaudiobackends+="sndio,"
+       use pulseaudio && myaudiobackends+="pulseaudio,"
+       ! use pulseaudio && myaudiobackends+="alsa,"
+
+       mozconfig_add_options_ac '--enable-audio-backends' 
--enable-audio-backends="${myaudiobackends::-1}"
+
+       mozconfig_use_enable wifi necko-wifi
+
+       if use X && use wayland ; then
+               mozconfig_add_options_ac '+x11+wayland' 
--enable-default-toolkit=cairo-gtk3-x11-wayland
+       elif ! use X && use wayland ; then
+               mozconfig_add_options_ac '+wayland' 
--enable-default-toolkit=cairo-gtk3-wayland-only
+       else
+               mozconfig_add_options_ac '+x11' 
--enable-default-toolkit=cairo-gtk3-x11-only
+       fi
+
+       if [[ ${use_lto} == "yes" ]] ; then
+               if use clang ; then
+                       # Upstream only supports lld or mold when using clang.
+                       if tc-ld-is-mold ; then
+                               # mold expects the -flto line from *FLAGS 
configuration, bgo#923119
+                               append-ldflags "-flto=thin"
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+                       fi
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+               else
+                       # ThinLTO is currently broken, see bmo#1644409.
+                       # mold does not support gcc+lto combination.
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # lld is upstream's default
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+                       fi
+
+               else
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "linker is set to bfd 
due to USE=-clang" --enable-linker=bfd
+                       fi
+               fi
+       fi
+
+       if use pgo ; then
+               mozconfig_add_options_ac '+pgo' MOZ_PGO=1
+
+               if use clang ; then
+                       # Used in build/pgo/profileserver.py
+                       export LLVM_PROFDATA="llvm-profdata"
+               fi
+       fi
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+               mozconfig_add_options_ac '+debug' --enable-jemalloc
+               mozconfig_add_options_ac '+debug' --enable-real-time-tracing
+       else
+               mozconfig_add_options_ac 'Gentoo defaults' 
--disable-real-time-tracing
+
+               if is-flag '-g*' ; then
+                       if use clang ; then
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
+                       else
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
+                       fi
+               else
+                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
+               fi
+
+               if is-flag '-O0' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
+               elif is-flag '-O4' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
+               elif is-flag '-O3' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
+               elif is-flag '-O1' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
+               elif is-flag '-Os' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
+               else
+                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
+               fi
+       fi
+
+       # Debug flag was handled via configure
+       filter-flags '-g*'
+
+       # Optimization flag was handled via configure
+       filter-flags '-O*'
+
+       # elf-hack
+       # Filter "-z,pack-relative-relocs" and let the build system handle it 
instead.
+       if use amd64 || use x86 ; then
+               filter-flags "-z,pack-relative-relocs"
+
+               if tc-ld-is-mold ; then
+                       # relr-elf-hack is currently broken with mold, 
bgo#916259
+                       mozconfig_add_options_ac 'disable elf-hack with mold 
linker' --disable-elf-hack
+               else
+                       mozconfig_add_options_ac 'relr elf-hack' 
--enable-elf-hack=relr
+               fi
+       elif use loong || use ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on loong/ppc64/riscv,
+               # see bgo #917049, #930046
+               :;
+       else
+               mozconfig_add_options_ac 'disable elf-hack on non-supported 
arches' --disable-elf-hack
+       fi
+
+       if ! use elibc_glibc; then
+               mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
+       fi
+
+       # System-av1 fix
+       use system-av1 && append-ldflags "-Wl,--undefined-version"
+
+       # Make revdep-rebuild.sh happy; Also required for musl
+       append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
+
+       # Pass $MAKEOPTS to build system
+       export MOZ_MAKE_FLAGS="${MAKEOPTS}"
+
+       # Use system's Python environment
+       export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+       export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+
+       # Disable notification when build system has finished
+       export MOZ_NOSPAM=1
+
+       # Portage sets XARGS environment variable to "xargs -r" by default which
+       # breaks build system's check_prog() function which doesn't support 
arguments
+       mozconfig_add_options_ac 'Gentoo default' 
"XARGS=${EPREFIX}/usr/bin/xargs"
+
+       # Set build dir
+       mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}"
+
+       # Show flags we will use
+       einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       # Handle EXTRA_CONF and show summary
+       local ac opt hash reason
+
+       # Apply EXTRA_ECONF entries to $MOZCONFIG
+       if [[ -n ${EXTRA_ECONF} ]] ; then
+               IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!}
+               for opt in "${ac[@]}"; do
+                       mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--}
+               done
+       fi
+
+       echo
+       echo "=========================================================="
+       echo "Building ${PF} with the following configuration"
+       grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do
+               [[ -z ${hash} || ${hash} == \# ]] \
+                       || die "error reading mozconfig: ${ac} ${opt} ${hash} 
${reason}"
+               printf "    %-30s  %s\n" "${opt}" "${reason:-mozilla.org 
default}"
+       done
+       echo "=========================================================="
+       echo
+
+       ./mach configure || die
+}
+
+src_compile() {
+       local virtx_cmd=
+
+       if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then
+               # increase ulimit with mold+lto, bugs #892641, #907485
+               if ! ulimit -n 16384 1>/dev/null 2>&1 ; then
+                       ewarn "Unable to modify ulimits - building with 
mold+lto might fail due to low ulimit -n resources."
+                       ewarn "Please see bugs #892641 & #907485."
+               else
+                       ulimit -n 16384
+               fi
+       fi
+
+       if use pgo; then
+               # Reset and cleanup environment variables used by GNOME/XDG
+               gnome2_environment_reset
+
+               addpredict /root
+
+               if ! use X; then
+                       virtx_cmd=virtwl
+               else
+                       virtx_cmd=virtx
+               fi
+       fi
+
+       if ! use X; then
+               local -x GDK_BACKEND=wayland
+       else
+               local -x GDK_BACKEND=x11
+       fi
+
+       ${virtx_cmd} ./mach build --verbose || die
+}
+
+src_install() {
+       # xpcshell is getting called during install
+       pax-mark m \
+               "${BUILD_DIR}"/dist/bin/xpcshell \
+               "${BUILD_DIR}"/dist/bin/${PN} \
+               "${BUILD_DIR}"/dist/bin/plugin-container
+
+       DESTDIR="${D}" ./mach install || die
+
+       # Upstream cannot ship symlink but we can (bmo#658850)
+       rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
+       dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
+
+       # Don't install llvm-symbolizer from llvm-core/llvm package
+       if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
+               rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die
+       fi
+
+       # Install policy (currently only used to disable application updates)
+       insinto "${MOZILLA_FIVE_HOME}/distribution"
+       newins "${FILESDIR}"/distribution.ini distribution.ini
+       newins "${FILESDIR}"/disable-auto-update.policy.json policies.json
+
+       # Install system-wide preferences
+       local PREFS_DIR="${MOZILLA_FIVE_HOME}/defaults/pref"
+       insinto "${PREFS_DIR}"
+       newins "${FILESDIR}"/gentoo-default-prefs-r1.js gentoo-prefs.js
+
+       local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js"
+
+       # Force hwaccel prefs if USE=hwaccel is enabled
+       if use hwaccel ; then
+               cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
+               >>"${GENTOO_PREFS}" \
+               || die "failed to add prefs to force hardware-accelerated 
rendering to all-gentoo.js"
+
+               if use wayland; then
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel wayland prefs"
+                       pref("gfx.x11-egl.force-enabled",          false);
+                       EOF
+               else
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel x11 prefs"
+                       pref("gfx.x11-egl.force-enabled",          true);
+                       EOF
+               fi
+       fi
+
+       # Set dictionary path to use system hunspell
+       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
spellchecker.dictionary_path pref"
+       pref("spellchecker.dictionary_path",       
"${EPREFIX}/usr/share/myspell");
+       EOF
+
+       # Force the graphite pref if USE=system-harfbuzz is enabled, since the 
pref cannot disable it
+       if use system-harfbuzz ; then
+               cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
gfx.font_rendering.graphite.enabled pref"
+               sticky_pref("gfx.font_rendering.graphite.enabled", true);
+               EOF
+       fi
+
+       # Install language packs
+       local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name 
'*.xpi') )
+       if [[ -n "${langpacks}" ]] ; then
+               moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" 
"${langpacks[@]}"
+       fi
+
+       # Install icons
+       local icon_srcdir="${S}/comm/mail/branding/thunderbird"
+       local icon_symbolic_file="${icon_srcdir}/TB-symbolic.svg"
+
+       insinto /usr/share/icons/hicolor/symbolic/apps
+       newins "${icon_symbolic_file}" ${PN}-symbolic.svg
+
+       local icon size
+       for icon in "${icon_srcdir}"/default*.png ; do
+               size=${icon%.png}
+               size=${size##*/default}
+
+               if [[ ${size} -eq 48 ]] ; then
+                       newicon "${icon}" ${PN}.png
+               fi
+
+               newicon -s ${size} "${icon}" ${PN}.png
+       done
+
+       # Install menu
+       local app_name="Mozilla ${MOZ_PN^}"
+       local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
+       local exec_command="${PN}"
+       local icon="${PN}"
+       local use_wayland="false"
+
+       if [[ -n ${MOZ_ESR} ]] ; then
+               local desktop_filename="${PN}-esr.desktop"
+       else
+               local desktop_filename="${PN}.desktop"
+       fi
+
+       if use wayland ; then
+               use_wayland="true"
+       fi
+
+       cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
+
+       sed -i \
+               -e "s:@NAME@:${app_name}:" \
+               -e "s:@EXEC@:${exec_command}:" \
+               -e "s:@ICON@:${icon}:" \
+               "${WORKDIR}/${PN}.desktop-template" || die
+
+       newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}"
+
+       rm "${WORKDIR}/${PN}.desktop-template" || die
+
+       # Install wrapper script
+       [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}"
+       newbin "${FILESDIR}/${PN}-r1.sh" ${PN}
+
+       # Update wrapper
+       sed -i \
+               -e "s:@PREFIX@:${EPREFIX}/usr:" \
+               -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
+               "${ED}/usr/bin/${PN}" || die
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if ver_replacing -lt 136.0 ; then
+               elog "In this version of Thunderbird, upstream introduced an 
in-app notification"
+               elog "system. Setting pref 'mail.inappnotifications.enabled' to 
false and nullifying"
+               elog "'mail.inappnotifications.url' may help you avoid these 
messages, if you don't"
+               elog "wish to receive them."
+       fi
+
+       optfeature_header "Optional programs for extra features:"
+       optfeature "desktop notifications" x11-libs/libnotify
+       optfeature "encrypted chat support" net-libs/libotr
+       optfeature "fallback mouse cursor theme e.g. on WMs" 
gnome-base/gsettings-desktop-schemas
+}

Reply via email to