commit:     97cff14766723e979f9ac51c8cbcaf5b3104bd10
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 07:30:42 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 07:31:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97cff147

mail-client/thunderbird: add 139.0.1

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-139.0.1.ebuild | 1162 ++++++++++++++++++++
 2 files changed, 1227 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index d90ba6ce0206..a24af1526c5a 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -393,4 +393,69 @@ DIST thunderbird-139.0-uz.xpi 356056 BLAKE2B 
c4c94a3cff03ca526509ed175d6f34aa88f
 DIST thunderbird-139.0-vi.xpi 516768 BLAKE2B 
00a332f2fbe3b0e5e3a3bbc63e17a2338ca3e7e175194325f8b7b45601f52f761fe69794635aa5caf9f58bf36edb37c8c198b823b4679eac6bf28ad8091ece49
 SHA512 
e3ee7b084daed653a190724ce1bd442ea59557b459b1af564f85590f0e5c1ffd3bb73c935ff41254e4738e31b809d3b03b251fbfa4af7d0bb7e7dd4a50d2db6e
 DIST thunderbird-139.0-zh-CN.xpi 506143 BLAKE2B 
94fd75ce10cf0da5fb7f42c8f51130bb3e98c7d75114a936c107009b516119e20fa0fae43b1ad0f5ee34575668c921f149fe21e88324a1232918b3870c556557
 SHA512 
175be4f771443ec07e9c7c909adf2d7dc84022cddc13237fec843a76d9b30f77fba5389d62e6cbf8404298bbd572c88f37397fdf69bbfb2243186edfc741bc3e
 DIST thunderbird-139.0-zh-TW.xpi 509370 BLAKE2B 
6f3b52f91087f9103393d54204a11cccb984c7b152976bd24839f985e346fbb6335a2d77e9d314bad5fd4aa3d3f8a44bbd2c2524e935579b4d3f18c4185cd928
 SHA512 
294338dbb37f34fef188f69a9e5dfb36566b9d6c4043c3145e62708105ff996620b54ff78151899967f1809a67e25cf96e23c863a36ef0ccd120311127ed7bff
+DIST thunderbird-139.0.1-af.xpi 316968 BLAKE2B 
5b6fe82396aa3b6fd5687e6d509c3e9150a880dcef4d5c17369c04ecd95480574da25c73f4c052dadec8e7abcaa50829bf85511c29f13ac183345b7d924ef854
 SHA512 
5fb234ea89e47d99036004c91ef90c27ea2df6d51aee33c8668cfb4f35fcb703ae930cf4b79b6d695dac35b7db80f63ea14d95b7acd287f35c8fa2ad9a933a6f
+DIST thunderbird-139.0.1-ar.xpi 435735 BLAKE2B 
f87a369ae831f791c6c3b98e3a9cb3ddbb4467c9b14e93d1969433e65e72aad44caa16972275a4611ebb1ac12659faa5cbe4750d6587a381d3cae133d8e7fd1d
 SHA512 
434db6fe56283e10516d29d2e666763bdb8041fcc63bcece6bdb16b67a7484ce17de48c3c2f0505a21654be8bede2674aadf49cafa0385d5ce1501efbb42bee3
+DIST thunderbird-139.0.1-ast.xpi 342373 BLAKE2B 
f232fced5a4218e818c757842da103b34ea97310a0e4919622ccbb2ca388cc3020ceee8e2a34e710176df71ff37566b47c10df08d8810c20107e438e3a6ab507
 SHA512 
b9450383afef48635391308c13e06bf4d832a71979ac2f55bfbc3be1ad673f398076b8cefca46d336306593939cb456779a7ef0f512830fcb375f85b508f6b71
+DIST thunderbird-139.0.1-be.xpi 518999 BLAKE2B 
f3566801b11f88057a61423092ef109694e437dd5d6ed7dd1069f8f670f4c8c80686753cb0e49e5b3b65ca14cd07f09dbf894c2504d8006c73b776186ea24063
 SHA512 
f3bd14d7d1f9043a00e1bc202014d036e1388bad19b915f31cd2b4a99fd4a501c77a0e9f87e755131200848482083f26d89bccb5a24b6b520119294f624c1e87
+DIST thunderbird-139.0.1-bg.xpi 535154 BLAKE2B 
c5e195aec04f93070aefccadb73a9ff989e2d6283f00eb1928fee974418a753e2394bc184e065f1550e9fe04355f6f8b1e0941de4835a5533852713b73180f73
 SHA512 
5e8312f942caf4492057cb8d860736e9fc7ef72979106e576e40bf66d0d602c76cd34b3bf7f68f75b14db49fd5dce9a26c10129ddf4840e50b462c094c45426a
+DIST thunderbird-139.0.1-br.xpi 403227 BLAKE2B 
92890df2ee0d67a3c1a5d781813075107fe218c532c53fdac920342f8a235d2af53ec40efb8a2315344afcf11a5ea9dd2bf58aa16af8a71fa9bb788f941200e8
 SHA512 
3d32cdcfeb44cd88ed70085059628f9e800f5469c4cb034d3432a1d1277427cc61d032fdad33fde7504e524c189fec393f29555ce56d14f6bf0d13926761aa7c
+DIST thunderbird-139.0.1-ca.xpi 441385 BLAKE2B 
4b7f8c4d340ecad451aa0f5cc20c5618c1d6866b8624acaa0008102578b796d473a0a2d5384dc2e29ff148ea7387caeb1f47e88683349ef981b4b62b208defaf
 SHA512 
58803a3c3425ea79c05331ef6545eb1fc942888c412a315859acfae02f62a0dbf0b09e863ff2bec7f8767dfe09a6967e73a5b69ae17de4be555fd919d1d54a8c
+DIST thunderbird-139.0.1-cak.xpi 419103 BLAKE2B 
9282629249e47c0ef7f0ed0d360c12f9a53cce717454c46ad47c9c1eaee589600a3876fc201a71f2a01311fd1d5a7ee3a5f42224dc4f83accd4d84cc002f9ddd
 SHA512 
a115a5eefb771987a138533d02d46a8a542e51403d56767993e72b784ca7dd58e6d464d9f854ef1bd4104699fe90109cf920abbda05371fef38ab5731ff443bf
+DIST thunderbird-139.0.1-cs.xpi 517129 BLAKE2B 
ca1bde1264e6bcbe78585807fe5e2a5b748e74f1ecbaf56fda57631cc18a98f5f12977aef55670392a63ed89a0c9a729debedb52a380ee3a54ca13fbf4b55bfd
 SHA512 
237725604251dab57098cfce9137614fbbc653f74d2718d207d4161c3bfa4429c293fbca11af7cbf0306ca2cf56ce2932ed999dc43d31e56f972020b8132d492
+DIST thunderbird-139.0.1-cy.xpi 485814 BLAKE2B 
0980093c11737677056238fecb0b42e93d1ab52907c1541b4e1dde223d4863d36ea1432a4e7bb13c99f10e64e7293c6b5a15e23e0b020405e3dbd851f886d179
 SHA512 
4daa816dfc3abac08f4c024a2497bf2c779c92c2a3e7561dbb9418139ef8170d14ceb7b6e61754696719396eb3363ec047afb712da06cb517adf80458fa420f1
+DIST thunderbird-139.0.1-da.xpi 474894 BLAKE2B 
d7a34f9e065db3ed1d36e2e5ee7964f1a4dc2000de0bbbbd13aac06d42ad93d42e1d5b41dfa71cd0643581e4bbba9d8338224fcf3c6e04dabb91355b90d89f5d
 SHA512 
072ddfcbcdd2c92ad5382816de09b1d943f6818daa8793b309320c54d6aa4918845c3b65530f612656879e00e19610a39506c21f6ce4c75597f81edc385fa90d
+DIST thunderbird-139.0.1-de.xpi 502967 BLAKE2B 
a04c98d90f5ff237a21d8839e9175167fee9e75fc8ed8e979799451abc240bd7a4655fec6e8c2b725774f82314a267f9b3c361412175cfb64d269c495a27f43f
 SHA512 
f84338f39f62e9c34d651e7dab2cdd06cd3ae051a2fa4b7db8ba8fb50f6b2a708c098638d8c795a588a02ec8e6b8e2c67ece850936ad6d6625c6abebbea8ac77
+DIST thunderbird-139.0.1-dsb.xpi 515790 BLAKE2B 
af726f7f838c29c77dd600ca2fd7da85d046d07a9b93af6ad9cb245c57f60e8cf195fafdfd9347b316c390c62b3dcb287094ef6845faf07625a1b7c77668aa9f
 SHA512 
987dfedce944685b8cd159ab6cc76599e8272939f2a9e69557fc0878638e6077df3b58750b2ea1fe4025b7eb97cf50849d0ef19b1a40dd7156ddf512b28ca596
+DIST thunderbird-139.0.1-el.xpi 606201 BLAKE2B 
30c797f67e6dc10f362bc035bce0defac351332ecde200a95dc521fe0afdf4269171cc64d1f155f92c2ef9c73358b2c0c0904834df1bc7bb4ddba225d70de383
 SHA512 
0830b163f671320f6cc1a948e06149aa12cecd4f1c81a6dfa2f24154d2ac3db82b118c94b526cd2339551eec2cd34b21ffa0994187ff9e48d4c6b58990347b38
+DIST thunderbird-139.0.1-en-CA.xpi 449786 BLAKE2B 
9be2b8ccdbe7e9f5b3622de27cf65faf7356e066606b17f7130a716aade240eff89f5cf74ff69464da147d58d2b5296bcf97faa46243a7021b577d4d92b747ff
 SHA512 
26d3a70edab6ef4cea292b7a0a4ef2f9f12ecf92f97c2ba1d41ec7b979b703bfb354091687e4dea6aaef7fede996958208922d819bd534afd9f4e436e0a1d1e6
+DIST thunderbird-139.0.1-en-GB.xpi 450741 BLAKE2B 
8b1dd841b0d6db327d39d597fb73502867add48f201e6ce9f94040f618fd12a46751b4074d9d3b570b43251f0e7fa4298a355f2a3401a2aaa0b2d597457f1c84
 SHA512 
6f8e75c9220b3c45c19be8d3bf6bcc4c6928ad8402354a22b944718fc93d0fde3ee70bca218924efb5761c2854ddcb2e112b1a059c30a695c67f2078fcbc6d9c
+DIST thunderbird-139.0.1-es-AR.xpi 493643 BLAKE2B 
edfa8e89ace5a19c2a506de8952a07f8427df40576282feb31a15299090ed1094aa64395d6ac05f9926337152c4065ec52e89ec7ea02dec9ca902573a5042c50
 SHA512 
14cfc49e08c9d811ca26c7d86b41e2fdbd38b8f420e6832eca6f77c2732237574ba7f7a7c734737b336c16cc94ab0a571a820240a08f51a58678b8d4aaf28fdd
+DIST thunderbird-139.0.1-es-ES.xpi 495377 BLAKE2B 
b07a69594883f470e34d7152591652b96cef8ac778357024a56635a57962bf0bd121dbc7e597fa2bdbd5e2ebc2dc867907922066bf33f20e96f48310a82b35ee
 SHA512 
1d31669ebf988fd419ce98f96edbf6eb68cac7eea926cf36b262804e012cede3a1e0e14e17f94fca21da7bed78f6806fb2aa2fed01fedd21cd9f0851683cde17
+DIST thunderbird-139.0.1-es-MX.xpi 489248 BLAKE2B 
ca73da4dfa11cfd126a195ef362faf2437a8f3d1c698a18fa8be6e86096693962d43f5d7e4852421cb0f7bdf8be99258ddee64351bf5ae79d615898256a70573
 SHA512 
cf5d3035cbe808a2e77991c84a42193f23a9ff4864923a5e816ce07b1216275c832b10b570de672eddb5caaf7f4ff75c98d43c76084d60d11f3e2debb297a920
+DIST thunderbird-139.0.1-et.xpi 443106 BLAKE2B 
80733efc304c558e3f383728bb1e13538d5c5075e6c6acdfe8ba86030209910c42c801434bd1b8289e986c8da879ef130dccfa74b3273e79be90477eda572c30
 SHA512 
2cdd99b384427ee37151e762702e5db8cb2adfb1ecde87a051b89208a624dfb6f300e38d51d288c138bab1e7c1a94be42ce55291516e03245dc044b92d6c4559
+DIST thunderbird-139.0.1-eu.xpi 471469 BLAKE2B 
d8fe19222746e9c95c3b603dfa2d8ac1276710835e1028d5e96ae6a14d838f42585306932a20d1b9e48a10b0430453bad93b2154890946f5eb79e3be47b7d186
 SHA512 
46cef89d9bcc9af8031d5aa9d5cffe51daecd87f6bb51aa8cee0fb7a2c061944a1ea24a60bb20a46dd61fac8cf262c6038d5768daafd0b52dc74b6261892321d
+DIST thunderbird-139.0.1-fi.xpi 472732 BLAKE2B 
6adfcd8d03aa2079c1442ea588cd4692a28d844aa8c2f7262a0a8fafc4d0f7d1514a51fb334e307c30a95682becae2d57bae8c8daf56b0c8a713e3584535b92f
 SHA512 
814b2bf958e5ad219bdaea0fcc27e1b23e32f523234a06bb1733c382d77dddbd7226c817ec1aaac77c6465171251cb24231ae8b5713f1f6eddbd883de883bf77
+DIST thunderbird-139.0.1-fr.xpi 506098 BLAKE2B 
9e30375052b4915c986968ddf332d2936bfb2e5743e84be1546021d8a6d5a623402d9e7155b0b50cc17a92e7e76800ab3c60c340c93c8a762496815664745ed2
 SHA512 
267898e12d76ee064a78a73b815a429606bcdd4f6cbf0a599eb864f4435445c8cbc446c83601d7d48c6220dde68f29faf76ab8525cfa14d64a612896d2f6663b
+DIST thunderbird-139.0.1-fy-NL.xpi 488899 BLAKE2B 
6497f58f3bfc7e73ede0c79db2974bae75832622aa4d9cf68b87cdc85d2bffdb22cb930906a349d2d9989f449a0a58e09011470041d6d063d930fd3e165e204c
 SHA512 
f48038bfec5365dbb55083fba37f4b3b026e21179e58bf441fd53397db237ebd60e2511c1a5a672d422e1825db876aebf167dab2212e3913d6c560d5e13e779d
+DIST thunderbird-139.0.1-ga-IE.xpi 377498 BLAKE2B 
853284ab44e9ec547d861dccac379ba3aa54e9c74ae8a578db57d16a9672d3298453613096c839dec8ac90ccabe0dcce87f9894c6b321cbd56451f76cf1b3332
 SHA512 
1b685ca9fb69f198a821edbf0c3a59137e2cd2a72fecf9f755f5021262712b12d672e8b51b6735e5b75fa3d7850e741a2e5da1ed4f5541f35ac57d310e46946e
+DIST thunderbird-139.0.1-gd.xpi 463049 BLAKE2B 
bd47f2ab9c017ccab86618df752484980a53fb4e2901817864b056bb05c31427c3856ef4b3508b1ce9a7b27d6292613524daa8803d1121125a291a0ed2f5b578
 SHA512 
b2519adff13d0c0da82e46ec74dd92b225d27b6117851d001e475e9ab08bc90aa0aabce9c330b8d5f833600c63c3937866de792a6e5c973fb2bde63bf4f17a9b
+DIST thunderbird-139.0.1-gl.xpi 471960 BLAKE2B 
08fb978cf7c90f790f7382205f44396c6c4ee21bef600858b61e46ca02fe15a78a732e678d879081f30cc1a63e1d8d4cc10c99ce4b4e63a848176bf20ddf2e03
 SHA512 
4e69548d85e88a5cdfb427f9848e3686908ce98bee1ef42565da5ec3e41f018c294378acdcade85ead6c951020765e9b97f8418251cf70e2b192b4bae8d91fd8
+DIST thunderbird-139.0.1-he.xpi 440197 BLAKE2B 
2f0724d2136b3f7e359c65139fd43886fd5636cca628d407f0bd21a2a53274ab128acf022d1b4c901766f4a1c1d8cf3dd4908e766dc930eb59c890ac3253ccec
 SHA512 
eab0960c6e28dc4ef27e16bed046eabc7d39fd34a9c998e3f1d73cee6e73e95af98bad4760c1fe4d9f81aa62139aaaa3e1b590f38a30c435b51d91121ff408bb
+DIST thunderbird-139.0.1-hr.xpi 458920 BLAKE2B 
4b99a8de9f956645a786d2dd72a67430775812724671b618b9b8af4a74f2178362c9f2a2f1adbf0668c9ce6f2edbf623a96de3c45fd587150f97978c4e288d71
 SHA512 
0e9b377c2f3b5026887aafe0d8b86a974e88b981edf38407ec5301bc51d84f8c32fe6aaecef044221cd2d93c39377d66c56bba4ab00d5f80bc2594ae38736a9d
+DIST thunderbird-139.0.1-hsb.xpi 512882 BLAKE2B 
39f81ad58c7b62d62e4cc4976efdcee54f4e6e6e803ac42f9d63b9f9e7bc6dc06dcba7b6ab67b966c74b89ab18851a7adaa67aed5ea099a2c323ae5789af3896
 SHA512 
dc59a071dfa5661e3ad50adf458d1aaa003f64c905e6dba2a224868c3d3466a1f2e86a0765b00ecd910bab36e7010bdc36579f00c452201d5a537b6ee9795750
+DIST thunderbird-139.0.1-hu.xpi 515603 BLAKE2B 
bf84143e5c2f93510b09a4f99c5cc6d1de642124c692bbd8735f5291e9f9fb9bcf67e801aeae5a7aa883d300f951bab3a64479622a59e7cfbe8c429ba6257fda
 SHA512 
70448cd7087c5170cd6aa051b1156c0e4755cfa150fee15f36fddd29e29fa1f1320fa62f97c5da7406a53f737f86cd7a037ab0c86bf410599e1e3db2c92d1514
+DIST thunderbird-139.0.1-id.xpi 464512 BLAKE2B 
127691c7afb864350915c8f328be1d0e530ec64a605ede23b5ebbac14a15b5e497ee6c0ecb24ecfa843cc02451a225d83f2f2a86d16e9c62ba5ff8dbdb7e747d
 SHA512 
0695461baf877fe74e629e51aa9bbaef2a08d8f666276a89b9363115f17bef8238d8f8c50278a586514289a20ebb3394ce8eb16c5e9214002df6ee594dad5b29
+DIST thunderbird-139.0.1-is.xpi 481856 BLAKE2B 
a30b9550f4b4911907348c9736b98618d12f12a98b5a4d716c8a26aede4864f27006f6b149c5175bb38e7cf426899cb1406a465179b13c1b5ce84392ba7444e4
 SHA512 
cf48dc1610da3dc1a6fac006490ca6a6e3e193203b5db90ad306848d850dccfda89c17491eafd5c41d84ee926c2ad9f2e345505caa129aa4f8727612c3655e04
+DIST thunderbird-139.0.1-it.xpi 486744 BLAKE2B 
dc5d605899656804c5ee27edd2fd26c4752f7aeca654e87ad6ffcdaa2108c2a62ab205d8c9acb6a6e383b8b555c4f0ff68424800ddc360b23a4605159559b549
 SHA512 
0171c46069bd0610cd2efdc584c308131c63dc67826712543932658417459bbb93f2f2dbbc18065129379ccd4d92bab13240faa3929516cd3cac92b6bd8b3c98
+DIST thunderbird-139.0.1-ja.xpi 537132 BLAKE2B 
3ef56ad4ff835ae13db4d9a5f1c8b8d640abd19dab7758e39f070769774dad61d67646ac55f6cebf3245bce93ab88a3c4c9eb704d4a6da60a7b71d37ea3bab9f
 SHA512 
b177ae38319babf1e82b77b0bb4e05f8635c829fc6977f11bb24b1080091deab4992edbb5767c557e6d5bc95eec2e7ae0831a7b5c47fae86b92806546d8c99dd
+DIST thunderbird-139.0.1-ka.xpi 542000 BLAKE2B 
df3cb9bded1a516f7a8c6b7d9a1892fd42281dfa1aa8d92e24f407097bf95b598ff6988cf4e9cfc8d20e910a32b4e32f8ce06f0e779ab5f4fea55883da275606
 SHA512 
30d0b5753ee49280e7c92cd614c49a165309500caa1d96481f615ee14697722b77674a9ef44d6d8866129aec6b0690a8c345b0244087176116bd44480d8c5e26
+DIST thunderbird-139.0.1-kab.xpi 468317 BLAKE2B 
7be5f07cce8ad55e338e464ff9fb8b72802af3308592c5fa0ca46365106622c43637a85a3d07b1822dd75cca9182cef75e71ad2c413dfb01250279dfb36be4a9
 SHA512 
516f8b23c1c2d3d777019b642eafc698a859d3beec60e0f8fcd724db724f98580ae21cb1075b6b5d8b18575c7a163d726bfe5ce07db30d7dd28007f5dce86cec
+DIST thunderbird-139.0.1-kk.xpi 572045 BLAKE2B 
4b86298d39b7a98a52a47864531ff1326bf872c4d4a75a6a5a071a5e48306d5e6c538c1d1813eda456860080804102cf0b6e7636acecc24a84c61808986fd87c
 SHA512 
cc2b4a8b028ddf9c90f960c7f5efa47e0fb9a85f321ea9b63a43d635a2d92941d8fc8087948296d11ebccf9767410bd6d835d7560f196c6ea5cc0c81c6d2c12f
+DIST thunderbird-139.0.1-ko.xpi 513102 BLAKE2B 
323e8803f13601737a673b3d9f06b00e0ce7f6e8d6daea1815408521add690562f56467ba41319b5756bc71e934a728b16a2b26b5eac9f7b7d46050d87c08d6b
 SHA512 
d1272a07cdc8d86b72a901616bf88c4fb695b738e0cc3d2d7321d7f69e06362caaa50e29b4cc4e53f76533c27b42cf34ce8768b7ec65d1c2483ee84822cf2e76
+DIST thunderbird-139.0.1-lt.xpi 442904 BLAKE2B 
2c0f1b00e1066a589b0401dc03c7bb167a19a629ecf441bdb8b32ccba7bbb12dd0e3ee8d5e7d3db27c7e02d4183babf5aac6b15aceec079752418e6a7c29659d
 SHA512 
2c52afdb60d758bd68fcbe882c5b8031120630b4f53166914e1a4054cc482c260a49b2e8badecfff91e7973477864a85576d0b2c8434fef240140bf4706db144
+DIST thunderbird-139.0.1-lv.xpi 392676 BLAKE2B 
daeef1ef441a111b0a454d7be4398c7da275026432deb1009ed4a93d5ff873eeffd5714c549e68c77f6027c5833d212fe66bf51d94407f53d55399551b80ace6
 SHA512 
a99e914af6b501dfa5b16a080043cea1b08a5e6db60e916ade0ab1142c86e46f97ea364c8ef3caae955d3e20229d43adbdbe4ad109f80cb8b4038b15d572ee9e
+DIST thunderbird-139.0.1-ms.xpi 352872 BLAKE2B 
a091297406c7b8c0262f32a8db0b853817ee34504a5e2a52f7e36f79d33e9f9849d494306900e513a93599bacd86db7f7a8d63a2b9668a51fa691f93cecac304
 SHA512 
6b336094a8459e5091d9ab0e0124a5de4076e8ca03a3d0ebb31906655d2d2727c15e4852cff7f52954b8ffb355b165e56e64e3cabf344fdab695fc1c5c58aa37
+DIST thunderbird-139.0.1-nb-NO.xpi 445668 BLAKE2B 
8738185a684b3be7153f05eb717c284c9f44c056cabfd810c637e3f968c1e98efcaf0fc34a34a2879dfba613ea7f58cd204d38d89bf51d380a6598d06d374019
 SHA512 
ef3fe91684b60d341e41c557b32e1530657b94b8566541a45b3a70029a72520cd3a69dfcb148b870bd5960e5f6bd0109cedffa6cf657dc53a9a80fb39fc7a2a0
+DIST thunderbird-139.0.1-nl.xpi 480405 BLAKE2B 
0202c6f56fa210c23ef64ffa0713f80e2a2fcca923d05d806573f9532701d4e326cb86b44e716bf0f7bcd8d47b3b341292b965eaae7269dbd22078d5f3336e58
 SHA512 
f9da77d9e330fdc7bcbf74ca99caf24908bd7e578903a2d9f822dc6dc98a9d1fd2b405f21fd29cf196ba6637c4342cc1dc446b7f4d432f416d29d0cabfaeef55
+DIST thunderbird-139.0.1-nn-NO.xpi 465874 BLAKE2B 
76434432c06d1224a090442bfb6e0ce0e9c985f1b21d7464b85276e158208a5850bc395ef2e7b83e9097b58c8d1e114dee942277cf8ffdfddbb80c3e2d24d61e
 SHA512 
74e9c20a9d6ad34fe75df93e63f7cabdadbb7dc8f29c5f39b420eec08976c5e347a509a71d96a19d6d47b7b11107c3659950075301c30c760ab8ecc9aa24d2ac
+DIST thunderbird-139.0.1-pa-IN.xpi 433721 BLAKE2B 
a93049999239385de41aafc0066a69640e67c61f322df0b56d7c73f57810426c182634996664465b15fcdbf77e4a464ab84db201a0eaf4f1737aab9dfc29f227
 SHA512 
5d1d5f541db7456b380726b5ed4e59177f6542bbe2582db2f7a504b62b48d6697e8f8cdab8aae650410280cf1eac54a792e91ce5923ff811f74f7fee135de4e4
+DIST thunderbird-139.0.1-pl.xpi 513177 BLAKE2B 
404cef20c500d2c315505e8ae80b75b5af594139670b338931a480c9ed3fef53840e54db290f2eba05b73c0aafa9b2e8ef50d1fe5e7ef513fb8ce338a6098817
 SHA512 
ba5bf2545888f4971de6df7554991dc150fe4b2abe10535fc73880f3d69352872d0026edf9f44447f8d8908a63b2878d3dd183e74071fa30b9f2ccaa4746f5af
+DIST thunderbird-139.0.1-pt-BR.xpi 488459 BLAKE2B 
92525bf9053c63ede1fe6f54717c173c15e68dabf81990497de80c400bba1d561147eaf808079970a376200b2dd108c3c94cb1b2c29f6693a5c0d0b57676fce5
 SHA512 
e0b22deebab58772310323577bf9a49fc99b6b1101165e940489f35d888c478693ad7eb65551ed6e57e7e1e707e61bb34f55463374b9ddfea9eb66efe498c1c6
+DIST thunderbird-139.0.1-pt-PT.xpi 485386 BLAKE2B 
14d4bb64782e052c3647eda4292c54772903c8742f249ece8b0c11b86181fda0816eab00965b608ba3d0d117d4e63c3841204deb849c635757f4a92e773439df
 SHA512 
576f1dd4b064390eaaf5b42b038ceaadd80df8a5d33089961aae97695497819dc8666cc8a7723299bea9cd51fc66668a392120f95577e16b7bb7e6a95d8ab614
+DIST thunderbird-139.0.1-rm.xpi 488211 BLAKE2B 
eb9fe0c327d9c34aff4e302e2799fec37eb2df78ff60875cdcfb976c5372b4d817f5fb0e1220fb71bfbb2225fcd3776d5a4d3c4f0aa7df71ab24937b800ea565
 SHA512 
57e8635b5cb7a3485c3daafcdc91231c479b18552cacc7d21adaf9ac97b8247666502c3ae33bf106d9287464a9fef884fa58b3c472494b26cc363f82e31b4dcb
+DIST thunderbird-139.0.1-ro.xpi 418451 BLAKE2B 
ae03e601493df25ebf2937b476c8410b751882f7133092068bb5efbe96b17a4a9605ddc48eab72809fea497ed4dd4134f823f78ba494d1687a8375a8803681c2
 SHA512 
97be41582fc2698567d7b762ad5569fe72d2cad25bdbbc4218b4025e4dad57b2006c097b8db0149cad8344e924d63e35be7ed5dff7b63259b5b63b175837aa82
+DIST thunderbird-139.0.1-ru.xpi 590191 BLAKE2B 
07fdd7f44a4a183a0e062e72e7f3d8550b78fe1b5b76ef3eded135a4841cd6044ecb04748f576e885c29d03623ce32ed08a9e0b42c2f8d2464c4e90f163c8798
 SHA512 
656b8f53b11a61a02dd040dbfd8be7fe08fc9ba4f192e3006062cb6669bf90dcd6f5743877d855e90de19eb9c8c2a84c33ded9cdcb2cbdca151f19c6c2a1aef1
+DIST thunderbird-139.0.1-sk.xpi 517024 BLAKE2B 
d31fc0f64d39ca0d8b9eeee46886cda427092c8869d60a870c2a51c8351b66df42c92fb79ebc19d47af97df31dec6e9c3ad61084e01144bb373c4dca0a4a122d
 SHA512 
12ebaae64ef97ae3798cdfb89452c3cac1cd269f96c8b7d1edbae2d1d63487f10999eac504d4d9a029fcebea3224b1f4a527e10072a4add10220aae911630602
+DIST thunderbird-139.0.1-sl.xpi 483954 BLAKE2B 
d0623a4a283a64798989ae886b29e8c4e5020a4b71168077a754b8d5374daff79c5ad8640836cdc32e3edc0b403aceea8fd6d4d7d717de600511289f4ff4d04a
 SHA512 
27f523e7184ded4a15b7f6ef6615faf7f885a7ce50a067c7fe2cdd42448eb0aecacec6e50ce2bd303a4575969018c3847b1d429c631e8a6438e425d31218d195
+DIST thunderbird-139.0.1-sq.xpi 504116 BLAKE2B 
f2aa3931682966fa85daf58dd9e78e2e42ab9ffb30d73bae0094b04fd21dcb749fda4a6a152de2802ae407b6010eff6054499a638b09118eacba921883070ad4
 SHA512 
5392fa087fa1b475063c83a0740aeaf09afd6261c3533b20cf5776dd74ddcdce06cd9b8872625eb04bd8f690f9f77262a41e010a5ce61b458f929ffc5375fb9f
+DIST thunderbird-139.0.1-sr.xpi 496747 BLAKE2B 
803a01d9b0e3c3e6adfb794eccae9608411255784fc98f34100d65ecdd3bc37654e544b8fe9051f10c1535ac47461085d2c1f074a165373bde809c14def17461
 SHA512 
5219c0a2944f5aa3d617e007a38d6c6763d45d03f4198e95a5f69343438a29fb804380b1363b512030028b2b2537b9a3e8aad603fb016cbaedbb1b23cff99b15
+DIST thunderbird-139.0.1-sv-SE.xpi 482751 BLAKE2B 
78d77e7bd8c08555281b370fd18800107ae34360144182f6aec84183e6474bae8227f6a5e5f80eb2a1ee4ddf40e615595a8f0dbdead038ba850e8adec7094111
 SHA512 
bc6b8826c7ee15afef57b0d2cc537627d15489293ef1c666616f3135697e1d27029d5206cfe8884388cd3d77f9f8c27ac65da8d1c6cde6627bbd503225cb4e7c
+DIST thunderbird-139.0.1-th.xpi 563675 BLAKE2B 
fe1e983f3e46465794d7150ec23cbef535471d503f0820721d9139f7a6a4481c8de9d41d821f488006d62f034e364d99b4e03c6ed56effb500582e2f9af5bc9f
 SHA512 
31c731dd8e0973701f50c2e482719991b268be08308611c1776c30a317420391de06fa4398b2505cb416fcda9272c3b0c428912ff66e868e653d8f5c16ecbb25
+DIST thunderbird-139.0.1-tr.xpi 493121 BLAKE2B 
8160e5a62e8b2608f6cc85abbc8db999dbe92bc0da583fea9de8264ca901bfc21f2e4cf7b194dd222a65b70d4269a5accea7c996da0fd1a768650ad73c83ed10
 SHA512 
de54209cfc51796aab31dc6afc0d046c238a1cf0a6362427dcbf571814de1bc1524f65557ab9d2b7045b1a659f6f651c0a7e193886a646dbf567341223e8de0c
+DIST thunderbird-139.0.1-uk.xpi 579871 BLAKE2B 
2d60aba52939b62869bfb8155b4df70421776aff0cf9b32608c81c8f9422dcc2dd5c88860a80bbab37718113f06dad9d133dbcee261b999f510df07d98f371c1
 SHA512 
676900108ff889f4583f487a59bbf3e05e0f680a7c86a379fb97e94a5de2ce11652566fb84314fc72d5246b9e71916f376585ca4ad2de9e0395d995daccc0aff
+DIST thunderbird-139.0.1-uz.xpi 356057 BLAKE2B 
0f4334dd7a7a2c1fadc72023d8c37b2bbe720c696a16e5cfbcd9261d851b9389edacf90ae4dfcdb5dae9f3acaae3e053fbaa65c5e7f641dc0daf69686f47a904
 SHA512 
3416e0394440c1948081a771786672a4394d806df5b06f77624434b96dca029bbfe2e036f4a0a8175f1c8882c555662c45b0ef58223c78f049163dda47ee1eff
+DIST thunderbird-139.0.1-vi.xpi 516771 BLAKE2B 
69fbeb5409ceab242784a4f503377bab7e5506320feedb31f2ff74570ee5129d6b30730654c7fffee5f0899100647e044ef54d70ab3ae24cf87c728e4a7ec9af
 SHA512 
de3d4f11e022a87e60908d77df4d23e8a67f9d3245e6c53a0af5156a4b8500ff6e905787cb009e5a805fa0b8fd9ab6a0615538a9f21eb991075e52ebe54494ea
+DIST thunderbird-139.0.1-zh-CN.xpi 506145 BLAKE2B 
a1fc99eda0ef67d505b35f4b58a4fb6df0175e3a88671c1dc66c265db0668507c1605d2a15715a2593a9c91ec2aa8455e2c6dbc01aef22470f17e17a40b6fbd8
 SHA512 
14f9102bd33946395195aa30378007982536dd564c29ac62cd58d05044d834eaa76dc8e9e7210aa4864c9cf4db8149f526e83d84931b6a655496637f171b15d2
+DIST thunderbird-139.0.1-zh-TW.xpi 509370 BLAKE2B 
980652e1b06a888e7e61cea7681408df028356922ce1b452e3bc0b33bb71f46d7f104d78b47bf573a35cc840ded9e676bc105721f6c2df7c4bdc582daf452218
 SHA512 
3c818a96029d6b2b48e03077de7f012d5b6b90166085015b845115cecfe4f8b89334eb8736ae7d3e7aa1953b9e650b1ab91dda19c495ec4b8477741ef328ec15
+DIST thunderbird-139.0.1.source.tar.xz 755720308 BLAKE2B 
59bfe43c3aa1bda5eda261b21e635c92953d89338a89f36b22fffbe6be9ec13a70a68268528d0b0be09f35b2348aa32e64c7e2b8f79559ebebf8a98d619580c7
 SHA512 
3ad96de458d054470c52ddaa3eb267176ce2cdbf4dd8fa707fcb4313bfd0a7ba4baa2c860b247940a8c9878e1f25509961afc40a545f818b1c8acabee1f70ed3
 DIST thunderbird-139.0.source.tar.xz 755313836 BLAKE2B 
1804346bbfd01c3d4ccc44ea567f7bc573f6231bdaf3338ab6d151a74b28d84562cd5ab2b725420fa110feddf64aedbcabc41bbf21ca3cb5725daa0f5a5438b2
 SHA512 
8e749ceb7f0e88603ad244485b0d33ff209c71b7419debab5ca0bcecb3d9835079d72fee6333ba29458399ce748b92e55156ebbf1bd147a3787fa2f5bf1ed55c

diff --git a/mail-client/thunderbird/thunderbird-139.0.1.ebuild 
b/mail-client/thunderbird/thunderbird-139.0.1.ebuild
new file mode 100644
index 000000000000..5d3c0c1226d6
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-139.0.1.ebuild
@@ -0,0 +1,1162 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-139-patches-03.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-01.tar.xz"
+
+LLVM_COMPAT=( 19 20 )
+
+PYTHON_COMPAT=( python3_{11..13} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.82.0"
+RUST_NEEDS_LLVM=1
+
+WANT_AUTOCONF="2.1"
+
+VIRTUALX_REQUIRED="manual"
+
+# Thunderbird will have separate release and esr channels, matching Firefox's 
rapid and esr.
+MOZ_ESR=
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit check-reqs desktop eapi9-ver flag-o-matic gnome2-utils linux-info 
llvm-r1 \
+       multiprocessing optfeature pax-utils python-any-r1 rust toolchain-funcs 
virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}
+       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 
sndio selinux"
+IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent 
+system-libvpx"
+IUSE+=" system-pipewire system-png +system-webp wayland wifi +X"
+
+# Thunderbird-only USE flags.
+IUSE+=" +system-librnp"
+
+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
+                               <gui-libs/wlroots-0.17.3[tinywl(-)]
+                       )
+                       x11-misc/xkeyboard-config
+               )
+       )"
+COMMON_DEPEND="${TB_ONLY_DEPEND}
+       >=app-accessibility/at-spi2-core-2.46.0:2
+       dev-libs/expat
+       dev-libs/glib:2
+       dev-libs/libffi:=
+       >=dev-libs/nss-3.110
+       >=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:= )
+       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
+
+       # Enable jpeg-xl only in Firefox.
+       rm -v "${WORKDIR}"/firefox-patches/*bgo-928126-enable-jxl.patch || die
+
+       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