commit:     81802bb420ce176db90ddbd1aaab74594e49fd98
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 18 07:44:48 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Sep 18 07:55:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81802bb4

mail-client/thunderbird: add 140.3.0

Include relevant changes from Firefox:esr, like python-3.14 compatibility and
updated nss requirement.

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

 mail-client/thunderbird/Manifest                   |   66 ++
 mail-client/thunderbird/thunderbird-140.3.0.ebuild | 1156 ++++++++++++++++++++
 2 files changed, 1222 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 038406305b74..9918caf57ab2 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -2,6 +2,7 @@ DIST firefox-128esr-patches-12.tar.xz 19024 BLAKE2B 
e6e1cd56548cb429590cac156de6
 DIST firefox-139-loong-patches-02.tar.xz 3096 BLAKE2B 
2e9c0f3dac780c808a13f70fe3808df9976898360b55113def97bf3594893166e0647c70ebc389b2d14fa2c2453fc1dd68aba20d92178670ef97d70c34205e1c
 SHA512 
e1244007290e2e15d14cf519e3ade6a4da06abe41c416de60569a11396609661cb62fb5b592e763cc079406699dc33d6a34851f71068f4d09bdf34021b035a59
 DIST firefox-139-patches-03.tar.xz 11536 BLAKE2B 
a7610d1348a2a4d02305c8d694a1648997040c69cb1445b901fe456045d0b1a73f28b0102ed03d34f70d8cc1ea9ab0245599a104b0063c7fb0dcb5a8fdd6f60b
 SHA512 
4733d34a842d525824fbcf6ef5d8f33e26b4f37a16aa87043427eaaf1e0665aa257cb8487bd692e4fd095c2a78553ab3f0213208124c3455e534394576fb5614
 DIST firefox-140esr-patches-01t.tar.xz 11412 BLAKE2B 
fc6e669c1ce1125c1caa1ed2b9f9e1ae3ee8cde22cba84cbdd4048c926112c6bce33069c3ecd0a09fa31e3f4d294c4aba26fc6c502a91a1f840d54cd2bbffb2a
 SHA512 
cfded87de70cbdd243a324807248936d7ca817b82bb9c3a70117a52f787d4b12b2d242fed03d99ea35994ec722673f0a57138d37558e9a7b5f2ea1061c9395e1
+DIST firefox-140esr-patches-02t.tar.xz 13408 BLAKE2B 
5fb65fd1b12c3b9569677e3bdeb8c73ea6aeda6109c0ec969cd49b8787874e48fcfef0893452529b5680c0bb01368ab1cde49b4bc9bf870e7c93eca905642b67
 SHA512 
e7f3f163bba110aaf16aafbac491c3fae5c54c2b0188fc17ad6675a81a0dbffc61a2f15be71474193b501997a205bfc7eff58a85fc3fa700b441aebce85aa650
 DIST firefox-141-patches-02t.tar.xz 11688 BLAKE2B 
495049551ac01dabaf1fa3d20b612731068cee991e0221c245f54b5258c86f817846ecadefbd425da7df360d4766c8d9fd114068692daf2a13f05a26235e5ab7
 SHA512 
335fa3ac8c5161bfe4bfc9af75ff8b32e651cbe01526680df11dfa022957bc3104e3a475251af6dea0fc960ae0ef1bb1a195932b49bfab7a8df0695c1ea65561
 DIST firefox-143-patches-01t.tar.xz 13612 BLAKE2B 
504f8563092625291d8422c53e965e6a269ece38490b4ac8d2b30615a70de6abb157a3a9c13acbd32cd3587a02dd7b9362f45d17a8382d96541344b3278b4d97
 SHA512 
42431fb24c95934f8bbfd865258db4a7cd160a2a4a785316e5b9ad204e4bcf141ef3f6008a57d9a20c9210ca226608141b255a18efd3f94d5ce7c0e05c8ad511
 DIST thunderbird-128.13.0esr-af.xpi 534911 BLAKE2B 
3b167ab88316ca54c392f000cb49a0e8f69d5e84ffbd4586148a8350af21ec59302d6e8c310a067f08dbb1462f90e801f1a99481c23508e1c9c89d143ceb8ba0
 SHA512 
4ab4dc6f624f98460d5a135aed856ad3b6f49dd6f52359c5ea5e76a88f2cff3cebc07ce49e12948451ff1b5c5e6d2e7fa702c8aefa8bd61421e83b2d4be95a74
@@ -394,6 +395,71 @@ DIST thunderbird-140.2.1esr-vi.xpi 518730 BLAKE2B 
4452a1fe7be3f7e10b90beebd0a004
 DIST thunderbird-140.2.1esr-zh-CN.xpi 507880 BLAKE2B 
c9e95385aae95b843963458982cd1b29c35726b95d80713ce76087c9831288099f9c04e4a8d92c7a1f7cb668cde2db9cc968076f97a47433840efb216d5c84a3
 SHA512 
93ac8b27e2f9b4acaf2245c10d3bfa095162f191c38e12b671590ee559df6ab33731ccdb6f3f86fd3385ed6f251947b947511065d207c230343674b954b02870
 DIST thunderbird-140.2.1esr-zh-TW.xpi 511181 BLAKE2B 
0deebe043ac0e1177aba024b91738968fa0c832d6d2fa37e4bfba1fe3871a845e743445b211f4bb3cae161045166473d58dfbd59966323f0a0b3ebcefe9df5c2
 SHA512 
fb317228fd3a8fff88094df377006111ba2b600e83b6a11d16508df24923e5ef85ad2e91ceabf7d67716953319bf3cdb6c5d1d044843017b777635d5c103bf73
 DIST thunderbird-140.2.1esr.source.tar.xz 766037104 BLAKE2B 
3bd11ae3ee382204f2c8ea72484c5da129f81820ef45c72d9fec5aba384dc4ddb31e41ce67df99f7948f61c6ecc0c542ef0206d54621c86929ac6fae0eaff6de
 SHA512 
fccef5b8d60cd1aace585f253f52587cb3ff9384bcca2e150d4b52c8106dcd19e4d911f0ac634c0adef2da5034169c81667a5634ee14a5f5fd7cf194f6b86576
+DIST thunderbird-140.3.0esr-af.xpi 316219 BLAKE2B 
7f62c3b0a3d20c7ee7197bf39e183feb95c113745d315a7c6624ef7b07afd237b5284e3f1afe7390eeb7701e7c2bd6bcb74f9812561c266cb6d1e9e09f28a9ed
 SHA512 
b781ba7d1481e8f2e81b55983ab03f69ae72a5cc493fae9ffbb088949f601451ed5619f549fc53c63ae31996464d044fd091edfefbf320d3d847ab2a89704cb0
+DIST thunderbird-140.3.0esr-ar.xpi 436173 BLAKE2B 
adb9e6a33f0ab999868665cae2ad9d5eafdb7c3f1d3fcbb9ee56d0f193d7a0b9572279d7c799fccdc4fa37b4ce285efd507201a5194d03bb07f8c4c5f3bd1ca1
 SHA512 
9a3dc85cfd0842cf1d1c7400252d6bed43a866a489ea91acbfa1fecf380dc5edd4a262384b718ba5e1632d9a09eb8f9e8b10c56b32dc5c94f52ec0599540c78b
+DIST thunderbird-140.3.0esr-ast.xpi 340598 BLAKE2B 
6d513dd3c411c4ea9827e4592cd9bada417d6fcd7d5abedd71e9008a74d738052d206b8017147bcaebf37ddf71aead13efadb68c403444e05d15eeaac719ea3c
 SHA512 
7fea5d904110c99a9b7e5092b03303e9c91af9bee635bda876f13d948124f134c0f128e997bfda2feed8a162564cc94d8e66ed2663ea71dbb72ec956d320f2eb
+DIST thunderbird-140.3.0esr-be.xpi 520646 BLAKE2B 
2ebd15f321282e2b3c80e59f40fee91d679cf6abc77121ee337ac13fb11d86e91fd9783200fff10074b5d8325521e69d013463e49a7ec184a8a51e5a531ce48c
 SHA512 
f7dabe3b2c0e4edd68fe8cff1e096ed71bbb69e7bb45e1a097a8706a518a3cdcac44d5745dd705b0d6991cf812162f11f29a10cf1e3866355f6a39844ed2c8ac
+DIST thunderbird-140.3.0esr-bg.xpi 535505 BLAKE2B 
7502529df99e8d0e2e2ac9b960464737e8e9394795302a3130c523a0789d8a42f1d06f71d5a96605aedfca5cb9409dd3feb8c514bfe6022db0350009112c1a80
 SHA512 
2da45577c4b817555bbd73373b8e2ed7290d15d914f01db664d2bbde7463dd007cbc17b88f934bdb33e6ebfb5bb3caddc9d77b9ac99e68adc7284bec9956ca72
+DIST thunderbird-140.3.0esr-br.xpi 402748 BLAKE2B 
301feb6d02aec8140b8e3e967027455de9935159008c28e43c3330908961a5c091340eed2bb30f63fa02f7948229254609f4e48ca6919de800f15065f2773ab7
 SHA512 
62bed4ced5eba3151c74d6964b10d5076b08c0dfa8476616c7b41a9ff6e99692a292251e944bc43ba021700d8f947da24471d5c46adbc1233e37d5ac13c2cc56
+DIST thunderbird-140.3.0esr-ca.xpi 440584 BLAKE2B 
20ca2e9b5c01814c627bfb5886481a11188abd1fe1e4e63c031eae6e6e521c033dc2be23c273556666d04a5dd5d6adc4843f1cceb99ca3ac7c252182ad078f48
 SHA512 
5da424bbab6453d3bb12b910c10ce51c4a1d441c8e053aaabd4246c62017b88485dc73c9fc5c8e70d87dd8e5beb3d2510384a207ad3633d6fcbd4fad974062b4
+DIST thunderbird-140.3.0esr-cak.xpi 418018 BLAKE2B 
7e4f9cc57c9b55a9e6ef5c8bb9d12761fabdbf44da9bd96c448031f814881afeaa3546e6cfbf227aae5e64fdc8a42fcdfaa9fc003dd28927677c0c67293647a6
 SHA512 
95ff7fc1bc4a61f7b9ae6be2100d041a0713e4711797ef2e5d6b7466445528a1eef67d5c4583386228c827213e93daeffe9348e62011ef12af859a2ea5f4b7db
+DIST thunderbird-140.3.0esr-cs.xpi 519527 BLAKE2B 
57cd2ca8e9c34454bbdc219bf10e628cd7d74debbd25d2775a439ce3958ec200813cba95b2367af4cb40f36367c9309b6ad59d6ceb500212a911f282088e18bd
 SHA512 
656bd5d397400d54b418e39021310aac47c18af2082d7f2e3b9a997adb17a78b2d66e8a4f8322cb5f54a0203d8e2e472b83f371fbdb84de9fd459147aa8c94a5
+DIST thunderbird-140.3.0esr-cy.xpi 487646 BLAKE2B 
26e118df70e7185ec6cb8709ced9c59388d6c999620eb7cbd3360da019b41806215621cd517a022d57e8bcc234ccba41cb7960a8a796c328612a0e490caf89a4
 SHA512 
fa42054853b609132eae9fee92c5afeb77d41d64979123dddb0decfe0347d039e65f5e17ca7d3dcb2535ee2c5d22852ffeb32f541fe316a87cec4baae1382e0a
+DIST thunderbird-140.3.0esr-da.xpi 476637 BLAKE2B 
adc9257918486af56683017eb9956f48830837181262ed085fff657460ea91dcdf13fb746113ac25631097e94729a1439a359337c16d0b65c24f401c611ec353
 SHA512 
f4c1d2198d4c10db6cf076a24411f1d7bb2b66b2a29cf80655b877e150e253742ea9dfc171cdec1b413a6dba32864e5e5030e5922c6caea4151f6863ee9729df
+DIST thunderbird-140.3.0esr-de.xpi 505054 BLAKE2B 
9fb86a38f0105dbf91a8c41a1799ecbe09a55744ebc3c3ca8b251fba819008604cdc9b0835205ce88b0c73ab6e6f3ea46ac2de80ba18b265330eb4bedbd23446
 SHA512 
655b1328dfedfd74612735399e6cdacfa10bc2cf5e60f51c1c486be1479563e1b0b5c0f660bbad5862ed90477413230dedb35b875c69ce5971af3100c965a1aa
+DIST thunderbird-140.3.0esr-dsb.xpi 517904 BLAKE2B 
b878a597035529085ada5dc4aff30615fcfc025f4a799cc3487e571de7eca184f00ae32fcd0371ecbe46354adbe67e51b37d599a64e2aa124a1f34a9f198fdb5
 SHA512 
a17400a34a12293737cd035e6502e94bb4404cd36a59cc5948973939a033a0e4640bca12e35a2b3e49f60d81ebb2417410099a70be71543825ddcea34ee97766
+DIST thunderbird-140.3.0esr-el.xpi 609083 BLAKE2B 
ed3dc1887ff5de4ded8579533ad07bb34d11efce8f84aa76694e96dd308df91e121737d2c7f52fde336338d45c73f1228a4d781742d910a0cb8a746b94de4a9f
 SHA512 
0426cd314dcd202c7318a96acf2bc6643a82438079d7fe72777acbac63638a9d32b21d0488b8c84c3d150dbbdaebf1fa5dca075c8cf912bfe16b5925197528bb
+DIST thunderbird-140.3.0esr-en-CA.xpi 451423 BLAKE2B 
ebd726a8352f8e77283f6b59e2c0794d3c9d23e45c7e510a097ba4985af91835a6b77b049b1c9896cbabe1f9ea6c2028acf69a36d911db17c1c41bb31fb3b493
 SHA512 
3f48612d200343ea4c9c62a4cf74bf256326f78035fc17759ed92f73049b5a1ce686ff54c98eceaee6eb34768d67aa8f9ed0efb5c3d3657ef0b8150171379b59
+DIST thunderbird-140.3.0esr-en-GB.xpi 452066 BLAKE2B 
e1bb494cf5ea2a447ecbc529f47496b53a010cfc29b89f9eae2c24d9b3327ad15bfdb490471d8a2dd2646b838e4e7b3be82653618e9e315a03acc10a1791da58
 SHA512 
dab1ecae5d0de85e6c73de2453cb7610eb6e3b21e0ef9f370b8cb5694b703951abc4fe52d7572a53f09222354af36ed97dcde95eaa16e1a119529399b260f457
+DIST thunderbird-140.3.0esr-es-AR.xpi 495294 BLAKE2B 
7bda619645a4096408f791a6e7b1e020dc4c2ff860f63693ac902d34f3c18f284acbeb8caa1b5ff9e3a3709e83bdd0cbb9a8d36bc9ba8da83b158afc081f5924
 SHA512 
157880eef1f252fa1544d0cf6694c8783149641e6853808e5b7050e141df35312d6c2a31c43fc7c4c6f0a3545b3035e94b5af76322b0de9b5c6183e4c10cbc05
+DIST thunderbird-140.3.0esr-es-ES.xpi 497279 BLAKE2B 
e01b084e32405196d4db87d044948c39917ee8a4e22e8177969991bb0ff48767ee2dc0eac4ba46a41bf427344672cba8c3f69ac24197dce2a531093c4ceb0bb7
 SHA512 
278b69fa7cd982c748c497b89198d3f19fdd202e8ecc3a69d4c2794a3ab233fb93e169d4433d3603162f3b74177806d28b5b27fd726077c857a555c51c0796e0
+DIST thunderbird-140.3.0esr-es-MX.xpi 488155 BLAKE2B 
13fba054e10452d3c543bc0265a6b4bd6228f5a06593053a5e9f3f3e6bfe42f65cec20f7782ec5602d385e433a77e3ef5bb478e1575729a618cad5df5644c95b
 SHA512 
ecf629e920fa720c97da50acdc04b8bfd7a47eb7ff3eaa9103093636e095e073288b15219a5277aae38b90a00dbdeb610cefa657757f1ba7bb43d0c5bac6cb80
+DIST thunderbird-140.3.0esr-et.xpi 443606 BLAKE2B 
dead960f734c8e3248002cb4aa131c6347892fbbf6b6746a4e182161868f5bc36f9e5cbdd037678b6ad6fb6623f94dad05eb1c4cd02ea66adc85634415aab452
 SHA512 
ff366a2fe1ca84e6f9519fd084660fa0545af5b242ef353955c926fe134df5c4567c51d347d534a18dd8498a59850d9280ab3f9348f0b7529dfaaf255833ab38
+DIST thunderbird-140.3.0esr-eu.xpi 473513 BLAKE2B 
2a0885fa6236116ddba8de449eeda7c21affd54d5e4652f4b60ba8057ca0e3dd4fa75dda94ba866edb5054c19ac865105f3ee1e75c2f0cac69a648be5782aeb4
 SHA512 
63c91b94623a7c691e5b7a2d89d54607263bd293533b9e2b327f876c945a8d0d0cf5651909ff7215bb92327bceba69ae3770c6483b418d2b139b6a821fdcfb27
+DIST thunderbird-140.3.0esr-fi.xpi 474566 BLAKE2B 
baff815a23c8d57de64cbf677ea4b479216aabf967f894d5971a8a4a69d77139cc37d28dba4fd5dce2c3ed422445b37014d4bdcb63237084e7427f3bc2f167fd
 SHA512 
5b37faae66deed31243843861ad1e59fe9f2a81a03fa015a11ca0582a6d3db0cbb0bb82f8ab7f91456062bc269494071f3d222773b97ca6b9a214be7c6b94336
+DIST thunderbird-140.3.0esr-fr.xpi 508257 BLAKE2B 
0547d9c2403d1c403a93343026b36481941d6e5dbee93f3790d3327a6cc36563159fd679c437dd0cb9244523c2f5dc30c6c644fe0f8986cabb9e4883cf116fa7
 SHA512 
4acb11dc448c8748cd7dd17d7a3024bec65af47ae300a5361f56e306b9173dce22c6dd5cc4956c8055aac75faed7cbb942c699987ba8e3eb4a92e248b51f969f
+DIST thunderbird-140.3.0esr-fy-NL.xpi 490665 BLAKE2B 
ceae3cb8316e459fb2ca9f7e457deb1dfe42842058560db074717f37488770d016ff3f1daa35cefe45fb9bb88e0ab4c4c91181fe66b8e6bd302913b0e734950d
 SHA512 
cd905dc14479b35ec4f55303ff4d214f2bac156687f61a4b05cf73626155880d5291de462aed2a3e2def2b515907710ccfd8d7ee178b9dfd7ebaeb3eb2a3b8c3
+DIST thunderbird-140.3.0esr-ga-IE.xpi 376741 BLAKE2B 
420597e5a37a01319b5f5033e5707e1ad7a230533e5282c17b8fc5130529c43ac54f696da96aafe73aa8357c5e4edd773f8fe02cdfe4311841697ce6881e1521
 SHA512 
64ff70a2b601479352031b4e8919d612d8cae740e8c5022586b7d3cb56b8dc2cb0527b232a94cfed179a8463d49f393d4fbe862434d8266ff92c775faee57656
+DIST thunderbird-140.3.0esr-gd.xpi 461957 BLAKE2B 
2a6fa50d74438ab4c2aa5e943979455f91a1c87623f74d82ecda1372dea400f0514bd524f9a06d0da639e379f169ff707d13551e6c9ea11e2f31767dae1a0f79
 SHA512 
404b8eef6d120b3b6131a5353150e7d9d536a00ecbd91b03132db82d85d365c02770c9eb69181b67a90e6557774be150b5f13abbfe44a8452d6bce91458fb2d0
+DIST thunderbird-140.3.0esr-gl.xpi 486671 BLAKE2B 
1219201dab68831facac49fd90c1fbc2096d601e25369d9706f33b2bb5c46af710ab9624c943f86674be244527c40d9b43b88dd989a3742e0fc21233e2e31953
 SHA512 
b7559be65e24bcc2158e8a2f88d60a4343c883e2bf774f9cd770b4f16d2311c3fc2670f5701b9aca131a738400eca1ade38394e82209d03e1700fbd46611980a
+DIST thunderbird-140.3.0esr-he.xpi 441521 BLAKE2B 
2043cf0a29e25d6cb340f4c840c346ab80a62a3937d4f855cc313e77a45a71eaa24ccd3e4c19bf5f98ea372bd3bb420813d13959885d0a18d4077b1d33464a1a
 SHA512 
0b7d19f5f1afc5ba9932b985712c92eb71a7d5868843af9c1cdd00af7f1ac40d8fb6a75e68726aa8364b8be20fb515291de3c34961a5678bab10eced8367828c
+DIST thunderbird-140.3.0esr-hr.xpi 464035 BLAKE2B 
60fda3e3692f697e7d8bf574e0341fefe859a8deb2316f5b16b8b19cb1fe55fd07dfcb38cab066d28854ae33817e8a81cd9494a9ebd80b0977eb66b78c6cdc30
 SHA512 
e1a18b07d44b6916c02aa6d27d700aa071ff2935452ec1bc7006e74569cbe32bafcb39c56ccba973bf5270ab9491f45a588e3137e7a62ebd3235dc065b62ee61
+DIST thunderbird-140.3.0esr-hsb.xpi 514947 BLAKE2B 
93017b9bcff29de2aa327f9da1482bd15e1a5eb5f15d6dea344560ac4c225a4e6ff08f90c11fe6cdf67697a38aa838cc9e9b1a1c6c803ba2c4c7ebe05b7d1a37
 SHA512 
7d0f4cf0274d33831954a7eb896f2f7e316c351ef3fb88d314bdaf63eced220b4ee95e087bd933c6654c68601a8cc1105a3cceb561dd3a289835f93f9eca3c23
+DIST thunderbird-140.3.0esr-hu.xpi 517537 BLAKE2B 
49286e6202a3e70c8aab4066c7057ef687ac618cd20c4333e8386e5a2271a981f2038125b477c19184eed63c0292e4e23cba0cf4cf0603311e4e18691eceef84
 SHA512 
de7b43f952be437d0c3de76c19af8c825b751172aefbba3303d31d3bdc8cd202f9c7e78e128d6abd49e34b8fcd5b0100e19a33fdc8fdfddfc3b441ee4d24deab
+DIST thunderbird-140.3.0esr-id.xpi 463453 BLAKE2B 
37eb078eb8db2bb1a06157d63a712b14874caa5df17a9089a595aece03f526ee962c9427c74fc3b2a3d265669bc1223057899c0b425f0f96c6aa926dc4e78de0
 SHA512 
0be2eafbae0b1adbe957edefd116ae8f6ce79144dbb46126460c3f8eb3a5ae673d6ed66356575d7acb6b16e2889824075d094a8b4e33c4786c41c27d89e9a801
+DIST thunderbird-140.3.0esr-is.xpi 482736 BLAKE2B 
8cc9eaf10b07cfd56803ff326cb394ed39d8e3444fca18b9d00fd35bfdb132e3502e09766288633a54c4ae0f1896dfdf291dbcb9b32d60b0edd29b5019629249
 SHA512 
34b57fa7983a501d7351aeaa54c8746871eb3c8d5adf65df64c96ea1b86f19652ea0f30d9ebeb58380791aa8793c0a9cba63fdad910cce2f0862ba1102cddf57
+DIST thunderbird-140.3.0esr-it.xpi 488522 BLAKE2B 
7e4e3b1ce3cb28a376b5e32cc8c72418aabf13be8386951f3ae5313aaa728a6fd93fcf306c38abb879e88a9b4052e3b215a6fa6c11699a93030679c891d4d7bc
 SHA512 
57b4fa4c8b19d8425a010d056f5183e114fa75885c23d0e92a91cc9e0d2037207c817cbd2b49fcb30fd557fb65c1677d6ae18dc3370f78993849e940030b1b27
+DIST thunderbird-140.3.0esr-ja.xpi 539358 BLAKE2B 
4a5d539990427d8b9b68d0280ace1452e187d78b50697708b325ae6f05ee3d86a2bfa86377804587ff50bf97080b67a3bea4892948ea6c0755cc290bdbea688c
 SHA512 
25e5e8250edc6a89ece1214e8533b14ccc39f787e8b02f7646b4be789750aff393c0d590188906e4e99d54c0dc387043c6cd41d6278699cdea5613002260bd60
+DIST thunderbird-140.3.0esr-ka.xpi 551184 BLAKE2B 
589698b194ccfcd2809545832da92309373df1bf95862d1179a7ccceaba11c6e4e37079926a29b87c0f74c92afb34017031ffe9b9ebfe37a2a5cbb100bc1cf23
 SHA512 
407a60bb65b377e155fbe0afb62459fcd952643237ddb9fae3fa2d8ff9e20c841201823eaea44868c1f88edc87575ab6478c612905935d0798490bac2b6cc79d
+DIST thunderbird-140.3.0esr-kab.xpi 469131 BLAKE2B 
198bfd5f17895e5a49fe92a42adb259b6cfae0e820fded441f201ddd6c597a57b55ca7fbc977a0a0cd6465d1a0fab092812366cf57c65fa89a50ed05fd69e3a6
 SHA512 
bcd1ce9b34d80f6fbaccf83d806dcb870f817cf9cc06e024a99ebb06c0389bd6ab055c23bd39439c3a0683db36e9021f57eb6d89e5009d463bf62229c36a9b8d
+DIST thunderbird-140.3.0esr-kk.xpi 573790 BLAKE2B 
3831dde9a1b2f48cf756247c95a290fbd6af8cd98fe3e69949a13db11d299ba56348531d04fd628210e2ca738f6d8019d240ca00bb52ac2c7a9b9fc70c3da7fc
 SHA512 
90a8ff91bb8a3f2d67fc6a014e553a8d4afa1caec8181f789cdc45c7b88ec4256a148469f1cdd9bc0efdda0de6d0742a3f2ca905dafa06a6bbb4c0e3bfbdfe4f
+DIST thunderbird-140.3.0esr-ko.xpi 514514 BLAKE2B 
026903adb2104537ba29b28887ce924e13e0487be682b34c8ac41aa6f15814ee04f39a28a0ee3e28685d81add71ef0284e778e76c66dacb7f2c7464addfeb997
 SHA512 
705f9c3b834e82162730bc17e0e84bc6878baa92648a03167c4b37a769d2bd3c209fa45ee15bb1549fedb27c867b51e9c5a13a15fb7249c5e6393e489ff7774f
+DIST thunderbird-140.3.0esr-lt.xpi 441853 BLAKE2B 
23da4085e32c38b0acd913c126856263fd0a72e4985948d373595910293cfc04f4068337126992e514255149f7131342e0a9d6d5406d2fb03ad3bba7ed638e0f
 SHA512 
4794aae2160b043b33cd7896daa744f97b3770109117225b318ccb86dabe3f74f978e9dd411745d217021cf1adb8827640d61c96347fda4b53eb5768d55f10e3
+DIST thunderbird-140.3.0esr-lv.xpi 391802 BLAKE2B 
dfe4fef225773147c317cd0ccc021f739b98232fa85e86fb7b016069c2124932ce55996a40154302a01ffe1dc1e4755117a052051d7ccb19a8157482781c6bf0
 SHA512 
13a0fda31109d9e195c866707eb5e6980685383299d3219190afeae343cb5e2666dda77e715fd780a686825a2283d388dad0df6c4047cff3f0bac37a0345ff29
+DIST thunderbird-140.3.0esr-ms.xpi 352176 BLAKE2B 
682f41b8ee14a5762ec0526579719957a44e1e7a945c7ede786443ec7e0e3ec7a9ef2d063e2ac676618a9d787f227598c7c4edb28045991ff4975093f627d209
 SHA512 
22ae0f5fd71acbd3e1ccd3fa8d280ba1b6444e2a85a0c7400817ca074121d38bf7c3efccc72ceb44e64da075e64845b9b3be4e89d94fc3ad0dad4ef9b9def9b0
+DIST thunderbird-140.3.0esr-nb-NO.xpi 447969 BLAKE2B 
b999268fbea666c33b82707b0db6b66c8ffd859dec22abfdc58707bc36ed0dac73db4b07119c30e8d67e60d8bd52a78062c6168a3b42cedda875fba91992f215
 SHA512 
021ae045a216bcbfbedf6430bf5d508bd503490980c09dc89cb12329c6af323cd91d2332fbc49d93d6835d729dfb469769569d0a2a2956aec07e8a7c0ffcbcc2
+DIST thunderbird-140.3.0esr-nl.xpi 482131 BLAKE2B 
1abf712f353f7c942ddda6fd8c1ca6e30dd0a20cab89d21d306348ad724a883b46f2db532deb7c57da10b30e0854e085b0478ff34fc4ac6a6857dcd53e899228
 SHA512 
a1555a0e70fb945639475fd40c21192d84bc299d869e46d23eb25123903f0050fbf99703ad6d9f326f5971e72038e824c205abd6c37cda301900738be9c7a90c
+DIST thunderbird-140.3.0esr-nn-NO.xpi 469412 BLAKE2B 
83c46d1448350d633268c85dee9b7390136e62e1316133bc2594fdb7a4dfe02d1274d877b0b8d17b642807e4b6415c029ac6bd3c2ea71fa965a72babd2d7a4c8
 SHA512 
755e8867082e83faa8c5cf63d1da1cda2c2002be7b98900960e55baea103673d9f293be0c7b780866e617cb0d012ac8c51971f1a8ed6235be77d08c7edb27d0b
+DIST thunderbird-140.3.0esr-pa-IN.xpi 434965 BLAKE2B 
ea4533d75885673537c01ad499b6ad986535590f3902fbb47e259f844a4bb19690db9c5410e4875116e7c2a132393f61dac8045a91d8c13869efc52da335aafc
 SHA512 
cc5939a1b3aa7490d8254321bbdc449f02cfc6b030087d19fd54488c38c0b2847ba3dfb6055494eb0f1972d28b8b80d67e8e7d11192a1919138e7239ac1ef34f
+DIST thunderbird-140.3.0esr-pl.xpi 515039 BLAKE2B 
40721a4c8611ae703344f1500465b05f83b0a391116bf8319eeadf2891bf26425aa2ec8253e55b708a22b35e0f9fc5b587aaccc74c1d834c520e4caafbb1cfed
 SHA512 
ce710b4b890393ab47c59433d2eb5a1b6f8e2e783876220fb349ea7930bd08af5a283cf173317d39ce21a852507cf2c847c0f904683e045a2538b54c4e246c99
+DIST thunderbird-140.3.0esr-pt-BR.xpi 489974 BLAKE2B 
9f6571cf0ce5a0ae58aa16fffb35a337b826fb718fca56b37904cd44d3a45561fb56f35f3afcbc015a0180f2a8e393b47465f767e5d98ca4679271d4e079a10b
 SHA512 
c64f9cf147ed3177dd1a0d931ce2942328cd5c33212f0b8b0d1e4beb9b723730bd6f40953a53166092c334afe7700144170d5cb6885734dd3a27516b4d6eade1
+DIST thunderbird-140.3.0esr-pt-PT.xpi 486332 BLAKE2B 
be665d68fa940ba5c90fa80304bc3c7b24a6e56494f1e5cf7ab803fd9ccd541182f46229fb0f80a6967bb8d55a825b4f99237b8890b7e05454187c4b3ced38be
 SHA512 
e105d454510c34141f865c5612d735d07c4cdc43afe8bceedc596ced00b270b8074e8281d771e4c74ec5c24d796d0b32e2292e6103e2051cf3b810fcafcd4974
+DIST thunderbird-140.3.0esr-rm.xpi 487183 BLAKE2B 
9f41763480ef33684a4fd7533ca6d71f0b3e9dbc083e0dfadd60d41ccffda69753ace073f20847d8ade2f88d15afd7a776d94791ea651a4a9894ca0eb9223694
 SHA512 
3b63be96402a7b851713ed3ccfa1bb4e0e8aa576a01aca2767be26cfcdd89845f210c8f775dbf808d18f84da442e5b1335a5d3b933176e3792d1abe843bb0ba3
+DIST thunderbird-140.3.0esr-ro.xpi 451872 BLAKE2B 
5a36b57a1aacf577aeac8e1977cb702c27a8d0476fd8a0643af2ee8a11b3538dd82f827381cb72cf48119229464b3c1e7f21bed5009758229070c4591f712d14
 SHA512 
287a8736f118385a8feb8a9da305b2a72b78ab4598e54e7a21a532ea0b6b5127448e13d0d1d7176b34fb1130524f68f2c5fb0d76cec0fc94f5627ba568faf6ac
+DIST thunderbird-140.3.0esr-ru.xpi 593155 BLAKE2B 
294e01905701b355004b2582d9333ba399b96f5ba835794b8498d2bba542c86eb5d03ef5840bd00b684817a1d1da59c34e9908e1dc080ae4e0854bd7d67af0e1
 SHA512 
756e3b7b2602c9fdaf6c6e3c4bb8e3629b0502d252f154f6a57d1fc5a4c789e77efb0684f98c33e09589c02232aaebcc791d7593453b9c71b0cff4702250e87a
+DIST thunderbird-140.3.0esr-sk.xpi 519236 BLAKE2B 
af052ce8cccb67b55d7976d55e11f1d4196926c99f8a1fe7d98b16ceb7e571e20177bb755026939e47bc589a9c5eb406a0023e90ea66f7db0a45bdfbfb4efc8b
 SHA512 
224ed59652854ed1fbc2905322841d68bc41aaa978026d5ade5ddd6b3be70f03791b8e68587dbde515f74129e3d76202ca763cd88ededd5a7021629c0ba85234
+DIST thunderbird-140.3.0esr-sl.xpi 485940 BLAKE2B 
6a595874650150ceb14b117853419ed9a94986c6afc0631c1264ad0e0ece6e9c52a1571062589ee1df5ca6649193dd98c659171311d07ebf1938834e2bf29207
 SHA512 
701b7a5f04a112d0cbab1ce786ecc28ac0a11b11f51a449574a235ce9c379a9c341468306ffce6773af8081492db2d7a51c7d8baa9d291109f78caae65af2b58
+DIST thunderbird-140.3.0esr-sq.xpi 504054 BLAKE2B 
ff853c4a28287831f531b6734183b446a01112bff899ff693bbdab5feb6f787717321048c4530a06589db3da4e8201d761c840da5fda642922bc0ccc59aaa4e0
 SHA512 
31f765aacb82779dcffe0afa0c38d2313345adae0f106ccf1e9a6d341a7489defbb2bec79c938edac2b870e69d80bdd6e2bf106302e338f8cc17a875cd9ac824
+DIST thunderbird-140.3.0esr-sr.xpi 495989 BLAKE2B 
96bb5da345d27551f1d312e28cbe70b0fac37a3bdfbd4f43a47243b96f3bb1263add81766949ccc102fc16a2ee636b9a183923a953c20471731891d4c3240daf
 SHA512 
30e73d3e3f2f75482081705c8e46909f1da64c467ac91d15be680f9268d99d7945ac4db2f0ec78bf488ba1c915f03868420eb5701da6f290702beed3895537ba
+DIST thunderbird-140.3.0esr-sv-SE.xpi 484418 BLAKE2B 
ac27f0951d7e30cf48e1f5e49988da0ac6d96bb86d8e9cfe7aadd979a26b036d345b8b432b0eb2838ed4ef1024e883c2cf6ba89d90ba6c81be9a54ac2d291946
 SHA512 
1b092ac37bf01fb5857b82a6e10410c8723d7128ab43fa55a35aab5069ceefee2cbe3f6757e81bbd565316e31763c5e4474577f2d9b51c45571f2d5efcf79b8d
+DIST thunderbird-140.3.0esr-th.xpi 565640 BLAKE2B 
ba968a11ad5e15401fd0949eaeadbe10332ecebfc6d7ce90a3ad8da2e7726ec03762f794c9a9b2888fbe4506db991a754f64cd7fd5c8a2158df5c7a9920db217
 SHA512 
b338f848c64977af22c8736863e0c7e40316f34cc76266d064636df4e4475618f2d8a6f82b8b551aed8aa61c04229723e73d2c888446e6ede12df562ea77c81a
+DIST thunderbird-140.3.0esr-tr.xpi 495545 BLAKE2B 
a863aae227f3ce0cf05076886f76d7fc53404d24bd9004db1a1936e7aa47ca2df6974701b6fa0acef8448c05f458ef2ea77485d87eb97098bff5db8774043375
 SHA512 
d3dd650d627012761f61c384fefbfa99a34b5aad66ad6846d5ccde09618a420a7b51dad05bb431cf98164bc5d128c603431c0271e0e02f2e8a36f0136f52d371
+DIST thunderbird-140.3.0esr-uk.xpi 582168 BLAKE2B 
38f8af2efb35dd73aba28d985ab334c0c2a031a58fb5e7d7877c5e460d29b1f625aee867b6076653bd558ad84278e2fe91b1a4d584494c2f397d779682c83211
 SHA512 
e14af0a3ea68caf58098849d14d1636b635a0550410eccb14537bf1c1d9530cf0e6fe22397d819ba981ab5c57251557e3ed7068fa461cbc8b73817a6e851e93a
+DIST thunderbird-140.3.0esr-uz.xpi 355264 BLAKE2B 
fb84e426ab1c914a3517e8b9cc1db53aaf2df6a884eccf70a04d4510285ee2c31b55717453b637883f3dddd73573f8b826bf8c2cc76df242c565c854a7121c78
 SHA512 
da5cba01c7dd85cee54d4d95cb4dd88582d70ca4858f0ff84e50ceb639d5aa87f102f4f3cf6b526d5317e7751daffefd203359bdbbdee2d86650e4c4e4bf92c1
+DIST thunderbird-140.3.0esr-vi.xpi 518874 BLAKE2B 
027561b22cb1a49818f50522fb759eda5063b35321ef5d2db565baf7cfbb4bdd0d41f3f0aa15ae7d0a5b1eae18f6d0247d83542df7d5ff90a7e9fdc4d289950f
 SHA512 
9d0610bb450b4952a4f8d6203ab0be02c83f0c8851f1a6b16b9824710a4da87b00c1dd56db349759d228f613ac7fb11312c6349262b606dd4797c98e69f057f5
+DIST thunderbird-140.3.0esr-zh-CN.xpi 507841 BLAKE2B 
f44b932d0f436992573f68cb03de70ba6d1f67c287a8810cd51c1fb7ca7c8e9a483f665cc05100932a6faa0c9c8568fd5db1904343fbf3480b014acad3d1e89a
 SHA512 
9691d61646a2b9d4790f37f445e4b32b8708ea6299adbc49371ddd41be20548bc062c45a359824e3e01696e48f54463e82d010f3d74768be06a061a5d74822fc
+DIST thunderbird-140.3.0esr-zh-TW.xpi 511165 BLAKE2B 
ddf7db9c0c43cb6d6c6bc8e6ace3410c1a4d988c306d4c09649cdac15045063ae372a9c4aa2c72136702e377e03a9d530394234b435c3f876b87a7d954c26847
 SHA512 
58e008a8ce47f0077fe629a19dc54ef0610006150718b7016c37d1086d7a49dfcdf3e0ee2c18835b269d848a842aceac7574bb1957786e382d44defce4aa200c
+DIST thunderbird-140.3.0esr.source.tar.xz 755800156 BLAKE2B 
3b8fff0de38f6f639527ec8208e3e7f84327e237300238132d35c3417b310301d5da36f42befc4e4332e3d0ffcb873f5d7f4dfd0f00c8b3229f7aadab77c1835
 SHA512 
82a9c4aa250b01e0e4d53890b0337972e46504636831c1b6307b841c4c5aeec86482b2da3c1666c46e870a75f6cb54db9f759664688b382ad66efa647145d900
 DIST thunderbird-141.0-af.xpi 316528 BLAKE2B 
cf495fff6dce79f769348a1c403e8cc754320b7cbf73b1d06318da0db8de0f0ad533a6bb4b1f6e1bc7887d68cb05048af96064aea0ced8266cdfd92035d417ce
 SHA512 
9bf54ff65f9f607bfb44cb94cae11cdbb14fd2ee49bd1eebf4d0a8f4777085004f5e8e00e5719c514b09817c801dd3357138a2882a79e6c19626e818d9818fed
 DIST thunderbird-141.0-ar.xpi 435929 BLAKE2B 
e68e34ba41dd78183e0f1fe53b5bac475acdde75369a99e2cb86e5b13128f6b60a14d148bad1864ba2bf7b1c12df246a168601fe870694eb88d6ee004aa80ffa
 SHA512 
088d6d7868f60a77fda04c4bc39fa63fb1cb8a93e99a232ce2d0cf2e791e08f5f8dbf383095b848fb5ccb431c33aeeb8348b27fb647becf065d901f5f4a6fa4f
 DIST thunderbird-141.0-ast.xpi 340911 BLAKE2B 
96066df0a7b63f30cd39c7b6e125b99f6d615a62e5353ecb51f1385cee45b20daae1d3269169fa33ed5c54c678a813454a1e35f24234960758495e1bdfda399f
 SHA512 
bc48e9667d3c6becb2913bcd4d8204e9b9d4f902935d09fe859bc9d245be579dfc691786c5b6c061d25910d19604b4d63fd61bb0d833f9dfa1979ef4e4413b84

diff --git a/mail-client/thunderbird/thunderbird-140.3.0.ebuild 
b/mail-client/thunderbird/thunderbird-140.3.0.ebuild
new file mode 100644
index 000000000000..1cfed15df670
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-140.3.0.ebuild
@@ -0,0 +1,1156 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-140esr-patches-02t.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.tar.xz"
+
+LLVM_COMPAT=( 19 20 )
+
+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=yes
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit check-reqs desktop eapi9-ver flag-o-matic gnome2-utils linux-info 
llvm-r1 \
+       multiprocessing optfeature pax-utils python-any-r1 rust toolchain-funcs 
virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}
+       loong? (
+               
https://dev.gentoo.org/~xen0n/distfiles/www-client/${MOZ_PN}/${FIREFOX_LOONG_PATCHSET}
+       )"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       SLOT="0/esr"
+else
+       SLOT="0/stable"
+fi
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+
+IUSE="+clang debug eme-free hardened hwaccel jack libproxy pgo pulseaudio 
selinux sndio"
+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"
+
+REQUIRED_USE="|| ( X wayland )
+       debug? ( !system-av1 )"
+
+TB_ONLY_DEPEND="selinux? ( sec-policy/selinux-thunderbird )
+       !system-librnp? ( dev-libs/jsoncpp )
+       system-librnp? ( >=dev-util/librnp-0.17.1 )"
+BDEPEND="${PYTHON_DEPS}
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+               llvm-core/llvm:${LLVM_SLOT}
+               clang? (
+                       llvm-core/lld:${LLVM_SLOT}
+                       pgo? ( 
llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] )
+               )
+       ')
+       app-alternatives/awk
+       app-arch/unzip
+       app-arch/zip
+       >=dev-util/cbindgen-0.27.0
+       net-libs/nodejs
+       virtual/pkgconfig
+       amd64? ( >=dev-lang/nasm-2.14 )
+       x86? ( >=dev-lang/nasm-2.14 )
+       pgo? (
+               X? (
+                       sys-devel/gettext
+                       x11-base/xorg-server[xvfb]
+                       x11-apps/xhost
+               )
+               !X? (
+                       gui-wm/tinywl
+                       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.112.1
+       >=dev-libs/nspr-4.35
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-apps/dbus
+       sys-libs/zlib
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/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-1.4.7-r2:= )
+       system-png? ( >=media-libs/libpng-1.6.45:0=[apng] )
+       system-webp? ( >=media-libs/libwebp-1.1.0:0= )
+       wayland? (
+               >=media-libs/libepoxy-1.5.10-r1
+               x11-libs/gtk+:3[wayland]
+       )
+       wifi? (
+               kernel_linux? (
+                       || (
+                               net-misc/networkmanager
+                               net-misc/connman[networkmanager]
+                       )
+               )
+       )
+       X? (
+               virtual/opengl
+               x11-libs/cairo[X]
+               x11-libs/gtk+:3[X]
+               x11-libs/libX11
+               x11-libs/libXcomposite
+               x11-libs/libXdamage
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXrandr
+               x11-libs/libxcb:=
+       )"
+RDEPEND="${COMMON_DEPEND}
+       jack? ( virtual/jack )"
+DEPEND="${COMMON_DEPEND}
+       X? (
+               x11-base/xorg-proto
+               x11-libs/libICE
+               x11-libs/libSM
+       )"
+
+llvm_check_deps() {
+       if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then
+               einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+               return 1
+       fi
+
+       if use clang && ! tc-ld-is-mold ; then
+               if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then
+                       einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       if use pgo ; then
+               if ! has_version -b 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+                       einfo 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2
+                       einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+MOZ_LANGS=(
+       af ar ast be bg br ca cak cs cy da de dsb
+       el en-CA en-GB en-US es-AR es-ES es-MX et eu
+       fi fr fy-NL ga-IE gd gl he hr hsb hu
+       id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO
+       pa-IN pl pt-BR pt-PT rm ro ru
+       sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW
+)
+
+mozilla_set_globals() {
+       # https://bugs.gentoo.org/587334
+       local MOZ_TOO_REGIONALIZED_FOR_L10N=(
+               fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
+       )
+
+       local lang xflag
+       for lang in "${MOZ_LANGS[@]}" ; do
+               # en and en_US are handled internally
+               if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
+                       continue
+               fi
+
+               # strip region subtag if $lang is in the list
+               if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
+                       xflag=${lang%%-*}
+               else
+                       xflag=${lang}
+               fi
+
+               SRC_URI+=" l10n_${xflag/[_@]/-}? ("
+               SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> 
${MOZ_P_DISTFILES}-${lang}.xpi"
+               SRC_URI+=" )"
+               IUSE+=" l10n_${xflag/[_@]/-}"
+       done
+}
+mozilla_set_globals
+
+moz_clear_vendor_checksums() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -ne 1 ]] ; then
+               die "${FUNCNAME} requires exact one argument"
+       fi
+
+       einfo "Clearing cargo checksums for ${1} ..."
+
+       sed -i \
+               -e 's/\("files":{\)[^}]*/\1/' \
+               "${S}"/third_party/rust/${1}/.cargo-checksum.json || die
+}
+
+moz_install_xpi() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local DESTDIR=${1}
+       shift
+
+       insinto "${DESTDIR}"
+
+       local emid xpi_file xpi_tmp_dir
+       for xpi_file in "${@}" ; do
+               emid=
+               xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
+
+               # Unpack XPI
+               unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
+
+               # Determine extension ID
+               if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
+                       emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; 
s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from install.rdf"
+               elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
+                       emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' 
"${xpi_tmp_dir}/manifest.json")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from manifest.json"
+               else
+                       die "failed to determine extension id"
+               fi
+
+               einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
+               newins "${xpi_file}" "${emid}.xpi"
+       done
+}
+
+mozconfig_add_options_ac() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_add_options_mk() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_use_enable() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_enable "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+mozconfig_use_with() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_with "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+virtwl() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument"
+       [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to 
be set; try xdg_environment_reset"
+       tinywl -h >/dev/null || die 'tinywl -h failed'
+
+       local VIRTWL VIRTWL_PID
+       coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo 
$WAYLAND_DISPLAY; read _; kill $PPID'; }
+       local -x WAYLAND_DISPLAY
+       read WAYLAND_DISPLAY <&${VIRTWL[0]}
+
+       debug-print "${FUNCNAME}: $@"
+       "$@"
+       local r=$?
+
+       [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
+       exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
+       return $r
+}
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+               # Ensure we have enough disk space to compile
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif tc-is-lto ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+
+       # Get LTO from environment; export after this phase for use in 
src_configure (etc)
+       use_lto=no
+
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+
+               if tc-is-lto; then
+                       use_lto=yes
+                       # LTO is handled via configure
+                       filter-lto
+               fi
+
+               if use pgo ; then
+                       if ! has userpriv ${FEATURES} ; then
+                               eerror "Building ${PN} with USE=pgo and 
FEATURES=-userpriv is not supported!"
+                       fi
+               fi
+
+               if [[ ${use_lto} = yes ]] ; then
+                       # -Werror=lto-type-mismatch -Werror=odr are going to 
fail with GCC,
+                       # bmo#1516758, bgo#942288
+                       filter-flags -Werror=lto-type-mismatch -Werror=odr
+               fi
+
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif [[ ${use_lto} == "yes" ]] ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_setup
+               llvm-r1_pkg_setup
+               rust_pkg_setup
+               python-any-r1_pkg_setup
+
+               # Avoid PGO profiling problems due to enviroment leakage
+               # These should *always* be cleaned up anyway
+               unset \
+                       DBUS_SESSION_BUS_ADDRESS \
+                       DISPLAY \
+                       ORBIT_SOCKETDIR \
+                       SESSION_MANAGER \
+                       XAUTHORITY \
+                       XDG_CACHE_HOME \
+                       XDG_SESSION_COOKIE
+
+               # Build system is using /proc/self/oom_score_adj, bug #604394
+               addpredict /proc/self/oom_score_adj
+
+               if use pgo ; then
+                       # Update 105.0: "/proc/self/oom_score_adj" isn't enough 
anymore with pgo, but not sure
+                       # whether that's due to better OOM handling by Firefox 
(bmo#1771712), or portage
+                       # (PORTAGE_SCHEDULING_POLICY) update...
+                       addpredict /proc
+
+                       # Clear tons of conditions, since PGO is 
hardware-dependant.
+                       addpredict /dev
+               fi
+
+               if ! mountpoint -q /dev/shm ; then
+                       # If /dev/shm is not available, configure is known to 
fail with
+                       # a traceback report referencing 
/usr/lib/pythonN.N/multiprocessing/synchronize.py
+                       ewarn "/dev/shm is not mounted -- expect build 
failures!"
+               fi
+
+               # Google API keys (see 
http://www.chromium.org/developers/how-tos/api-keys)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then
+                       
MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc"
+               fi
+
+               if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then
+                       
MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ"
+               fi
+
+               # Mozilla API keys (see 
https://location.services.mozilla.com/api)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then
+                       
MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005"
+               fi
+
+               # Ensure we use C locale when building, bug #746215
+               export LC_ALL=C
+       fi
+
+       export use_lto
+}
+
+src_unpack() {
+       local _lp_dir="${WORKDIR}/language_packs"
+       local _src_file
+
+       if [[ ! -d "${_lp_dir}" ]] ; then
+               mkdir "${_lp_dir}" || die
+       fi
+
+       for _src_file in ${A} ; do
+               if [[ ${_src_file} == *.xpi ]]; then
+                       cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die 
"Failed to copy '${_src_file}' to '${_lp_dir}'!"
+               else
+                       unpack ${_src_file}
+               fi
+       done
+}
+
+src_prepare() {
+       if [[ ${use_lto} == "yes" ]]; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die
+       fi
+
+       # Workaround for bgo#915651 on musl
+       if use elibc_glibc ; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+       fi
+
+       eapply "${WORKDIR}/firefox-patches"
+       use loong && eapply "${WORKDIR}/firefox-loong-patches"
+
+       # Allow user to apply any additional patches without modifing ebuild
+       eapply_user
+
+       # Make cargo respect MAKEOPTS
+       export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+       # Workaround for bgo#915651
+       if ! use elibc_glibc ; then
+               if use amd64 ; then
+                       export RUST_TARGET="x86_64-unknown-linux-musl"
+               elif use x86 ; then
+                       export RUST_TARGET="i686-unknown-linux-musl"
+               elif use arm64 ; then
+                       export RUST_TARGET="aarch64-unknown-linux-musl"
+               elif use loong; then
+                       # Only the LP64D ABI of LoongArch64 is actively 
supported among
+                       # the wider Linux ecosystem, so the assumption is safe.
+                       export RUST_TARGET="loongarch64-unknown-linux-musl"
+               elif use ppc64 ; then
+                       export RUST_TARGET="powerpc64le-unknown-linux-musl"
+               elif use riscv ; then
+                       # We can pretty safely rule out any 32-bit riscvs, but 
64-bit riscvs also have tons of
+                       # different ABIs available. 
riscv64gc-unknown-linux-musl seems to be the best working
+                       # guess right now though.
+                       elog "riscv detected, forcing a riscv64 target for now."
+                       export RUST_TARGET="riscv64gc-unknown-linux-musl"
+               else
+                       die "Unknown musl chost, please post a new bug with 
your rustc -vV along with emerge --info"
+               fi
+       fi
+
+       # Make LTO respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure || die "Failed 
sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || 
die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed 
sedding multiprocessing.cpu_count"
+
+       # sed-in toolchain prefix
+       sed -i \
+               -e "s/objdump/${CHOST}-objdump/" \
+               "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py 
|| die "sed failed to set toolchain prefix"
+
+       sed -i \
+               -e 's/ccache_stats = None/return None/' \
+               "${S}"/python/mozbuild/mozbuild/controller/building.py || die 
"sed failed to disable ccache stats call"
+
+       einfo "Removing pre-built binaries ..."
+
+       find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) 
-print -delete || die
+
+       # Clear checksums from cargo crates we've manually patched.
+       # moz_clear_vendor_checksums xyz
+
+       # Create build dir
+       BUILD_DIR="${WORKDIR}/${PN}_build"
+       mkdir -p "${BUILD_DIR}" || die
+
+       # Write API keys to disk
+       echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
+       echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || 
die
+       echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die
+
+       xdg_environment_reset
+}
+
+src_configure() {
+       # Show flags set at the beginning
+       einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       local have_switched_compiler=
+       if use clang; then
+               # Force clang
+               einfo "Enforcing the use of clang due to USE=clang ..."
+
+               local version_clang=$(clang --version 2>/dev/null | grep -F -- 
'clang version' | awk '{ print $3 }')
+               [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 
"${version_clang}")
+               [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
+
+               AR=llvm-ar
+               CC=${CHOST}-clang-${version_clang}
+               CXX=${CHOST}-clang++-${version_clang}
+               NM=llvm-nm
+               RANLIB=llvm-ranlib
+       elif ! use clang && ! tc-is-gcc ; then
+               # Force gcc
+               have_switched_compiler=yes
+               einfo "Enforcing the use of gcc due to USE=-clang ..."
+               AR=gcc-ar
+               CC=${CHOST}-gcc
+               CXX=${CHOST}-g++
+               NM=gcc-nm
+               RANLIB=gcc-ranlib
+       fi
+
+       if [[ -n "${have_switched_compiler}" ]] ; then
+               # Because we switched active compiler we have to ensure
+               # that no unsupported flags are set
+               strip-unsupported-flags
+       fi
+
+       # Ensure we use correct toolchain,
+       # AS is used in a non-standard way by upstream, #bmo1654031
+       export HOST_CC="$(tc-getBUILD_CC)"
+       export HOST_CXX="$(tc-getBUILD_CXX)"
+       export AS="$(tc-getCC) -c"
+
+       # Configuration tests expect llvm-readelf output, bug 913130
+       READELF="llvm-readelf"
+
+       tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG
+
+       # Pass the correct toolchain paths through cbindgen
+       if tc-is-cross-compiler ; then
+               export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} 
--target=${CHOST} ${BINDGEN_CFLAGS-}"
+       fi
+
+       # Set MOZILLA_FIVE_HOME
+       export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+       # python/mach/mach/mixin/process.py fails to detect SHELL
+       export SHELL="${EPREFIX}/bin/bash"
+
+       # Set state path
+       export MOZBUILD_STATE_PATH="${BUILD_DIR}"
+
+       # Set MOZCONFIG
+       export MOZCONFIG="${S}/.mozconfig"
+
+       # Initialize MOZCONFIG
+       mozconfig_add_options_ac '' --enable-application=comm/mail
+       mozconfig_add_options_ac '' --enable-project=comm/mail
+
+       # Set Gentoo defaults
+       mozconfig_add_options_ac 'Gentoo default' \
+               --allow-addon-sideload \
+               --disable-cargo-incremental \
+               --disable-crashreporter \
+               --disable-disk-remnant-avoidance \
+               --disable-geckodriver \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-dbus \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-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
+               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