commit:     833c623d8984f9a4c6a24f448d217cad5cc22b03
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 29 12:02:51 2026 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 29 12:02:51 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=833c623d

mail-client/thunderbird: add 140.7.1

Straight to stable, as there were 3 commits between 140.7.0 and 140.7.1. Tested
on stable amd64.

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-140.7.1.ebuild | 1160 ++++++++++++++++++++
 2 files changed, 1225 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 52dfb0e57fab..f89fa16efbb6 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -133,6 +133,71 @@ DIST thunderbird-140.7.0esr-vi.xpi 518883 BLAKE2B 
c033750671e3f59e30e101b61cdae9
 DIST thunderbird-140.7.0esr-zh-CN.xpi 507837 BLAKE2B 
3dcc0d32bff319a36737ca0d9c8b285bf7da0f4f9c7fcd2748223a2ee04ab5070069ba44b29498f0a4e94fd11db54d746175556a4cf5c7d346034d07adb075f0
 SHA512 
495ae611f6b5ab1c291d2b53af3afeb0cacc4c1200a386fed3e478bf92ea4269e3c366a2166896ff9b933ab8f4d6628d3f99c2925781e0dda5f923a2c29e7179
 DIST thunderbird-140.7.0esr-zh-TW.xpi 511430 BLAKE2B 
18e36fbaedc0e54ce0316fd506e4ecc9dae755988cd22440b08eb1794f4cc01ee3eaae298cee21f5e14ff0167f15b91f496f82cff5cce56cc188bf9935064e79
 SHA512 
095ad671e67c8249db9943592933443aefb21c76145a1fb15b2b8166402f79fba5319026f3c5d98f88361bfecf268370838c587b69a62a28888836039b65dc59
 DIST thunderbird-140.7.0esr.source.tar.xz 757376992 BLAKE2B 
83a659c88e2f2e3054fc87c98a7a0f6723b4aff0713ee6b8c7fd87c4fcd3a9e59331807fe335d719dec48b8b585c36c63ec9349afbc46d7b4131c738b140dc12
 SHA512 
92746d87ca2d5a59082c25aa3c3a816e5bf24ae3e095f8ec478a60c5cd890faea392ff98b5b510cc9a89b155240dce9d06c7ddd0f17f564722acc65105fb6cd2
+DIST thunderbird-140.7.1esr-af.xpi 316218 BLAKE2B 
842ffb57dceca2faecf8e4029f990a57857ecb943e76dab696459d27b829c1496cbf74e270a5feef81cef653f19595a4d662d6e30bd49f77267c77f0b2ec1450
 SHA512 
0237605a47088257e9fb978841123a20449f52d489972f3bc76189f6f0dae24844f165cf1f6b5dda0a99e6d1a4359f1c1a3aa694d628f0297edce6d3381a2609
+DIST thunderbird-140.7.1esr-ar.xpi 436197 BLAKE2B 
c76de7e15ae2f00f0a70c11bd6e5562075d58cedcfed28c02e162d1adae5e1f44ba8b335d66f2c29fbfa43871b4ffdc9b39b154fd35c9cf838283d458e850b30
 SHA512 
53db36903662d0fedcc48246b89c2deb96c3f0a0abd777d1eea378f4ac216fe70da7d27adc39cd3a84301b0af0f362352144fcb9884e4251091ac5a160093e6f
+DIST thunderbird-140.7.1esr-ast.xpi 340598 BLAKE2B 
34d0e2074a337e73207aba79649104779937932fc5ccf4ff76abac24091bcfd40d6241e445c85685d9cf50d8be4b1f8b2c9dd889507a8fb76c8904f1670976c8
 SHA512 
2947b77ea5812334370344d6e2ebde602fe32ffb031bc08838086de2481fe23d08b4fa2fe7118a5fe38b8563317363a65ceec850d92bd2707c5cd3f04fd4c7b7
+DIST thunderbird-140.7.1esr-be.xpi 521574 BLAKE2B 
065a9acc7f56058c338f1b87b645a4877100d9cdae4e0ab23af4dcb7faa95808e9cbc01bc7c26e0116032a044d8a0158c6ab0a27b9f4c4b1ff732957fbcbb62b
 SHA512 
e8d6b843b9e38a68f1bbfa170121fbe808750d06d598138e6532fb984ecda933726ae874575590b7b7ae1ec0d30186464f2bed865ee96e6e662fc33068a935d8
+DIST thunderbird-140.7.1esr-bg.xpi 539806 BLAKE2B 
79901297f40b2aa2fb00849de7958ee193818e164831642d7533d169cf69f16a346c2f9e8979cdf69742d5ebaed480e68e1daa844bb71eef8d62f8dbee7329ff
 SHA512 
1c184737caca156ecb329b73a4c13d6d94a01a3817a69037ad1d0278b842c53301e34a0847cd5f1c6fb546e48f9fc850f88a294143c5c4e8767c6edf625b2e86
+DIST thunderbird-140.7.1esr-br.xpi 402746 BLAKE2B 
ab06242ec04f83a42848345957c44394233d209fb0a8b325c2a37151df876cf8460a5d0aa6514b7fffe61ed1fb9d8fe21716aae1ed86b0f071d6a3b988e4bb9f
 SHA512 
359ad81f6f004a5093416b6ac384e3b357f67259bef02aafb6e9c630848f22a79f18ba48f50d5e9c7ac1aad8f1b12a7d7b54ef91769d42cc5eabf941eb2fc8d3
+DIST thunderbird-140.7.1esr-ca.xpi 440586 BLAKE2B 
c5a27936f323ea60a1d3e123c55406c8d66929f2e5951491a6ef8c853b991f4d255f015a566580decfe2ceaf6b5ad43afc737ee80b7af6bb0b0b80f40200a74e
 SHA512 
06f5da1167ab3a8ccddcad2d21b8f81b9997f2e8dae89d3ed8c6fbcb667214dd2434c73347af35cf84272dd6798cec8f7f8fbbb0e57891feb50aec07b9104b70
+DIST thunderbird-140.7.1esr-cak.xpi 418022 BLAKE2B 
1a746d1abe2ed5600935ae2a0b0383853530bc0819a7ef09126906d20995d61ba2d5a471768e64825dea68054d9e6ab8fba95b6cdf0ca601021205c529cd0ae2
 SHA512 
1d6d26297bd726dfbd92a8f6f5a90975ba93a931e348b51dd584a2ac43bce2709cf2f2f50de55b0a9df9120c9f00571a591dae1ffc3be78eef783254fb5e9799
+DIST thunderbird-140.7.1esr-cs.xpi 519507 BLAKE2B 
76ec0d7ff72f9d0f1a00c13b046e4f2b80d9b91e0fc36634bcd1960763143cef01d3996a5368ed2444f1708156ff8299afeca2baf5f123a283f61cf4082c80e2
 SHA512 
a6e342d41fd0966b6c5c7c617060f2ab84fce83d6d44f4ab87870c880bc71afb237edca1dfa2d1ddff1f6479a93f4f32d447c942c9455491a06cb38fed95b0c4
+DIST thunderbird-140.7.1esr-cy.xpi 487650 BLAKE2B 
a756176f7336f9ab1ed5ebb20b851c75c39cfac0a733a79011e9c4e2e4732af2c94e4ddbf0e9960b0bd0e1f2d14b179f66b5ed8ea6e9db7a19fcb9cb00d8d0f5
 SHA512 
34dd65a3354de15fdc79d9faea0012af4850e9562f2a5373d5861634075b2a5fec35eb29231fa34de594fbae03872fd1372b240defe7d62677ae48f285f9ffb9
+DIST thunderbird-140.7.1esr-da.xpi 476623 BLAKE2B 
713e99ba782ac68110a89c52dd55c076873ba995fdca82ace149aa6cfff31c5725f4be337238bfb8cc3e1955e263c3f086c915a269ef74dd8cd11d0ec42f2344
 SHA512 
901da0fea0121141557c27d0eed9f977e9ca30e7fd6aeb5e596c9b54ed60bc46721017fe1af2e3b662d2f734c4dfeb6d859ff052b8074a4892cd2f6d0d4bb9b1
+DIST thunderbird-140.7.1esr-de.xpi 504707 BLAKE2B 
930debecde06b5a1105274a4c6ff30e44c2fa8d6cac8487d11ab0548db27eb7e36216eedcd0cc438ae1a00a16ba2319765866e1cc9a3f3baa7130024bfdfa7f3
 SHA512 
bf9c66d6be635e0c9dc8f226e35e39a3734a1f09084628d1b93d0ee384bef21eb6f5fd31e3fc4f94a29f298624cc3cfcfdadc7d4f4d6f981297f59b30b78019c
+DIST thunderbird-140.7.1esr-dsb.xpi 517896 BLAKE2B 
688b2f65aafa6936a59025590336a0644d40f187f6d1f2ad9edb24e85a05a55c1f3b80b70aef4a0bf072ce6268c8eeaac9c2ed8b803c74bfb24e736a97155a86
 SHA512 
fce79c0da3d1a19be375cecdbb7b841f7dad61000cd4de39026037b976df5c7a62bdfbafcc4472765de461e3ff2cd421474fdbf9c4e9f18173ce876673a2d3ea
+DIST thunderbird-140.7.1esr-el.xpi 609031 BLAKE2B 
c8b36b53cc3e09e0767704b711286cd76ee151589e933d800d17e5f925b892d8759037a922b77973ee8371bb0900a524e4e1c563579902da8969b8f7b0e68489
 SHA512 
3ba28a9bb767002e65a77fc238105df4a9f88bbd7f78ba16fa8868a37ec7395a1be4f21f8964317f01ed262409c6f4b33ad3311c344746f58d2d68af334006e2
+DIST thunderbird-140.7.1esr-en-CA.xpi 452240 BLAKE2B 
0272290aba2abf89b4635f090d93e517845a6edced387840acd4c1e4f561776c14bbdb9a2145ef47e799750c3f3bd130332548880582ca7c01bc67fd0178e406
 SHA512 
e99490eef0ee000c595d251ea0197065c94406a699830981d7c38c6a3b724ab8e49d8a859c8199cdde92311897b4ba9de6cdcb4cb163a72b46c1d835faf3ce36
+DIST thunderbird-140.7.1esr-en-GB.xpi 452068 BLAKE2B 
f93ff81a0de82e824683568822cca1450b578f02a1738ae2bbed3e1e16184056b131007999fdbdb458e26a7830a473bc463b411b69e398dbd8906087203fade5
 SHA512 
d0e84a698cb764c57738da43e99993add6d14573545c5dd0bc2f42384d78f5e4321f477db7f5843c6795d8acc0b0a2b885a12ceb5f52650f5a60b5ed98719042
+DIST thunderbird-140.7.1esr-es-AR.xpi 495268 BLAKE2B 
ae75f109a6e2afd19c769a8fd33e6a4e4a88efd23c3c6f899994d8187a09f1a2338afc72dc229b6fa22de01892efb8f0fa1aeaa7f1dad223cfa783601dc553fe
 SHA512 
34a50c3354c2f25065a66daf03d8d9592bb096977fe7b51b6ca844a75e0bdb24d0177a0048827f200c9386a7e0acbc92f0b0f898943d52a3570264dc9696798f
+DIST thunderbird-140.7.1esr-es-ES.xpi 497285 BLAKE2B 
1dcc57c72a951fd457a0ea6d80be2dccb61f2b53eebce836c1fe3465ccee06132536e4fafe6f933beed2629d038c1b6b601db5fb32d5a5b75f152d546a35da89
 SHA512 
31baaa613d79faf2b592883b7fdd4db0a14e6cdb12ab255faa001dc821ffb2a12be7ffe796bea6409dfde59a5aff43b749b4ccf26b83e025a4931fdd44de0b06
+DIST thunderbird-140.7.1esr-es-MX.xpi 490411 BLAKE2B 
5368ca3b31fee038ee6eefdff711b9fc0d8690e4377d89c0afd3f7c2b871f33a09c904d9c5b482c8394fd15ad43ec6b81120572d28ec5812b133ce241cc665fe
 SHA512 
a9ccd7e4eb8901eaa556ce9427226d2c861baf2f14b8d7d30c6caf9dad0a9d12ae2571f826af5de58b94464e972b2eb240ed62906b67763d0c823657ed0372f3
+DIST thunderbird-140.7.1esr-et.xpi 443619 BLAKE2B 
fedc14ad8e46dbde85a296fa5951ae5626a6acb6609220f72d6ff73cadc0cd94ba4bad66251feada063c955bfa534fd006602151b0e595ccea67e47437ecb210
 SHA512 
09651981d1746142f3b1dafca4ec8b5e6ad94eff8c15bc8153478e946d9d0270b7304e69371aeeee61b8d426d8144a7430e80898fa64a85fb70849fb565c7147
+DIST thunderbird-140.7.1esr-eu.xpi 473924 BLAKE2B 
859d50d56c933cfa9dcb90e991800be09652a666deb4dd84e7da44b59b37999c91ce78ace3852e84f5f27922f8ff5c23e58a593dfd7f11a11f23b6a959cb635e
 SHA512 
094d65fde40205fe6c3d78f86e0a5a253ac32cdb01801a09ec7ded0a60504d424d33045779ea2db36d1d25fade754ab6679fb2d2af996b353e327df915d14885
+DIST thunderbird-140.7.1esr-fi.xpi 475611 BLAKE2B 
d5a91b869f310ef901e6ae0986eb63a05f7b3ac84cd587dc1025c7185f7ef5866abfa806daab42ad65212f3872bb3e10999881331e661bc3129945cddb747bbb
 SHA512 
370c9e1ed89428fca369c15636f513c8473a5f60db99de93e2777cccb59c0a2ab8bdad5c694557db021841181b514c5e1e4b009dabf09b9746833ceb3fc6f4da
+DIST thunderbird-140.7.1esr-fr.xpi 508319 BLAKE2B 
8a4451311f65890f9513efa1bb65f115d2001c6471aecd32a400ee54dfff380a6277360f2851fb3affbc242c2579773d38b320989db8b35cfe2dd97166a87fae
 SHA512 
78fcd20d2bd97e1934ee90e470dd084177cb5f209c5eeee2077ea2e5f1e20a048eb2d32d736e8185dc556cc868287dbff3547c874733343a7da1730eb645ac1d
+DIST thunderbird-140.7.1esr-fy-NL.xpi 490685 BLAKE2B 
f0ce1d9506b5880ef63979c214f2aae3f83a85b2d191725507feb8293f57b76c05c540cc56d8f0022676b6757dd161124f58d8341288ccf220f685d20c9e7a3c
 SHA512 
dd291454552b2adb703f8f780e806488883a4bc0be44275f975e93d69b33f36ad288faa3c8d27dee00002ccb49f16dcaced47916996f9c7173d25dced205c595
+DIST thunderbird-140.7.1esr-ga-IE.xpi 376747 BLAKE2B 
748db7083f64fe1b2da62d49f951308cd5acf429d33a07cb8d1e27f8a8e6deb7f9bf8fab0e804c8a0c4d350038c9fc5e5a8714d14b6c4bd2146458f39b552588
 SHA512 
2083a46a03b8b015e46047c10ca9ae998de597c05dff8ed48a85f4e94e8c4897c1975ab5cad764f5e58b22cf230ad0eeb67c2629dd09fecac440bd1913059cd6
+DIST thunderbird-140.7.1esr-gd.xpi 461960 BLAKE2B 
5bee2ab73e9eb0f2e0f5114088d0191472070ce80c6653a43e4ad6d6f701eb160a19329aedf0b6ce36f69499e02b548a8a435826d160d151a2c7510ecbe4e669
 SHA512 
32879ede0324f88329b195e7cd058306e8b5712065d64314939761f4fd923eb3829bd754a3e23ebaa4c2170f15206e8fb387a8478fa2e2f48d2a4f3682acd586
+DIST thunderbird-140.7.1esr-gl.xpi 489346 BLAKE2B 
311443c2acbb5f889642ca88877574866632890698a660760d56437f5e2714cc36f2b6351fedf7f3a83eded5b763603f6d29be84328b631da664aa9b085d82fd
 SHA512 
eb8f9d87d096941c182203f207607dd3d417999b63947f38c16f13e4f32bd86fb39f9e333299704eb2266465fbe7f82b1caead225e4457cdf55e7168c0801270
+DIST thunderbird-140.7.1esr-he.xpi 443587 BLAKE2B 
cea8bbe4af910a89b9726e52e3aec3d3d9266eab04348f19d102e72c43eb8e27ca2d8d3cf35354ede7272e75c3d6e6b3777b3d9f214ae78018b0749b95973035
 SHA512 
eb6b1b045785e7930c5d97d59bb027ec0e5f1b1ae05ddabc0761a608d8fafb3579e3b09395646ad8c864fb2dab4afe82295e4136d9edbe59736083c4d94f4fe6
+DIST thunderbird-140.7.1esr-hr.xpi 470679 BLAKE2B 
42e67534130b5e37382465f52ab1371e19b242dab323e5c64888cd0afaadd9fd221c0ed7d8fceb9e56a99cd3eaa24645daeb67709e3d9913f315e29fd60ed929
 SHA512 
31ba46b9edc9f5598c5b77497ee870324fdcc7fbfbc04b279736d3001da15b64ff1a7d572c7c1d229a8c988b26342ecf98f5fe50063022753f36cdb683a325cf
+DIST thunderbird-140.7.1esr-hsb.xpi 514933 BLAKE2B 
442de05229125bb5004cd7d39e5f8a3392c6dbe4f4298d27181fb1f15d87dbae65fb2fcdb7df30d53278b05b440a2f1e27d8c8b8a5929f4feef3e58fe2bfea1c
 SHA512 
bd70ecf6a9b0b5edad6e4957cb0253fede949c91ea875587454fb06525f5bdaef8e573e8daf35b9cc3ef8b5a9d1dedb643115d7ed746b7f933e11bfb50c50ff1
+DIST thunderbird-140.7.1esr-hu.xpi 517545 BLAKE2B 
d6531e37225594ddf459aeb040bc37e01010aa8ef9e715d75d30142e5ea582a5612b5d687e66e4d7b060ed9333ea9d0697adf981e561f01d3a79beaae2f4ceff
 SHA512 
e7b51d04bf78bf6ace4cb5294b36c73f951db1eb552bf44b85b58ba7da4a76c1f6b9687ff9ce0c27506ac3dd76fec6eaaf575d9226bfcd0ca0b7c9da7861a481
+DIST thunderbird-140.7.1esr-id.xpi 467001 BLAKE2B 
8c26c04c4e05fade83f49261f2a9670bb04e354a036d032b483ce79950191c2a740355dcd97769c57827a38977abe8da963f73b3af57a06256f0c0fd7559d2a8
 SHA512 
180724765f0360e2223a058191bdc43b14f09eeb47d83318bbb8220cfed0a37a70b44d432a9fed047fb8b170e4a59f137f255f22eeb81252deb28627f5690b11
+DIST thunderbird-140.7.1esr-is.xpi 482738 BLAKE2B 
316f7e437f98528dd43b1f3cc373027360950818771d2aa072ef91a67daf054ec7039b11c62fb99f62d3f781587b06ed886f8a55b19ac5219c48b07ab40f5d1e
 SHA512 
ef20b36c5ed21387746b5d50afaca0c035b401673083728e19090dd78d1c471f3bb6223f1609b863abcc96542d004e4edbe2be681c61153647226e6d0842dd01
+DIST thunderbird-140.7.1esr-it.xpi 488504 BLAKE2B 
1a928e185f6cf5253f16c9b145d61685fc4fc9aa098f8946710235dea57f73e2041282e40bed01e0705770b41c2efe2dd74b42ac8cb2d442a3c5005e312b7199
 SHA512 
e692076dcbd84a7b97fe0204226eb7eb5f3995c9515f0f7cd19aff1ffefdba3e20cfb468a4eb3dd6358c9e0c75811b3c59d3be26556ea36de9f0b2db3f6a515b
+DIST thunderbird-140.7.1esr-ja.xpi 539194 BLAKE2B 
bd80f8ac079af6972d0c79ce7d728ca867ffa9a4259261949e8452a353586c7da5ce281cf78a3b92367ea47a6f8dafc4a2c7e4ce64d27f9b6e80086c2fc7f52a
 SHA512 
1a00ddfb2c12162e88133bf84b5c390cff9027d62d9186c4393c73170910b533b8660737b25e0e122e0d484adce21e4f9b99d456ba57620f9fa6b09e49a904b3
+DIST thunderbird-140.7.1esr-ka.xpi 554772 BLAKE2B 
2637ce859b531931a09aa234510a4c3419480e3ae3775d5bd5d058c95b62753883abedfb234e2e30a7d32bd6b4a970409fe55de999e346f1d2ea1fa6e9610024
 SHA512 
830ba7eba2bfd29b6a04ed98c8a5b0f38f4e27e2bd39d20a0a0ebe95132fe0611859802617d040a391ff0369df7b49ea637f53063735d4cf8cacb54086c8ef9e
+DIST thunderbird-140.7.1esr-kab.xpi 470497 BLAKE2B 
34ab5c361a8be1646216c175de154e88618380028c1d07ae282d0362c645c3de19a6d03e8bc8a4edef24286b8fbb7f01b8e24908503b0f4c729c89991f0a7420
 SHA512 
2aec3abf6a89a2f30f0b7783fcd872dcd4201e337d144556f919526ade080f0380bd3e07e4dbbfaaecec331ecf901ed20dca8f76de870dc75ae0657e09737338
+DIST thunderbird-140.7.1esr-kk.xpi 573880 BLAKE2B 
19713afcf2ef1b6f04b92a83039cb0c5608c903cbed06ad4cff67599b29cd7078ffa417ed144c7fe844d63867d58baf3115e842d7861fbff70dd52da3dd6f494
 SHA512 
e32315e637f81e215a3b188d2e718733440846cc635b87aefba6f1b7b7c33a161f331636e40d751712198c5db87fcd2a18f9e7a2724f04a5995ac0e920b6af2c
+DIST thunderbird-140.7.1esr-ko.xpi 515591 BLAKE2B 
fe470ead6691992a40fe3e2dc39f65555e080da0190cd57b46d9510f1fb618cfe426fd37c2230c394438007774a5a2bb40273bf091199a32301cd5fed231fc5c
 SHA512 
fc1127ab2c17477f03dda57885388477cd4a2aad3de9db4f5030b0cb840acafd2d65d6280c39711727d83a42c4b05bede0d13ffaef856ec2cf09eeb481cf2ee8
+DIST thunderbird-140.7.1esr-lt.xpi 453436 BLAKE2B 
94037a9358fc93e6949dbd7ab0c92aa63c3b8de6c64e0db8a3a21255f29bfd2c5bebafe441ac083975a0036ab85e5a70d908d52b7f2417ce6d0f603e17fd12af
 SHA512 
818b4be948c950d84ae99d4c96a4a75845165030a06529ef382cb1d471e9ffc2326dffa9126e10d1124e91d9d1e3e3700b4014984c1ffa9ef9abfc2e393bd584
+DIST thunderbird-140.7.1esr-lv.xpi 392816 BLAKE2B 
432c5ffc09d62152402e8df06b596c1a5b56d3c9bdf1462dc0237c8d133e433281d713551aa22b01a4efc48661576d6a9b8ec644dccd091faffc933e90a0e2be
 SHA512 
40d2f7e5a74540b6037cf37b5de17b5e0a917d2b93d3405a6b5aa1a073f8ab51a888f2dce306710eb887e54a02c16bc3fd8733fabe75f0e8d017738d71a2cad8
+DIST thunderbird-140.7.1esr-ms.xpi 352181 BLAKE2B 
fd78a990a23c81d9060cd181173e693a336dad0e00c23ea059e6be4517b0e5a022d9006d164d1e31b22877fed292256c419204c14dca134ba341e94dc2c1b102
 SHA512 
4362aba6a7f0eb5d24d080385ccd167641a42f26893483fbf1ce995e34dcf6bb16221d54ff29e67c47b22625005d9c46d28d5613634923725bf55c3d6f7af756
+DIST thunderbird-140.7.1esr-nb-NO.xpi 476137 BLAKE2B 
267fb95e778949769a8796707ca648e685173ef0859fa66e79fe6fab83cd0758c4cba62c8d7d72a0c280144b64a63cab65b543a142dcbfcc340dae2098fc9752
 SHA512 
33643b016fe14c657e6baa9f9e0091ee59d9955ddabd879a5f1ea9fe86e5872104122005522d1fecb22dc986e1040212ee78f81d404524616f0b23d26dd2c5c5
+DIST thunderbird-140.7.1esr-nl.xpi 482123 BLAKE2B 
2614ae08b9df9a70fdef04fc22fe4687668efc86ab637a84b8353b9f0d89d8e0914b8973655748561bfd22429ff1594ffc93ee57b05a272b4c553d32ea42a984
 SHA512 
61aa51037bccf5fadc721ca924d6784c1c3873e67dad6d23c1a6e550e3bc461c776b206b169d99e76910e8622b53e74729a0dfcfaeca41a231cd70370a799cc0
+DIST thunderbird-140.7.1esr-nn-NO.xpi 479759 BLAKE2B 
55af94516c4cfdb463ffbb4866469308fcfe73896a6116c9d232e73b6e00f9a31f17035441c720943b6ec49cbd15884d8c8da2844f9f9d4fbcb6c7ce8edf7a6f
 SHA512 
796762e0031abf93a7018498edf662bcfc5c267c488aad36306f00d2ad68d783148729ffc0c538f5fc0b26798d7acdf12297d34da286df03161c020c0b87ba91
+DIST thunderbird-140.7.1esr-pa-IN.xpi 435423 BLAKE2B 
288582f88933be8e97d0dc454bad7a097d34b2aa50ad131559f403db328ed1b0fca44c0c3efce2c748d41b5ad2b3b1362f26b89211b9900c28d133ce01ce8f0c
 SHA512 
a5a4edf82346ebb42356d24df85b3154c62df0990e58646f87326681a3c89aadce4cf1328907662151ed2402915434185bd4104242e4ab8cf4025ca70f00bf51
+DIST thunderbird-140.7.1esr-pl.xpi 515613 BLAKE2B 
524ccacfa8e6300bb50d30eac9099f7b431beea81ba90a3493e0c294d38eb252cb10b6abca7023e2c159799d62ed5e35eb82dedfc8c4cfc98f8f38683e643a3f
 SHA512 
3ce5211099c61f8cfb54c737c900ea29093b943ddd7fb57f7fbef1b0ccd53c406cf8ea33092888242e571d55fa9ec76ffd103418a37d762573402231625b1b78
+DIST thunderbird-140.7.1esr-pt-BR.xpi 490163 BLAKE2B 
ea02e320f2e115848208771cafefa4e6b127645ffdb3efd0dbb89fa69c3dc43bc9defaf4253b708a9d8a8f0be381c9b949ddb7452631a9cca5948f5e66041bd2
 SHA512 
8d24759af63db8e4d7fe35e100f780bf3c5ea3f0ebf093b1d9e9f27f536891fd21e56105a36f3b6a375588250a96afe21440be923dd2cb35cc0fd512270169db
+DIST thunderbird-140.7.1esr-pt-PT.xpi 492525 BLAKE2B 
cb1b9a2186705c5e6056c8bb45b7360aad3fe75b48a998e78bf4d516457f4e5ae7a2907e22f7c9c071a7f4c1abf5325ab6dc270e3a65bbe9737c345cc089cb9e
 SHA512 
28b23077b9fde3767f184174665446953188b46966dd0712e83ca9557e8eefde9e0390f1d8b5126d8dd9e6c804d7f345f8b640ee6dee5a475ce342d5db863b70
+DIST thunderbird-140.7.1esr-rm.xpi 487884 BLAKE2B 
4273b2c316b0064172b2a7808363a71186561d2f9e7f9659437446d556b42589ee47ca2645e5fedcc74cc47ebe1a5fcf3e94a7fae7c342745424e4988c8d1a5e
 SHA512 
9d020415fc60c5ba7cfae76a9d742041afed7ac04806a957f45517f4d0b0d1a4956070a90f078a64749669561e007ca94cbd0a15bca50b3ed9ee48497c48c14d
+DIST thunderbird-140.7.1esr-ro.xpi 501093 BLAKE2B 
00096fc20373c5a468f035cac35b1943e15be6b34141ebf5104cf462354e3c0a9d439deaf3412f6b1d1e23493424a88a9ca5b290216b2feacff4632e89839fea
 SHA512 
ff39e041f95739df4db6b10b595d6195ef600ab752ea57696570b40a5ccc4c20be69b829e1cf34bf6cb85cd4d4cd5e140f5b55408727c5d6be5cdad82ece1bc9
+DIST thunderbird-140.7.1esr-ru.xpi 593284 BLAKE2B 
22d638dce75638b0202d2baba36462ed171ae99ce95b560eeec0ce45ca0479140924c61dc330e22ea73b6e88aa15ce8b9e6236e670f5575bd630d038f6f8d394
 SHA512 
b1d2b573311b7733b39b3edb112f8a2d67bdeb7c19eaeb252d01dd7910e6e73bf01e953ecd8ec2f395043e3a69cea9f07624053d04901f0b3b89447c431735dd
+DIST thunderbird-140.7.1esr-sk.xpi 519388 BLAKE2B 
56846eef79500cd665fa90b6dadb6e2e22708fb6d671307a1983a3d5cd263682741d6136a36cad68a16d8c60332ff980fa11e3c76ffbf7c803eb065dc03edb9e
 SHA512 
80ca9351edb51522106ac98fb9a8fbfd4d358aa4cffce9d9cd2c4ffe5c2ad62751a89a30943cbb51c19cb4143a3d11f70c0fe876093372facdb5e47d6d35296a
+DIST thunderbird-140.7.1esr-sl.xpi 485960 BLAKE2B 
79614ca391859477c280cce3605093b9a6521e90bd6a84b607316399ec99c025b2896aa1ae3e979907900996ffc5138f2dc232fa6be7c9644b936b7d8d70f143
 SHA512 
ead48a32a3c6c6d76f8a6447fac483baadbf11deec9f5008e8c28c01665235b373badf12868757f0084f9a992bcea950d39d0a631601773dcedefabe084751e7
+DIST thunderbird-140.7.1esr-sq.xpi 506267 BLAKE2B 
66aa95a370b78cf39430d7de9dc09e0f7bd2e5bd6c3cef8cb955e4fd44d2142e2a476e8205b922e79e559fd88c78a735803caa9855fa1afdb82343f24b486e11
 SHA512 
c9994ffe66bb55e05026ea7cbe5ce99ec7373045f5443cd0b3289055044e74cf41ffde2a7619cc980be98f2e6b6733d95297a3ff8261eb371c3fa5defa933735
+DIST thunderbird-140.7.1esr-sr.xpi 495990 BLAKE2B 
498d3d69802a474693d09407e1c12d6be42edb27f180a872ce8d00a14712a1b9abaf025a794e4c27bdea281bbf0662e06810c170e834b067154b374bb6c96c50
 SHA512 
4c79da087e43eeb3c5eea8995b6a89cd6425c439729c5e387b03d91621b3558e046c375b30a131f76050b49abb1574414b14de319dceff4f2b6a0e90ae5ba725
+DIST thunderbird-140.7.1esr-sv-SE.xpi 484419 BLAKE2B 
ecc20de54fc564d3653751189a3fcb65ab102f24be815485bd813a713b4ceff83b995d7524e309ef5c4eb885540086ec5f9fb06e51a47f9e66b99e04e6e7dc83
 SHA512 
3f0c760aff6ee86770393bc6acc638b435b8aa440558182fb34fd00a36487c5584fa9e9638e00e3e533f4729cd26f379a629c8fc491083c3652387c86c29238b
+DIST thunderbird-140.7.1esr-th.xpi 567947 BLAKE2B 
5a5b2e1dad99fc2be33b21d69631cbf9492640aa241ed045da7c9c2876696db42d7b910318006b9d3669cbae39f8b89226a65bba186429d5e169319aa7df48d9
 SHA512 
956be0d0e77daf27004cd534ea1023cc6ffbb9293020a9954ea8c9b2e3ad5e7e487a66b1f672c8214b2a7a8e0e22b1a5bd1f10516cca34009021db82dae6cd01
+DIST thunderbird-140.7.1esr-tr.xpi 496182 BLAKE2B 
246a72e9995159fcc0fd00c73faefd503b8531eaa2f5f6097d44736e4591eb6f1a7fee5facb196506f8d487d58318c7c0f6f085b3f707fd43d8c36941fc41f6e
 SHA512 
3101fd0b741ad2c798a6e83d73486b284ed25856728c704e920a350d9d3c68bc0b9257cce8975f829b1dcd698455904d5c33c83d0f3d8dac04f188596d20f710
+DIST thunderbird-140.7.1esr-uk.xpi 582152 BLAKE2B 
288c751d0c5be0f38ebc5f4232b8dab141fa78d9f57ce1b936a73def19c4647dd83de5d9a4dc4c844650aac022470f60028a8a3d3b121530e2ab39bb5a0f5066
 SHA512 
c9c41aa20848d0d73668336737f2286755b66a7b09649f105c819377466bad01de992b712a7f2df2b122dfc931d259610fad9be387b623ae91a2cd8598522c77
+DIST thunderbird-140.7.1esr-uz.xpi 355267 BLAKE2B 
93bb15bd61705ab9898cb41e0c841f44aa1a80c7ca4d0fbea4f531b47b35cfb5d3aead1fbd60b8f0dd743bda8dd60aee749a1b43e937baea3c73306d1f3d9b97
 SHA512 
4e748b9d359c874351fc1be7688c5170014bb359a6b9ddc6f0a6e27d12be215b9628ee3e6d3e5723b3ba4b7803e4f167c3dcc12209e602f5c9767c37e7f85695
+DIST thunderbird-140.7.1esr-vi.xpi 518884 BLAKE2B 
626280769bafcdf9ec0a25ddcee15ac74ace71e0b6232fafb3efe1a6a5ba94c01b9bba7b42683f34fe090056908384fa91dfdbec0038f041a84de472514ba2d7
 SHA512 
e5dc3b65d0729b82f29c67b05b4e5c35b05c9bd221eaf207c8050097cb5a61f36f6e6b7f004683354520eecf7e77732b4467acecb0454fa5602c0f268c02aafa
+DIST thunderbird-140.7.1esr-zh-CN.xpi 507840 BLAKE2B 
44a04f6586695c9e098073d1f5f74ca766eb5bcee72063392ebe55e7ceb069eafe6502dc7e683d51bf2a500a770c4ae1bf6a75eec31ab2d7d536ef939b5b72ca
 SHA512 
ca0fa3abed86be1ab6edab2e5431668dbac332143521cbeaa7ca5edfc561a46bcf1e238f76778f62916c9a68b7523ed279e2bb925565ae0bb671cdaf63a21bb2
+DIST thunderbird-140.7.1esr-zh-TW.xpi 511431 BLAKE2B 
fc9043dd3e6598d31a32aa1890c1eaad03358ed34b80fe3452274f41e839b5b084b524a04f1768e8229993675a26411e36388baaf4925d8b9f854e1ca2084af1
 SHA512 
814ce81f00b74ea8c7ddc26b0afa35a3a45516cb7ed6715b36d2aaee6da415dc3dd2d4dcdf2e5e857d6889c0b56bebc9808e54a558384a9a628d209374c3fb65
+DIST thunderbird-140.7.1esr.source.tar.xz 754997380 BLAKE2B 
c7cef462046d0e6e30ab389437202683fad0487c545b1cff9c4c4eadcbf2b8945c2809a99311b282e3307eb50a765788adfffff20663287b9be61bcc8054937b
 SHA512 
2d0f61758b0428eb4eb8294c58d914e03842c9ad7685cd2eec26c723cc1491634f90fc9fcf5ad6d3f13738e141e96c692cd8ff1599869346e3247a0cae2349f4
 DIST thunderbird-146.0-af.xpi 312102 BLAKE2B 
1002d405b855ab92e382ac171d078a8cfb1d40c502d71865906c1a29e1d3e5bc3b5dd5dd3a623f769dd8617872361808a64aff7731e9ba476a2fa6fde2e3628f
 SHA512 
21a4f2c6241d9252cad85b8a5a2111afb749dfb791abaa1f505ac433e4575247e7b1f3a47663f717e8c791f3c084b43bbb52312dd75787d7b0badbe243ff56b7
 DIST thunderbird-146.0-ar.xpi 433915 BLAKE2B 
0fabb128da8e4685f489a928c38437bdb668a0c7d1c15b94c68718fc1df26303a5cf02d0d722b5ecc74b9a1521ca394941235647b8e6469825f3f13e3b57d6d1
 SHA512 
27e9fffe05fc2e52b902cf52399847d6f313dfb6cf7326e4a5ed8cdde55cf87694f39ceae38d5c7b680ede2b3bb1b5d7685df0e8751dcd8497ea0abea4451159
 DIST thunderbird-146.0-ast.xpi 336128 BLAKE2B 
92491e55d73bcb204a23aa283d3b16d43fa0038bb24c6fcb0308d2c1d2d3017802995ff14a617eb9c5d5869943afc31ba1c96aa06eac2dff3989e9e41c2c9a7b
 SHA512 
f74087a0cebf61e8dd5fc86d31ad1c9786cde50f312f40664e247a478e7a1f4ddbe547af529e1ca58cffa21e711b4ec6d61903af62d306394e490e9353486b5b

diff --git a/mail-client/thunderbird/thunderbird-140.7.1.ebuild 
b/mail-client/thunderbird/thunderbird-140.7.1.ebuild
new file mode 100644
index 000000000000..6ff755a1aea7
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-140.7.1.ebuild
@@ -0,0 +1,1160 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-140esr-patches-05.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.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=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/glib:2
+       dev-libs/libffi:=
+       >=dev-libs/nss-3.112.2
+       >=dev-libs/nspr-4.36
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-apps/dbus
+       virtual/zlib:=
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/libdrm
+       x11-libs/pango
+       x11-libs/pixman
+       jack? ( virtual/jack )
+       pulseaudio? (
+               || (
+                       media-libs/libpulse
+                       >=media-sound/apulse-0.1.12-r4[sdk]
+               )
+       )
+       libproxy? ( net-libs/libproxy )
+       selinux? ( sec-policy/selinux-mozilla )
+       sndio? ( >=media-sound/sndio-1.8.0-r1 )
+       system-av1? (
+               >=media-libs/dav1d-1.0.0:=
+               >=media-libs/libaom-1.0.0:=
+       )
+       system-harfbuzz? (
+               >=media-gfx/graphite2-1.3.13
+               >=media-libs/harfbuzz-2.8.1:0=
+       )
+       system-icu? ( >=dev-libs/icu-76.1:= )
+       system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= )
+       system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] )
+       system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
+       system-pipewire? ( >=media-video/pipewire-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"
+
+       # ICU's subslot change should trigger rebuild on Firefox if it is 
updated 77->78.
+       if use system-icu && has_version ">=dev-libs/icu-78.1" ; then
+               eapply "${FILESDIR}/firefox-146.0.1-icu78.patch" # bgo#967261
+       fi
+
+       # 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