commit:     565073d398e3a43df1a7c211f0957123d16711f4
Author:     xor <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Wed Jan 13 02:40:28 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 15:35:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=565073d3

mail-client/thunderbird: bump to 78.6.1 for CVE-2020-16044

Bug: https://bugs.gentoo.org/765088
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/19047
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 mail-client/thunderbird/Manifest                  |   65 ++
 mail-client/thunderbird/thunderbird-78.6.1.ebuild | 1053 +++++++++++++++++++++
 2 files changed, 1118 insertions(+)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 8c4378ab81d..7bab30dd80d 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -64,3 +64,68 @@ DIST thunderbird-78.6.0-vi.xpi 674599 BLAKE2B 
dcc41dcfcb211f9362b92dde02fffecc83
 DIST thunderbird-78.6.0-zh-CN.xpi 687180 BLAKE2B 
4b662680445032e207b21136af182358b4d353d487baa42022f42b4ce0a9d413fcf7ddfd7b5a0ec6418c38d6979eb8adfbe5c435632873642f9f25a8614b9c90
 SHA512 
4655c5b71b75a483779b1ee974961f2f11f70d4f3ff60e0d7422681a6fc14ef7b44c7e1ac409c319081b88bdf4a76fa6dc3ca51fe19a0ec87b0df8716674439d
 DIST thunderbird-78.6.0-zh-TW.xpi 687618 BLAKE2B 
56a70374a090c6e8118d513dc3f55e7b8b4dc51853cf8a243f369de3f5449a311d9da6b789d4ea326b36db4f386a0926964a3d3d8f64656a2a037dc3e8b45221
 SHA512 
26ae0da18bd99aa0bbb32fcc5a8e5cb2e22cf60bdef93be2805174c85a1372f59b3099fed24ee5d88c754ada0293fcac8d3ad2d029a622240d583ddfaca87da2
 DIST thunderbird-78.6.0.source.tar.xz 353496712 BLAKE2B 
71cba995bc99181c7bee5ad99c3441301f12b79d4db3491d79df3c89f06927ab62261a12cbaae0031bce880f817eee9d35b3e2a66acfd3c070b902f6db1c25e6
 SHA512 
36194e8bf58117d8accbd6d8dc52a6241d8c572c023db1b271db3b73098652a608da28134865099792fbeb0a2f0d3705d98093447b64fa19eab7efb3e3bdd421
+DIST thunderbird-78.6.1-af.xpi 548339 BLAKE2B 
0702395342f4e20246550d4cbdf0a4733879f1f72f7ab430f4c6998ca8e827219d27e825f989f4534be0984d25deb736756855de02187f9cf9f6356cd9eb14dc
 SHA512 
bfc97747475389b26dbe18bea983b0d211b98cfeaeaa8ebce2719b6d2da50a7b84d8741bd9df5902a0adcca95a9091b9b75c1069455627d6f2cb350b84e00000
+DIST thunderbird-78.6.1-ar.xpi 648611 BLAKE2B 
a05ef5bed6f66a1ecba92c7de0f192f43378313bfa2d59d54506f5fb80ee8ac5fe1d0b119a23f26a3769d8a29c06f1deb849728a7d18b04733223aab23090332
 SHA512 
fb6f5c18cff61b7ca52743425efeab85bc7573c21193ca8e16558cb91bf7b6e8b8be5fcd56700fffe55dce1239dd0829e55e0916399cb79b686526d58b0dfbbb
+DIST thunderbird-78.6.1-ast.xpi 561254 BLAKE2B 
3936ea67b3466e7ad2e09880b85ceaf424523673fddf30bfa7526521e23461fe93bdc25b477c98a3887eb309372fd0361b7561c6272536859d18807d312f3256
 SHA512 
ad82892abe2e30ccaad2cc9b54bafdd245f5b6214f6f2aa854e3b40019e81ee25c945ec66fbe29ce8f737dde4e6b7ed8bc45d409c62ad9cdea0d0358803c2870
+DIST thunderbird-78.6.1-be.xpi 666677 BLAKE2B 
336a83cdf448e47919b71ef1086e0b37b05612797f469c93314e74223e4b3d9cf6530e7bf3786e16cf19476529bafd6afddcc236a05785a94c6dff2f7742e494
 SHA512 
bf29d3d562b22123a11d0347786a3f2e7da7dc8bf2d2b1a299eca48e309adc6deabc7684f1b8a7d436d91cac151dc4290adf2850e95cf47c349d4427f303ce38
+DIST thunderbird-78.6.1-bg.xpi 672420 BLAKE2B 
a5809108c9939fc1104b93bc48d8365e35cc30d6478873968b23217deffb004830a76860bf3a37737fe3c883d37af99c39c7077cc6f8b0f8efb96c757d0aec3a
 SHA512 
8b9af3134954b8c47d11fee37274011588a337ffbc3fde3148dd67794bab93da80d9814cacaadbbd5149f2337c4bb1ff1b94590ae7f7638a0a641c8688cc214e
+DIST thunderbird-78.6.1-br.xpi 604516 BLAKE2B 
54c32341dd8d4e6379dbb5400acde2259968fcde2b6095beedbf0ff36ba832dc9159ffd0c08c43bc39576d7b3d8512c6641133feda67e82235e5523bd6ac422d
 SHA512 
a387b40d6cd90e790cd20ab2a57ce5614fc43eae1027c54fb83bc205c42445edbc0d237d253c853c58e2cea8c28035f4063e16a6aa9de0d3e27a57e87b181b61
+DIST thunderbird-78.6.1-ca.xpi 620452 BLAKE2B 
5ac11dde1bccd137f370d3c51a80dd2949d52cd0e39ab1d5738a7588e746782f18168bc58ecc702a48d911cdd54e088a1e6e71a75fc84effc9a0d85528186bad
 SHA512 
f5897c4e70ab96a2939c663db2b74aaf868b242b9792b3c479c6cafeb0730f98a590689c9c17cdfd127116099b27386e876d7713c9450cfd6d52287611922404
+DIST thunderbird-78.6.1-cak.xpi 635652 BLAKE2B 
adeab0e29b19555a93e433095e574d370835d6c53667862193d7dbf2e2be2bd3c775f646f161cab68d0eaf7730dd1b4c11acea1c72b368bdeed586ea84a1f550
 SHA512 
328cd44e49c13e301a59434fcad9aff773dbda187b0f4614494d28bc937ff9173df313d183265348efbc236bfa965d49b4fd1493a99435aa441bb0bef4d5a720
+DIST thunderbird-78.6.1-cs.xpi 635338 BLAKE2B 
56d68b02b75d09db0f191736a543bbbcc7ea219ac247dad89ddf4242be97074ed3078c90970d574a35230803acb01de67cd4cc98f3b482a97d948ce4353ce0d4
 SHA512 
da8d60da7bd9d8e84cdbd9aeb071568c28bd0e963b4dc011e94e08480dfab320de859bc95a2e91b48517b0dfde67177382f528a421da045c487f309323f8b338
+DIST thunderbird-78.6.1-cy.xpi 646247 BLAKE2B 
5513c77cb0a4b1b024a657abcbd6b5b83b9c448910618ddda61be6092fcf4e34b935d877c68cfdeab8f7d716a15ccf183c697c8dd17679e813f996f641561f60
 SHA512 
ce4c63649e81062bd060e2376167b1dfc8b2e453aa66e458f43c6c535ed510b2ccd084358eda25e78394b76d6fe14dcc3bf260ddaffee099f8f4a510811c79f9
+DIST thunderbird-78.6.1-da.xpi 620995 BLAKE2B 
1abd5047f1d881464e5cd79bae249f3b72d7b37fc56c4533cc8a69c2dcefce87bb0828563b2133a1ea75cbb20b7c66b007ff7b87f0352831f27878335e118d8e
 SHA512 
ff925fa534badd6114d97be8baa18df9907c998424f0a9bccd6b7363a060d815899357bdd71915e18eb34bcf9ab4700d97b4dbb6c35c751009a173eee9817e8b
+DIST thunderbird-78.6.1-de.xpi 665196 BLAKE2B 
07a2d1b063fe37c04bbd9fec2b759b2176ab799979e18eef291c2d8880873a489b14ace271869f5e937bdc37824c7c166df7f544ff8d36f2234f5d188590a086
 SHA512 
efce8574a66d6e90b8487fd3283559502829b5710dcfaed6468026f96a2dacd9e41e1658c11183a662f8196d5e0489ca5d46d7fd7fa3dd8be8201c1fbbcc2806
+DIST thunderbird-78.6.1-dsb.xpi 666775 BLAKE2B 
61427ca4c8aca1481a864a793bdf7c71bd06ac9e248efcfea5edd78727c2e0fde9990c2403ecfb3a2a2425d0c9dc4a540cd36f5fdcbdd5b754dcac3e7718a951
 SHA512 
66ed6a2d26271aa2adcc5f04ec45bfdd4bacde86cb74020be185a88acce4bd5fb31f366d9f34d3f5007dbae3041bdf7560ad7efa1b43ea323deff225cfc584b3
+DIST thunderbird-78.6.1-el.xpi 774453 BLAKE2B 
1d73f2d543f149e96ec6892140136a472647ac4bd8b4030d319a7618655dfd155f006ad1e89d39de25575be9dc559f3d81c0ed767f080e28aaee075471179c12
 SHA512 
0e779010192f96f7dfb260fdbae942048a15a635682354c58e9f7ea88d4a5b9ab7fc89b891e9b83f0cf5542318a16fa37bf6c823bc0f55ab1f4d9a0423fa05eb
+DIST thunderbird-78.6.1-en-CA.xpi 611775 BLAKE2B 
4809d1d9dc86fcba7082fd4bb888c924ecb6bc70a707d1b31c9582d5eec3e56b9722e2387c5ffea7f929bfec915f5eff9e22f0c6b1695143e0e112895b771e1e
 SHA512 
ac602e248abbdfe66858b544fb53d6c38d11988682617b6b21de0aee1c582cb9e5c7b4c7fa735087d29a857ea8e794501cd96118aa68dccf2960c7aa2e7d77a5
+DIST thunderbird-78.6.1-en-GB.xpi 611185 BLAKE2B 
e7547970744420a2cb241476b85434a84bb221be6956c8583c2dae687e938176ba299bc27fdeed8a97484beb1ca84cbce6b823e2dade43fc862f9a1dcc05ae83
 SHA512 
d8f914252e7e8d9f3267d1b85f8c798ca42e1c9eceb695eaf3d6b71bba7794ebb12e30ea15523cdace33ad55758f504ae6f4ac91571d7bd95f6bee67eea96824
+DIST thunderbird-78.6.1-es-AR.xpi 657784 BLAKE2B 
e29522355346bfde7bf7bb43014f85a39dd94623e5709db7a9fdd2248f4b160162acb17ebb5251585f5992c6b9d938e69b3f749b4331526efafc21d0efa79caa
 SHA512 
8459f2c6fd57dd4109b5d41b412f95e2caf3f76b7005a2e45803139d16d0c99301ae123fbb8ce391cd8c9055e5aacac1189698ff8b9ad05e0d67eafbc7dc467c
+DIST thunderbird-78.6.1-es-ES.xpi 569804 BLAKE2B 
bd3148312fc5d2f44ae80a337dc55beac789d3982e15eff889df368992995aeb6de0220fe59caca85cba9cbf941563331918e4ba4b1dae4194863290cf22f425
 SHA512 
940ad9cd539159b6f4a15213274e2dc202ca8291883c8f7cfcd99a4c057d704c87061ea43a3d05ed82cdf6cb15aecc232befafc922829e0060c5579c9d07711b
+DIST thunderbird-78.6.1-et.xpi 597719 BLAKE2B 
95572389dad231e701d890f4e59b450ee629ba99375e2764763fc87cb9e8aa035bc7566537db92f6f0b5518a77155614d4f4f0ab72eb685c0cb58e1f86b0efcf
 SHA512 
aedb8a69cd9ada611df998fd1ecccfd680673f55be6b67f145680b53d0ff579ec8e5c59c04ce2380723ebe8159521c32f93cfaaa66467757faec2e2e60a58bd8
+DIST thunderbird-78.6.1-eu.xpi 632967 BLAKE2B 
00eb014ea22a8862cec1033ae6dc047b4a0f08251703119f0fcef6efcea1758f25aeb33271565c6ffe19edfb2c06215251c9244b595bb1a54463ee3d15b47055
 SHA512 
f201053409332ddf4795c6a120c8b501975b8b56d40de724384630d48fbdd5cd2963285c34a434046f35814ceb3935088e51b3be002bd6ae6f9fdd16a3978330
+DIST thunderbird-78.6.1-fa.xpi 639744 BLAKE2B 
9e671dc6a7b93fcd3a7e00ea73d7e8627b93576184c9deb0ca942fdc0dd5d6acbfd1a4dcda365b5f8d0e56334a8c51ed2fac48c83a78fc57e535cb30df5ae8d3
 SHA512 
397b97dd85009fbbf97a3ccb963f92f06bf63248d6c32b078165f9ea0a1484ae3c202b899542f4556f25775c24ea2302465a31d6e93d4349f1b75c74ba81b510
+DIST thunderbird-78.6.1-fi.xpi 642451 BLAKE2B 
b6ddead26dfa2baa47cd86bf755299e1540f824e2f81feb0d401c9340371a770b8f632361f92cb89d991ae576ecc6be03c37aceb1b754c987c7f858efb9cfc87
 SHA512 
0ea8297cef463ac11069212bdbfb4dfa44789e282b4b1c54ce152786aeb3f92c72196c4f376fa0c59045136e224e27bfc44ab06b6b45259c2d2a2f7085e83510
+DIST thunderbird-78.6.1-fr.xpi 669501 BLAKE2B 
6465f98d2acd0a178a419e10b80a89be4eb58904776d914677afb8f08c33f7e56ce3cb2775977a484570f685d675b660bcf505eca0dfb9a27ebcd279ad95c3b4
 SHA512 
a389bd39e1ee0d0bddb96e542b3bfcd3ba708b32b9a38d95ef6a076f0f2abbaa504c243d46abeb71ac2aba28a45864b8fb1c24cfc6fbbac84d124f6b7a52d09d
+DIST thunderbird-78.6.1-fy-NL.xpi 653079 BLAKE2B 
7c1d759ca0a088585a0d4d1cbdbe8c0e429ddfaca5c299788741f3f79dddf40c0aaa1e398df76e3768f61315def9c2911e020dc9093ad4f8f080c64f9cbed62d
 SHA512 
11cca649f12a27e54749342cbebbfb8919ef30a28e1e78672650b7efb45224f23b7b0c1af3c5341934b6cdaf27bc4fca9e44252ef3eb6688bf403c15946505fb
+DIST thunderbird-78.6.1-ga-IE.xpi 600706 BLAKE2B 
5c4441b31c77e8654f4e11dcda00ad4c95a6b630196d8a10e69d729ff4a65b33c213ffdcc7a447020df5696bafa03e11e998aebf459a93b48ab115855fba2655
 SHA512 
fa88b6d97c4a210f040c6defa1c834af6ff49912ac5b5b38f908809e8bff59c1a1cb1f91f80feead7e66b6035a6e8e98c220f1de84fb3a782cfe4fa28120c4c3
+DIST thunderbird-78.6.1-gd.xpi 609380 BLAKE2B 
baf66f4879a0b82da4c8a10760f00132eb675f833a8d9732faebd29f6bf881fea5ab86e06d9b939c2a80ba0415d38d530fef26130d8f3e724985eb9916540e41
 SHA512 
0bd39f37e5bceacd0690ded7608501d5f2173fa437aba755ca51176d73e3a82f7ce5cde0ecaaa6b1199e2604ea497bc03f67f4464a165bf3e26de35ca623ec26
+DIST thunderbird-78.6.1-gl.xpi 615719 BLAKE2B 
b852ab7db18b6e35b950f791dab91937e5678317545c4a1982e4c9335594ae40fa2b15d829374bb1d3d042184758ed88b7fdb28d12ea363a7a35667372d283d7
 SHA512 
2a6009e9e596ca41c47a18ca0a804e1d7e58a10ae240c22922faee209bb597d382531dede9bd317955597c625aafd47044adc5827e92a8fa9f621b2ce265de0c
+DIST thunderbird-78.6.1-he.xpi 640493 BLAKE2B 
9adbfdfd9029d7f3295a08643cb802e261631ea1e6321d8cef9f18911d92743513325b471c2b3de1350cac50f13acfc21bd38a218ce70f715b13a9ea755f7e3a
 SHA512 
0f03ae87b60617167158a1b8863701473e6ef03bc64769d83edfddd1912deb43faac2de1ee37c75a697e69bca7b8d06c3a68b0fc6106c82d7c0a91de685bd360
+DIST thunderbird-78.6.1-hr.xpi 629032 BLAKE2B 
da9d0856bd33a7b12081c329e3721193256cf77e11d9040419b27101d2e3713a86049e164480444c02bbd1c02b0fca6337190651b1bd8fec698ea0d4314e1b61
 SHA512 
9f95d9fb18b66bfd17091148e3555e4868421da6aafa152b2d5de9928250c6db29a294accd2d3f8c22349816da433a69e77f2f80b471b1673d64af485e081679
+DIST thunderbird-78.6.1-hsb.xpi 668604 BLAKE2B 
1fe2f5b87fd387d4d94eecde897cf7e6639aa2e4ae09986be96d6cc4819607e01f84d9005dbdf765d5e26b65cc0431d5ba387e9be1b713b1099fb23c10f665d9
 SHA512 
00a98a197217f26708222701115e9292aec43d66032931465db88900d64edf0208ca4b4e6b418713f3d82a3c813fbabfdebcbff98a28223c6a91d69121569418
+DIST thunderbird-78.6.1-hu.xpi 679840 BLAKE2B 
eb2808d6901aea571aff052b0357a433ea40f6549d9733d5b9c619d94a8d506a4a5f614c9c5de9365ee0bd3d828ea12f5e72cac0a8dde6b90d8698dcd2a2c926
 SHA512 
4f8e83923e66f00913a4e608fc7cab4686fe0ab78568ec03b6c91d723c1602226cfde9c88fdfdf0fb627db02d065f0a790d3c4dc823b74b184853f6bb0a85789
+DIST thunderbird-78.6.1-hy-AM.xpi 713330 BLAKE2B 
4396a7d75a7d52baa25b170f01c840db19e9ff9cda1cbd7beffb8fd889c5f9e416623b3cf34513e70da12c164a97d60f2b6bce43edb45f8fe10a208b61389932
 SHA512 
6f6dabc061f339d0d90a34bcf3ba46f7dd0f391d985c9ef14ad082cd8b3a1f3a0c7d93edc8c42a98a2bacca6a1138e905d06e137c38ddb4ae7e75b9ce8a01a00
+DIST thunderbird-78.6.1-id.xpi 620682 BLAKE2B 
f35b50df580212c552474b81f331406970ada902651622639e636bb9ec0184f26fdf7804645b98ad9ef548afe1323617271fbccf484df9cf2c8a60107ee17d16
 SHA512 
215658eac2eb7b51431dd7a065b90fbb62b0fd3342da9cc1836a7445661e06ede0bad2c491a5a019b991c4cc7fe5272cb876ec4b16ecf8b367d8ab9d455669d6
+DIST thunderbird-78.6.1-is.xpi 581649 BLAKE2B 
388b0c2fe807c2cf5aa31e5a57a1e44b968f059350b733303d3df8dffd56c5091b38200a4d6d75cc35eaca5832142c2d3fffb3e1bcdb19999371a36672f72417
 SHA512 
8d044d733442a48a8208576f547d63f29b8f0c292559e7f10c8f04122e2348a2821bdd4b9261ae7fba138a9e96c480f890f1dca6a4b630f55300d52ada9288bd
+DIST thunderbird-78.6.1-it.xpi 572958 BLAKE2B 
0b0c0115e4169087c9fd962085ed5232b02764185dc4b2964d40cbf3ccb9f35fabad1baec24e1593fd9dbf2621c01291c4306aa78d871a79942a60a9c167822d
 SHA512 
48ecc84509128aad59d90a88bd9f89b67be1366ba100520a19356d8c4afeb6d7498bbe838a718b4f2a86429455290b71bf2fb2f36e0ff121ea3cb29731fe683f
+DIST thunderbird-78.6.1-ja.xpi 722446 BLAKE2B 
92b66c92e1eb9e6e2960cef8302cd7098a64064feb23f4a1e506fc791e7aed33ec5f1bdfddbb70fbda1f7fce0e0f9fcb8d0cb7e408a82a4b13682717b1b307f5
 SHA512 
7cf6b2ed3da796d89ab73bc7db2ad11bba96ef22e589df9a7ed6773b591189afb94f594b4af1175fd2db46fa369e17ed4527bb2f1dda46fe2dd7f58f5977952f
+DIST thunderbird-78.6.1-ka.xpi 717016 BLAKE2B 
755f14bd03138a00be0d863a0e04c01148fd0691817b42e9d26bf18ca3d347b980faa16e53d419fcfcf382447cfeabae45ed7445ecce841d336526ce1b4033cc
 SHA512 
58c582eaca90cef841ee02224412c2c1016a11d41d0664f3f37af9a410b7d66ae16c9e1fa4e6d1a8da0e33d61c63ecacb173d69037f8a507889c70715c9f6696
+DIST thunderbird-78.6.1-kab.xpi 651926 BLAKE2B 
da0c1daa58b1b6b9e2f90b4e01a78518d4db7281cf2f48eb10a0c21422bb90bf6bc3f8f318674c6c8baee2a321a6c901d1a837a72751e9102b0710ff9dd7f3da
 SHA512 
c4cb1f458e82880e1097233864cebf5501031fd3172a92c2c824d604d6198d87255f658768119a837354526ffd2ae6c3f2d41229c3f548bf52f95d997bb497d9
+DIST thunderbird-78.6.1-kk.xpi 720461 BLAKE2B 
d4ae543c89f7577091fdc2c6d7b8fd3863a69d6af94e5654a73db57ae59d1ec646d47ba79d5e5d00feb4900f2dd0321f2f0bfc53ea6f7d2f3971b8fa82a72d56
 SHA512 
0a2168349dff87f315c8e013456659a2e341c342cbeef251fd86cf79ac3a4c7eab34da706487aa5d2a94e5abb92c8f5a8f1923c72517f0a74f6624137aced024
+DIST thunderbird-78.6.1-ko.xpi 688201 BLAKE2B 
d863d005de32c8aba1620fe9af86d4541cbd070f95c508ddc424530a7ea70a37c5bb02c75b7c928182f24c9404f05942f7d52067bc084e4bfc7a85ad3161047b
 SHA512 
a4701560d4e6ba8b52d8cb6528fcb418cf37bbfb114eea66c07daafcd58b169d553e17e648b748de2ce0f01ce30c40419bc3896825c6f88cc1193451c6291cf9
+DIST thunderbird-78.6.1-lt.xpi 660301 BLAKE2B 
407856ffbe249cc3d937c69c4e6704d9b3f0e30d055c8587a808f0c1d9971a481608d63c66daf490cd911e12dd225a51da7dcf8214ae8cfdb208085e868f1583
 SHA512 
2508e9fa781696a0c2cffd91563b763e9d5a9a2896d14f999c0787b30001a7519e6a060d1ec4e852d1b7c0349ff026e7d14dcc4eb2fc8df020fd70dc37f8c7b9
+DIST thunderbird-78.6.1-ms.xpi 572179 BLAKE2B 
74fa5e42f7d749790841f1069a5faa367cc08503242c45a0026b2a3f71064696f75945409ed751382ec204e8b4f359fe89cf3eb42c02a6c8ed1e3105e2bfada2
 SHA512 
678c7419a5e1652b1a763e1e4eab3639813bbdc846f957166d1a5908233809d9752ad7c4180edc44222f26043bd8b16c3687e28718d37371c25dd62820f36d5d
+DIST thunderbird-78.6.1-nb-NO.xpi 637239 BLAKE2B 
57f4128672e57e5fff83d44617735678e3f03ceb01ae79fff2038b64fc5eeb5f99169b9c460ee143605c86bfa7a350d55ce66ba90e4f334192c4433711784295
 SHA512 
bfb4ca357859d7b467eee75951ec1cc3490e8f6170943aa8e6ff95770d23c8936d6bd288fdb91e3a308fb469313e7cd685ddeba65570329b29aa831009392b08
+DIST thunderbird-78.6.1-nl.xpi 644355 BLAKE2B 
ba15ff1d565070d193548b2a1c4f314e4ec2b7daa9c4997dc6f2ea53e2256b5d9ba722ffee2accb749a989a211816a600194c640a55d67478f7cebde4ba5f0ae
 SHA512 
175b03a3f94842fbc48c75bfa0e3ca1cbfdb0321f85b8e590f5511c41624e6fc9481c8e51e91a804679cb7c4a50bda7ad4ba8aa828af6550efdaad46af293a0e
+DIST thunderbird-78.6.1-nn-NO.xpi 640695 BLAKE2B 
1aa628452c0ab95b15284fb4c5d73f2ca1f648b7f4da760bbe0334bcb05510fb92dc7a244b0d84d7baaedc75d08e287b667777e479035a9cc1c92c2559a1be5d
 SHA512 
65731af02f83c88634f61371c1872413db969d191edf2d070d065c36f5bf0e1c3e41d88d5c417cd64f559e7316105711ee17b3f1aba057fb06f7e3a4f88f8af8
+DIST thunderbird-78.6.1-pa-IN.xpi 633219 BLAKE2B 
cfe1dca9234802ffa991275d45009143fb8b0fcbef77a98b342fe3130874e7d91dbf2f7e1d5ff049fe388110c86d6acdeb1bd18d982587842a7a9346d4cfac58
 SHA512 
13ffc0570ed34caaf98d6f036273c26945151c06d16558e263a7af85c409caa2ae3f3d62930c57d8bcd4d4e0494d95ec69bf1b5793a6c7ef404a8cee06e0cece
+DIST thunderbird-78.6.1-pl.xpi 637125 BLAKE2B 
4ff7622b19e6b39e5eec148203d2b721f25757365e75cbe549e4619f9b952ad6e59392c58bc2a92af96fb7b2596dfb5704a0939fe9dad1d24d4d3da244c1831b
 SHA512 
f748ffe82e2aa2df04d9820ad0d7b74aa59b65e1ea14060e5aceed98908ee4dadcf7818e7345653124b8e73d3926a281a241e3bb289d72b64857000286471a45
+DIST thunderbird-78.6.1-pt-BR.xpi 649402 BLAKE2B 
8a7aa938e094feefd26023ccb8267d3b34b6b4d53a5df5780c530c757bdc8a8327cd13ce58582c1c86e967d88718c4a275d65ee1ca4a2618a1e416176ecd90e5
 SHA512 
e34950beae7c93f46d0e7eb3cbe5f7e21c1b19769ef84b25525493a728d8876a52ffe72c6bbfe1176330ac0b4698a9f68f5a373e031db51b2d6d4a27890dfe65
+DIST thunderbird-78.6.1-pt-PT.xpi 655494 BLAKE2B 
41084fb4b7c6dabbd684d05dd9735309d16f9af0bfdd3861606100076d8d355ae80653412b2844c6e9e98d51c7a00b7380c0fa754213f3ebfe02dbae480de219
 SHA512 
083539a904e0c4ec1b5adeef705c51b8a395ad532539f796636ba6f0477ad768ed861a32fe3b834c9539fd0daa7cde9fa13fb946093f672ae4f4d0308e0b1223
+DIST thunderbird-78.6.1-rm.xpi 646521 BLAKE2B 
e3d0dc6a8365842657d84556fe485d8f89490f0b020830692cd498a3e0e905d37e9a58aa1d1899d34932309af2c4c4127b4d0d55fb892b4ae6a261eee00bb303
 SHA512 
e94fb8ee4e9884d51fd6f43268ff7b377c278bedb18d077388e6bc46e459905934314d22f0b33ecb54d05e22a42f0c0993f8b972a6c232805003b3de4ed0004c
+DIST thunderbird-78.6.1-ro.xpi 662634 BLAKE2B 
f8a66affef0f4a866af4e66478de1559457451088d8fd31516a49fed4949da0625c008935bff5cee6b33fe116d490777ba990f79a3e2a019a31cf5cfcfb1b31e
 SHA512 
cd732df54a53fbc6e856d50da27defe258c41159e1e7b3955ebaa1268b825f6848802989877a68a9a3be4aca40824b61875fc5d6206d2c3d702d04ff47ab7b59
+DIST thunderbird-78.6.1-ru.xpi 756186 BLAKE2B 
1d21b03e163225a2f0972520bc24545458c0ed78ab474facf0c50b06be522270221ec166b04ef7ff9d8c29ea6178b2989a5f7cfcd79d6999a7ac182a5d9b2935
 SHA512 
f57191febf197b514f2f1ad3dfbc27706138e8581ed9b29d1ced54a3cd0d71c504e8940e5b63f79c1e6d0408f3188c4872613d54fdb58a4cbe0d5715b223d742
+DIST thunderbird-78.6.1-si.xpi 651110 BLAKE2B 
9b967bbd9b85293b1ce7e86ce219899ea7c60fc51fa6782742df2d272b785c5714975aefb3a0a639ce9d44f2541c4e3439a37368625dfe89bf165afe3fa58c41
 SHA512 
25d2d800e99a0cc04765ed86d9d91fa524d162de8b4233e9cc8d05a36762e97d3136c08a987d8985c90e32dd1b5a2c60fa81c4da6494b42781defb7d0c47a762
+DIST thunderbird-78.6.1-sk.xpi 643228 BLAKE2B 
8d40464edc6cf813191680032918e21a8fbd46ba21490fb35640ea9a4edf3fc199fa12d31686b2237c3802ed98aaa40c222d1dc90a07bdaca7bf2c774fdad018
 SHA512 
c9fee505e42461dad487c65caaa9bd6d35287ef1ebabb533e30aa6669c60e8dfe49a2e7fcef80328626f6a64acec9a2af132c188b7a918d11c17ef19328acd2e
+DIST thunderbird-78.6.1-sl.xpi 632384 BLAKE2B 
9fe5c5f7fa8e5bf2b3942031e70b1081e9ee55fa35bd884a4f1a726f55782d39ee17920a30618795596f3ca1e76f2481ada13572bcef6c43e1deb3f138b93bd9
 SHA512 
e7bcab0ac1cfc5c7c603f2d577d04e1e656f3a4d5a8be2a3eacaa5b067e1418bc3422417223cebcc00316158fd893cb9dc30213a0c694e832270d464f381df5a
+DIST thunderbird-78.6.1-sq.xpi 657825 BLAKE2B 
d2877a33c89b886e15eb29a11285c972cbefbb32047d918c5d8b7fd421aba884cc3f596eadb9a0aa7d4150f719d07df6451d6375b959bd00335656e30f7387a5
 SHA512 
52e23fdd381917aad0702b12315b0af1082853292864a4b2da65701b37fce29ecf18f34a7a52802b8ff3ba134b3e0742ef6f3a1ae28992723a3f220f253884e4
+DIST thunderbird-78.6.1-sr.xpi 683111 BLAKE2B 
e2ffd2145eea9fb8f49ec367919fc93fa13612d7ddd16358e65196813e877794d45873eeb13628bb2fa92d1b438298d405954f0dbcbd6302cda845de26c13397
 SHA512 
edddd2722d5488a14d0e35b23f23f4c310af72973673d60dd08c060b3663f686c83f360a50985c09cdf986aff74741bff7ad7dcd0f095b577160fa262ec779a2
+DIST thunderbird-78.6.1-sv-SE.xpi 648863 BLAKE2B 
7f2cda06f7705504162ed9cdb95fa91901df0547225f8eabaa18b079a300149a46ac99bfbe41061553293178f50bad1c7d236d9e3d3c0a879b37895e86e96daa
 SHA512 
9a650043ce8d457a383bf9179ab2049e280c5b12d32cc5056e1f84c2d2d4ea9819924123d985fc918b811f6bd28727b5613bdc8a1182d2ac2cd61e7473c1f656
+DIST thunderbird-78.6.1-th.xpi 712033 BLAKE2B 
160826bc46de910002d69535956da25cd368e0e5ea7b71fc8ad371d3811210e55d8ba2b66f967757c7fbbe757cff815ac2257ead3f53112d9019a4067bde7ed3
 SHA512 
50073c9a5a0278e91fad3beec27aaa37dacb2dc5a54b63fd2795695bc57c26158dd1cdb60c384d004f1de026a1f91a0e1d2d53ff7f4b5963d1fb53d52ddced5d
+DIST thunderbird-78.6.1-tr.xpi 649074 BLAKE2B 
c6ff6ed1d9568a6af085601775c6c7c1b99cffac0bafc552cc34401c83cf79da87f56abf75a342aa71c36d9cb03ceda9b72888d398c560034447751013763734
 SHA512 
57ee0972642f769ee87e93d04945d4e0aa7c76c7abf1013d205e7b4f0c9f739594aa27f8830c84f1b6b8f6fee33c4ed34eb7075faebcf0dd18b94f4a0964913d
+DIST thunderbird-78.6.1-uz.xpi 586602 BLAKE2B 
c26dce6fe52528780f8840efa097392c2b08ae5e6bdbde60ea963a1ed4221005e8a6762cf298151b5b4d31a135190dbdbe1043418ebf58680075a5d1767f3144
 SHA512 
7388d41755c2476cf95a8e81ed5e0756a6ffdedfbcaa45b1627be339597de48f446a39f042bd9a3146cc9bc7dad5e58e649e0dec38c48d0d4d8027d371b18025
+DIST thunderbird-78.6.1-vi.xpi 674605 BLAKE2B 
7db83cf29596b955a8a2f8376bbe3322d5fdacf84d661832603131639ddb4373a35f9810b2442dac4e5a920f189b2f44762c6e966b07e1c2867fde3528f115df
 SHA512 
70b226b35e671956d2eab2d95cc15cf401f2339a74de5cacb6fa1de982ebcbb0b1642f83cf5cbcf64ca6b2c6ebd958f4aed33cf267ff7a52c248f6bd1ab6eff4
+DIST thunderbird-78.6.1-zh-CN.xpi 687175 BLAKE2B 
08b9baf8e1e2090f579c7b1b480162654d4387a502e0ff7e74970ac737f1e1d0cee291a2979cb6ebe4e5baf7ea1245cba3a2d1d25612e5be5b33bb3be491d7c9
 SHA512 
d99d17ed9b4151c5cb948f36296f550110e953f912d5f7cff2133e8447b3eaae23b261abff356d81035d0a4624443f0eff71d34324c884d14d561893405305c5
+DIST thunderbird-78.6.1-zh-TW.xpi 687623 BLAKE2B 
389a13ee623a350cdea95e00e6ed63f79f5096e846395126934ce5a77edab8e404aa77ac9ba6b12154a409c95dd68589eeeda4e5cd5dd792fdddc29be4cedf73
 SHA512 
e9f71faab7cfe04661298acf021562fec28f58aad1d5da244573c6dc561065a7c2dbd2e89dba965a31f279627b209a6d45dd109be4aa7c5fd5520b7828153ce3
+DIST thunderbird-78.6.1.source.tar.xz 351971732 BLAKE2B 
e66049bdad344a8aa1d95828fb257aad2fa4f425bd64abfb77629f0257d11317ab4f2ca9f04cd1a3a584dd9a3e7dd2a13c861960c72fb1c94809cebdebbbbf26
 SHA512 
672f9ce2716114e83d3feaa7f322a405946731d540b5a9781249eba951cbf865af73ce67654e1c47e93828b0d792c1ff6a36d7ce26aee7af7bfc8cd715a8f977

diff --git a/mail-client/thunderbird/thunderbird-78.6.1.ebuild 
b/mail-client/thunderbird/thunderbird-78.6.1.ebuild
new file mode 100644
index 00000000000..68bc1344eaa
--- /dev/null
+++ b/mail-client/thunderbird/thunderbird-78.6.1.ebuild
@@ -0,0 +1,1053 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+FIREFOX_PATCHSET="firefox-78esr-patches-07.tar.xz"
+
+LLVM_MAX_SLOT=11
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="ncurses,sqlite,ssl"
+
+WANT_AUTOCONF="2.1"
+
+VIRTUALX_REQUIRED="pgo"
+
+MOZ_ESR=
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+       MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+       # Convert the ebuild version to the upstream Mozilla version
+       MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+       MOZ_PV="${MOZ_PV/_beta/b}"  # Handle beta for SRC_URI
+       MOZ_PV="${MOZ_PV%%_rc*}"    # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+       # ESR releases have slightly different version numbers
+       MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="${PN%-bin}"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+inherit autotools check-reqs desktop flag-o-matic gnome2-utils llvm \
+       multiprocessing pax-utils python-any-r1 toolchain-funcs \
+       virtualx xdg
+
+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/~{axs,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
+       ${PATCH_URIS[@]}"
+
+DESCRIPTION="Thunderbird Mail Client"
+HOMEPAGE="https://www.mozilla.org/thunderbird";
+
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+SLOT="0/$(ver_cut 1)"
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+IUSE="+clang cpu_flags_arm_neon dbus debug eme-free
+       hardened hwaccel jack lto +openh264 pgo pulseaudio selinux
+       +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent
+       +system-libvpx +system-webp wayland wifi"
+
+BDEPEND="${PYTHON_DEPS}
+       app-arch/unzip
+       app-arch/zip
+       >=dev-util/cbindgen-0.14.3
+       >=net-libs/nodejs-10.21.0
+       virtual/pkgconfig
+       >=virtual/rust-1.41.0
+       || (
+               (
+                       sys-devel/clang:11
+                       sys-devel/llvm:11
+                       clang? (
+                               =sys-devel/lld-11*
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-11*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:10
+                       sys-devel/llvm:10
+                       clang? (
+                               =sys-devel/lld-10*
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-10*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:9
+                       sys-devel/llvm:9
+                       clang? (
+                               =sys-devel/lld-9*
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-9*[profile] )
+                       )
+               )
+       )
+       lto? (
+               !clang? ( sys-devel/binutils[gold] )
+       )
+       amd64? ( >=dev-lang/yasm-1.1 )
+       x86? ( >=dev-lang/yasm-1.1 )
+       !system-av1? (
+               amd64? ( >=dev-lang/nasm-2.13 )
+               x86? ( >=dev-lang/nasm-2.13 )
+       )"
+
+CDEPEND="
+       >=dev-libs/nss-3.53.1
+       >=dev-libs/nspr-4.25
+       dev-libs/atk
+       dev-libs/expat
+       >=x11-libs/cairo-1.10[X]
+       >=x11-libs/gtk+-2.18:2
+       >=x11-libs/gtk+-3.4.0:3[X]
+       x11-libs/gdk-pixbuf
+       >=x11-libs/pango-1.22.0
+       >=media-libs/libpng-1.6.35:0=[apng]
+       >=media-libs/mesa-10.2:*
+       media-libs/fontconfig
+       >=media-libs/freetype-2.4.10
+       kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
+       virtual/freedesktop-icon-theme
+       >=x11-libs/pixman-0.19.2
+       >=dev-libs/glib-2.26:2
+       >=sys-libs/zlib-1.2.3
+       >=dev-libs/libffi-3.0.10:=
+       media-video/ffmpeg
+       x11-libs/libX11
+       x11-libs/libXcomposite
+       x11-libs/libXdamage
+       x11-libs/libXext
+       x11-libs/libXfixes
+       x11-libs/libXrender
+       x11-libs/libXt
+       dbus? (
+               sys-apps/dbus
+               dev-libs/dbus-glib
+       )
+       system-av1? (
+               >=media-libs/dav1d-0.3.0:=
+               >=media-libs/libaom-1.0.0:=
+       )
+       system-harfbuzz? (
+               >=media-libs/harfbuzz-2.6.8:0=
+               >=media-gfx/graphite2-1.3.13
+       )
+       system-icu? ( >=dev-libs/icu-67.1:= )
+       system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
+       system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] )
+       system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
+       system-webp? ( >=media-libs/libwebp-1.1.0:0= )
+       wifi? (
+               kernel_linux? (
+                       sys-apps/dbus
+                       dev-libs/dbus-glib
+                       net-misc/networkmanager
+               )
+       )
+       jack? ( virtual/jack )
+       selinux? ( sec-policy/selinux-mozilla )"
+
+RDEPEND="${CDEPEND}
+       jack? ( virtual/jack )
+       openh264? ( media-libs/openh264:*[plugin] )
+       pulseaudio? (
+               || (
+                       media-sound/pulseaudio
+                       >=media-sound/apulse-0.1.12-r4
+               )
+       )
+       selinux? ( sec-policy/selinux-mozilla )
+       !<x11-plugins/enigmail-2.2"
+
+DEPEND="${CDEPEND}
+       pulseaudio? (
+               || (
+                       media-sound/pulseaudio
+                       >=media-sound/apulse-0.1.12-r4[sdk]
+               )
+       )
+       wayland? ( >=x11-libs/gtk+-3.11:3[wayland] )
+       amd64? ( virtual/opengl )
+       x86? ( virtual/opengl )"
+
+S="${WORKDIR}/${PN}-${PV%_*}"
+
+llvm_check_deps() {
+       if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+               ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+               return 1
+       fi
+
+       if use clang ; then
+               if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
+                       ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..." >&2
+                       return 1
+               fi
+
+               if use pgo ; then
+                       if ! has_version -b 
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then
+                               ewarn 
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..." >&2
+                               return 1
+                       fi
+               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 et eu fa fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM
+       id is it ja ka kab kk ko lt ms nb-NO nl nn-NO pa-IN pl pt-BR
+       pt-PT rm ro ru si sk sl sq sr sv-SE th tr 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}"
+}
+
+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 lto || use debug ; then
+                       CHECKREQS_DISK_BUILD="13500M"
+               else
+                       CHECKREQS_DISK_BUILD="6400M"
+               fi
+
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_setup() {
+       if [[ ${MERGE_TYPE} != binary ]] ; then
+               if use pgo ; then
+                       if ! has userpriv ${FEATURES} ; then
+                               eerror "Building ${PN} with USE=pgo and 
FEATURES=-userpriv is not supported!"
+                       fi
+               fi
+
+               # Ensure we have enough disk space to compile
+               if use pgo || use lto || use debug ; then
+                       CHECKREQS_DISK_BUILD="13500M"
+               else
+                       CHECKREQS_DISK_BUILD="6400M"
+               fi
+
+               check-reqs_pkg_setup
+
+               llvm_pkg_setup
+
+               if use clang && use lto ; then
+                       local version_lld=$(ld.lld --version 2>/dev/null | awk 
'{ print $2 }')
+                       [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 
"${version_lld}")
+                       [[ -z ${version_lld} ]] && die "Failed to read ld.lld 
version!"
+
+                       local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep 
-F -- 'LLVM version:' | awk '{ print $3 }')
+                       [[ -n ${version_llvm_rust} ]] && 
version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+                       [[ -z ${version_llvm_rust} ]] && die "Failed to read 
used LLVM version from rustc!"
+
+                       if ver_test "${version_lld}" -ne "${version_llvm_rust}" 
; then
+                               eerror "Rust is using LLVM version 
${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+                               eerror "You will be unable to link 
${CATEGORY}/${PN}. To proceed you have the following options:"
+                               eerror "  - Manually switch rust version using 
'eselect rust' to match used LLVM version"
+                               eerror "  - Switch to 
dev-lang/rust[system-llvm] which will guarantee matching version"
+                               eerror "  - Build ${CATEGORY}/${PN} without 
USE=lto"
+                               die "LLVM version used by Rust 
(${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+                       fi
+               fi
+
+               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 ! 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
+
+               # Ensure we use C locale when building, bug #746215
+               export LC_ALL=C
+       fi
+}
+
+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() {
+       use lto && rm -v 
"${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+       eapply "${WORKDIR}/firefox-patches"
+
+       # Allow user to apply any additional patches without modifing ebuild
+       eapply_user
+
+       # Make LTO respect MAKEOPTS
+       sed -i \
+               -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure \
+               || die "sed failed to set num_cores"
+
+       # Make ICU respect MAKEOPTS
+       sed -i \
+               -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/intl/icu_sources_data.py \
+               || die "sed failed to set num_cores"
+
+       # 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
+
+       # Clearing checksums where we have applied patches
+       moz_clear_vendor_checksums target-lexicon-0.9.0
+
+       # 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
+
+       xdg_src_prepare
+}
+
+src_configure() {
+       # Show flags set at the beginning
+       einfo "Current CFLAGS:    ${CFLAGS}"
+       einfo "Current CXXFLAGS:  ${CXXFLAGS}"
+       einfo "Current LDFLAGS:   ${LDFLAGS}"
+       einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+       local have_switched_compiler=
+       if use clang && ! tc-is-clang ; then
+               # Force clang
+               einfo "Enforcing the use of clang due to USE=clang ..."
+               have_switched_compiler=yes
+               AR=llvm-ar
+               CC=${CHOST}-clang
+               CXX=${CHOST}-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
+       export HOST_CC="$(tc-getBUILD_CC)"
+       export HOST_CXX="$(tc-getBUILD_CXX)"
+       tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
+
+       # 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 MOZCONFIG
+       export MOZCONFIG="${S}/.mozconfig"
+
+       # Initialize MOZCONFIG
+       mozconfig_add_options_ac '' --enable-application=comm/mail
+       mozconfig_add_options_ac '' --enable-calendar
+
+       # Set Gentoo defaults
+       export MOZILLA_OFFICIAL=1
+
+       mozconfig_add_options_ac 'Gentoo default' \
+               --allow-addon-sideload \
+               --disable-cargo-incremental \
+               --disable-crashreporter \
+               --disable-install-strip \
+               --disable-strip \
+               --disable-updater \
+               --enable-official-branding \
+               --enable-release \
+               --enable-system-ffi \
+               --enable-system-pixman \
+               --host="${CBUILD:-${CHOST}}" \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               --prefix="${EPREFIX}/usr" \
+               --target="${CHOST}" \
+               --without-ccache \
+               --with-intl-api \
+               --with-libclang-path="$(llvm-config --libdir)" \
+               --with-system-nspr \
+               --with-system-nss \
+               --with-system-png \
+               --with-system-zlib \
+               --with-toolchain-prefix="${CHOST}-" \
+               --with-unsigned-addon-scopes=app,system \
+               --x-includes="${SYSROOT}${EPREFIX}/usr/include" \
+               --x-libraries="${SYSROOT}${EPREFIX}/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 && [[ ${CHOST} != armv*h* ]] ; then
+               mozconfig_add_options_ac '' --enable-rust-simd
+       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-location-service-api-keyfile="${S}/api-google.key" \
+                       
--with-google-safebrowsing-api-keyfile="${S}/api-google.key"
+       else
+               einfo "Building without Google 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 system-libevent 
"${SYSROOT}${EPREFIX}/usr"
+       mozconfig_use_with system-libvpx
+       mozconfig_use_with system-webp
+
+       mozconfig_use_enable dbus
+
+       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"
+       fi
+
+       mozconfig_use_enable jack
+
+       mozconfig_use_enable pulseaudio
+       # force the deprecated alsa sound code if pulseaudio is disabled
+       if use kernel_linux && ! use pulseaudio ; then
+               mozconfig_add_options_ac '-pulseaudio' --enable-alsa
+       fi
+
+       mozconfig_use_enable wifi necko-wifi
+
+       if use wayland ; then
+               mozconfig_add_options_ac '+wayland' 
--enable-default-toolkit=cairo-gtk3-wayland
+       else
+               mozconfig_add_options_ac '' --enable-default-toolkit=cairo-gtk3
+       fi
+
+       if use lto ; then
+               if use clang ; then
+                       # Upstream only supports lld when using clang
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+               else
+                       # Linking only works when using ld.gold when LTO is 
enabled
+                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
+
+                       # ThinLTO is currently broken, see bmo#1644409
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+               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
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # This is upstream's default
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+               elif tc-ld-is-gold ; then
+                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
+               else
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+       fi
+
+       # LTO flag was handled via configure
+       filter-flags '-flto*'
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+       else
+               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*'
+
+       # Modifications to better support ARM, bug #553364
+       if use cpu_flags_arm_neon ; then
+               mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon
+
+               if ! tc-is-clang ; then
+                       # thumb options aren't supported when using clang, bug 
666966
+                       mozconfig_add_options_ac '+cpu_flags_arm_neon' \
+                               --with-thumb=yes \
+                               --with-thumb-interwork=no
+               fi
+       fi
+
+       if [[ ${CHOST} == armv*h* ]] ; then
+               mozconfig_add_options_ac 'CHOST=armv*h*' --with-float-abi=hard
+
+               if ! use system-libvpx ; then
+                       sed -i \
+                               -e "s|softfp|hard|" \
+                               "${S}"/media/libvpx/moz.build \
+                               || die
+               fi
+       fi
+
+       if use clang ; then
+               # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
+               # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
+               # toolkit/moz.configure Elfhack section: target.cpu in ('arm', 
'x86', 'x86_64')
+               local disable_elf_hack=
+               if use amd64 ; then
+                       disable_elf_hack=yes
+               elif use x86 ; then
+                       disable_elf_hack=yes
+               elif use arm ; then
+                       disable_elf_hack=yes
+               fi
+
+               if [[ -n ${disable_elf_hack} ]] ; then
+                       mozconfig_add_options_ac 'elf-hack is broken when using 
Clang' --disable-elf-hack
+               fi
+       elif tc-is-gcc ; then
+               if ver_test $(gcc-fullversion) -ge 10 ; then
+                       einfo "Forcing -fno-tree-loop-vectorize to workaround 
GCC bug, see bug 758446 ..."
+                       append-cxxflags -fno-tree-loop-vectorize
+               fi
+       fi
+
+       # Additional ARCH support
+       case "${ARCH}" in
+               arm)
+                       # Reduce the memory requirements for linking
+                       if use clang ; then
+                               # Nothing to do
+                               :;
+                       elif tc-ld-is-gold || use lto ; then
+                               append-ldflags -Wl,--no-keep-memory
+                       else
+                               append-ldflags -Wl,--no-keep-memory 
-Wl,--reduce-memory-overheads
+                       fi
+                       ;;
+       esac
+
+       if ! use elibc_glibc ; then
+               mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
+       fi
+
+       # Allow elfhack to work in combination with unstripped binaries
+       # when they would normally be larger than 2GiB.
+       append-ldflags "-Wl,--compress-debug-sections=zlib"
+
+       # 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 MACH_USE_SYSTEM_PYTHON=1
+
+       # Disable notification when build system has finished
+       export MOZ_NOSPAM=1
+
+       # Build system requires xargs but is unable to find it
+       mozconfig_add_options_mk '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 CFLAGS:    ${CFLAGS}"
+       einfo "Build CXXFLAGS:  ${CXXFLAGS}"
+       einfo "Build LDFLAGS:   ${LDFLAGS}"
+       einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+       # 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 pgo ; then
+               virtx_cmd=virtx
+
+               # Reset and cleanup environment variables used by GNOME/XDG
+               gnome2_environment_reset
+
+               addpredict /root
+       fi
+
+       local -x GDK_BACKEND=x11
+
+       ${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 sys-devel/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.js gentoo-prefs.js
+
+       local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js"
+
+       # 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 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"
+       fi
+
+       # 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 menus
+       local wrapper_wayland="${PN}-wayland.sh"
+       local wrapper_x11="${PN}-x11.sh"
+       local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
+       local display_protocols="auto X11"
+       local icon="${PN}"
+       local name="Mozilla ${MOZ_PN^}"
+       local use_wayland="false"
+
+       if use wayland ; then
+               display_protocols+=" Wayland"
+               use_wayland="true"
+       fi
+
+       local app_name desktop_filename display_protocol exec_command
+       for display_protocol in ${display_protocols} ; do
+               app_name="${name} on ${display_protocol}"
+               desktop_filename="${PN}-${display_protocol,,}.desktop"
+
+               case ${display_protocol} in
+                       Wayland)
+                               exec_command="${PN}-wayland --name 
${PN}-wayland"
+                               newbin "${FILESDIR}/${wrapper_wayland}" 
${PN}-wayland
+                               ;;
+                       X11)
+                               if ! use wayland ; then
+                                       # Exit loop here because there's no 
choice so
+                                       # we don't need wrapper/.desktop file 
for X11.
+                                       continue
+                               fi
+
+                               exec_command="${PN}-x11 --name ${PN}-x11"
+                               newbin "${FILESDIR}/${wrapper_x11}" ${PN}-x11
+                               ;;
+                       *)
+                               app_name="${name}"
+                               desktop_filename="${PN}.desktop"
+                               exec_command="${PN}"
+                               ;;
+               esac
+
+               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
+       done
+
+       # Install generic wrapper script
+       [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}"
+       newbin "${FILESDIR}/${PN}.sh" ${PN}
+
+       # Update wrapper
+       local wrapper
+       for wrapper in \
+               "${ED}/usr/bin/${PN}" \
+               "${ED}/usr/bin/${PN}-x11" \
+               "${ED}/usr/bin/${PN}-wayland" \
+       ; do
+               [[ ! -f "${wrapper}" ]] && continue
+
+               sed -i \
+                       -e "s:@PREFIX@:${EPREFIX}/usr:" \
+                       -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \
+                       -e "s:@APULSELIB_DIR@:${apulselib}:" \
+                       -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
+                       "${wrapper}" \
+                       || die
+       done
+}
+
+pkg_preinst() {
+       xdg_pkg_preinst
+
+       # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse
+       # does not need to be forced into the LD_LIBRARY_PATH
+       if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
+               einfo "APULSE found; Generating library symlinks for sound 
support ..."
+               local lib
+               pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die
+               for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do
+                       # A quickpkg rolled by hand will grab symlinks as part 
of the package,
+                       # so we need to avoid creating them if they already 
exist.
+                       if [[ ! -L ${lib##*/} ]] ; then
+                               ln -s "${lib}" ${lib##*/} || die
+                       fi
+               done
+               popd &>/dev/null || die
+       fi
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
+               elog "Apulse was detected at merge time on this system and so 
it will always be"
+               elog "used for sound.  If you wish to use pulseaudio instead 
please unmerge"
+               elog "media-sound/apulse."
+               elog
+       fi
+
+       local show_doh_information
+
+       if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+               # New install; Tell user that DoH is disabled by default
+               show_doh_information=yes
+       fi
+
+       if [[ -n "${show_doh_information}" ]] ; then
+               elog
+               elog "Note regarding Trusted Recursive Resolver aka 
DNS-over-HTTPS (DoH):"
+               elog "Due to privacy concerns (encrypting DNS might be a good 
thing, sending all"
+               elog "DNS traffic to Cloudflare by default is not a good idea 
and applications"
+               elog "should respect OS configured settings), 
\"network.trr.mode\" was set to 5"
+               elog "(\"Off by choice\") by default."
+               elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences."
+       fi
+}

Reply via email to