commit:     9d709e48feff573e58470fdb462b6f74d10c7c78
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 14 17:53:33 2026 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jan 14 18:02:01 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d709e48

mail-client/thunderbird: add 140.7.0

 - sync changes from firefox:esr.

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

 mail-client/thunderbird/Manifest                   |   66 ++
 mail-client/thunderbird/thunderbird-140.7.0.ebuild | 1160 ++++++++++++++++++++
 2 files changed, 1226 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 1a2847c5e0ec..52dfb0e57fab 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -1,5 +1,6 @@
 DIST firefox-139-loong-patches-02.tar.xz 3096 BLAKE2B 
2e9c0f3dac780c808a13f70fe3808df9976898360b55113def97bf3594893166e0647c70ebc389b2d14fa2c2453fc1dd68aba20d92178670ef97d70c34205e1c
 SHA512 
e1244007290e2e15d14cf519e3ade6a4da06abe41c416de60569a11396609661cb62fb5b592e763cc079406699dc33d6a34851f71068f4d09bdf34021b035a59
 DIST firefox-140esr-patches-04.tar.xz 124424 BLAKE2B 
89fd2cedb67a9d82c339fed01b79c9c4b3f58051b68764121f982d4eba04d979c9d16238a7599fbab4f9d3965253f3ec4886f2da590b05116bc6ea0ee027e935
 SHA512 
b8c268fd5118007490edb7ef99f90148af4fa88ec7cdec03d028630476c85862e896b1ad3a6964215835f6f442aa71df96d6dd9aab632802773792bced8dc17b
+DIST firefox-140esr-patches-05.tar.xz 124432 BLAKE2B 
9281214dcf3da5d2e288112a99dc1fbee44ee93c4b83e30d73e8383805bd9c8ad9b1918d11351398cd963fdc30ec3cb50d7f6b5c9905d7c1303d21fdef440fbe
 SHA512 
70551bb7eea2a50bbd30418438a78a8ace07467fe852b7655c24373c651f816df89fceeb98b6fa6c7d95944b0c5deef76b89b3e742795a8ac04259f02bd25c10
 DIST firefox-146-patches-01.tar.xz 10568 BLAKE2B 
643ed4298d7ab2251ae1f813473a7b461aa386dfb72984e46201b22b6cb0f69f28e92b44a4783dda32a81b4b0dacbe8b47a25b9232481ecd79a19550e74e4812
 SHA512 
9e2474eedda1c2644ddcb0f9fd2d90ede764469337eab1267d3d4dbe8e3487bb519106449acf1da9798050d61a51e96a882f365e4587f88747161f6418203e4e
 DIST firefox-147-patches-01t.tar.xz 47372 BLAKE2B 
27c8ec917b10b3ad0ab035cf98b0578acff26a627360ae4d74bcbaf1c8e1775a4d7fd4f0175787cb8f0abec71c0f9e23db18ececa890c387869c1cfe4964ccdb
 SHA512 
9cc23c92b442205314c044dff704ea33cc3f22d43a88d4c2f4bb0d2e21b89488c6b9935195339031729573c722493403ac845cbaddbbcf0a927e7d506f21b67c
 DIST thunderbird-140.6.0esr-af.xpi 316217 BLAKE2B 
c7238abeeca8275eeafa982c35d46816de5c0c0751f037f6acfc07833077c521a752946b56b1c3b92e756212be2105b8203b4172da6cfffb66f47d1f34f2aee7
 SHA512 
f7ae8f8ba1e12e85a6cade91d0520ef957f1ea4b8da086805aec9c5e2d22b0d3667b5437bd5a9177c9a7e4e4759e083e23ac4b6473a3858d98465073540d2148
@@ -67,6 +68,71 @@ DIST thunderbird-140.6.0esr-vi.xpi 518884 BLAKE2B 
47f3212e30dee2618eb656f7be8e92
 DIST thunderbird-140.6.0esr-zh-CN.xpi 507816 BLAKE2B 
5e12d7bd198298d123696cf4c2d2548c9fe79380ae0051fb1adabb174d02f51fb12fac379d11e7a6ca5f6fd95d49ae1c1bb8bb510274091b69c0f067966c7bb3
 SHA512 
6112a797abfb744e351abc5d3f1a37c1cd7b19942484e2a39853ac941421772d2f7deb8bb1594f62f387e1cf1a2097062c9185488ef4c3f69323f0388df9c64d
 DIST thunderbird-140.6.0esr-zh-TW.xpi 511176 BLAKE2B 
556e5c8543cd750da47a7111a1362da6579480b5927a11c6c619c7b463b0baaa3875dbb8244163c0a089327b413fd66035841a802a1d568afe2160e64df96103
 SHA512 
ba84f99cb3bb79beb2444585e2f3d55fa7e86d41233a866f4c513cba2104918a5f71e69b11ef23e3b55dea3eaaa2a4136137aa8be56528b4a85299db00e2d643
 DIST thunderbird-140.6.0esr.source.tar.xz 750981904 BLAKE2B 
84a34cef3e30e65223220474de251e8075754bade9cfd1499de2f713bec4fdac6b29ce3c60d5297a0186e330ba04b80ff55c6c4ba362484a335b8a16cf0e0001
 SHA512 
817a807381fa0b5e5e2c3f961931855788649ed596b1c6773ec5b0d6715e90df137ab0f755408a9137b5573169c2e2040bf6a01c4ecdb9a8b010e6c43dbb6381
+DIST thunderbird-140.7.0esr-af.xpi 316217 BLAKE2B 
1bab34792c1141e8bd0b68b6fee1233324a73325313588aa6fc2f354018023406a56b4861d32d4ba8c4b2746e2a967e1ca5ac4e4f12cb5e2d011df3257eb6cc4
 SHA512 
53bf5ce8d3c64a6b98899b0bde9f922d1bda700ad804590731e90a4d6b2005564b6ad8a1a59b5a5d27536c9f169ee3d227d5cf36201d11552b0529d7cef38ff2
+DIST thunderbird-140.7.0esr-ar.xpi 436195 BLAKE2B 
739449bbd9a02acf10916ac7a032a1ae9b7282d8807ef7215813ecd4a210d73613f730428c995a56d06ddd2b570d649c0bd2cec038a7fb5ffcef4020d8862f76
 SHA512 
d84b652ccf46f2e31440f61da38b89960cef13ec8c8de4f7840c59d8455ac39788e342586a27d5ebcf5782e00ba4b746e1a9382d24c1493392ea64e03c473990
+DIST thunderbird-140.7.0esr-ast.xpi 340598 BLAKE2B 
d58a644610dc7672e017dea504fb88a175439d5f40143c734a033244f8a557706038da2aa1ab2296df3eda15f3cd88d330d357d51c7ec26e23bca97dbf12802c
 SHA512 
e589c927db9f4a13697a7d4d04afe1114acc4c6b09831b063f5fde1d0afbedbb4f9f1df1d3432585d244de4ef7cc1258a6c421b230170e591fa4f6f0beaad068
+DIST thunderbird-140.7.0esr-be.xpi 521573 BLAKE2B 
9711122cb3123be19a60e78f4037fb500bfe3a66c2d064b878ceba23a8c64c50a9d2da9a25941d1b7eb68c884682b283ae5fc2761b4719fa7ae5dd1390355e83
 SHA512 
39a076ef6dbb97bbf4b7d30ed8a9d20c84527ce8dddc555a9d80273f902ac73d8a2dc1f9f3659de46f9869a5e87f95e7c6c3f35aef11c6a0bbafafdaf2482f0f
+DIST thunderbird-140.7.0esr-bg.xpi 539805 BLAKE2B 
fd2620c7bbea9ad41f9591aa0010a1ee9ac535bad1fc3c2161e5fded8ad2ca0f57b252244df5da608cb0cc5b1c6db1e1d695f5cded846e082eeac6a771f6675d
 SHA512 
7e95fc50eeeda647a2a3e6d34286c1e486e2f88b2ff2843d8c54358068975853fcbec33274f89f3ad03a110e2707f68d031afbe4b848f2979fb8680861944cef
+DIST thunderbird-140.7.0esr-br.xpi 402746 BLAKE2B 
c80cc649d3503d5848747ffe996eefbce6465dd6c0365e6c20fbb0a8e3909321372d7791506c6e5155b4a90b3930d4ac9a3948f7f1002f278bfa98c5c183b267
 SHA512 
b03241b765d59eca6773bc93cff287e8f5ff1b1172d7e2311c8d8823809a8172f0751dae1f2c0b5d59139895039efdf7284a7a2c44aac91c408f4946ed58f958
+DIST thunderbird-140.7.0esr-ca.xpi 440587 BLAKE2B 
e87a794da3cf2999321d6d3338763a58b53334c055be8b29d98581459d13686b46cd1c7b1ab723ba9aca5cfa833f2f5b656a669adb09cb77f7af8b755ab43d47
 SHA512 
ce837cd15bc8bf9f059679098789466586b442bda1a90a1becc5ec3ad3781a0b186e06f4c1ec43b886b094a144943817a63113eebbf183715ddad9dcc282182c
+DIST thunderbird-140.7.0esr-cak.xpi 418021 BLAKE2B 
2cda5836b2ebd02f27c72a415abd9a37b57fcecd03bcb9061d0ca88f71e25ca969c00654e072ece9e27c5bce87e1ea0e11896ace5927f7507bf97e14f1a0689a
 SHA512 
2a16b93fb35e266631a33754eab163b357d35280e76ca90aac4731f00481f3650f5e7299358ce1cb0ab3a2714275561c6f4430cd041846c79375853cffa5d73c
+DIST thunderbird-140.7.0esr-cs.xpi 519507 BLAKE2B 
8b17a8a49aed09b5bf6c035e47a41ff4690a9dc3c4c76d2731ddadc59f75d2f6bbe58d7d5bf9779765544a95810cda5d28ad8c2f3b2c62d30713b0a8d26e17e0
 SHA512 
5286c4886b58ed1bebc1ccbd3d1ec261e73f95a0ae383ea1b299ea8e970d5beaecb044521eafa47dfc2e314994de6c0ddf2a1cef3971477d41c48b65d38ae738
+DIST thunderbird-140.7.0esr-cy.xpi 487650 BLAKE2B 
a8c618890e095f3d2193a04e4ae2b000ec0b6fb43eab643ae835db172f92390f8fb1e87b681c078472f1ffc8bef027a488ca3918d2729d161c593fc79b12bfd1
 SHA512 
520a1de323a4912d66360dc0066eccd7fb2fa0096066cba387a604019cfb3f29f1eb6859609c7030a88981efaefa46418dc2fc2f3006c23f06701875fe3ea86d
+DIST thunderbird-140.7.0esr-da.xpi 476623 BLAKE2B 
3124d4ff6982a27acd3d0dd43a10363918b2a5d6cde89b08a1e2657659d32aa5a95e259ba494a8e3f99cc67f7cdfd14680c7f188e07fa9840146bba8f9034fc2
 SHA512 
de8c2f1e714fd091288ffc49af664c3cce60d1ca29535c9bb3316e6cf309922d85435dd4f39cf0d080f5511001c35ef423d5e4cda8231cc303d90f54339c6746
+DIST thunderbird-140.7.0esr-de.xpi 504707 BLAKE2B 
d490e74958b2609e799b13b5e957e798b3b379fd3ec8992ba93ce3488923264f674d8aa4912d2038dc3f22a015f40b6b1900ed3fdfe76567f53eab18cec92f5a
 SHA512 
faecbc104d75162ea5af8909ed1f4c2ed25c869d9a17fe3d9cd5737dd1aace796cd4ddfedf9ca8c31b9d9ede1af34b5e0c9f6ea9551abfcc0a6e69f6f90c7162
+DIST thunderbird-140.7.0esr-dsb.xpi 517898 BLAKE2B 
671921323fde1c42a4be3ab02758ec7cc37b4be4439397cd8b2ac8dddbea4f8d64708c9a5582e2d1090f7b5a1edb24d6c0ec1574849a206bd0c4bea22bf5d153
 SHA512 
0db854158e7e05dddb81a45172a5514b00b8eb8995505dcaf74fa5d47b20d96d336fe2a464b3ec8fcd0723834cf955f0893ca446bf88e45f1747e74ec09ee1c8
+DIST thunderbird-140.7.0esr-el.xpi 609028 BLAKE2B 
7888f8eb246619c594a584cbddbe4f545661ec9c22aee11b8eb01dc3c0967b773f75dca7970cbf6214abf4d939a191a99d9df9fb2cdaa243e19634566cd19f01
 SHA512 
3e18a9a2e4f0c1fa63ff1f146c17baad152a06d1223be480f6c8890ecda4c94ea99317f562c265a387b65fc3e70272b5a5793a7b8c11eaa0bc6b9346ad84c300
+DIST thunderbird-140.7.0esr-en-CA.xpi 452238 BLAKE2B 
d647134e95b1ed708b9eb3a3d0b12497bbe12d4d6d3185e58885f62653a24b9fe74db7bd6a388fb3f6b08fc9fd8809e3e9bbdd3d18b2502cdf10804aa80aa585
 SHA512 
ae1dc889ea7787eb92e402d7922886f4cbcd37c764c10a34d32792b43aabdfedb0ad7696475546942bcc28d52f6498cc681d8ffa3e6e1c45360fd97f137bd152
+DIST thunderbird-140.7.0esr-en-GB.xpi 452066 BLAKE2B 
8579fc546973131897bd3a2ee7903396958e8513638dbacabc2044fc6017a722aa1b9c943726039942869deb432e9cd1cbb985ce104ac832840162875b82c729
 SHA512 
7dfa49cd52f7e15abdfd1c4b6b2a2a97131ff4a1381e850db94f07bc45911aaa22ffae970f664622fba74e31bab1f88116964f630a1eabc608bdddf803ba3578
+DIST thunderbird-140.7.0esr-es-AR.xpi 495269 BLAKE2B 
84801e05768757c12b63457e444e0a5cfdc12253a9ed60381e99b09040221ec4e66b44398bce3b66f7fcbb20ea522861aa911d9b4816db44a584c06f4f33d9cc
 SHA512 
db31ab9693e6c6edd50345484670f9760bed05e7f65666ffc80837c38a9f30c5e9260fc013fc2e035d9dce3f36fa1ca4e5459c1d5c9cd888cf81f24035cb3a5e
+DIST thunderbird-140.7.0esr-es-ES.xpi 497284 BLAKE2B 
02264d2c8db2ca45530f24ce2a3c89456f44fac16ee6a440d30444c3185c86ba4466808f02c9b86e8b7cbe7671748646d302e5b730a95c8ef8b5036219bd1924
 SHA512 
1855c788084decc2815f0f7c7062808474af89f196da1ea04a0e3e2a0488f414b1bbab309bb74d9b2678b30d38fbfa060e1159924e74985a7c2d346dea481c3f
+DIST thunderbird-140.7.0esr-es-MX.xpi 490409 BLAKE2B 
18941dfc21f9c0ed628d16ff964a36ed2d07e37af1448409406471c8ec9fadad7a57a1cfc093c8a5e55d93d5227aaea9334aee3d523f4780a0f471c31f97a92d
 SHA512 
f9a2b19f0843efd7a4fbc22c33eec3b276bfdcb7eb79890f4b0441a38155b0d51d2939b0b0bb8b61c073fd8e53245f5b5ca6c58276acffbcaffe964f3f273709
+DIST thunderbird-140.7.0esr-et.xpi 443617 BLAKE2B 
1cdcacabd71f7db34db3b906feaf97ea8e70031c44eb150197a7bdb26a2d5097921b9578d79b2881a40f8f4633e1f33d679e4cc107d85b3488227045d55ea011
 SHA512 
1df3fd8511693fe518f33620a71ad783df4b3912960d031f79eb9a648d629b83a7957fb18b28bc30a63d499a36a05c71b9e5a6d0913237eab27ebb0b5aa21b9e
+DIST thunderbird-140.7.0esr-eu.xpi 473922 BLAKE2B 
ca47960f00579e33e233c941cf38688ffa301d2c1b04a373bab111fc25095ca1b6115eaa82274609ceafcb86467fff44b42e4cf013d202e47fdc7fcf02bf0772
 SHA512 
6943dd9e4ae434fa72a7bc47fa8283584754ed3fd2014788e92d6f6ca23f18965cbc30555cddf493c3b4f4d25afd64a19e211719ffc294191e1e9005c6fe6884
+DIST thunderbird-140.7.0esr-fi.xpi 475608 BLAKE2B 
656000ba978593d0c12da5aec9fa5bd430aa6fb75bf707dfad92cf9cd315c8625f91330b7df68609ea329891d76e6c3bb8b1104d77525b4cb4eb741dca1cb516
 SHA512 
4fd5759def6485b334aafc195bf258810efa89b62de92b9112c0c0a23790fbaa7c63ff857fe6f6eeab3fb39ac9c98150f3490cd25da63fc2768de0a6afc2ff9c
+DIST thunderbird-140.7.0esr-fr.xpi 508319 BLAKE2B 
94179c49c5a3ef2cba67fcc2f2785a3229060b907be6475efff57a94741aedae2fbcc5074e85a2f2d30719a056cc9f8ce1a66e7e49ba74485e47f915f7b510e2
 SHA512 
a7bba0ab8f2553fc8507af91a08b9b4ec71259f6387e0d8b95c72dc76f9f4c5cc42feb7b0f7a9f77bb2bd0915aad212da0201cc27723ba727b3e2da10cdd93dc
+DIST thunderbird-140.7.0esr-fy-NL.xpi 490684 BLAKE2B 
c3f5dc31f8e2f42551103c54386c81f3f770d44495e5da31b4494e502b4c9c526853f907bb9c7b1dcd270d09c3cec5a3ff321a49780e93c76409f99119124d3a
 SHA512 
7e0622efdacc3a44be1907c1af222f92c6252016a005cf28b8b3043505491ad20d5cb18d7cff41d64e59bc135e4e3a44395c94af68c689622e57b7b6ed7598d9
+DIST thunderbird-140.7.0esr-ga-IE.xpi 376744 BLAKE2B 
2ef00c30f77d51f972de691258f995d9370cbbe51e1d619156cbaf958df96b024a7cc2dc36df3511c6983ded3e20cc32bc65675621ee0677da4f98ceac8eefcb
 SHA512 
eb4bc171a6ca7758144990afd846764ab2b4710b56f973b405493e6ba9dc03d9c62b7b685b3bb472881191ab3f6bd5f6f932c38359be6d4a3acf25424ae3aea6
+DIST thunderbird-140.7.0esr-gd.xpi 461957 BLAKE2B 
04be864f94da1faaa083eacecc04533ae74f7daad23be490bdfd120680d1f5b71992231d5df7758988f471f1feddae6755a633b4ab082c55c0046c1b730d8f9c
 SHA512 
033aaf0c9f4b27445a41b296e3d5cddad254c123678060c3078004d281f152234df797c547ad2c171393e98e9da2a6172a5be480ec112eb79562dc82ea6cb5cd
+DIST thunderbird-140.7.0esr-gl.xpi 489345 BLAKE2B 
928d367de83098c8e06b0f20fe3a9bdea8adb5d2600ee18bacd97de924768671da318f0ab90291f134f2a15c85570dc654ac73d6518e268cc7f6b9238a2c2d6d
 SHA512 
ac91c7f664ff437cc5d24c1bef7d969687ab3894f9acfd18bfa1485ce5096b35790299f0ff7bb4803762f3cbe0e05c96e7de7833afe3c1fe94ac9133f4651a9c
+DIST thunderbird-140.7.0esr-he.xpi 443587 BLAKE2B 
203ee7e80cc9c84b0823fb82fb13c9f95dfdfbbcc72a3bf0bf2ddec66dff750b078ac5590cb3f13dd1a1a66dc19b687e7163c4a0d1967ce47ed78f8bbcceaa79
 SHA512 
fa6134c4651b46aa0e2771e233927263af78d5af10f389afb5dcf22e3a431d09d5f4461c8ffeeb008650fa0eacec0f2d5ad3e7b0b125bf2372ef07cef4ab0bee
+DIST thunderbird-140.7.0esr-hr.xpi 470679 BLAKE2B 
2a3e9ac577d689ab2df1aee320b1c91185fc7cbc6afbd18135848b1ade7ec0b9b2dd9825c67d034eab097c249e32d2f196f235b4b20cad5695f147155ce37520
 SHA512 
e5acf440fb04b4fc4abfdf978ef4d9378682a50a0c9e8e5258692d244ffb6830d09f0617619902ce66bbaad1b76a67b07ed34e269906d979691843e1451d3a92
+DIST thunderbird-140.7.0esr-hsb.xpi 514933 BLAKE2B 
7b212fe7fd4b2b82b0def0f0b502a360583ffbc19315116ecc480df38259914d4a6932d886441a061fed059608517014bfd5a606ea4e9067914a8164a7d3a864
 SHA512 
af0e9c78d397f05f02dffed4b306711aac6d67624ffe0dbb410c40cdfcc64c7bc2be2fdf0da38882f64daa29a9916580c8ac7eb180b6523dd40794443dffd876
+DIST thunderbird-140.7.0esr-hu.xpi 517543 BLAKE2B 
aca1adea84788eba292ba805e049e1cc90fdb5b69c306f69d02083e3091d9b5c0a4bc6a164fde34f153a3beedf1723472e7092af69daaee28d24713e881e90d4
 SHA512 
3c144c1b52df6fe12d0d999e3444bcbda3d0d82cb5ecfc2d44754a0d61996c38eceb51e00a74d3ffad1a802797a394d75f1dbcb6f341b88c4211b8185c12657d
+DIST thunderbird-140.7.0esr-id.xpi 467003 BLAKE2B 
9804bdb367a0655ef4c7b2af5a139bbe6f750c39bde880c2fa919300271dc73ebd09685e0a62a6ab2a590effb7171bc1fff01fe728a9c6bd18e3562e5a95f3fe
 SHA512 
07486610c8cca121bb9f2951a0e504cbf8f5607e051bd45538c110b49b55c293de53151a83d7a0c390ad87cc02ac342ab2f04fed8d5f9cfa3c99e1d07924ca7b
+DIST thunderbird-140.7.0esr-is.xpi 482738 BLAKE2B 
d83974b657f1fb79ac460c2b398ff2bca91a3bc6f0e877f07f9170805136250e6344d8b590898da7f1c6dce2b1528a19c9a9730d9d8f8405fcf8121225f15ac5
 SHA512 
3a1a24c4c8ccb274ac021e1e9d13ff29376b56223c59222f2c1cefb15ec6c869c1cb378213d18d18ae76bb2d31e42a6b1fcafd5ab85f32954d468db47bf58c27
+DIST thunderbird-140.7.0esr-it.xpi 488502 BLAKE2B 
708a4e48847f42a680f2255fec2e41c15c0057e684551c4054193a765ebc1813057e6e6b13b308f38f765504945f6b100ab8fa3283f0540e9bf8a47e3fd90b0d
 SHA512 
40f37086dc205cff4ef416b2c508f1ca0509e4338e1ae2821d3a73f72a52c112f5aa8f1677b3a344af66c9db3202c55f241393e49a8ed771d9a1490a89679745
+DIST thunderbird-140.7.0esr-ja.xpi 539196 BLAKE2B 
8abd0dfaffec329b320d77cebd051b56ce155813acd8aac38785b24e39074a4325d2fcd2a0d8b841f42c32859f910b61d4c53c2cab5b7370c087e2e36eeda057
 SHA512 
2689a336e9b23938437e056393572729eddbb66a27f4382a29c00ff67e52a946789a6871680febc39411e8f4a166e480feda0d53a9918197155b9285732228ea
+DIST thunderbird-140.7.0esr-ka.xpi 554773 BLAKE2B 
f6fd9c342b22c0634e2afb4bf2b20f5944f0135b39c0de7688aba00dc2ebf5007b4263556fdf227f20688a162e70e29b1bf28f03a94ac3f36ef7733e109ee171
 SHA512 
3f3d2c84fcf034fd9f3b0207eb7cc10292bfbf0dc5f827edff1afbebccb48a5515d57c0671392e0349eb806aed8464e03173dfe28b9e85ceccf5b2c5a388f114
+DIST thunderbird-140.7.0esr-kab.xpi 470496 BLAKE2B 
641cee56a4de74e5abfbe405939f45acfbe3d1a3ac6cf08257e51bf04865c7c67e149c4e358e229ed490d26f6a62a4131b1ed93e9908a5af772c385475421ef9
 SHA512 
721eca97125221138800301ca6a704f62170dcacb1d0083fb3c35ee520a29488008a508ac0b92363c80d44e9c71900fb8b1d3a1be3b1766d08bf36e0cca57ae0
+DIST thunderbird-140.7.0esr-kk.xpi 573879 BLAKE2B 
2d3b1cf2b6709146ecc583227d63189de743392de9eeb64457ffb2c33063c85e89774fb35ea3e80eb25b89a3c2d376360259b3fdf434b396030cc4f04fd9e7a3
 SHA512 
555ee46b1863d41371cb36756e880d274fe5f8b24076517f87fa0c4ba0aa0dd576f4cb4af5f8f620d04ee50e078d25ea08d71a5288fac4e482331f36efaf246f
+DIST thunderbird-140.7.0esr-ko.xpi 515590 BLAKE2B 
9cf7149aafbe88d6bc4fe5bb4c393af42fcc2841d80e420f9f9417cfea165bdcc9a6644c3fcb3a2d44fe38f8e76d65ab786ebcd8000c7dc5721904ddba816bb1
 SHA512 
111a2ff206210273b08a684f85385c6708f58d9e65afaa7026bd91e730eaff95d1d73f09e35ad9db1da3ae782e43d3b2f4eeb49d608e584c93621d1158906517
+DIST thunderbird-140.7.0esr-lt.xpi 453435 BLAKE2B 
65aed1dbd638e672c847917b97a66710e7f48d465ad1907a7a5154f50c6b95b00c0b7bec22d64e0ac889ab7a382d1bba4a97ee9c1c2222223d5db0f38bcf2565
 SHA512 
94e9b8deef3e52ff7f52150d26912cb3be8b20f5e36e263178fd9ff6d438d23a50d8457a6bd4240a6351ec1cf6544d513452bfccf69b1a4ea85fc003dfa5710e
+DIST thunderbird-140.7.0esr-lv.xpi 392812 BLAKE2B 
3167abfbd60f97067c2144de3961d1c130df253d296f99c4056a8ee7e9ee6fe6e1b7b2f1615bcfc57ad85cc50b980c238dfed8f50ce465981013f14fc6d5634c
 SHA512 
23306b78b3616fe8d18a01b8c83753b0af9c8909bc7c005e4094fb078bbec4f370714e4f4e0d3ba1d99e6b10942f03804a4f6b3553e330ea19b7aafd045501b5
+DIST thunderbird-140.7.0esr-ms.xpi 352179 BLAKE2B 
762b0db883f6d754757b1bf14d1fa740a1b97ccb2fcf7d582af0e3a0364a65d26e23afffb6520acee70dcfbfe374f8c4b7c935f2b1f343dfcc453fcfbe93d0d0
 SHA512 
fc35ecc717d4da73e13f5bc7da5d5a5d3c83be5091f9567b1e9236530c1d3ea9092d5ac62e3790755ebbb041470afe86c3aa9b41548cd1aa92c40ed4a39295d5
+DIST thunderbird-140.7.0esr-nb-NO.xpi 476137 BLAKE2B 
9fb43bbced14dd0e5f2647418ed25668ba262d777537e47885caae7c343747a1dfe3d3d55ddb60add43d8e4a2870b96a26f8652a128a1f36ccd73c2a7574fac3
 SHA512 
de2edc2eb0688dc5bc596e614c3c0ff77ee8d504fe37fe615dca67e2686d6c739dd91332ccdb389bea6bb1d753414ec75cea082a9f003b9e0de6eb1524d794ad
+DIST thunderbird-140.7.0esr-nl.xpi 482123 BLAKE2B 
248eb897d4decbd7483b19b4ef3c4e7a7aba45c85d13ead8103bb00b3ea46ae2938f716f81622c4bcb2792375d605dfac16922e9a3e9e63c5fda3996877c088e
 SHA512 
a5c698c60af3dd2b54c3e546fa13e3e2fd86d1b51fe2859b2fa477bff7af2f799512c13626411be3d0d4190ba0310cd4c37aa13433efaa7ee122674f60931756
+DIST thunderbird-140.7.0esr-nn-NO.xpi 479759 BLAKE2B 
ab403f47fe91fcdd1da114fc2eea9e74a19c008fc403aa52953ec7b233a8bb01db31f5c98d570f633234b861d89114b2bfad77b92642759c8f109f926e439f79
 SHA512 
2a2fc6e469a74073933a20fa948c46420df4bd21f98152bab5735aaf986116236929bad51655c245402144e6839e5357710f993922188e6e865f83a5d2d77fb3
+DIST thunderbird-140.7.0esr-pa-IN.xpi 435423 BLAKE2B 
153488423c18256c15bfc46ffdedc7a17b781dda92b9433249bbcd8f0a88c604a227337d6a135aa29ec749d8786db1017c14f02be2ae9f2a677d7bebb339c9ac
 SHA512 
844d05d4c96e11c62414bf8bc02152dad276546c20534778f11fa9ca5404449442d1cc0ff9967b69e58fba06a1e4a87895873c4f2915343db811e9abb9153819
+DIST thunderbird-140.7.0esr-pl.xpi 515611 BLAKE2B 
cd5e7cebb533b7531b2df6b4c63b4be2a5556d9b0d45b8a4fe19c80a10ee164d2ac6e4380fe248102036eb385fa965bb3317f9a57eeb276af14b4064200314a8
 SHA512 
480cfb23dd1975858810e045c32c2c4bec0ea02cbf083d6bc61aa77c8fb6a78ee15d4215f63eb41d3f812825e430b9ef320de0c5b8c3f5e6e5d48b661c8ab5e0
+DIST thunderbird-140.7.0esr-pt-BR.xpi 490163 BLAKE2B 
bdc75e95ff3512eb8a26645e387d6df4e65b465ce9d0213cf7b0e141c42ed38b7cca6ee3c382dcc96735a65c4ff64d0b8559aa917b8c4d5d0229b6d042af2b4c
 SHA512 
272bb936cd4f4319455707ac5d19a05cadd973ef7e36b7455850c529eb6f08041fa320c7cd29848452706784b204562ce7431a265446a6e252f8d8357b3820eb
+DIST thunderbird-140.7.0esr-pt-PT.xpi 492523 BLAKE2B 
b5b64cca56f1825d2fc9d3f61e417a6bfa61b5e785b8cae87865b0db4a1922aa44dab813ecedb510c5b4cb24a68b4d796dda83bf567f3dcabf3df797218fe1f7
 SHA512 
ab34adc7baf97ea696b75777b1873ed18f0c4664f74b181c59a101fb1c4528d14303fa6478784c73c28c9b521154e33d65de36d01d9614b9f0cc7310534bae80
+DIST thunderbird-140.7.0esr-rm.xpi 487882 BLAKE2B 
4d8bf4e85f69581070d2266ee795787f94973504a4fa88d8a940dfa9c30e6d63a712fc188ee01d3a661bbc213b68569d2e2379fddfe81808179f81612cc74d72
 SHA512 
511c2e680424b9b2cd3b44a23fd5eb84fe4c7a05b2f66e1d429d1961b43d67ba2b1629c3b62ff007365b9990f67d8c7137c05096ece21704dd0b6e901b2c167e
+DIST thunderbird-140.7.0esr-ro.xpi 501094 BLAKE2B 
d6fc15f62d9f91ac17fd01a47c20d23debcbc907d58310ee6b866ca3b27872b0c1a56d77eeae51558d3955378d1ada107589cf0bcc4a260dd906acbdb380485c
 SHA512 
78964900f66c2395d907a6e836da59574264a81da85d1e52b3fd17aa7de11adb4e9deb2305d52b50ba2738c6bdeb6aaacaf46d7d18f7cecf26cc0ebe128f2e40
+DIST thunderbird-140.7.0esr-ru.xpi 593283 BLAKE2B 
532a082aa3a57f3f3073e1ed21fb53b40613e0551fbc29462a51ad73e14b76a9c299de3cbe4618b807ac06d97fe48406493ec2cbe911181e9f86aa941b871bc2
 SHA512 
1bb67458295e3ec7fc01a818dec02b83d47a3081f9de55d0a5ba9351265c40142499458aebef28cf83e2e784a291aa9610833915ee38cab3601fb0541586d0bb
+DIST thunderbird-140.7.0esr-sk.xpi 519388 BLAKE2B 
d37bc1194e578d57b8d55f745127cccdc13a0d478fba1e3531af7b12d134728f1e85713761af76f2e4a1d8d43702fbfc687f3b51296c23d9facfdeb734baa0b1
 SHA512 
8949bbc24d442ce7115cc3b71a4cb0dd6279635ac182c5968c9aaa19c4da1051e963f9a54f2c48eac19b5804c9007d61ecba52d878896e298130a1fc671aaafd
+DIST thunderbird-140.7.0esr-sl.xpi 485960 BLAKE2B 
87b033a5ec71a357eb3135eecd8911ea00d4a4993262000cf418b2e2582c291914ba43fc3d04d7e6e4d477a92fe0082a76dc50d063aa191536178afa0afc3500
 SHA512 
0ef0df604bf7adc9e904c9434b0eeab32eaf8f2bab4ee69beb18311899b56a4bebf1b0c77608e8954b76c1a8faacf9935fe78be2c596ae634e38b3f5850682b7
+DIST thunderbird-140.7.0esr-sq.xpi 506267 BLAKE2B 
c4505a7ac872f841de5b0c36d96e77beb9510cf797344ed02578c7367b11adc82fd78846befa9aed93c36f5890f6c7e3a8922a70a7614219afdeef19c7555939
 SHA512 
b15eadeacdbc4dc880da3cd42546cb5813aa121bedd6f88c101005a17424b5c38c7d1b424ba4b6e8a156b9fa459149f679ac957ef2da1a1353726177ca704fda
+DIST thunderbird-140.7.0esr-sr.xpi 495991 BLAKE2B 
d7d55b2597ec6946835d18725057ff07a76552cd6f8d5a6c8f5aa051fed409b59fefb7d46c5baccb006b7cbb8429df3c54bf2e7cd17aae53e03e2962623596d8
 SHA512 
121d170da94dcda4e6e1f43b695288d6b1be4de8714eda75f43620b7415fe53aff8ea9653c2219dabd82cfc201e27f13ae57f6cc7100a3ef3409de7d9da17e37
+DIST thunderbird-140.7.0esr-sv-SE.xpi 484419 BLAKE2B 
a2a967bba29703a53d222b1b39ec5ecd088e9aae1d36b82403c4da86e7c56516dd4f0b193accf227bd2c8987c018e7685eaca07e33becc5fb7a042451a38826b
 SHA512 
bbf56ac2a1a10326dc2e230d632fc795d15727aa0821ef8f37c1b165c0c47a8622f8eb62e81d416fc0546a1dfe4e5f82d5a1089cbebe570e05ba3852d0e0d156
+DIST thunderbird-140.7.0esr-th.xpi 567946 BLAKE2B 
059b92042f2cebbf5859238489ef5326953b6e7e635e36cd7f5b7f8231cbf0fb032fd401a7ef82648d39f22e96066b8163875b09a1c7e3d4179255644302f00e
 SHA512 
790ce1a0df233b7319f3a2216a0c02e2fd2ce219e17839b30cde11a0ea0b0b629472d7fe80ec13486d38f39b6af47d31a7c764bc8f785b570ee6588f1552b339
+DIST thunderbird-140.7.0esr-tr.xpi 496181 BLAKE2B 
d8ca6e9e0e0262f9674be693b7f64a4942eb080a452e25d26d5fcf6fd655d8fa009d54d4a8d07674a815fc46d86dea8f93a4cc4a02606bab30e7f3f1b0b8ba86
 SHA512 
162b624118ffeb9522cd2073ab61416218343ce61097214e219f992964d8c5cdc4a6ac8ef4f168933321326dcc67ee0530974377f35995f478a77d4676e7655d
+DIST thunderbird-140.7.0esr-uk.xpi 582152 BLAKE2B 
938a7ba9a10d7c26fbd4a2c95db232b6235be836f73ead0d155a42fb9f55cb110a697c3c57704283d0cdfd680886b048fafe2f80b705e9786220a5557200c1a5
 SHA512 
674523fe9c0d7a666cddee2aba36242ca9475b058d38194b509f9538d2b23e829590f531adc814138dbac12d19044ba1506d67ddb1df8bdc51334aac21805dba
+DIST thunderbird-140.7.0esr-uz.xpi 355267 BLAKE2B 
9ca9c6f9b750229f6dbb02e5e7c7c9479341546d204fd0135c48356afdd8fd67aa916bb420d726aa5f80a1b5f9f64016dbb15ff3cd1fb8a0c40b418f4f530038
 SHA512 
1f940a3f213e5634cbeaa50cf934837b6bc7ede4d71a8d59aa5627c5f3baf971181cd2004fd5d73add17c8cdd7ec733e092b5d8e858232af41bf24af23eaac8e
+DIST thunderbird-140.7.0esr-vi.xpi 518883 BLAKE2B 
c033750671e3f59e30e101b61cdae919f97752d25fdbf53e4b8802b66895c41e85d1f13dcee62c13a32e9a5dd6b0cdd3d97d3a723547b077529eb791eacbfb8e
 SHA512 
76d5808117a390050da376b5c685d629f15ebef01d7b118188ee409c8f0103341974328d0f2b0652ce7d5f0699b2edad13443b41131ede1f7b0cc52cb54e0323
+DIST thunderbird-140.7.0esr-zh-CN.xpi 507837 BLAKE2B 
3dcc0d32bff319a36737ca0d9c8b285bf7da0f4f9c7fcd2748223a2ee04ab5070069ba44b29498f0a4e94fd11db54d746175556a4cf5c7d346034d07adb075f0
 SHA512 
495ae611f6b5ab1c291d2b53af3afeb0cacc4c1200a386fed3e478bf92ea4269e3c366a2166896ff9b933ab8f4d6628d3f99c2925781e0dda5f923a2c29e7179
+DIST thunderbird-140.7.0esr-zh-TW.xpi 511430 BLAKE2B 
18e36fbaedc0e54ce0316fd506e4ecc9dae755988cd22440b08eb1794f4cc01ee3eaae298cee21f5e14ff0167f15b91f496f82cff5cce56cc188bf9935064e79
 SHA512 
095ad671e67c8249db9943592933443aefb21c76145a1fb15b2b8166402f79fba5319026f3c5d98f88361bfecf268370838c587b69a62a28888836039b65dc59
+DIST thunderbird-140.7.0esr.source.tar.xz 757376992 BLAKE2B 
83a659c88e2f2e3054fc87c98a7a0f6723b4aff0713ee6b8c7fd87c4fcd3a9e59331807fe335d719dec48b8b585c36c63ec9349afbc46d7b4131c738b140dc12
 SHA512 
92746d87ca2d5a59082c25aa3c3a816e5bf24ae3e095f8ec478a60c5cd890faea392ff98b5b510cc9a89b155240dce9d06c7ddd0f17f564722acc65105fb6cd2
 DIST thunderbird-146.0-af.xpi 312102 BLAKE2B 
1002d405b855ab92e382ac171d078a8cfb1d40c502d71865906c1a29e1d3e5bc3b5dd5dd3a623f769dd8617872361808a64aff7731e9ba476a2fa6fde2e3628f
 SHA512 
21a4f2c6241d9252cad85b8a5a2111afb749dfb791abaa1f505ac433e4575247e7b1f3a47663f717e8c791f3c084b43bbb52312dd75787d7b0badbe243ff56b7
 DIST thunderbird-146.0-ar.xpi 433915 BLAKE2B 
0fabb128da8e4685f489a928c38437bdb668a0c7d1c15b94c68718fc1df26303a5cf02d0d722b5ecc74b9a1521ca394941235647b8e6469825f3f13e3b57d6d1
 SHA512 
27e9fffe05fc2e52b902cf52399847d6f313dfb6cf7326e4a5ed8cdde55cf87694f39ceae38d5c7b680ede2b3bb1b5d7685df0e8751dcd8497ea0abea4451159
 DIST thunderbird-146.0-ast.xpi 336128 BLAKE2B 
92491e55d73bcb204a23aa283d3b16d43fa0038bb24c6fcb0308d2c1d2d3017802995ff14a617eb9c5d5869943afc31ba1c96aa06eac2dff3989e9e41c2c9a7b
 SHA512 
f74087a0cebf61e8dd5fc86d31ad1c9786cde50f312f40664e247a478e7a1f4ddbe547af529e1ca58cffa21e711b4ec6d61903af62d306394e490e9353486b5b

diff --git a/mail-client/thunderbird/thunderbird-140.7.0.ebuild 
b/mail-client/thunderbird/thunderbird-140.7.0.ebuild
new file mode 100644
index 000000000000..ff6ddb3204c7
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-140.7.0.ebuild
@@ -0,0 +1,1160 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FIREFOX_PATCHSET="firefox-140esr-patches-05.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.tar.xz"
+
+LLVM_COMPAT=( 19 20 21 )
+
+PYTHON_COMPAT=( python3_{11..14} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+RUST_MIN_VER="1.82.0"
+RUST_NEEDS_LLVM=1
+
+WANT_AUTOCONF="2.1"
+
+VIRTUALX_REQUIRED="manual"
+
+# Thunderbird will have separate release and esr channels, matching Firefox's 
rapid and esr.
+MOZ_ESR=yes
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit check-reqs desktop eapi9-ver flag-o-matic gnome2-utils linux-info 
llvm-r1 \
+       multiprocessing optfeature pax-utils python-any-r1 rust toolchain-funcs 
virtualx xdg
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.thunderbird.net/";
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}";
+
+if [[ ${PV} == *_rc* ]] ; then
+       
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}";
+fi
+
+PATCH_URIS=(
+       https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}
+       loong? (
+               
https://dev.gentoo.org/~xen0n/distfiles/www-client/${MOZ_PN}/${FIREFOX_LOONG_PATCHSET}
+       )"
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       SLOT="0/esr"
+else
+       SLOT="0/stable"
+fi
+
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+
+IUSE="+clang debug eme-free hardened hwaccel jack libproxy pgo pulseaudio 
selinux sndio"
+IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent 
+system-libvpx"
+IUSE+=" system-pipewire system-png +system-webp wayland wifi +X"
+
+# Thunderbird-only USE flags.
+IUSE+=" +system-librnp"
+
+REQUIRED_USE="|| ( X wayland )
+       debug? ( !system-av1 )"
+
+TB_ONLY_DEPEND="selinux? ( sec-policy/selinux-thunderbird )
+       !system-librnp? ( dev-libs/jsoncpp )
+       system-librnp? ( >=dev-util/librnp-0.17.1 )"
+BDEPEND="${PYTHON_DEPS}
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+               llvm-core/llvm:${LLVM_SLOT}
+               clang? (
+                       llvm-core/lld:${LLVM_SLOT}
+                       pgo? ( 
llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] )
+               )
+       ')
+       app-alternatives/awk
+       app-arch/unzip
+       app-arch/zip
+       >=dev-util/cbindgen-0.27.0
+       net-libs/nodejs
+       virtual/pkgconfig
+       amd64? ( >=dev-lang/nasm-2.14 )
+       x86? ( >=dev-lang/nasm-2.14 )
+       pgo? (
+               X? (
+                       sys-devel/gettext
+                       x11-base/xorg-server[xvfb]
+                       x11-apps/xhost
+               )
+               !X? (
+                       gui-wm/tinywl
+                       x11-misc/xkeyboard-config
+               )
+       )"
+COMMON_DEPEND="${TB_ONLY_DEPEND}
+       >=app-accessibility/at-spi2-core-2.46.0:2
+       dev-libs/glib:2
+       dev-libs/libffi:=
+       >=dev-libs/nss-3.112.2
+       >=dev-libs/nspr-4.36
+       media-libs/alsa-lib
+       media-libs/fontconfig
+       media-libs/freetype
+       media-libs/mesa
+       media-video/ffmpeg
+       sys-apps/dbus
+       virtual/zlib:=
+       virtual/freedesktop-icon-theme
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       x11-libs/libdrm
+       x11-libs/pango
+       x11-libs/pixman
+       jack? ( virtual/jack )
+       pulseaudio? (
+               || (
+                       media-libs/libpulse
+                       >=media-sound/apulse-0.1.12-r4[sdk]
+               )
+       )
+       libproxy? ( net-libs/libproxy )
+       selinux? ( sec-policy/selinux-mozilla )
+       sndio? ( >=media-sound/sndio-1.8.0-r1 )
+       system-av1? (
+               >=media-libs/dav1d-1.0.0:=
+               >=media-libs/libaom-1.0.0:=
+       )
+       system-harfbuzz? (
+               >=media-gfx/graphite2-1.3.13
+               >=media-libs/harfbuzz-2.8.1:0=
+       )
+       system-icu? ( >=dev-libs/icu-76.1:= )
+       system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= )
+       system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] )
+       system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
+       system-pipewire? ( >=media-video/pipewire-1.4.7-r2:= )
+       system-png? ( >=media-libs/libpng-1.6.45:0=[apng] )
+       system-webp? ( >=media-libs/libwebp-1.1.0:0= )
+       wayland? (
+               >=media-libs/libepoxy-1.5.10-r1
+               x11-libs/gtk+:3[wayland]
+       )
+       wifi? (
+               kernel_linux? (
+                       || (
+                               net-misc/networkmanager
+                               net-misc/connman[networkmanager]
+                       )
+               )
+       )
+       X? (
+               virtual/opengl
+               x11-libs/cairo[X]
+               x11-libs/gtk+:3[X]
+               x11-libs/libX11
+               x11-libs/libXcomposite
+               x11-libs/libXdamage
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXrandr
+               x11-libs/libxcb:=
+       )"
+RDEPEND="${COMMON_DEPEND}
+       jack? ( virtual/jack )"
+DEPEND="${COMMON_DEPEND}
+       X? (
+               x11-base/xorg-proto
+               x11-libs/libICE
+               x11-libs/libSM
+       )"
+
+llvm_check_deps() {
+       if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then
+               einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+               return 1
+       fi
+
+       if use clang && ! tc-ld-is-mold ; then
+               if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then
+                       einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       if use pgo ; then
+               if ! has_version -b 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+                       einfo 
"=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2
+                       einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+       fi
+
+       einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+MOZ_LANGS=(
+       af ar ast be bg br ca cak cs cy da de dsb
+       el en-CA en-GB en-US es-AR es-ES es-MX et eu
+       fi fr fy-NL ga-IE gd gl he hr hsb hu
+       id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO
+       pa-IN pl pt-BR pt-PT rm ro ru
+       sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW
+)
+
+mozilla_set_globals() {
+       # https://bugs.gentoo.org/587334
+       local MOZ_TOO_REGIONALIZED_FOR_L10N=(
+               fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
+       )
+
+       local lang xflag
+       for lang in "${MOZ_LANGS[@]}" ; do
+               # en and en_US are handled internally
+               if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
+                       continue
+               fi
+
+               # strip region subtag if $lang is in the list
+               if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
+                       xflag=${lang%%-*}
+               else
+                       xflag=${lang}
+               fi
+
+               SRC_URI+=" l10n_${xflag/[_@]/-}? ("
+               SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> 
${MOZ_P_DISTFILES}-${lang}.xpi"
+               SRC_URI+=" )"
+               IUSE+=" l10n_${xflag/[_@]/-}"
+       done
+}
+mozilla_set_globals
+
+moz_clear_vendor_checksums() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -ne 1 ]] ; then
+               die "${FUNCNAME} requires exact one argument"
+       fi
+
+       einfo "Clearing cargo checksums for ${1} ..."
+
+       sed -i \
+               -e 's/\("files":{\)[^}]*/\1/' \
+               "${S}"/third_party/rust/${1}/.cargo-checksum.json || die
+}
+
+moz_install_xpi() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local DESTDIR=${1}
+       shift
+
+       insinto "${DESTDIR}"
+
+       local emid xpi_file xpi_tmp_dir
+       for xpi_file in "${@}" ; do
+               emid=
+               xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
+
+               # Unpack XPI
+               unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
+
+               # Determine extension ID
+               if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
+                       emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; 
s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from install.rdf"
+               elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
+                       emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' 
"${xpi_tmp_dir}/manifest.json")
+                       [[ -z "${emid}" ]] && die "failed to determine 
extension id from manifest.json"
+               else
+                       die "failed to determine extension id"
+               fi
+
+               einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
+               newins "${xpi_file}" "${emid}.xpi"
+       done
+}
+
+mozconfig_add_options_ac() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_add_options_mk() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 2 ]] ; then
+               die "${FUNCNAME} requires at least two arguments"
+       fi
+
+       local reason=${1}
+       shift
+
+       local option
+       for option in ${@} ; do
+               echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
+       done
+}
+
+mozconfig_use_enable() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_enable "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+mozconfig_use_with() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       if [[ ${#} -lt 1 ]] ; then
+               die "${FUNCNAME} requires at least one arguments"
+       fi
+
+       local flag=$(use_with "${@}")
+       mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" 
"${flag}"
+}
+
+virtwl() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument"
+       [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to 
be set; try xdg_environment_reset"
+       tinywl -h >/dev/null || die 'tinywl -h failed'
+
+       local VIRTWL VIRTWL_PID
+       coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo 
$WAYLAND_DISPLAY; read _; kill $PPID'; }
+       local -x WAYLAND_DISPLAY
+       read WAYLAND_DISPLAY <&${VIRTWL[0]}
+
+       debug-print "${FUNCNAME}: $@"
+       "$@"
+       local r=$?
+
+       [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
+       exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
+       return $r
+}
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+               # Ensure we have enough disk space to compile
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif tc-is-lto ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+
+       # Get LTO from environment; export after this phase for use in 
src_configure (etc)
+       use_lto=no
+
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+
+               if tc-is-lto; then
+                       use_lto=yes
+                       # LTO is handled via configure
+                       filter-lto
+               fi
+
+               if use pgo ; then
+                       if ! has userpriv ${FEATURES} ; then
+                               eerror "Building ${PN} with USE=pgo and 
FEATURES=-userpriv is not supported!"
+                       fi
+               fi
+
+               if [[ ${use_lto} = yes ]] ; then
+                       # -Werror=lto-type-mismatch -Werror=odr are going to 
fail with GCC,
+                       # bmo#1516758, bgo#942288
+                       filter-flags -Werror=lto-type-mismatch -Werror=odr
+               fi
+
+               if use pgo || use debug ; then
+                       CHECKREQS_DISK_BUILD="14300M"
+               elif [[ ${use_lto} == "yes" ]] ; then
+                       CHECKREQS_DISK_BUILD="10600M"
+               else
+                       CHECKREQS_DISK_BUILD="7400M"
+               fi
+
+               check-reqs_pkg_setup
+               llvm-r1_pkg_setup
+               rust_pkg_setup
+               python-any-r1_pkg_setup
+
+               # Avoid PGO profiling problems due to enviroment leakage
+               # These should *always* be cleaned up anyway
+               unset \
+                       DBUS_SESSION_BUS_ADDRESS \
+                       DISPLAY \
+                       ORBIT_SOCKETDIR \
+                       SESSION_MANAGER \
+                       XAUTHORITY \
+                       XDG_CACHE_HOME \
+                       XDG_SESSION_COOKIE
+
+               # Build system is using /proc/self/oom_score_adj, bug #604394
+               addpredict /proc/self/oom_score_adj
+
+               if use pgo ; then
+                       # Update 105.0: "/proc/self/oom_score_adj" isn't enough 
anymore with pgo, but not sure
+                       # whether that's due to better OOM handling by Firefox 
(bmo#1771712), or portage
+                       # (PORTAGE_SCHEDULING_POLICY) update...
+                       addpredict /proc
+
+                       # Clear tons of conditions, since PGO is 
hardware-dependant.
+                       addpredict /dev
+               fi
+
+               if ! mountpoint -q /dev/shm ; then
+                       # If /dev/shm is not available, configure is known to 
fail with
+                       # a traceback report referencing 
/usr/lib/pythonN.N/multiprocessing/synchronize.py
+                       ewarn "/dev/shm is not mounted -- expect build 
failures!"
+               fi
+
+               # Google API keys (see 
http://www.chromium.org/developers/how-tos/api-keys)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then
+                       
MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc"
+               fi
+
+               if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then
+                       
MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ"
+               fi
+
+               # Mozilla API keys (see 
https://location.services.mozilla.com/api)
+               # Note: These are for Gentoo Linux use ONLY. For your own 
distribution, please
+               # get your own set of keys.
+               if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then
+                       
MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005"
+               fi
+
+               # Ensure we use C locale when building, bug #746215
+               export LC_ALL=C
+       fi
+
+       export use_lto
+}
+
+src_unpack() {
+       local _lp_dir="${WORKDIR}/language_packs"
+       local _src_file
+
+       if [[ ! -d "${_lp_dir}" ]] ; then
+               mkdir "${_lp_dir}" || die
+       fi
+
+       for _src_file in ${A} ; do
+               if [[ ${_src_file} == *.xpi ]]; then
+                       cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die 
"Failed to copy '${_src_file}' to '${_lp_dir}'!"
+               else
+                       unpack ${_src_file}
+               fi
+       done
+}
+
+src_prepare() {
+       if [[ ${use_lto} == "yes" ]]; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die
+       fi
+
+       # Workaround for bgo#915651 on musl
+       if use elibc_glibc ; then
+               rm -v 
"${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die
+       fi
+
+       eapply "${WORKDIR}/firefox-patches"
+       use loong && eapply "${WORKDIR}/firefox-loong-patches"
+
+       # ICU's subslot change should trigger rebuild on Firefox if it is 
updated 77->78.
+       if use system-icu && has_version ">=dev-libs/icu-78.1" ; then
+               eapply "${FILESDIR}/firefox-146.0.1-icu78.patch" # bgo#967261
+       fi
+
+       # Allow user to apply any additional patches without modifing ebuild
+       eapply_user
+
+       # Make cargo respect MAKEOPTS
+       export CARGO_BUILD_JOBS="$(makeopts_jobs)"
+
+       # Workaround for bgo#915651
+       if ! use elibc_glibc ; then
+               if use amd64 ; then
+                       export RUST_TARGET="x86_64-unknown-linux-musl"
+               elif use x86 ; then
+                       export RUST_TARGET="i686-unknown-linux-musl"
+               elif use arm64 ; then
+                       export RUST_TARGET="aarch64-unknown-linux-musl"
+               elif use loong; then
+                       # Only the LP64D ABI of LoongArch64 is actively 
supported among
+                       # the wider Linux ecosystem, so the assumption is safe.
+                       export RUST_TARGET="loongarch64-unknown-linux-musl"
+               elif use ppc64 ; then
+                       export RUST_TARGET="powerpc64le-unknown-linux-musl"
+               elif use riscv ; then
+                       # We can pretty safely rule out any 32-bit riscvs, but 
64-bit riscvs also have tons of
+                       # different ABIs available. 
riscv64gc-unknown-linux-musl seems to be the best working
+                       # guess right now though.
+                       elog "riscv detected, forcing a riscv64 target for now."
+                       export RUST_TARGET="riscv64gc-unknown-linux-musl"
+               else
+                       die "Unknown musl chost, please post a new bug with 
your rustc -vV along with emerge --info"
+               fi
+       fi
+
+       # Make LTO respect MAKEOPTS
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure || die "Failed 
sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || 
die "Failed sedding multiprocessing.cpu_count"
+
+       sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed 
sedding multiprocessing.cpu_count"
+
+       # sed-in toolchain prefix
+       sed -i \
+               -e "s/objdump/${CHOST}-objdump/" \
+               "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py 
|| die "sed failed to set toolchain prefix"
+
+       sed -i \
+               -e 's/ccache_stats = None/return None/' \
+               "${S}"/python/mozbuild/mozbuild/controller/building.py || die 
"sed failed to disable ccache stats call"
+
+       einfo "Removing pre-built binaries ..."
+
+       find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) 
-print -delete || die
+
+       # Clear checksums from cargo crates we've manually patched.
+       # moz_clear_vendor_checksums xyz
+
+       # Create build dir
+       BUILD_DIR="${WORKDIR}/${PN}_build"
+       mkdir -p "${BUILD_DIR}" || die
+
+       # Write API keys to disk
+       echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
+       echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || 
die
+       echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die
+
+       xdg_environment_reset
+}
+
+src_configure() {
+       # Show flags set at the beginning
+       einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       local have_switched_compiler=
+       if use clang; then
+               # Force clang
+               einfo "Enforcing the use of clang due to USE=clang ..."
+
+               local version_clang=$(clang --version 2>/dev/null | grep -F -- 
'clang version' | awk '{ print $3 }')
+               [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 
"${version_clang}")
+               [[ -z ${version_clang} ]] && die "Failed to read clang version!"
+
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
+
+               AR=llvm-ar
+               CC=${CHOST}-clang-${version_clang}
+               CXX=${CHOST}-clang++-${version_clang}
+               NM=llvm-nm
+               RANLIB=llvm-ranlib
+       elif ! use clang && ! tc-is-gcc ; then
+               # Force gcc
+               have_switched_compiler=yes
+               einfo "Enforcing the use of gcc due to USE=-clang ..."
+               AR=gcc-ar
+               CC=${CHOST}-gcc
+               CXX=${CHOST}-g++
+               NM=gcc-nm
+               RANLIB=gcc-ranlib
+       fi
+
+       if [[ -n "${have_switched_compiler}" ]] ; then
+               # Because we switched active compiler we have to ensure
+               # that no unsupported flags are set
+               strip-unsupported-flags
+       fi
+
+       # Ensure we use correct toolchain,
+       # AS is used in a non-standard way by upstream, #bmo1654031
+       export HOST_CC="$(tc-getBUILD_CC)"
+       export HOST_CXX="$(tc-getBUILD_CXX)"
+       export AS="$(tc-getCC) -c"
+
+       # Configuration tests expect llvm-readelf output, bug 913130
+       READELF="llvm-readelf"
+
+       tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG
+
+       # Pass the correct toolchain paths through cbindgen
+       if tc-is-cross-compiler ; then
+               export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} 
--target=${CHOST} ${BINDGEN_CFLAGS-}"
+       fi
+
+       # Set MOZILLA_FIVE_HOME
+       export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+       # python/mach/mach/mixin/process.py fails to detect SHELL
+       export SHELL="${EPREFIX}/bin/bash"
+
+       # Set state path
+       export MOZBUILD_STATE_PATH="${BUILD_DIR}"
+
+       # Set MOZCONFIG
+       export MOZCONFIG="${S}/.mozconfig"
+
+       # Initialize MOZCONFIG
+       mozconfig_add_options_ac '' --enable-application=comm/mail
+       mozconfig_add_options_ac '' --enable-project=comm/mail
+
+       # Set Gentoo defaults
+       mozconfig_add_options_ac 'Gentoo default' \
+               --allow-addon-sideload \
+               --disable-cargo-incremental \
+               --disable-crashreporter \
+               --disable-disk-remnant-avoidance \
+               --disable-geckodriver \
+               --disable-install-strip \
+               --disable-legacy-profile-creation \
+               --disable-parental-controls \
+               --disable-strip \
+               --disable-tests \
+               --disable-updater \
+               --disable-valgrind \
+               --disable-wmf \
+               --enable-dbus \
+               --enable-js-shell \
+               --enable-negotiateauth \
+               --enable-new-pass-manager \
+               --enable-official-branding \
+               --enable-packed-relative-relocs \
+               --enable-release \
+               --enable-system-policies \
+               --host="${CBUILD:-${CHOST}}" \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               --prefix="${EPREFIX}/usr" \
+               --target="${CHOST}" \
+               --without-ccache \
+               --without-wasm-sandboxed-libraries \
+               --with-intl-api \
+               --with-libclang-path="$(llvm-config --libdir)" \
+               --with-system-ffi \
+               --with-system-gbm \
+               --with-system-libdrm \
+               --with-system-nspr \
+               --with-system-nss \
+               --with-system-pixman \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system
+
+       # Set update channel
+       local update_channel=release
+       [[ -n ${MOZ_ESR} ]] && update_channel=esr
+       mozconfig_add_options_ac '' --enable-update-channel=${update_channel}
+
+       # Whitelist to allow unkeyworded arches to build with 
"--disable-rust-simd" by default.
+       if use amd64 || use arm64 || use loong ; then
+               mozconfig_add_options_ac '' --enable-rust-simd
+       fi
+
+       # For future keywording: This is currently (97.0) only supported on:
+       # amd64, arm, arm64 & x86.
+       # Might want to flip the logic around if Firefox is to support more 
arches.
+       # bug 833001, bug 903411#c8
+       if use loong || use ppc64 || use riscv ; then
+               mozconfig_add_options_ac '' --disable-sandbox
+       else
+               mozconfig_add_options_ac '' --enable-sandbox
+       fi
+
+       # riscv-related options, bgo#947337, bgo#947338
+       if use riscv ; then
+               mozconfig_add_options_ac 'Disable JIT for RISC-V 64' 
--disable-jit
+               mozconfig_add_options_ac 'Disable webrtc for RISC-V' 
--disable-webrtc
+       fi
+
+       if [[ -s "${S}/api-google.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 
}') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-safebrowsing-api-keyfile="${S}/api-google.key"
+       else
+               einfo "Building without Google API key ..."
+       fi
+
+       if [[ -s "${S}/api-location.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 
}') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       
--with-google-location-service-api-keyfile="${S}/api-location.key"
+       else
+               einfo "Building without Location API key ..."
+       fi
+
+       if [[ -s "${S}/api-mozilla.key" ]] ; then
+               local key_origin="Gentoo default"
+               if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 
}') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then
+                       key_origin="User value"
+               fi
+
+               mozconfig_add_options_ac "${key_origin}" \
+                       --with-mozilla-api-keyfile="${S}/api-mozilla.key"
+       else
+               einfo "Building without Mozilla API key ..."
+       fi
+
+       mozconfig_use_with system-av1
+       mozconfig_use_with system-harfbuzz
+       mozconfig_use_with system-harfbuzz system-graphite2
+       mozconfig_use_with system-icu
+       mozconfig_use_with system-jpeg
+       mozconfig_use_with system-libevent
+       mozconfig_use_with system-libvpx
+       mozconfig_use_with system-pipewire
+       mozconfig_use_with system-png
+       mozconfig_use_with system-webp
+
+       if use system-librnp; then
+               mozconfig_add_options_ac "+system-librnp" 
--enable-compile-environment
+               mozconfig_use_with system-librnp
+       else
+               # This controls the backend of the bundled librnp. Choices are 
"botan" and "openssl".
+               # RNP Upstream recommends to use botan. In Gentoo it's 
preferred to use system-librnp.
+               mozconfig_add_options_ac "+bundled librnp backend = botan" 
--with-librnp-backend="botan"
+       fi
+
+       mozconfig_use_enable libproxy
+
+       use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme
+
+       if use hardened ; then
+               mozconfig_add_options_ac "+hardened" --enable-hardening
+               append-ldflags "-Wl,-z,relro -Wl,-z,now"
+
+               # Increase the FORTIFY_SOURCE value, #910071.
+               sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' 
"${S}"/build/moz.configure/toolchain.configure || die
+       fi
+
+       local myaudiobackends=""
+       use jack && myaudiobackends+="jack,"
+       use sndio && myaudiobackends+="sndio,"
+       use pulseaudio && myaudiobackends+="pulseaudio,"
+       ! use pulseaudio && myaudiobackends+="alsa,"
+
+       mozconfig_add_options_ac '--enable-audio-backends' 
--enable-audio-backends="${myaudiobackends::-1}"
+
+       mozconfig_use_enable wifi necko-wifi
+
+       if use X && use wayland ; then
+               mozconfig_add_options_ac '+x11+wayland' 
--enable-default-toolkit=cairo-gtk3-x11-wayland
+       elif ! use X && use wayland ; then
+               mozconfig_add_options_ac '+wayland' 
--enable-default-toolkit=cairo-gtk3-wayland-only
+       else
+               mozconfig_add_options_ac '+x11' 
--enable-default-toolkit=cairo-gtk3-x11-only
+       fi
+
+       if [[ ${use_lto} == "yes" ]] ; then
+               if use clang ; then
+                       # Upstream only supports lld or mold when using clang.
+                       if tc-ld-is-mold ; then
+                               # mold expects the -flto line from *FLAGS 
configuration, bgo#923119
+                               append-ldflags "-flto=thin"
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+                       fi
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+               else
+                       # ThinLTO is currently broken, see bmo#1644409.
+                       # mold does not support gcc+lto combination.
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # lld is upstream's default
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+                       fi
+
+               else
+                       if tc-ld-is-mold ; then
+                               mozconfig_add_options_ac "using ld=mold due to 
system selection" --enable-linker=mold
+                       else
+                               mozconfig_add_options_ac "linker is set to bfd 
due to USE=-clang" --enable-linker=bfd
+                       fi
+               fi
+       fi
+
+       if use pgo ; then
+               mozconfig_add_options_ac '+pgo' MOZ_PGO=1
+
+               if use clang ; then
+                       # Used in build/pgo/profileserver.py
+                       export LLVM_PROFDATA="llvm-profdata"
+               fi
+       fi
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+               mozconfig_add_options_ac '+debug' --enable-jemalloc
+               mozconfig_add_options_ac '+debug' --enable-real-time-tracing
+       else
+               mozconfig_add_options_ac 'Gentoo defaults' 
--disable-real-time-tracing
+
+               if is-flag '-g*' ; then
+                       if use clang ; then
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
+                       else
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
+                       fi
+               else
+                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
+               fi
+
+               if is-flag '-O0' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
+               elif is-flag '-O4' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
+               elif is-flag '-O3' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
+               elif is-flag '-O1' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
+               elif is-flag '-Os' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
+               else
+                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
+               fi
+       fi
+
+       # Debug flag was handled via configure
+       filter-flags '-g*'
+
+       # Optimization flag was handled via configure
+       filter-flags '-O*'
+
+       # elf-hack
+       # Filter "-z,pack-relative-relocs" and let the build system handle it 
instead.
+       if use amd64 || use x86 ; then
+               filter-flags "-z,pack-relative-relocs"
+
+               if tc-ld-is-mold ; then
+                       # relr-elf-hack is currently broken with mold, 
bgo#916259
+                       mozconfig_add_options_ac 'disable elf-hack with mold 
linker' --disable-elf-hack
+               else
+                       mozconfig_add_options_ac 'relr elf-hack' 
--enable-elf-hack=relr
+               fi
+       elif use loong || use ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on loong/ppc64/riscv,
+               # see bgo #917049, #930046
+               :;
+       else
+               mozconfig_add_options_ac 'disable elf-hack on non-supported 
arches' --disable-elf-hack
+       fi
+
+       if ! use elibc_glibc; then
+               mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
+       fi
+
+       # System-av1 fix
+       use system-av1 && append-ldflags "-Wl,--undefined-version"
+
+       # Make revdep-rebuild.sh happy; Also required for musl
+       append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
+
+       # Pass $MAKEOPTS to build system
+       export MOZ_MAKE_FLAGS="${MAKEOPTS}"
+
+       # Use system's Python environment
+       export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach
+
+       export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
+
+       # Disable notification when build system has finished
+       export MOZ_NOSPAM=1
+
+       # Portage sets XARGS environment variable to "xargs -r" by default which
+       # breaks build system's check_prog() function which doesn't support 
arguments
+       mozconfig_add_options_ac 'Gentoo default' 
"XARGS=${EPREFIX}/usr/bin/xargs"
+
+       # Set build dir
+       mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}"
+
+       # Show flags we will use
+       einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
+       einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}"
+       einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
+       einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}"
+       einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
+
+       # Handle EXTRA_CONF and show summary
+       local ac opt hash reason
+
+       # Apply EXTRA_ECONF entries to $MOZCONFIG
+       if [[ -n ${EXTRA_ECONF} ]] ; then
+               IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!}
+               for opt in "${ac[@]}"; do
+                       mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--}
+               done
+       fi
+
+       echo
+       echo "=========================================================="
+       echo "Building ${PF} with the following configuration"
+       grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do
+               [[ -z ${hash} || ${hash} == \# ]] \
+                       || die "error reading mozconfig: ${ac} ${opt} ${hash} 
${reason}"
+               printf "    %-30s  %s\n" "${opt}" "${reason:-mozilla.org 
default}"
+       done
+       echo "=========================================================="
+       echo
+
+       ./mach configure || die
+}
+
+src_compile() {
+       local virtx_cmd=
+
+       if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then
+               # increase ulimit with mold+lto, bugs #892641, #907485
+               if ! ulimit -n 16384 1>/dev/null 2>&1 ; then
+                       ewarn "Unable to modify ulimits - building with 
mold+lto might fail due to low ulimit -n resources."
+                       ewarn "Please see bugs #892641 & #907485."
+               else
+                       ulimit -n 16384
+               fi
+       fi
+
+       if use pgo; then
+               # Reset and cleanup environment variables used by GNOME/XDG
+               gnome2_environment_reset
+
+               addpredict /root
+
+               if ! use X; then
+                       virtx_cmd=virtwl
+               else
+                       virtx_cmd=virtx
+               fi
+       fi
+
+       if ! use X; then
+               local -x GDK_BACKEND=wayland
+       else
+               local -x GDK_BACKEND=x11
+       fi
+
+       ${virtx_cmd} ./mach build --verbose || die
+}
+
+src_install() {
+       # xpcshell is getting called during install
+       pax-mark m \
+               "${BUILD_DIR}"/dist/bin/xpcshell \
+               "${BUILD_DIR}"/dist/bin/${PN} \
+               "${BUILD_DIR}"/dist/bin/plugin-container
+
+       DESTDIR="${D}" ./mach install || die
+
+       # Upstream cannot ship symlink but we can (bmo#658850)
+       rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
+       dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
+
+       # Don't install llvm-symbolizer from llvm-core/llvm package
+       if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
+               rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die
+       fi
+
+       # Install policy (currently only used to disable application updates)
+       insinto "${MOZILLA_FIVE_HOME}/distribution"
+       newins "${FILESDIR}"/distribution.ini distribution.ini
+       newins "${FILESDIR}"/disable-auto-update.policy.json policies.json
+
+       # Install system-wide preferences
+       local PREFS_DIR="${MOZILLA_FIVE_HOME}/defaults/pref"
+       insinto "${PREFS_DIR}"
+       newins "${FILESDIR}"/gentoo-default-prefs-r1.js gentoo-prefs.js
+
+       local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js"
+
+       # Force hwaccel prefs if USE=hwaccel is enabled
+       if use hwaccel ; then
+               cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
+               >>"${GENTOO_PREFS}" \
+               || die "failed to add prefs to force hardware-accelerated 
rendering to all-gentoo.js"
+
+               if use wayland; then
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel wayland prefs"
+                       pref("gfx.x11-egl.force-enabled",          false);
+                       EOF
+               else
+                       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
hwaccel x11 prefs"
+                       pref("gfx.x11-egl.force-enabled",          true);
+                       EOF
+               fi
+       fi
+
+       # Set dictionary path to use system hunspell
+       cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
spellchecker.dictionary_path pref"
+       pref("spellchecker.dictionary_path",       
"${EPREFIX}/usr/share/myspell");
+       EOF
+
+       # Force the graphite pref if USE=system-harfbuzz is enabled, since the 
pref cannot disable it
+       if use system-harfbuzz ; then
+               cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set 
gfx.font_rendering.graphite.enabled pref"
+               sticky_pref("gfx.font_rendering.graphite.enabled", true);
+               EOF
+       fi
+
+       # Install language packs
+       local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name 
'*.xpi') )
+       if [[ -n "${langpacks}" ]] ; then
+               moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" 
"${langpacks[@]}"
+       fi
+
+       # Install icons
+       local icon_srcdir="${S}/comm/mail/branding/thunderbird"
+       local icon_symbolic_file="${icon_srcdir}/TB-symbolic.svg"
+
+       insinto /usr/share/icons/hicolor/symbolic/apps
+       newins "${icon_symbolic_file}" ${PN}-symbolic.svg
+
+       local icon size
+       for icon in "${icon_srcdir}"/default*.png ; do
+               size=${icon%.png}
+               size=${size##*/default}
+
+               if [[ ${size} -eq 48 ]] ; then
+                       newicon "${icon}" ${PN}.png
+               fi
+
+               newicon -s ${size} "${icon}" ${PN}.png
+       done
+
+       # Install menu
+       local app_name="Mozilla ${MOZ_PN^}"
+       local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
+       local exec_command="${PN}"
+       local icon="${PN}"
+       local use_wayland="false"
+
+       if [[ -n ${MOZ_ESR} ]] ; then
+               local desktop_filename="${PN}-esr.desktop"
+       else
+               local desktop_filename="${PN}.desktop"
+       fi
+
+       if use wayland ; then
+               use_wayland="true"
+       fi
+
+       cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
+
+       sed -i \
+               -e "s:@NAME@:${app_name}:" \
+               -e "s:@EXEC@:${exec_command}:" \
+               -e "s:@ICON@:${icon}:" \
+               "${WORKDIR}/${PN}.desktop-template" || die
+
+       newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}"
+
+       rm "${WORKDIR}/${PN}.desktop-template" || die
+
+       # Install wrapper script
+       [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}"
+       newbin "${FILESDIR}/${PN}-r1.sh" ${PN}
+
+       # Update wrapper
+       sed -i \
+               -e "s:@PREFIX@:${EPREFIX}/usr:" \
+               -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
+               "${ED}/usr/bin/${PN}" || die
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if ver_replacing -lt 136.0 ; then
+               elog "In this version of Thunderbird, upstream introduced an 
in-app notification"
+               elog "system. Setting pref 'mail.inappnotifications.enabled' to 
false and nullifying"
+               elog "'mail.inappnotifications.url' may help you avoid these 
messages, if you don't"
+               elog "wish to receive them."
+       fi
+
+       optfeature_header "Optional programs for extra features:"
+       optfeature "desktop notifications" x11-libs/libnotify
+       optfeature "encrypted chat support" net-libs/libotr
+       optfeature "fallback mouse cursor theme e.g. on WMs" 
gnome-base/gsettings-desktop-schemas
+}

Reply via email to