commit:     1eb1b5fa0fcad75550e9788c7d2145ca1f56dbff
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  6 09:35:35 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Feb  6 09:35:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1eb1b5fa

mail-client/thunderbird: add 128.7.0

 - remove useless "lto" use flag - the logic has been updated prior to check
   CFLAGS and the use flag hasn't done anything since.

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

 mail-client/thunderbird/Manifest                   |   65 ++
 mail-client/thunderbird/thunderbird-128.7.0.ebuild | 1166 ++++++++++++++++++++
 2 files changed, 1231 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 8f93dd5cae91..8a17dba44e5a 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -260,3 +260,68 @@ DIST thunderbird-128.6.0esr-vi.xpi 794032 BLAKE2B 
ea5a6ceff2a399cbc0331fdbe8ad40
 DIST thunderbird-128.6.0esr-zh-CN.xpi 794061 BLAKE2B 
35c330a426b5c6e39a6257ebdf0f3382b80d73867792663089e5da3fa69309141b0783ba09ba90b1e9ddbced6774637a29a658d1ade289f65801ea73cb78dece
 SHA512 
4448164c809d52efe1e5406117be01bd582fd75c08a59af5f54bdaf885e86e1753ecd69bf910396c70e6f7f6cc9c201bea65201dd99c55942f59bb8fe3926374
 DIST thunderbird-128.6.0esr-zh-TW.xpi 797334 BLAKE2B 
517c72d488ae48839959083bc29b19b966bb3c91982f926ed73f2693309677476336650afa63a6c9f8bb1c8e4e335dbd7626d71b826d961a370af851519649db
 SHA512 
6171c002769eb847d96a693440bba6f7246f033357dc22da93858a1a70833aacb28eed95e21592f49652221895fa1ecbefb91d0e24f29ce01d0fe216fdd5fcea
 DIST thunderbird-128.6.0esr.source.tar.xz 675443868 BLAKE2B 
5cb17164327a222bcbb70f1ff4f5da36e130866e7e4d7c4122d0ed7ad83104fe84039d46b7d638fd4bc3b8cd08e9ca3d7a400f0970014e510b26b6afcfd3c11d
 SHA512 
a561eac0bf0b8c72f3337ccebcde9099c342d1b31ce2b1f31096f1f805a195c49d627cf726cd56d41b21ec292d96fd577e8f226fcb24d8b13e0d773fc334b073
+DIST thunderbird-128.7.0esr-af.xpi 530351 BLAKE2B 
665e3c36027491ec674b4d11f668de264b9e7fdb476930dd151a7df7449759be5768986ac83ad348f6a9e1495ce34faea05a3647e31503a0a531c5ed35dbf516
 SHA512 
18dd42b98b74e951d624a868c89ae9713d5e5b1e991170506a880d2ab8ddb22e834b11a42bf9ab01c2664742eb503afcfbae93dc6baf3c0c2b5ce1322e545632
+DIST thunderbird-128.7.0esr-ar.xpi 686986 BLAKE2B 
4b219c2ddb940ea9363f86167d1d94acb68ebb280a17c761d8a54b09dab85939f4fe861b82c6ffc90b79be061b85167b35e9e96abde1ebb5732d82f59f9e426a
 SHA512 
f9e314831d230b1488b64056caf22a410f4e883c50e697746965949775333f785ed0316d0baac1df460c33f7724eb93a8e0784d7ee99d5fc9513245552f7749e
+DIST thunderbird-128.7.0esr-ast.xpi 561055 BLAKE2B 
14f2c12ee192d153d665f3637352bc5b5964661ff96db6d4c67a07cad2bd7650f3e2ce2fc687c92ea3480edd4fc5bd748f7c10d08cf8fd19f5cddba08b12397a
 SHA512 
4a68c5a10b38496c654d27e4ca82c10804f739ab526e6644509a8dbb09928c1a2d2182e003e79a4276a92bf62ebe6195c292662acbc3e21f633eb00abeaa843e
+DIST thunderbird-128.7.0esr-be.xpi 772990 BLAKE2B 
0a6004aa6afe568d4b0dcda0cf77e8f2ddbe51171f00b671feacc76ebe96b0b9cdcc65ea96830a0f73ce37d8fe534bd4a0fd715e7cb1a17f28f8fef20777572a
 SHA512 
77cb2459d26521253efcb71dabac1a3209c6a8fe5111d4c4e6bcb2d696c5d601f72890f9cb3c49c476fcf4ef73f67a033d5798c3d12cc1ca9c3dbfe84b2abe95
+DIST thunderbird-128.7.0esr-bg.xpi 812324 BLAKE2B 
9d684f979c7e30f8d6f06038607dd0b88b13cec484bd5202ce36b13d7fd344135ffafac5f368c10ce170e9121aae7cca8af82665a057aafc79b7d0e71ad551c2
 SHA512 
570e2a9c71aa853d9e8d159cf925e7b0f7a409cfb66f43383e2834edf2bbd90127305954c182654f52129437506c4cd0e54f66d14f880fc86478c7c2d7008a6c
+DIST thunderbird-128.7.0esr-br.xpi 655126 BLAKE2B 
819b6abfc63c53ea3ce8032743bd12650fa21ca96aa81f467eba3501239c4da0d2b29efcecdae61673084b41b1b80360a7f725e786dd3f746e599e2c11e36e02
 SHA512 
6cd4d4fefc0e8a7ce7454d7838cb360399194f3a05118ca90b029d0a53ababa762b3846f5f9855df0ce4e94b1eddb2766605a3b1b014b3aeaf0c87b4497be225
+DIST thunderbird-128.7.0esr-ca.xpi 711079 BLAKE2B 
3a1596e753edf2f9def896127abc7099405e36ddfd78733578c27cbee62467147b6a60bcc6ea50aa67f07a20a5c681fe90dbcfda7b3ea43c05b02204854889d8
 SHA512 
9ac29808ac217e334b561585c9a9aead3a41ae6d06f6878db2ac34b3d993bc06c3ee33102d98e1ffbdfb3f563788ad65c3cf479c3192f35d7ac21cef0750af10
+DIST thunderbird-128.7.0esr-cak.xpi 672196 BLAKE2B 
4d124cb87065abf5b00d9c9b32579d66c8598e903a1f4d4f114184462f06a30e3d82ff250e3e56366b9dcca72ca1a51ed72c857556be634f8611289d0e4dcb0f
 SHA512 
0a92954fe4deb26f5a7587c175c6ca81c1a561d089fd54d737a5a5a9d52529904e8f0debb1378841e1d3f6f586a976ae179e4087dd5ea5941cf944701dc38c38
+DIST thunderbird-128.7.0esr-cs.xpi 791610 BLAKE2B 
513dab8838994d84d5c3b536c4530a1184e409a510d7c3a76d4dee26eac55d82fdbd74b5d6ccfd50b972509b90fc03db7ccb401653304f7e09f8e06c4a1d7db4
 SHA512 
c843800a1e8e791f3264075450e3e1ef978a2d1d4ec18ad5c55e513f526849f3ef7070d2796cd87accf38dac9dff381535b85edd4e8a57cea3632967a4fad7a6
+DIST thunderbird-128.7.0esr-cy.xpi 756815 BLAKE2B 
ed1319a45cb72de06dcaa74a717a7a93d821db60832417824d53b3a377ecaf0b7ae406efbcb2632968d0349d19a38515f09d05800ee99d701ec537be7d236d19
 SHA512 
0158488d145a05e0bf84e626f42c96d448423ebfb37cad0a8a7fcd300267864f59ac519d43dc8eb91503621297e88181164aeef2731fee07b49da2619e7e806a
+DIST thunderbird-128.7.0esr-da.xpi 740057 BLAKE2B 
df744c0426149bea0702e31bec9e0b42b57c45dd62250b67d8f80017d02696969753659af91e423bd5cb9215c3364dbc4137898236ee6857fe053bc3afd8239a
 SHA512 
67f3e7c2fa199db55c187ca1e8998a513c21158579996fa54f8296850805d9ccfa96f8c9387f7fd63593c5f11c3b15e66035af80200509bd00f1751cf0b8e18c
+DIST thunderbird-128.7.0esr-de.xpi 772207 BLAKE2B 
cc51ec2a127eb7a66a3cd4c82fc910403317b36f24a72a5a50c15eb1a1a921156c1f6eca2507901ed92ca484285d36c402a065ddf7dec34b6cdac1dacb1935fc
 SHA512 
f299654dbeeb9ac0a4c3a601d0d9ab084b271c62a624a1646a880bc2e3a224c9143b96d1993c8d302d0018bcb784a5d56814742f0b64ada5363e9b3b3fcf7acf
+DIST thunderbird-128.7.0esr-dsb.xpi 790369 BLAKE2B 
b57ca9a6cc7975540195c71316bebbff19d998f767ef4000b04cb9debde12aa6bd65eb7f56318e6d3cafa4b92b32bfed352ad1188e74adbe921bfaa69036c86b
 SHA512 
e2cda336edbc3b6a3a2776ad026c245c3e7be10b71dc7a88d87f209d92b76bc328761c73f348f23b9d6cd37809c85fef7fb722d36e186f5f508fd94f3987e39c
+DIST thunderbird-128.7.0esr-el.xpi 895923 BLAKE2B 
b257252ad8eb88a88a386a7e733150a8cc53ee4b14e114645751715b7d0098e1a4a598d555e44c4501bd059950a3eb6359244bf4f26c419857cbf4d4c7df689f
 SHA512 
acf2f553bd1e69f09760e1eadf51bd3d9ab30be3bfaf93a4c4dde3f818114b6e0cca041dc257b31fefa60b6809501c9d3363a1af48039bbe7d75eab95a1a0263
+DIST thunderbird-128.7.0esr-en-CA.xpi 705214 BLAKE2B 
4bdfb5bae2c16bdf1761c51874db0fb817da188d81a81f3c5166ed5a97cc9df98dd271374813c036b76c366181ccca286ffb7bf3ca912c4b80382f10efe20f4e
 SHA512 
21b8515ed27a03d37e68f2adf548d8f68cdb0e1607adec950d44e1068eb4703f0ad2f5bb183ea3d2b1fe184335032958aea35a3d5c755c23e9f87e7929eff29e
+DIST thunderbird-128.7.0esr-en-GB.xpi 709688 BLAKE2B 
eb62ab5f6b3badc50391095464908bceb1fc502264e268d8bc4390f0d037b952fc0667cd212fc514fca2c4609b91199a2288204d03f5434feef543af79f658da
 SHA512 
a8edeb153ed97de071454fd88d01db964ac4b30c4580b540d0425c7e637dd5a6d76aee8e92775c3e2c5ab2bd071899c00ebf4b32902f9cf3339fc5425f92468e
+DIST thunderbird-128.7.0esr-es-AR.xpi 765754 BLAKE2B 
78a051457cdc46c87cdb07d09b0a801fc81fabfefa4fcae2d6f20d27ac998879c5068c7f6b858556b73c8acc7ff6a3a85b8ccfa97ed63ceed667cd6a12a3de90
 SHA512 
273a5ff9e1ec094a4d4d6bc523df8644359cbc807a5aa61c2d0d1d31f40c44adaaf4dfb79407db899990bc03b76a507a5180b1d672e0d34f8184d7827ac79a24
+DIST thunderbird-128.7.0esr-es-ES.xpi 733786 BLAKE2B 
5149580e38ec172c049c5b4c33da754f522880102a3fd52d3b27b51a65926a23407ae55f9cc83018fc6c263974171a0b50a0c1ccd08f5ba3c34cd1d3d06f6137
 SHA512 
72c68661a3961e75c40a16f5cc2b9d4ecadf539a7ed47f47ec0bf8b052c3c3ada75ce367d2210c5adcc298e83f761c06851c9af4b6f8dacd0a8e89808f889837
+DIST thunderbird-128.7.0esr-es-MX.xpi 749782 BLAKE2B 
5e88ebd56adc287f5b957546e24192d2ad3dff297f149deeeb2c5d8c191d159ff469a83df974aa559465cfd66ea88000a573d7f7f118821933679f4c140df0fe
 SHA512 
d38c7a0605bf937d30a1b3839587c577729454e93a57a0ff212b0758d6301c39a44c240d8bf20378e283616767bd9d4171b426af09248465f81c15190f880f74
+DIST thunderbird-128.7.0esr-et.xpi 696775 BLAKE2B 
cd10655d2ecc37f81d21ed5f742332630addc0006680c08fd97d5726c04a1b0e185dc2442f0a057d2ec77856191bcbe021b9a1d752a20aba43548f935d775069
 SHA512 
099d3a710c5ac18461826ed9340d32fb8fcfae0f274005c5404eb124fd0ad9c0e0d54929ad43bdac0e955d44da241fdbfc7225295bcc8894db0459321d32ead7
+DIST thunderbird-128.7.0esr-eu.xpi 740306 BLAKE2B 
6e406585672f1abd52470b5812dd513b264d11dbfa44cc518320058b161ee94a86b5bd9d4fbf926521e5f03cf4acf8922ecdea5faf95cedd65180e74fd1981ff
 SHA512 
b040d43d3a83d9b083a6645f24763535425420c7d6643c9b500cf1f0c9babfa8c90671d60adaaee318b271b2a3a8813de2a91a709e91aba407b7a7d2ca131347
+DIST thunderbird-128.7.0esr-fi.xpi 738932 BLAKE2B 
e8d9b71a5d67face67145fab85afd531b3026c1ab3dce19cec0e0e7b898039855e9982e01ee445134428eec6e71e7e1a866b8f6b7f4f08fca95916576bd150b5
 SHA512 
f2da784f2127e20a7bef27a315cb4ed468c4cae96f8931221847a2c8bdbf5d3af4079d2ab16a21ef187391ea2d2c9606d8a980003a483e7e3cc30cceb0f48558
+DIST thunderbird-128.7.0esr-fr.xpi 777365 BLAKE2B 
215c1552484d7423c11bf601bf3b8fbcd29a2e434e43cd5d0de31ded728139f1de533f1250252d1ff832392c3abd98c4450c52b3c3dce37414573df14c150eec
 SHA512 
8ede47f16b8d1a86835648a1d1d02e32b69022ba6feab73b680c0945c34d845af2cb17ecc2215a8dc2efba1d83ddf658f61510b5f817c7b6778b806cdf5c21c5
+DIST thunderbird-128.7.0esr-fy-NL.xpi 759929 BLAKE2B 
87d665b71bf41c0f660f5dc6c190adcc153f6ee37e4a23fa0b007ae2e3a1d870306bdcabaf7c4733b639c65f1ae294d5e03249e6a6aa246fcbe0e4cc5398e2e3
 SHA512 
0df0967be48ca4fd4b32b3ff95cfc7f34de8e8684b89255b0fe65dc56129c90768eaa2e2fbf8d04de2ebb53ff5f507ae0b2322a47be9ff8884db3acabf7e5983
+DIST thunderbird-128.7.0esr-ga-IE.xpi 616369 BLAKE2B 
ad3e57f7e344582435acb00141a38c64bafa9b7075c0e19eddacc22d05d8d5e9ac4cedab579b84ec5b559f5285ae0b06d54b0c8d7d0050a5940d24eb803ac52c
 SHA512 
6e5b0c87ae508b10a6634b39aecdda738cc9c9ee17d248d3d01c952bbe0dd0eaf09dd2c94c028e9f32cff3fc1807a417886c29160e0f956abf7504134a9c99cb
+DIST thunderbird-128.7.0esr-gd.xpi 729139 BLAKE2B 
be822c4a4cd736c2dcc8aba3d190474e061a0922bb640a901f5c1cf04ff927490dd5846f6d8d678e23a9c9df2c3f0d62f8f48c4191e42430e241af23b3ff5b73
 SHA512 
c6b06f31acffe9fadfb6093027e9f065d4d87915405539168922d0c2a34256570d96715cefd145ff8e7f748baddb15e2a374bccfb4411ca77988c697bb16f501
+DIST thunderbird-128.7.0esr-gl.xpi 742177 BLAKE2B 
a63dec77259d3d24601dc0b32fe07634b239a75ab1630b4599458ffaf952c61e2623dca5cdf25b6b54a31095620b3672db1ab84db3026214f5973cdbcc36af06
 SHA512 
bfa460e0cf2d67a4eaabf7439ce7588040257a2979418d42bedb9f56ff6a803563fbb6e9f938e1283674e627daea924780c681bdf95e1b4112803b72e3b5c5f4
+DIST thunderbird-128.7.0esr-he.xpi 703448 BLAKE2B 
f609b7f1c7957fcfc293fa270b1d66017e2d1051e19252904febf85928549cb3d263d5653e01ed52632af639ae16fac2722e7766924ac2953f13fde27ac131a9
 SHA512 
cbf6fc25c3f2f53ffa7ad434b88dab5f76e03e72c17d452cded322e73b2f9b9b76fdb758a2c9e786d8e77c4b8b0de094f3656ad58e9a9a6db6dca59175d5e7ac
+DIST thunderbird-128.7.0esr-hr.xpi 720121 BLAKE2B 
27bcb5ecd4310ab6fe0a5ac331f6d22c33662f4800acb88f9c5a68e1b718c385ef52defaddae907cb8c5ff2f4c95381fe489db4de23e4c977cf6b622fdc5cb1a
 SHA512 
133991092b131dfbebd1099854267307052228af24fe96f0d20153310bb26ce386019ca0b32266478ab77e80154258372e385a1eef253b7633077a6f479a6e6d
+DIST thunderbird-128.7.0esr-hsb.xpi 787749 BLAKE2B 
25c56ec7893869a7c6fbc74db46e2c8837ca7da7779b064af8dc0ef6dbc655ae4d1ad4aa5b68ba86e880fe03c621fd77e94f169e9fc3e1836789e99541dbf081
 SHA512 
83e58733a1794bd45127f144857f8ea51fe859967087297f09d99d1a7871e14e1a88e76638a65547b809b350775a96e120c06a1247a2e8124abd681d44a6ef40
+DIST thunderbird-128.7.0esr-hu.xpi 790232 BLAKE2B 
467586f159244dc01a82f01374b996ea40c2fc73c0e19ef33a29913cd2347fff77e7a6b9be2ea94b0074143fcb6b488143fb142cfc071f4176f6f5b704b2a1a9
 SHA512 
5d529176cbb1b7e5ee35f154c040583e812cc98c6ca1fa07e0ec0bb4c0b38262abb10863ae064984296e762b2db3236b2cc364b57d2a43804e9b2add32be7143
+DIST thunderbird-128.7.0esr-id.xpi 710327 BLAKE2B 
10078c0b4d2cd1961ccce39e082a1102da49bd97460527fe5f799d09c7129897c716ad68dc789b7f300bb68e7d2c28360aa8999dc62f5792032209077a4f4884
 SHA512 
2009b7d03b4cefb805aeae0fbc9256721aed633809714361f40911d3009504299cca8eaf56049395825b40a41a0263899966cb1bd0c7a7b97846257ae83c5fd6
+DIST thunderbird-128.7.0esr-is.xpi 751188 BLAKE2B 
c7df7207f236b65b50c3420940657a34257e5bbc78487f04c1f6b8ff71b45ed2415faf3b77d71216e84cf03b2a7024f4d5b0af4e7ced8d1136d2c5bfe708d117
 SHA512 
6d0311ed75a3f5bf9f38424dabd803a29b2786173428df1f92999982df5aebfc6809c83faa545552f2717d5fc6d1689e6f422f1c83f894f13aac4b055e45c768
+DIST thunderbird-128.7.0esr-it.xpi 697096 BLAKE2B 
8ff1927df39a7c876309ed90101af330b5f1a3a2b5d8fdb17fb1357be15dbe2d9397a1ca74ef830085233290c82103a0bcb7f6692c169951b6b04cab48ae9cd8
 SHA512 
af53190ee838502482d54884fc71cdb364bf37d98dfc1c130ab4bd20442e352f015e4a3be73ccb1e7edfce894fc941f93ac7bedaa874a6642dd5235708d11d86
+DIST thunderbird-128.7.0esr-ja.xpi 817723 BLAKE2B 
b39950f85af5319feb9038f6e46e9b468f45cd28f19df387b91bbea819bc0627aea964e16eded49a96c715eeb8c1b100459981b97571b29b0533b8646bd468cf
 SHA512 
e06f73a66f177ee38cd04e69eab6f27da4d6369c25e2be089db538101226d47abc35c71f6a9e653268e7469b0c04b8676af8f1910c11a008f877e359a86c94cf
+DIST thunderbird-128.7.0esr-ka.xpi 796714 BLAKE2B 
2cdee09811e79f8fcb1664771bcdbd46a0d4310ead60585bbbc9fc9d9c759b563d2ab78944d039a2b57cc48354abe9fa83d27f4a76e5a399e74e93b3ac8f253e
 SHA512 
ba98c87673a7a37389a0a529aa90b3529ca9c463a4a1bc97c198d51877de322b281fe03574047073abb502e392a4e1bf241a38127f72f2b07135a2d82353fd92
+DIST thunderbird-128.7.0esr-kab.xpi 735477 BLAKE2B 
48c4c8fac97afc18fc364e79a4fb274e4ccb2784b987ff8186619aa60d91fae969668295eac1b641157898100bd335a8e0dad0ddb3868e61a37418c2e3e001ca
 SHA512 
e47aa096b4f1ba1891e1ff8fc8f7d8edbeef5cd1e5cdcfb679906f3f7e497b8a7d1be54739480acd6a0641f5a274999ea6c38025809a69954c7d28b45b687e43
+DIST thunderbird-128.7.0esr-kk.xpi 865511 BLAKE2B 
61ad7f3884c9edfb5177a6cf2c7d2b43129cba842ccd2a5eba82e1948db01b7360b48a15ce276d645899f22faa0a44b89b99b751d20edced31dd315a8452d7ab
 SHA512 
965421675ad7a9329fbe87e53ba290d58caf2c9e6ff68790f84ea1cf1e017e669f43050e10363ba8799b51d989b92c119f6afb4205ca3ce2b8367948dc078371
+DIST thunderbird-128.7.0esr-ko.xpi 762642 BLAKE2B 
3f584133f334dcd8d9e6e89219162dcf5497e136e5e3163791a7e1b57c35420e5ac4ca7692b8a91f3b8a6a137dcfa20992bc33ee82aeefe1d97e697627fa68cd
 SHA512 
7b7cd4e4f3a27ca3ce3b4840e20e3d366b9c46bccbe6518bd76700ad38f5fc89f2886090fe3c6d0cccfdc453c0fdd701c8eec3e0f44bcb8169cdd42697cb7f77
+DIST thunderbird-128.7.0esr-lt.xpi 701409 BLAKE2B 
8642f92b9fa47609e6b405517c93261a6257c5cd734f1abbeaf42c9e89ee7831cc829c31ee4b72f9ccf8585ee9be882155d52e170dc4c3df5fe3e6d7c7202c45
 SHA512 
a0379dbeca96b02fb5c30d0a95d54dce6e15886848bd1cdca2f0068472666e191e1792e83a4578650b47f406eb28582ca429b3f2592226b9ac5b8c9b5018666d
+DIST thunderbird-128.7.0esr-lv.xpi 625981 BLAKE2B 
1820f75e8d2d617ee04640262c1459c652dfd10bf7736f83e8923567b81924dd4432b5946fbcf5acb8e253465f23d91980be0dfc10e1f07392334deaff129e88
 SHA512 
d021f9e76c7790ff8e989fb36313b86b1396f40381171e2cd3a1d3088cbb9a5155df949240f720ea02c5375e85bc37648e5e23820299c3693a210e8aac366841
+DIST thunderbird-128.7.0esr-ms.xpi 581575 BLAKE2B 
17fa1b1f9e114413491c47366b6c47b5d1f484436de3b849cf7e32a5a6ea8eb6bfc89ade56e97825e28aa493ed2f4f5d669aa09a4b0fe243f08c91a888bf245f
 SHA512 
95c2f483c2a325da0c6f950f4f8e211cb4a27f378e30ad050a100f15dd1ee693e16039c0afda74918774e6271cefcb98fbbf1e052978153fb938489b07468e77
+DIST thunderbird-128.7.0esr-nb-NO.xpi 708562 BLAKE2B 
b0758c994535b4809feac99dad9930b50f91e568601f63511295f08097e8f2feb1e195b1592685b36f9d38f48a95a2fcb756fcd8509b4965207460c9f32eeaf0
 SHA512 
53096019a732bd6add30384c75a4ad84a8143ed48c5f69a4e7e4c3ffcb5a8a083125705fa1408de8ead7c1b807b95ee9fdc6888296593f7b5ce5806e9082a897
+DIST thunderbird-128.7.0esr-nl.xpi 751613 BLAKE2B 
9a4850d60232ccbecd2cf7df797935257da484265316aca5a5a90e77817e4ddce79867e66594201a0eaed3a296cf5c867799737de5d40c5fe75585bd7efa21a9
 SHA512 
f4249e1a77391f99c0607b8df7aa6e9ee1c5abc79e470a05cf670bde0531d55cd99e74b542ffbc0e2d43385ba33fc29dffa6bfc2e8b27969f77a37d97ee6802d
+DIST thunderbird-128.7.0esr-nn-NO.xpi 729660 BLAKE2B 
f0d4386ac0f14c8992024e0d64ec675f1e0f96368781961328c1f1dea8d9f4d90ac15ffbb3ec2989707892ef79faaa40694ce8ed984bda0665bb9588067d6ba2
 SHA512 
4e5f87f4f7e0f0ab4ef1469f8877357437de87e44a40a29b16a0ebb465b7b999e5db12dcb91768342eccc86010cfa5efc68654a80d554811b01c88e22889f57b
+DIST thunderbird-128.7.0esr-pa-IN.xpi 688139 BLAKE2B 
c6d025a17685b94711d8ff7dda506f901eb3d17a1562ffa3cb4be6ecf3b7159442fcf6e891825890d9b89cf6e201f9375fb8e7021ce46ce0eec8b71e1d9bfd8b
 SHA512 
8b81b0a32d04b63a8916036d40798a7284fcabb48f3435ebb1a4984dac7cf5403dd7062866f1c36d1e03caf3379f4d56bdfdb3b3195f277e58328ff2b624e995
+DIST thunderbird-128.7.0esr-pl.xpi 770780 BLAKE2B 
196e2aa441a0702e58df702cf6c8a373d033d3727eb854f0c3933950050df5819a35e5239f6af346abdc421148cf7b8653dd5658e3fe0121a876a022015a28e8
 SHA512 
47b929ca24adc07e0a9fda4103cf6c730ff30c805587f09cf1e71a246a3f72469300b51b4db05ebb4ef09e9350ac00c279e4530fbe657b00f2872d8ca8d78f56
+DIST thunderbird-128.7.0esr-pt-BR.xpi 758846 BLAKE2B 
bdfd3fcbdafcdb3d0a4c484683ce34ccbaf725fea99ef106839717a21a3166a3c06dade39dfef1d4298db15ac809399ff33bcd1ffb4a57fea5f4378abf0b7703
 SHA512 
fd344d6744ec854111b883448195fc6cd31ee387edf23a4514dc44967dde3ed0daf51b8a4a4c730e4a4183c7bdff05d341d6069a2378f9083c2c0004d136bdc3
+DIST thunderbird-128.7.0esr-pt-PT.xpi 752025 BLAKE2B 
3eb50f6be0dd6a42140475060a8ea834c4c65c65f04016e16ce92d3cef9602b9d9b18f28e9a63da270cebf051074aac1e5bd6898ef9a029ed5de23924f239c01
 SHA512 
edb1f09f58c8891b6fd89168e2e9efd4d86caf1b52a89d7f3da0d1f2e5f72a38543fca4ba7a117856fe40134753667fc730a00070404f9b5a73da0d939c389b5
+DIST thunderbird-128.7.0esr-rm.xpi 754446 BLAKE2B 
50da6601327866d8194a9065b99a9e797bcd0abfda74e7a762a8c4b81b8337c643a6e0bbdaff93173eac6ea1815835c3dbe9255f9089e5109e3c9f0b122c2d9b
 SHA512 
4029bb04abd05ea71435c90a56bd94e46642a9fefd85e85617aabfde929412367b1b3df6552db0e6d9f6c3646d2a33ba6e8d87cf10a886aac0c9cc2497a45c21
+DIST thunderbird-128.7.0esr-ro.xpi 670229 BLAKE2B 
6ca1de5496c6d28148fc66f2755b1f2f165a0048c044b0001ab17ee5669c7c5bc37191c3267f888c31b8de242225aad831bc1dfc45e3c0defc0164ccdef4702e
 SHA512 
44459221af31502c905d40da208d7262b50880d8f422f33a0a7fe4b59a9332071f5fcfb86b9917646df4fd990b203e06db8dd085f66e59f7065cbeeff14ceb10
+DIST thunderbird-128.7.0esr-ru.xpi 880798 BLAKE2B 
f587eb80231744bd135438f4196700b0507072e0f50619f3d4a1b307c66f665cc554ccde3e4e017d1ce9f6c547cd481a17ee0e0a79e8e674841fb390d9eb60a8
 SHA512 
724876f8f959c268d2a68948d8dc519067076a08948ce8f9d26df58d96fdd3c927982d9acf9621acad91c3730ff053ec5582c3b2caa7242a08fad50985902f5d
+DIST thunderbird-128.7.0esr-sk.xpi 792220 BLAKE2B 
5dd4b78bd08f2f325da0ae8536dacc1efc4412e01e6163fda00cc92c64e566d951cbac6496046c7055b0c105d113b93ba3ebaa318f2aa94d5e893f42aa845840
 SHA512 
9c89e0c8df307fddcb39ae84c7e2d83b90166f13b85ced0ac090773d26ddbf29320bae87cb2daf46281df6c6606d5879a2d4a7a846ea23174abcae4ea0e5a55c
+DIST thunderbird-128.7.0esr-sl.xpi 751650 BLAKE2B 
a3d62715cf25d2d2283608cc9caab4df42d582f641097e5e82c7025fc12337c00f879c057c65328c5900f4ead59719458e7804be9ce96a24fd43c92d70fb6360
 SHA512 
8bdf61fce9f362415471a196488f0ab89c39927559bf9bac8f0097f8c5c154f3cd1852d59c1e43f8ed8cc6f44f457cc9c90b9936b9d77c5da6a10a2d37f6edc9
+DIST thunderbird-128.7.0esr-sq.xpi 774998 BLAKE2B 
4641573f4aadee35d60a0b406370a413ff487b9fd27bf8b7e8bfa432f53b726c1baacc855785d6e870ca04b9158c6bc90001ede39c67f67b8c496d0cf89757f7
 SHA512 
71f9dc77159e5a118352fbbfa3f6821c6e17d95c3b210d18adcb06aa77e53bb0963fb9f648541585aa6d8e75c73d5c16763f319efbdf02d227258d7b5512e94a
+DIST thunderbird-128.7.0esr-sr.xpi 771753 BLAKE2B 
9158c3187a0b4d9e8830b9bf7f52fc296d81b911d44715592ad3ef444c4a46c2ba0eeb13ae0a25b0472376818acc4840f5b5c23751f43cc2d867b4cfd15835b8
 SHA512 
132af5aa750a5711478d320c2a7ee15c6fd90106c3db16c778ec8c6237d7d54901a34b8114fb44249f9fbc1d777aca95bc7f4b649e0ab230312bc9517557ede3
+DIST thunderbird-128.7.0esr-sv-SE.xpi 754939 BLAKE2B 
91f8336b699d25aa89a22c1e08f592b81a3138287efed6523ab094fbb2577eb5bc63c297313c0ed9e3726881526f5cd35a8fb45c6b0663f6cf7c6c8730c9d512
 SHA512 
e2376ca51b18b82210fbab686aaaab1f64ac5257415fd432633b7f849c9ec626deb3d586187c6a82d79f85b0f2d5a69995a3d9fc0037031b4a04008b0f855b52
+DIST thunderbird-128.7.0esr-th.xpi 819693 BLAKE2B 
9a94de8b73e90bc2a144feed11ef2415ebc0688dc72ec81d29fd762eab20569a5a033bc28c58c7c8bf3a41b29b2fe91a94632316e2f7a63e18399f5ba95feb85
 SHA512 
c3e6739123d31026fd6e26c7cf5f486010b9d1a8a31bc41a28c36a2e77ef14b0b8d6d9111c21ae8ab70d937d7558af100c6e80d15c5e058c433dcc974b016be2
+DIST thunderbird-128.7.0esr-tr.xpi 765550 BLAKE2B 
9fa3d0dbe20beba4e9cb12cf196dc62b60392cdb10338bc50307fdcb71279dba0901bc01075dbf7085e532651cd43db68b4f68648e8160288fafacd1281a3e0f
 SHA512 
eaea6c9a393b01f2beac43e1e814e105eb2c11906c99934a254da36beb6d5c77f62becdca0fe00252416618b10f624262d6e96c74358092fabbf3931c143d2f4
+DIST thunderbird-128.7.0esr-uk.xpi 871378 BLAKE2B 
adc8d1669544b922325c54f3a76acf32e63dfb3b910b668eefccba3e0d8708c79c4569cf7fa1b2870a67aec5c85faad590db2f4aa385cb45dd040078033065be
 SHA512 
8b5fab2af470faa990fb7e2c7a75231694bc2a9a38aa82fe54f9f71c0dd9ed8a10c263cbc2c41c4b8fbc239c67aae9a3dfe7d8e328a2b12288c68f03fe94ce7d
+DIST thunderbird-128.7.0esr-uz.xpi 592620 BLAKE2B 
c1f41ccedddd4c025153dd1fe7e016f4ce97443f63ce91ccf71c051eb28c1e7b781e5ad714d001116387031220be331ca5d75840154a6ba76dd097a098f4551f
 SHA512 
2fd7eb9a7b1f605ca04a4b6ee3c890a0339e064c4f5e21955b279ae1fabc50b73770caab46b2fbf3ea674f60e627654913feb5a55c93f1def46845e252315a3d
+DIST thunderbird-128.7.0esr-vi.xpi 794035 BLAKE2B 
307d9823c016a4f6d32168cf45cebd8402e70bbab61ce02602881a172ec0d5c21cc2b46985375a36ad46d01a6b85003f8295f8c122a122a2e3f84f837f24e36c
 SHA512 
c2e30523bb15db7353d64275aa86c9398d8719abc01de566c656bd1d012371abb30bb7ab4eb45abfaf376dc309bd728884e87ef0564ec6a357153c3bc6dcfec4
+DIST thunderbird-128.7.0esr-zh-CN.xpi 794062 BLAKE2B 
3a7b5e1543894412d8e2aca92fc742764dd01f8101db2a9fa52edd3960e12062ae674da416c8fb17fb710786088a156c809d51668afc74bfd4b96d8f838d7d51
 SHA512 
51f6ff063552779304b227f62075dc0432509d7fee98f9bf854335e94df07a1818a1179813b31564eff487cf383eaf124c62ba3e745bb208e25f6fca6d9a69ea
+DIST thunderbird-128.7.0esr-zh-TW.xpi 797337 BLAKE2B 
d2d37f1a0fd41b8254821db6f728b503ab2cbb2c2b197f4f5a9830ff01f4a12ac9a6df36e11c0250bb4cdb8d1f003204de60c82e2c40800e3066b114d8a29309
 SHA512 
cb0714ce99d1df345e9968ca4d99b7d80b27c7a86347d0ca897244c81d9c7b6425de5aa35889e0f3fcc41c95a88541f716a80e56c66c146ea239ad3f9ff40060
+DIST thunderbird-128.7.0esr.source.tar.xz 674370672 BLAKE2B 
c857f6a703205492c1fcb1f7d4ecec24507847c54e6e0cbfe546289ebfa4b53d9eb37a9e6f2738fcb8125ec18142c18b8af344a13142e6cfb378819379a2da2f
 SHA512 
13c09644183a10bdaf9a7f7691063cda571bdc8dcdd3882f72dd3b176372ce42fb83fe510270018c467027e9b3af3b01bacf199534878781251a0fe668606f0b

diff --git a/mail-client/thunderbird/thunderbird-128.7.0.ebuild 
b/mail-client/thunderbird/thunderbird-128.7.0.ebuild
new file mode 100644
index 000000000000..93d64f1b7659
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-128.7.0.ebuild
@@ -0,0 +1,1166 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-128esr-patches-08.tar.xz"
+
+LLVM_COMPAT=( 17 18 19 )
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.77.1"
+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 autotools check-reqs desktop flag-o-matic gnome2-utils linux-info 
llvm-r1 multiprocessing \
+       optfeature pax-utils python-any-r1 rust toolchain-funcs virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+IUSE="+clang +dbus 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-png +system-webp wayland wifi +X"
+
+# Thunderbird-only USE flags.
+IUSE+=" +rust-extensions +system-librnp"
+
+REQUIRED_USE="|| ( X wayland )
+       debug? ( !system-av1 )
+       rust-extensions? ( dbus )
+       wayland? ( dbus )
+       wifi? ( dbus )"
+
+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.26.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.101
+       >=dev-libs/nspr-4.35
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-libs/zlib
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/pango
+       x11-libs/pixman
+       dbus? ( sys-apps/dbus )
+       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-74.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-png? ( >=media-libs/libpng-1.6.35: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]
+                       )
+                       sys-apps/dbus
+               )
+       )
+       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
+               if use pgo ; then
+                       if ! has usersandbox $FEATURES ; then
+                               die "You must enable usersandbox as X server 
can not run as root!"
+                       fi
+               fi
+
+               # 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="6800M"
+               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="6800M"
+               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#917599
+       if has_version ">=dev-libs/icu-74.1" && use system-icu ; then
+               eapply 
"${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch
+       fi
+       rm -v "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch || 
die
+
+       # 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"
+
+       # 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 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"
+
+       # Make ICU respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/intl/icu_sources_data.py || die "Failed sedding 
multiprocessing.cpu_count"
+
+       # Respect MAKEOPTS all around (maybe some find+sed is better)
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/python/mozbuild/mozbuild/base.py || die "Failed sedding 
multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/libwebrtc/build/toolchain/get_cpu_count.py 
|| die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               
"${S}"/third_party/libwebrtc/build/toolchain/get_concurrent_links.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 -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/python/mozbuild/mozbuild/code_analysis/mach_commands.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-gpsd \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-release \
+               --enable-system-ffi \
+               --enable-system-pixman \
+               --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-nspr \
+               --with-system-nss \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system \
+               --x-includes="${ESYSROOT}/usr/include" \
+               --x-libraries="${ESYSROOT}/usr/$(get_libdir)"
+
+       # Set update channel
+       local update_channel=release
+       [[ -n ${MOZ_ESR} ]] && update_channel=esr
+       mozconfig_add_options_ac '' --update-channel=${update_channel}
+
+       if ! use x86 ; 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 ppc64 || use riscv; then
+               mozconfig_add_options_ac '' --disable-sandbox
+       else
+               mozconfig_add_options_ac '' --enable-sandbox
+       fi
+
+       # Enable JIT on riscv64 explicitly, since it's not activated 
automatically via "known arches" list.
+       # Update 128.1.0: Disable jit on riscv (this line can be blanked to 
disable by default),
+       # bgo#937867.
+       use riscv && mozconfig_add_options_ac 'Disable JIT for RISC-V 64' 
--disable-jit
+
+       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_enable rust-extensions thunderbird-rust
+
+       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-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 dbus
+       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 ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on 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
+
+       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