commit:     73dbc07d5217413e8452af06871a423483bdb324
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 29 12:04:30 2026 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 29 12:04:30 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73dbc07d

mail-client/thunderbird: add 147.0.1

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-147.0.1.ebuild | 1157 ++++++++++++++++++++
 2 files changed, 1222 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index f89fa16efbb6..b5d8b861a43a 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -392,4 +392,69 @@ DIST thunderbird-147.0-uz.xpi 352853 BLAKE2B 
265b41778f264cba71aed0ab0edf29aa816
 DIST thunderbird-147.0-vi.xpi 525244 BLAKE2B 
69c041687feeb5667d7020da7527ce18bd47c612a2183cefd9278134db19ad4c86b9a7d24bdab125b3b9cb02b11bea19ea212c4a9eaa468a3059bb2be8ca033b
 SHA512 
2a3cf8aa906c5b2cd3b40ebdf28531fab361d2a1d219d995d8c41c38cdb93a8d0e5e4c0dbb0fa93217f8392248eef25695502abd8c635f4afd1b08a6d3a9687b
 DIST thunderbird-147.0-zh-CN.xpi 514161 BLAKE2B 
619857edf1cfc6277eb8b51e92db033676c1fd51abbb98950d8175b2077028fca5db1c6be03be9cadebf3bbba4d85bff43b824ada70cd4490b80da59fbbae7f9
 SHA512 
f26fb76ab74540e0347c282c25932356d1e1d0fb47d6cbcb8928110d3714b9f8eb2f1e09cd8d5958c81aae46246bf8600051428cf5c635b23d56ea4bacd6d641
 DIST thunderbird-147.0-zh-TW.xpi 517868 BLAKE2B 
3d89c8b0931a0cc5adde833ad8fb0ba2c0651e317ae0633160bd9af259ddaafc4c39fdfeab985775b0075df5082d74285d48bf5692a6f0db6daf9d49b9cfe9d3
 SHA512 
fdd6f43f5467aec5c5e290c2088f63d42b88d31f138fece1d5893ef4bec9d9cc54339cf240f04fda9c6b033a5a47c39f09a4ac99dc2389daee1c28617aa233a4
+DIST thunderbird-147.0.1-af.xpi 312141 BLAKE2B 
29861527fa9e7011d14111004c23b73b77619b1a3af79f46a7c3aa7a9a39fdc89cdd0e93160ea83845610f3056141e358c5631b9439241faba7ea5708e6f15b7
 SHA512 
e45a16852624a7b1dcfe67deb4443fb06fd1378bc4452bf40a8d46518ddf2c06cc20cf2dad0dbdcb4e6c35e58d36cf619c7e4c6cade57d4dcff7ce115f315418
+DIST thunderbird-147.0.1-ar.xpi 434056 BLAKE2B 
36498d77b7c64a47c4015497f72d3c9dbd4bb1075eeac06b20ae3bbff1b827b7a9e4befcdf60e158a424e0d06e15ef0eaee26bea869642f6bae01b0f65c502fd
 SHA512 
0fe0a1d2725d36b3af02af2a56e53a4757ca9d7694bba4c289a0e0d2ccd16471ecc912b04cca4a6bc0df9945bfd8110a1f2fc8b66f8a9ed5103397aab636f68f
+DIST thunderbird-147.0.1-ast.xpi 336206 BLAKE2B 
df2cf8b3c3b3006a08b192767cee74e76e8147c58cdebf0982adca9b18b7c4e3a410cfccf10d4fda941650023da04f1cc371ed17d46f144e324e50e495df5b56
 SHA512 
d5cb30946bf0b273f5f5351ec6a1915fb815c5f1ede255d3b83f3b64d2d43b9c77cfcdb87f41444da517d56fbd44cf954474e235a5decc8ebd36e147b004a50d
+DIST thunderbird-147.0.1-be.xpi 522340 BLAKE2B 
aeceae1ec9b35aebb76a0c6188a4918f05c6f9dbdd908eb90c0e647d8ab462c6473e6951d939e22e4fd193a105bd6d256ad08833d96670b63a620bbbb5591064
 SHA512 
c198537700f1eb85fde44f90a8774eca953886435f22854586c09c6de025ec4ea248b487b396ffda6e190d44c98ad1cad2067aab2aabc356f8719f01979ff6ec
+DIST thunderbird-147.0.1-bg.xpi 543153 BLAKE2B 
03d294ff7be72282e9ae0f719d551dfe682bfaf6337b531be07a1b94c40abaca46f8bc13a70efee0b9944b383e27bec9bc26c307007df316ee53c96aa0ab3692
 SHA512 
eecb9857baf746ff089259e692e8b800f7b680a6e5a3da119fc0ff95a01596f31fc83fbb3939a4cd9115a6956dbdb9ba365e59c19d3b7c790dda2e2371a100f2
+DIST thunderbird-147.0.1-br.xpi 401078 BLAKE2B 
ce7a831010a991ee3cf9d86367bbad6b3ea6aa9d0cfe1c9b97b87e4d94f1e25d7e30a1eb3289e786d8b8ff81ab0103b8b33b3c5bf672da2e248166286e83da36
 SHA512 
7cb261ca5cc6af78bf351ca28a8fc9c622100cc7aef2f1b556d021ce31b52485f855d5b6f93647309366ab46750913b9ff86a07cbe465d9cc6d8e8b899aed9ad
+DIST thunderbird-147.0.1-ca.xpi 438291 BLAKE2B 
09968dc0bd5047ded547b50b4d49f7bf40cfbad999624ec2079ee55cab15fdebc615cd849f32a7e9b620b2bcd8af77ab474e7e9232454adbde4c5ab96c05a4a0
 SHA512 
333b194954d2cd40b9e5db174f289fe34f33ea68dfffd04c5d83b87587ce007a00899e2e4e68006ffda738ea31ae71971f6d204b411fac528cf94dd0b54437f7
+DIST thunderbird-147.0.1-cak.xpi 414739 BLAKE2B 
904b7703c64a9711ebce9a8a2b391d87f711499a72ed46f25d050e3298be71d2426b4d45ceb5f5ed8d52e6a88584b1e24d8b17cdc07abe790d239f2401f12b7a
 SHA512 
b47ac00dd83fa1f8b4ef60350d9b8c295be746e875a962cead2df741fbceac59d5d25dbb2c5766157f0eadc0543cc7bc7c5f55052e52ce119ad0cde73a083f42
+DIST thunderbird-147.0.1-cs.xpi 527274 BLAKE2B 
6b791cecc049b28c9fd26833a8dc3f46ab0e1a108126712eda6414a6613d34d883c01fafde46b2cd2e209e8ab070432d2faab5be2d6ee49bf83046374695ebf0
 SHA512 
b8460fbc241191a0a5d8d7d5b5764e0af6d7db1ff6cb941b107f1054f3f72747cfc9c3d049971f7176df201864826864692b8daa48aa75fa0b88fc488b5fea8b
+DIST thunderbird-147.0.1-cy.xpi 494802 BLAKE2B 
f2d09f139120fb3ad66a0619d8f99b57894b96079fb36b67602a8ae881126abc21d19dd0c886c44fbf5044276db203e9b1f7eb58adea9833d52bfcdf139ecded
 SHA512 
625fe23a3429b665b44db62792bd22f41be06009de1d992559f320a5cb42f33f72b5d26719c0d5d98ccb37630ad916609cee3b12e318b1072a00a8b5fb632936
+DIST thunderbird-147.0.1-da.xpi 483074 BLAKE2B 
03d53f6fecfbc562be1e9c7cc16f46095acc368ff0d68c28812fef01acbdb1425ce67d8f1d4d9162bffdadc110bcf83fea18677561f01402c1ea4f78894ded50
 SHA512 
ba92b24f755250e39c81b5284fbfa4667df9990071a3211675a8a1049779959f15277a14fae7ed7ea5b60ffec17fe1c46a4aeff188cf46592e31f3e93cd1c4a1
+DIST thunderbird-147.0.1-de.xpi 511734 BLAKE2B 
9903dccbdef32394b59c63f09d99fc3666e0533097f88c76d2ddfe30001eb9728db591f56faa5a75371d141782a37027e57891ac664619370cb0ca5386236b0c
 SHA512 
493e7d452475f57100c617d8deee8c8767045542ef20d27bcfdd9fac3b6f2655b2d40a00625e24de1d021a16137e1082913eed4d103cad76d7e643e4d7aac024
+DIST thunderbird-147.0.1-dsb.xpi 524708 BLAKE2B 
ac9463fcd8a0c262f1831f81fb117812d01c724481767522a083c4d5e024c626fbdb1fd395b98a12a4858e1d4664787e77cf236cbcfb0187d512e91996a55ed1
 SHA512 
46f9224ef1461fa80e0d1cb9eeffdd812fbc2120571d6fdfe3725e01499aac106bc99f1fe6651f24b82f793b407c80f585a92ce8ba0de00dbe4ec45b858ffed8
+DIST thunderbird-147.0.1-el.xpi 616560 BLAKE2B 
8035fd438901e30376a4926ab39184e1f118a8e4a6a935f2d2e0b1a92b41cf2e344a23d31c75a0e55c3b76a1009d6578781024091bc794a4b74860cd99b37938
 SHA512 
fa98947c183614053818625c9b037d88bba2810eed526b6b155f786f2c3ffa34a55a266a02f5bd07ff4c5d634d0a9135032f51b8e1bf108f9efd8857d368d38d
+DIST thunderbird-147.0.1-en-CA.xpi 458185 BLAKE2B 
eddbaaa0e351d190644443df93203cd97ab320287adc562db14247af83beb6b3445f58379226d349e00b9484e6c326d87a984b4a4cedd46b731fd03e2fb08e89
 SHA512 
378a564c5d9912f18cce349ab7bc49c7c542a88805e42479b75de4cfc059e27d7a83974f5625efd8d3e4d044b152e9c0392e3cddf22df12cf34d29b8e9b97e45
+DIST thunderbird-147.0.1-en-GB.xpi 458133 BLAKE2B 
4e3fbdcbc2a9430347fb0026c632a171ec59ea9f014ecc3d428e753188ab6b329d6217748e0f2d91842eee713f2287c9b9cfc3268a046156814f73d3297292e5
 SHA512 
24324294270545c4bc73d5fda13da56aba477f484a89acb12e88c432fc83da5419490d9acd5b2de711241f351438dc4bd17bb86084b7d92031590dbb9e229cd1
+DIST thunderbird-147.0.1-es-AR.xpi 501884 BLAKE2B 
97a804d20fe5ab060b5a7be34714110af28d1ee13c700db281feb5788812962e7780148ff58b401149a35d369e7b8f37108c3adce34c7c9bbdb10ca1b63398a7
 SHA512 
ab9429973806b319a1feda5146aab711430e7d1a031d449aaa0fc62ec2ede34ec4213a256342f2feda48c2154c2ce22173aa5653293f0792bd521c3fede59eee
+DIST thunderbird-147.0.1-es-ES.xpi 504071 BLAKE2B 
18eeaa2e267e6e35f9665532282ec8f9d6190ada59efbf239ab37938409800aec2235d3d0ed2d1a9d22e3b04a226bb5b01680b76285fc6352d9f2a2245b8713f
 SHA512 
28ab554a6ad079fef681f4d596be2f93d1e1c2fbcce639413a446c6bf4897fc65299bad8d3982a1b89bd97c13979661d1c0dd5c32634e48f49d7e41d893033c3
+DIST thunderbird-147.0.1-es-MX.xpi 489659 BLAKE2B 
80ae9b9361af6248270f264cf9ce864abeedd8378926f28a65da35c0031252342f86418d8d85255b025374282a916534c3556d96ea37f04b0c5cd5d3153f0f85
 SHA512 
67fb1d4026578c4ee0c595093957a6eb7fb4cd8b42f4972ddb895d28426c1a3c27e19de37adeb5399d33e14bbe187c05ada7a663dbf27fb7f19b033ef492272f
+DIST thunderbird-147.0.1-et.xpi 441296 BLAKE2B 
6324e81fcbca2d9741e48c8167a1e8eda34a6ffa0134cbb42a83c1b1565b8c47bfafdbc53b09f28f4110fad9980e03c5dae760811a5ea845ed1af9efcf8a9581
 SHA512 
d722f16eb34ef6b6febf251fd281f9b77c054d53b9c5446e7e2cff20ed7ea8671dbd1345fe26d71f4de287974270b87563eda62fafe923a8f0685f2a99f99bfa
+DIST thunderbird-147.0.1-eu.xpi 480260 BLAKE2B 
768dbff6846330f68287553914c2f664a0e6a2271e2bef29d22b3ad51a1195ed5a1ad51b7fc483af9376c7d6e992da0f3a614eabba5076b4770bae0fddf01197
 SHA512 
4f453d5995154c59f17505134aacfd850b2ca3bdeb09150c7c0fe8c555b006d4295a610062dc8d443acacd8a9facac30f6a86e95853455713d9910c1ed239d35
+DIST thunderbird-147.0.1-fi.xpi 479305 BLAKE2B 
105c1975e5535c9618dadbe584f839f3f77180f5478a74011782bf536279d12f3033d5192a3e648ed0e127d98a45fb37631bc152cd0b8e87956837b601796fd7
 SHA512 
0dc441d7f52bd597df76dd8a1849811b58963c1d18e37ae2b8b4d0b6d5e5c576509464d9df87ecf1d8452f8bb50689144b3ff771d00060f77e41b2a343bd0cee
+DIST thunderbird-147.0.1-fr.xpi 515110 BLAKE2B 
379026d8ef4510af0c1ec29575f2ad51b59d2d932aa406e301a40006ff27d40834ef1101304d062464f987b0e3a3fc6952be3768811e3cf616dc2bd962ed61a7
 SHA512 
0df3645609cf81f46bd68d4fdef3fdb55536afce87da2dc4531abfcf62ddb61c7ee213c32b520dae9a1ef677c71a05c52b7749b0793d643b4f610207510f514c
+DIST thunderbird-147.0.1-fy-NL.xpi 497416 BLAKE2B 
e31291cf1716d9a8c684f711570f369d3addef7abeac05c6d4e2daa2a39c6cf072a099de0e4335aa1a35a5fa8f8e0691aa0199865113e1ae4711c578595515f2
 SHA512 
503777754c28bf14b4239a41af4add07d3dd8e7ede431363ebd3a825c35a686d82964cc469f1f44cdefe8f2c82ef3dc77d98debaa6c6f4496ebd1ae18677a81f
+DIST thunderbird-147.0.1-ga-IE.xpi 374259 BLAKE2B 
96df93726e4431e140656fb555050eec581baf5298df575d62291fa36625c6440ef4846d80e2e9c461ba9ee1350051ec425c1358ef9611517986946df8547bc3
 SHA512 
7726e5d78309c296691ac95f3180da038decb971c21f30fa4f13f9a8868608933013df378504ad01be4bb3213af0d1dddaa9103e67f2667646e867462e4aa11c
+DIST thunderbird-147.0.1-gd.xpi 459623 BLAKE2B 
a301fab450e076adbcb9e730e4e9012a9eb257cc71390de4bd54d54d377239fd40cf7e0806d4400a699704f370714993c3a691af0028e09a3e51f5f60e0794da
 SHA512 
1cf26f2681a728e9c636f7c19be96468e05a8a4aa332273e775e1f6f3d4cee15f3e0679c73d81be51f561a47ab74421f9a57f6f842e11d806f2be5b25eb9c480
+DIST thunderbird-147.0.1-gl.xpi 488946 BLAKE2B 
dd6e46ad48fe1e859c29f36e6ecbd2a7d3c20ddb82189e97f7a554247f915c33161cc5aab0eef19c6171dfbd4e7ab59afb42728b6ad037511530db04d61c17db
 SHA512 
a83cc7cc44a78f9233d4e738ff19b609dc3e3f0eafaa39b1306f829d08b28f6ca01db38dcaa30475010bba147bb95dee32882a0c1fe5fa5c57a8b945f29e3842
+DIST thunderbird-147.0.1-he.xpi 444170 BLAKE2B 
062fdf8fc44fa2d24b6a611024be66400c5d586dfb7b2e94ff2af21d22fc245fa2e7c98902c4fd59a523f54dfd6ae9bf226c06a77ecf4007a33dcee693e882ed
 SHA512 
8e2f77fc7f7d974f6f1cbcbb27927aea826f9deaf29ff74391345a22a33f8281556d42f18d2485ec9b7c70b8046ac933d5e3fcfc5be824f5ecc128032ef18d89
+DIST thunderbird-147.0.1-hr.xpi 476345 BLAKE2B 
e2242d0092e3113c534baf805cd4633bb056930c55fdc43e1bfde27e70875e4ba51dd2ff8c23a309010af340b241ee6e466b70a8e481b653d3788fcdadc4024a
 SHA512 
5a0a072a4e30b355c816f5d3647da1b12e97e740cfb490a88074e8563407cd1bc720e2933c3d1683a9e4d306bc8ec0bb50b1f229f5600dcb1a9bd8e29dbccdd0
+DIST thunderbird-147.0.1-hsb.xpi 521894 BLAKE2B 
e1e7dc54e7d654bf26ec346b08ea145c41ac0982fd325f760e14506939606b3a3b6072e28f6b2f5802f43de056bbf5583ff9e5c90774a766e67327ee3f3769d2
 SHA512 
4c7b264ef5f65734875aa8305748e7e0df00882908e9dd056b7499812632b737069132c1909fc8a925ad8d459a27af901ff69a29a4836ad44c1e78b5232fc647
+DIST thunderbird-147.0.1-hu.xpi 524548 BLAKE2B 
9f1cc1049a00b4fe2503f327d44bad008bd320472dac24235f48dd62de44c9248ab5e4f172f622fe1e01d43bbb7609191c63f422fa1c7f6f88873e59e86af4c1
 SHA512 
ac425687ef3f4e7aa8ae23f50addea91914cf15e009c58d81e99c27686cc312972b758deabe9c08600dbed6293c9499beb143e2b514a2002e96af5e7dbcb3acd
+DIST thunderbird-147.0.1-id.xpi 471096 BLAKE2B 
6687d920aefbecde8811d331076b71dfc8d501f86711d31cdc36c05a9f350da238405ffff886751859bc2fd5b3c4810eeb1126c0416cdc9901d8bc279cb223c1
 SHA512 
b8d2445b57bc30adb201d422cb5c6ebab10272c1a0b1c9fad36004aad5b76b24b3f2800d692b4787c05f97947b5f14aae75df8850d8008eb58758c425fb72f63
+DIST thunderbird-147.0.1-is.xpi 485923 BLAKE2B 
5aed1a4dfe3fe999213709c88a4b3928ab2c8706061c39721fda31306758e1dfc6c14fab050b39728553d7f898582256490d905e3559d080a16166a3341a8d49
 SHA512 
94b10e73fc77fe1b041366fca001cd8f7464c13e26977fc843a3c05dc53c6e87255a23549bd8e91ff5f30d47b6735ac02e8045f3fe4c3d4dfa980de7940cad1d
+DIST thunderbird-147.0.1-it.xpi 494991 BLAKE2B 
deec3a5a4ccd1932cc24d776f6f2c4afc35b3feec3d4a9137bb98cc12a66720475ff111866e92fa2dd68d54cd07d71123ac649749e424a7e47633ccd27e46f9c
 SHA512 
5c56de29c49b0197f78d0cd6dbf58d12c103f6dd5ac1797b1a7274515093461a6703fc97343feedce5c30ddf619fde4e8ef8e152e86c1e710e18bd4d4699c77e
+DIST thunderbird-147.0.1-ja.xpi 546208 BLAKE2B 
a41e3a09abc98561545da92fd491964d654d47d7e9ec921ebf6de38d061a02fe65222c3a09ef589d4aa0fe625ee67759bb2a22790af91d57a4c9710e0ddc83ce
 SHA512 
3bf8177280c8fda36f5b328cf95ae38ffd1950c6433f37c5c576ab688c6c6864b8440ed667e2bee81067dc2786720b01a535f2072af57b22d46274dc9f1c8048
+DIST thunderbird-147.0.1-ka.xpi 562231 BLAKE2B 
612948d625cd6133886ba644e41a8e7bca5fbb8111ece404c326519487e431f75c11de2b20df5f04093ea4e56e9e0744055a3d2ccec93c4ec859f54123b7e26b
 SHA512 
5a1779aa034a05a1a5050721473ebfbe73c76dddbaf9b084937cbbe26259ecd5bbf39a24d8ea8ede3a3ccb96038bb3ae970f414254d652364642d17e7dacb86a
+DIST thunderbird-147.0.1-kab.xpi 469115 BLAKE2B 
c46a45e15b894059e1fa9b9a72f6631a2333fa4a5e405a21f972b5ffe8fbf0f3e0e646954ddfda1574ee89912dd5fe4be13bf00fc95c1de96d907f4b4c5634e6
 SHA512 
c76af17482069f68982bc809696b4f430a54d0436a92e58d993e37086e7790617ddde26bc8d2a708dbc76e6e3dd710b577a20be5f2ee42d570c87e4fca367d5c
+DIST thunderbird-147.0.1-kk.xpi 586397 BLAKE2B 
cb618e066883751aa2d63a6aee5c9f62ca0cc58da0d4efac889def97a5cdbf7d883994ac5d89638cfefcabc85b4932ed1aba4bf0fb3f8b5b2173728cfe3a8e88
 SHA512 
9493cf0375fe51abc22c752e68dbc2d6dedb6de10e8a15f7eb6cfde99afbf1a78b4c8f4809b3b03b9ec85b76c6e05ee3e10e944f8b8ca9ebdc50e7566c60c766
+DIST thunderbird-147.0.1-ko.xpi 519363 BLAKE2B 
2ed965fae55aabb42e87796af56e550910889da5a57e6a36f10a846063e424b917033819bc8855805ff524b994e8051625de9d7891ed1d6b4843924ff9ffb887
 SHA512 
36bbac618f7b604bf95222dae72d19b8acf3a2892b6ec5bd85f0cae6ba0d5b0600fe1a101e9264a1937105e950d9b8b5f4d17c515bfd92098305084bcb92a0fa
+DIST thunderbird-147.0.1-lt.xpi 451110 BLAKE2B 
e9a806556cdc42bbd2620c629d9e47099b0e608bb7e0809782c4dbae5ad93cb96389c26cf21a0f7d268029a402314bc3d6a52f862b7837bf4c91531bd44e1f07
 SHA512 
816a76744908ecd650776d9e389e406090ed5a6011424beb4606f003f410c6da3f2922ccd1af0fca6ab83a3ad2a235ed4f3da31f23c3155ae4e73992c065ffe6
+DIST thunderbird-147.0.1-lv.xpi 388699 BLAKE2B 
87299a4e3e4fddf1a548284831ccff7233763936282ec6b7f27f0b9418cc3d7c9ee172e3b9f1c246fd74bcbafc8a9669247bb8007b71e07fe52f9932f6b4d101
 SHA512 
47f9b4b885a0ca4641f52f520f38d230eae9df651f2da1a69743bf6e04da8fe010f5f555c175eec3636d5acfb7f5e4f49d39c448768ea27a6c734cf315833943
+DIST thunderbird-147.0.1-ms.xpi 350561 BLAKE2B 
4f27a545b920afbd73045bcda8c453af20e82f7a4abcefe90a8518755f85cef7836a772c3505307f47929f001f93a6a5f4ca5b888a31b6fa74e37a56ea339794
 SHA512 
1d295af49e3ee8cf88e758e9466d175a96424e5ad89e5eebc5189adddfd41ec1d8c626bc2b8b2a9af723282cf6c10575eb903b8bec6ff458a55f741439095a9d
+DIST thunderbird-147.0.1-nb-NO.xpi 482518 BLAKE2B 
4fd352550ceb1350b62a0da3ae8da5c9c34007f42b5b3bad290de07734c40e30e5f9a6bf3c74f197756dd21e1f6bfcef3160ae675a189ae17a6498282fb73aba
 SHA512 
06e5b898078d73d08f6509e222247e2bf78b1cbde03092f49ed65322b6b231cb743befaeddfe6a793e6fc617662c3b9f7813d8b8c903fe1eea41998cfe01b715
+DIST thunderbird-147.0.1-nl.xpi 488673 BLAKE2B 
87c00c72d7ad580f876c90b55c6cd569f4fc92678227ef2b355075d61bab3973147978d89b5d686e0b082a12007b8f7b3e9ee492197c01b9460d72a7ec499c3d
 SHA512 
abacc92d38a40046f6a6970927ca756ba530d632d6b929e6552c955dc1a982c0bac344d5f1f9b5e5e99d75f94f7d6ddc643dc52baf13c0406c1b7c8008b16ac3
+DIST thunderbird-147.0.1-nn-NO.xpi 486396 BLAKE2B 
62bbc2823f4644eed44533cfffce3a73e668fc034eb50fd65a68224ef84b1d2205aba5e8dae16e6a0085adbd066e2af96f5ee34cfad6ffba20e7135f9d7376d2
 SHA512 
a07c0d3810c63207eae34f89ff95552c01302c97cd5ca9a6c070c8a3e92df2796168669d5835e6be82456f6395041cb6646dc4ac9688e72afc1da17497ab18ba
+DIST thunderbird-147.0.1-pa-IN.xpi 435804 BLAKE2B 
e0f04c283cea8d834b9dd9d5612fbc17de481e1e9095695737af9788e973599ecdcb7673a5d60aafb17c832a5e7990c5052f72f1a36f28902abacb37d6600700
 SHA512 
d7cb75f561388db9be322c904fb9e69ae020ae9adf798bcd93e741f76d4cd4ac6dad92d37b10c01f900339faac5387968d176a2c4b505fd5405134f371134271
+DIST thunderbird-147.0.1-pl.xpi 522619 BLAKE2B 
b06d058b2a196f8bec989441950a97c4552f98cc90baab18364bcb2c49e66924309272f061b8c1bee921621a9f0f7c3cb91b1ed3868097a0247b91abf6baa30f
 SHA512 
ab418d5bb2978101da235b8e5bf1c5b427894e1fa624e3373e5e9fc407700b328d93af5a3fdf7c20cd3458a5ecf934985b2321ba4a5cb83116c766194dd14796
+DIST thunderbird-147.0.1-pt-BR.xpi 496744 BLAKE2B 
5f12b88b144674eeedb19c916e4710f75f4810cc18010841876656bcfa59d9baaf0ba6d8705d2700fa8694d4155f8ce1e7a1bd0b3eaaa1101b2956fe226d4ed8
 SHA512 
06753cea1f48f64efc6fdb7080ea459e44a1d904a71bc5971644c89ab857a08744773222505a91d0d75a3fd431890fff1fec96cd856722cce1c608c5c7d35f62
+DIST thunderbird-147.0.1-pt-PT.xpi 486346 BLAKE2B 
4c210396b3f4cfce16c01c0b028ce466012dc8010fba9fb6172a979871ab9505fa16f8b1f2a7561d6930eff30aac60db25d993fca32d0ab206bd52a6dbe217b6
 SHA512 
4d4b3a5a72a10ee764b09dad03f40df00cb024d77bcf69eac52e062d1a5e488012fab472ebe8799f86417b1ba103e41bd8b491c25c48f9bba6c89bbfe8c03fd8
+DIST thunderbird-147.0.1-rm.xpi 487590 BLAKE2B 
1bb2aacd9ec0aa0b23d29141abbe38c5a6593e173716c70b4c88135bec6761579fe8a454d1be03e5205fa631addb6c2279150a10c7d52665c99d7d7d6ae6a8dd
 SHA512 
26298e79c2daa2e6a512e46e1611dfd9a0107a727247d89e4f6705c9df84ac67cd7cd87781101096a7dd3c95d2c87ef57c52c4bfff6a5187f459bc658a30d893
+DIST thunderbird-147.0.1-ro.xpi 507924 BLAKE2B 
3929b8342007b703ae19a093ef0403490c2ed22e779ecd63f7c1a5c6b3fa01f2a3d51836952c6a9f92bf5f8db5d5dea7a2cdb2aa5512ea15cdfde11ce81b42ff
 SHA512 
e20b93496b2e057a96b035adfc64b89e1c014a2939eacc84c6d1b30c6cc384cab05027324ade76c8dede5e4eb524664089a0ab54033c32f3dd0bc2ba70cae6d6
+DIST thunderbird-147.0.1-ru.xpi 601170 BLAKE2B 
645fee737afaa29e9af35bc91266b7f1b952385accf1366789813fa5903de9dde39827e2c8097a613329858d3248f5f691414e3a3d05327f599d4534fd6bf98e
 SHA512 
d46c1c224fbb32bc2cb3917e9a7af819534f7a0aa9cc757faccfa55f304469f792c94fed0a88bcb37b5616f1de76045e303d91852f7213c1a82ac98470d5fd61
+DIST thunderbird-147.0.1-sk.xpi 527055 BLAKE2B 
b8092ca289de4cdaef41d68b6395c792e3d79948700f0019a1f9df3bb0b08dde5a84281c607ee45e3c532c917386c832a7f9a4768b019c3a3da7f2665d4c2cfd
 SHA512 
61e6b41b652ad50b9b34e600247806db10dab117a403398e6f3ee384891711a43ca84fdcda68c4b40ef9e05dd2fca47ecb20c504b825436669cbd8a07a74680f
+DIST thunderbird-147.0.1-sl.xpi 491183 BLAKE2B 
a46f5f81f118d666248a359575edc183aabd9429b4f96f7e32da1bea1106dab0dedfbe68a99b73639cecd628ca8bf97b8277da7660b7176d8f0a43cefc19828c
 SHA512 
369f5f30ccf21c7122a5aed6841fa14b0d9dc962d5bed6ec52c411b4036fa28f58e6bb6da5596b4e9f9e9b485e71ec38700f681c8105482a678438395d16554a
+DIST thunderbird-147.0.1-sq.xpi 513078 BLAKE2B 
dddc1a45dededb0d61284dae37e307d741c3bd7cc1b881cd3999a39efb3d13764b8f95cb3f552cd7d17b163abefe499c85c25a5a39b78d56ad1d81103601bb7b
 SHA512 
7ce6dcb645d5b3386bb3003c27954744081fafce32551d81b7ec764d5c55fb4eaf097221cbb8b43996f4cdaa8b24532a10124fdb285e56f0aafc74ca4db428a5
+DIST thunderbird-147.0.1-sr.xpi 493074 BLAKE2B 
16ff9744fd397c030cacd6267491e8853e641c0a392094d8171da415e6155a2124661423328cf601daa39d19eb7422cfdb9576061a3ca93aa7a7f98dd32882f7
 SHA512 
ee11cb29eb3c34de105ecee3fffd983c8a251172df718ae5984e3aa27d1224f9fa3771f288a9f090959f8cbfa717ec437ff58263bb2d7a9054eb0d034d3150b2
+DIST thunderbird-147.0.1-sv-SE.xpi 490952 BLAKE2B 
927b8993c45842974a60d8799b18ba8b1f92ebac26f92f7176223e0999c7782416523c8a4c761caf54d480b55f9398c5aad14597ffef5247cdaa7a77570fd547
 SHA512 
29ecee273f7f4ac31b6b3a8b737024b698bc6aed35f38ed8e5c2336ca690fa486b8a841f9b843d8427ee85edf8129850fa87040a40f9c4c144e364f861a691ae
+DIST thunderbird-147.0.1-th.xpi 568262 BLAKE2B 
8836e391c3e320b6f1d8727277167b647444f1e25af630cc4859192c5d23d0526c6001a7b03946785d869f4e3d5e01010ddddb09636e38107d3be9218d23a081
 SHA512 
e47a0681cf78300c54607ad4c5a004547649538c2a8f83d71fc4dcad889a6f8a4534b6b0616521bbf668b9e3a2c0e8602c00be6d19801ad6eac04024dfa82915
+DIST thunderbird-147.0.1-tr.xpi 502703 BLAKE2B 
a2c2b99ec7dfd66b6d176b183fbc1db3571ffa26deedef7b4d97fec1a18c56af944e1b7a6cd51bb427b12c21b096c282cd5a658721a557851948772eebb15bd8
 SHA512 
ae61258c25bae2c4e6d4c22465a1039e6cb044584ef03c98f04629514e7917c6580f68b6054d5df8497b7147fa40a5b6497b74ea4a447ad4b090ff178cb560b7
+DIST thunderbird-147.0.1-uk.xpi 581933 BLAKE2B 
3409ece349f408d6b3234f7390691ede04a67fa855e5225fc7b75f030be328ea397428802c892953ef70481665b82e2e5c9961189c371030939eb569a87449c9
 SHA512 
67780ded3aeeb61e1f7757a46587067b5ad1a100380f9812a3c6603470ea69a5804c932d37ceb71c613b5540a9a22e41b34396d0b080a45a5fb52c2f13e475b6
+DIST thunderbird-147.0.1-uz.xpi 352854 BLAKE2B 
2d3c7dbe4709c34ed8bd939e582a631a1d38aeb6edf9c0b2e418f281c868d37b239ffbf9404d785b0271e161bdddcf55d0e57ce36e5da190e9e381ca1afc8590
 SHA512 
0f765c9cca883f57559a42c0716a962b9be3461378f64a4c128ee5efbc99b357510ed3c0c047c88832a3b1c586cbced634a8af1832cb3fb6742f0c527350d105
+DIST thunderbird-147.0.1-vi.xpi 525246 BLAKE2B 
6d6bccac26064f5e2d80694c9064e2e0fd75b805c48cfff67b6373b99a6cb32ad89b82b971d8ff2e164801077f2f5144d1bbaa25ea0c87059cf46100501abebf
 SHA512 
b965f4d4cfe6716816becf55f7a74faa0108729bedacc97e0ddf9b37a58e62056c9695c2b27ce543bc6bf80f801ce3a394f48d8ae75c322d31fd519ceb83e9a1
+DIST thunderbird-147.0.1-zh-CN.xpi 514162 BLAKE2B 
da588c5cf6b81b93b7bde3f67877d44c619a0223c9dd357af6d6fd87381642b855164e16f63ab6761c77f5d17e048238b29db8330bd0e0552bd4787f2fcca06d
 SHA512 
7ffe5e15bffc097904afcc2152589dc27d96b3e81e88ffcb72a2b4056fd21ee1afc926e26792aeac9fcc3190696f30e65b80668c98cb9b492ebcc1337e511be6
+DIST thunderbird-147.0.1-zh-TW.xpi 517870 BLAKE2B 
2e4afa7f9619b53de13cf4737411b25beefc15b0adca128077a1a5728400bb9b0dc3a0522dc44231642a942c662ad75e5fe9b441e195ca09261a30d863d97290
 SHA512 
24925956e15289e924a9cb9f3d4a433d3b49794faabfca918af4bb630e5f799e0acc4b30ee43a0828237bb747383edc7721ca418c3b293c1aee93ace41c0f6d3
+DIST thunderbird-147.0.1.source.tar.xz 781853284 BLAKE2B 
22993efa57b297b202e2dd0971361ff06e1a41b3a11a018494efeb509268496dd55545201276e5caf71eaffb2401c19f09f2a1a5465eb98b7edd296ff2e6d5b3
 SHA512 
bae9adbcb1d45a7644e4d699215a3da85b612b9d99516bdf12f84482f1a6f89153ec4d5ab6dd8bcf69dc512cb50080db4630a5bb52525f22213c7af92b4b77d7
 DIST thunderbird-147.0.source.tar.xz 780223936 BLAKE2B 
59fe7ef910e65dfa5b2e7ad5308123df86b854c336fac47c2e8e96ab4d40c04ac28561084796a8c33d7c9159d2186abacb8362cbc6c12440b5965ee3c6fab5cc
 SHA512 
d04a135f23572123d5cca41c2611704aa06cb81e0226c89c267dc527f59fb0d9d5d8b8a49cd126626c2fd934624c9d2420ae71dd10a912b3011f3342fbaf7511

diff --git a/mail-client/thunderbird/thunderbird-147.0.1.ebuild 
b/mail-client/thunderbird/thunderbird-147.0.1.ebuild
new file mode 100644
index 000000000000..b72e26eff40c
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-147.0.1.ebuild
@@ -0,0 +1,1157 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-147-patches-01t.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/glib:2
+       dev-libs/libffi:=
+       >=dev-libs/nss-3.119
+       >=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-78.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