From b9e42cb2b8de475ee05f0ea22725bd54d5b601a1 Mon Sep 17 00:00:00 2001 From: Joonas Niilola Date: Thu, 2 Jul 2026 15:40:41 +0300 Subject: [PATCH] mail-client/thunderbird: add 140.12.1 Straight-to-stable bump, as there are only two commits between 140.12.0 and 140.12.1, fixing the two announced security vulnerabilities. Tested thoroughly on stable amd64. Closes: https://bugs.gentoo.org/978389 Signed-off-by: Joonas Niilola --- mail-client/thunderbird/Manifest | 65 + .../thunderbird/thunderbird-140.12.1.ebuild | 1168 +++++++++++++++++ 2 files changed, 1233 insertions(+) create mode 100644 mail-client/thunderbird/thunderbird-140.12.1.ebuild diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest index 6908214db7e31..4d2b2aafb12e9 100644 --- a/mail-client/thunderbird/Manifest +++ b/mail-client/thunderbird/Manifest @@ -67,5 +67,70 @@ DIST thunderbird-140.12.0esr-vi.xpi 518883 BLAKE2B b6dca44e6c4da926e4fd1775565fb DIST thunderbird-140.12.0esr-zh-CN.xpi 507846 BLAKE2B d0699094b1cefd563d65806e285bb23ae14d3d8389f07f0e070e46c2ba5fdc2b8e767e774c912c5be061e347f8e8d02cbf31ff42a0a42fe045c8d4917334dfa4 SHA512 87f39b26865bf72a3b557846c139115d8e9bcbe4dde7c71f3fb31e175a7b881f3fa2fa9f8c57cea37349f6822dbb76ce9240b7267f64d15c7009699311055b8d DIST thunderbird-140.12.0esr-zh-TW.xpi 511430 BLAKE2B b16d8660441248515ecbc9943d12933d0c1556e4cc14ccc3b4e65de6531bae3d07c1906e415703d94a355806f2b9b7fa21178b773063da4b096995dc9403e9ea SHA512 d7931448bbd5228e3155c1579597416fb87e2ce7ac82fde41edbb39a8ed5406b3da6b1486709b8c4adc6cf08712d977221d2a93ade4e00a878d5329ff837f410 DIST thunderbird-140.12.0esr.source.tar.xz 766118952 BLAKE2B 23918346b7816da42d8821b76214652e9cb0e1579b5c3c070cc214739bd75f880a52e22e108644948ff2e82c3fcdcd08cae406ffea06c5c67c41d432db45dc80 SHA512 ccbcc305d5cc10aa01aa5071f40a21b42de0300d9ad6763c4fc4ad71bf797566f2380c8fd84d46952e7c4eae0a35905173e6906b108192833660eae2ceea7b51 +DIST thunderbird-140.12.1esr-af.xpi 316218 BLAKE2B 3b09a43ad922263da3600242290a752a2a9f7981fc2deee79be3c8b83929da699a43186a567b9b4395a904bb599f93981a6c6d1329c1ac735d3358532ec637e5 SHA512 c6950f558ac8b50a0947137135cf558b1b85c2352455f47acf071f2635b39ae690227b5ca8b15140c452c4032baaa1d254a4c3f46e677f817a9e98372473b8bb +DIST thunderbird-140.12.1esr-ar.xpi 436197 BLAKE2B 22630b6d833f7368a509ad6cc7a59b59294580cc3266ebf983e0cc535f90c55da5cbe404977c50ec7c62c4ea6c18a8f53859cbe285184c150c783f95e38a0e02 SHA512 b4dd5ea2ca80267e05fb59b344a148440b96a3cd719cc6238366572df6f14de7852e6a2adde08beaf8dac15f1a65b6d3e5fc4da319ab22b1fe37d4724098522f +DIST thunderbird-140.12.1esr-ast.xpi 340597 BLAKE2B 419a772e21f92054c42f4460f6b266dfe6d80bc98934e05981578d24265ec30463254d1c9748d99716e27fc68db41dbe971c6cb7b45a888a5cde230aca62c2d9 SHA512 aba32a26e1ac9509c1b7a423899d359673420c6936124a9a2c91987b7acbd9723ff633e64d6a90db7460472d8d7e125a28080cc5eddbf7f9e1b3262e6747686c +DIST thunderbird-140.12.1esr-be.xpi 522091 BLAKE2B de2956c67f93b87ec078bb9e6e07155017533d0fcc3ccb055ceed59df8829dce6a3f9d33079588046228b400189e82772d20cc52b89698a52da448afac958394 SHA512 102017a68973b10ea62071374ce9c2689b67a8cb60b28efb8f32020e240eb1b2314ed828a2725832d4b2aa7e216962c9dad94dbe236ce21ad473fc4914a2f14b +DIST thunderbird-140.12.1esr-bg.xpi 539806 BLAKE2B 89d497af6113a3760d74ddda87319fc73fe91f43e2b57170e4c844710339feac85b91c4f28134d2bb428e3610f9c3779942945c907c91fc8df8afa47021e8e7d SHA512 b3cbe9db611498fa3da68d868da88cd151bf4fce22d646a0f4663555478263a73ec3e7a71bcb3cd473b2270f9a13e032d96221e61d68d8ab72afe01d6cf98299 +DIST thunderbird-140.12.1esr-br.xpi 402747 BLAKE2B cd28c499e2252246ddc1bebda1aeaf34bb95d99cad9e0e9b51eb4ec0f9d30d8e1b508a14700eb7f1984fcc1d0ff5441a7243b50d6c014845d06ffdd97f0eccca SHA512 089de7b21618c3b189e0f06b39590ef626b0411a11bba48af0984af4ce0407fa12a6debe4e27819321e5bd40a56a4efdef20ad96c29c297d9de9496059ce62d9 +DIST thunderbird-140.12.1esr-ca.xpi 440670 BLAKE2B 8a342265db6d702a75b9974540970f999547c93d65029f3436c0a8b1354948258cf431b8ca5c3645602c0f2718e532183c89fe0925f1067bf6e4ad66a64d3ffa SHA512 e3aa7199d7b92d52d7b0134850baf40c0f46d559840643626d9d2757eb0133e96be72303d1006997b1ecdc8b75a39f5d44bda5109c013d0fae79f01bec3ad8bc +DIST thunderbird-140.12.1esr-cak.xpi 418022 BLAKE2B 973c30bb09e1e8a13a095abd95b4d5560caa394043f40a662d8c83a4272ea054a95a94549c26fe10e5b591fea8373dbc76ff2cf4326a89d636a70cd7dda417a5 SHA512 17026a49cb32c5141a6bca7dc797c1268b2b9679adb6f6f44a03ef675f8229bfa7a9d7ec58112be272fc34f007a269564b448563e506c566cfa1552e4256e90a +DIST thunderbird-140.12.1esr-cs.xpi 519562 BLAKE2B d2047a6ae5bbc7331c518198358446f7d06593b3a920916b3da656644e6881c5c5f385c4f0dfdef3d74f200bdb622f1f287ba4cd57c6f64e79d2932c714e504c SHA512 3a30d19a25c1430abda2327104fedf5c31e1ab0f546ddceba284116ca71132a2c74fc4db975ed08f7e14bea1a5ac4d9800f2cc3ad8a8f7c33772894cbbb5dcd5 +DIST thunderbird-140.12.1esr-cy.xpi 487650 BLAKE2B 812941f0ed2e02c0e7d3b8f020ab1dd7662eef48b1dfb9716b8f4969f920e11d2af99b2a72b99e7618c49478e7db2275f2fdaecf18b9ae8feff51c5a2d9e1eab SHA512 bbb2173c55ede04bc1f3290deea393f9d0c32862bf62a2420f335b37f6b49f6ba80c761334154c81e4aa552123d503fd5ff8bc19798bbadf74200f3eead0e083 +DIST thunderbird-140.12.1esr-da.xpi 476623 BLAKE2B 8963a2f983d09019be8ae15820bd93507ee1fb3b37e9bbf53416c6d76f24b058ce70e22684c9f88419cc0beee77b1831743ec0975e49f0a8bce5aa505cf9bf34 SHA512 1c79b591f60ca9fe5a01c9be5cf0544d15e1f8d9ae2c12d4b58d60803f7eece6e657a9a8acb375dfe8163412a09dde8d52d4686ed0516caa8cf1a4a2283a9782 +DIST thunderbird-140.12.1esr-de.xpi 504706 BLAKE2B df7c9daf0b3424a456031208f0907bfda73fad1ab1bcc816170ee42fab7a59d2b469fc05753443e232b92138ab862993011ad0961903f86963f7fd198919c463 SHA512 1b4a1e27b9fe8606d3c08f4fdc025c75acd22b1be068ba9294ed84ac4504e469fdf52cd7e58f76d53a34b6b29991d99c1b84c6c8edbad757a9b8acb48822d780 +DIST thunderbird-140.12.1esr-dsb.xpi 517788 BLAKE2B 4edcac236b36726783b6a68d142c5b8b86eda446274e253a2b6d0af5a1b324ebf0f98b9104d8e64cd1a5dcecff5c2e99c4f85b7a0fcf44653672337c50dd0834 SHA512 6c781f68a7be277e541fec99938614b82030eaaf3040ac0390a3e2afa4a7b80a137abbb2323d693b84def30b14accbff0e098a4835d815b7f22fa0101caf373a +DIST thunderbird-140.12.1esr-el.xpi 609039 BLAKE2B 0e2d5f3c29f62cb7a498dfa792c4036daf1be48e87fadc7ece7db49bd142468e0309207db39df9b59bef9dce4121b02c7aa13cc39066a4e44115c6dbe272b274 SHA512 a32e790b022540d92fc3d498b2e711203f6dd2310f77e2f8523153bf28681b3e1bf8167146f6a535a96e5736f00dfa422d02f10bc4befd9299de16fb2a61213b +DIST thunderbird-140.12.1esr-en-CA.xpi 452239 BLAKE2B d7053ba3ca6db671122f1d9d6b58c4c0fdbcffd8ae3e932b8d8bfb96b939fb23a6f4278f671b40f16147b23074ad3416f6a8ed094e0c450e8f3cf35010d0dffb SHA512 a5897e31a56c55367cbb64d86aff672a9201f969105b0ea47e6279ea2fc0f8e103c14b05b26ad0d4ef94104cbc4112cfd6593ec5e583dc1f12f2d8121042d546 +DIST thunderbird-140.12.1esr-en-GB.xpi 452067 BLAKE2B 3e12af768f3d6a9d8b684736f4fdc9453d342df493597309bf904de568190f1aae02085701d85a7c921cd3d5a9eead90b86ecebde8ef88a4e74f74e43053dcab SHA512 0a594c9d1e9c5aed56fbd135994a33c850d0bca64fb914acb572685f2cccd9189c0315e765e4e9ae81a60bff6c8d5d8321245d206de3599376a6802f4e645fd2 +DIST thunderbird-140.12.1esr-es-AR.xpi 495265 BLAKE2B a0404442566d65e8018d53e7b79c7848ceba7d186c11b46f3c132316441ed37f5a3fdd4efb16feca40255b16c6859fce0999da3d0188471b61a255575123fab2 SHA512 51b406aeb586093c75d3b5884dd0626d711728113e61f8e8e841a2895ec9818bbebe80d895f70eca4fd84fa3dc88b06121c2d965e42226cc884ed7d2503fcde8 +DIST thunderbird-140.12.1esr-es-ES.xpi 497284 BLAKE2B d63f87a63aaee6ded191ddde14912027d1ba453229e5fe751018f468f7aa31073e3ccbfe2cb86b57ba306ed2b1377568911ba4e114dfb42ae7e79a6044bdc64a SHA512 e1a4d9a6aaf099d8fda1e17a11488ca35911e5313cf19466ca4fd5eed023f36ca40f2210b15feef670da228c11d28d87bf9361e427535e8626734663ff6cc6e4 +DIST thunderbird-140.12.1esr-es-MX.xpi 490826 BLAKE2B 7bd397270bda97b6c46bfbbddf9f0ef7d775b9028ae9635c92d5c16accd6c72bc8d7c6a82604a0410d116834bb12f8948f0bf5e4e597f73064c4dd07cad3954c SHA512 0db665486a7a58dae960fe5459d8828f22c2aacc3906138ace035c4bcbdf801bbc85f2021c85d76fdd290dcce420c139c04d85a873c635caf3ea07d73bc82096 +DIST thunderbird-140.12.1esr-et.xpi 443618 BLAKE2B ba45b2703a34b7bf083a038476c5e19a0e65b9432dd04e6cb13ec6e80d88fabede79570bf6d50e50aa449adf453391ad395e409899a15e5714558b7edd889ca9 SHA512 e2619bd9dcd669910d659d2ef15b149a62b668acbd05c97047331e82c454015bcaa4d6fa7a04ecdface3af9ff0e84ff347ef6d750032a8e953dff8712d6683a0 +DIST thunderbird-140.12.1esr-eu.xpi 473923 BLAKE2B f735bbc4a33e3f2a3b110f6eadb01690d504110c7453e7ae42d59aa371aa15b47afc8acf6235cab9d9d6ea7945ab8472868c99a77fbfbf8b496e1e21182ec059 SHA512 f4e96475f9a254c31e544d981349365dc2997b8561a9d2b5606440faff3e06d469b9410b567b229f011610cdd2cb62fd496661a7c2ad3c828cad239b12d485ee +DIST thunderbird-140.12.1esr-fi.xpi 475618 BLAKE2B ff1a347493d197dc598ea2983635796f41b0d218a900b29e585ae21fb455868c4f927ff6f673def5503f4a5533a56b6d4898846680e3dedf29a31520afd556e5 SHA512 656b74422f1227d7913469bf095e9bb31c4e1d48d3f1a82aadcd401835ce3609b94e9202479294f8b972235d48607e1decbfcd8c89bcbd9acca7abc4408149c0 +DIST thunderbird-140.12.1esr-fr.xpi 508314 BLAKE2B a0d8246c1060f4a02bd327c8f687772edd4f86cecd57c0529a72f5e3e64b38ac547168f5e6aa688f4193a9e6dad7df77e95b4611b21dc82ae1f0e669d08ac7f1 SHA512 ebbd3973d8fb60c560f6c4a0031ad023d2ae9914caf88357038b6fbe596811fb7b3bd91e74e0e10a842fb22ef385668dc1e3bbaf73a7ef8167b1b7219db0be1e +DIST thunderbird-140.12.1esr-fy-NL.xpi 490684 BLAKE2B 6e18a68e510b6cc2147624e50fc8d546300b3c0682fd0427db69653a21b0a8d1618f819151be5b4976783ec20ba977502b87ee610b16104c68518bd771279337 SHA512 a21ad23c50eb443b6d541a7daa72150c463742a432c115b8ab86ae4a8bc9f0c48171acb827b110149d895cd274f23e25a3583ff0bc109d5bad7537964460f8c6 +DIST thunderbird-140.12.1esr-ga-IE.xpi 376747 BLAKE2B f1ba468ccb3f0ada42dfa9b0aaad986481fb004d77655e6aafd2745a75a2f4e24f9dc6141ea97d71e06d2ab9a61cdc6b60b6cfac64263f1ce8e3d46dacdbdba1 SHA512 66045f5319f40ba5d4b378b683a95db5baea38258aad41b13e7f00bb23efcca1de20c2bd3787da3f3a650713e9912d0db772a7466bf4d1d0caa85285e6386a52 +DIST thunderbird-140.12.1esr-gd.xpi 461974 BLAKE2B 3a586d68dfee83739616297ba1df1fadf0768c9f81b7a49d23211c53b59e57921bb87a22c3bc7e0af80a7ba91784f819e9a43603d81818a98f72cc9ec3f62a00 SHA512 5547f7ff81751ac47599bb2bb98711566ab027dcbacb621cf58584e1d364ef3bbe2f931585fd2ef136f516e48a868f3b481934dcd83983ceee5d7711ae4e78e3 +DIST thunderbird-140.12.1esr-gl.xpi 489344 BLAKE2B afb71fa97e4c2ba4296f851b5a3715510e45a8b6196651643cc6bc4eff9b61ee029ff766ba1d7918dc09535ab26a1da782d6c3510c739bb7946bf35fab0b5b08 SHA512 54826ee0de35ab3f3ddb7675c949d3b084a6a20a418f9c980686814d1912cc758c3dc94953b965cad750c421c80aae7d107d380f8fcae4e42ff7c5bb37da1e0f +DIST thunderbird-140.12.1esr-he.xpi 444205 BLAKE2B c4072d6ec31a946a177e81badbb26149c04ea9868e1f00a237f0e2bb33dbc0d95255762d464cadf60bcc72fd6cf83a53620ec75cd31d5b592334af47faa6f60f SHA512 6907d39f5b6cd6fccf54f01cb9d1a20b059f2618de9e4fc8a271b02c65558e713e89eef4bcab4634020bd020ec1f43f6af84c19e0f1d25fbec35d9d2d7da5d78 +DIST thunderbird-140.12.1esr-hr.xpi 471055 BLAKE2B 008d442b341237a471a534165ba321dd9557f28d0df19927d231467db6bb0f221c488d7b1d196423b515c7938598a91bf90b9b613852033f72b2a860fb5d67d2 SHA512 610a6291c712d6bc12ad229afc9882cc0b563cd3826932afa9f93efd044b9dc9c2582fd1478a304c0f8cb8705fca99c631abb66f2c0279c0990b07f7b76426b6 +DIST thunderbird-140.12.1esr-hsb.xpi 514952 BLAKE2B f03cf2b1ed4b580c1bfa5913fb5f71612876d17631e1def0f9d4d8accda9731f2560ddc6129fbd03e2dddd9a7cd5872e884c3dce6f1aea58741ca37adae76ccb SHA512 50503137c69eabaee4bf90b9507f2a3da9fbcce27ba7044cc8270c5f73cfbf56afe44dc1f4de87c159e9845752241aa2b6dcca1e0ad6a6ade981c95523d6ed45 +DIST thunderbird-140.12.1esr-hu.xpi 517543 BLAKE2B a0ff9336b456f6388e4cde46f3e54001f572b82e6e85d5c63488b481f853fb18c7c84f67f7469412f51c66c2b32c8a1bd80f60a0ee7c4afe2f80fe8b0584d54c SHA512 6dd20edb3507de625ca005c092216087f49a98fcdb2cc9d2d8533d70b9f06d9ecc833ab956ac208da9eceea1aecaca60dfa76e43d10a3155cf33c29b17ce8ef9 +DIST thunderbird-140.12.1esr-id.xpi 467002 BLAKE2B 1d5e488faf4d1839fe1a353355d7dfa8f0d152cc0f1822f9dee514bcbfa785a9ae2cd013e8ceccadbdc5509ac84dbe5e61f015158cf93d810a0d99ee3be05038 SHA512 10f2fcdfa73bec5241ba0781a649f3f18897e2de70c1b2b0d33184896c511058be4c7be58195e0e7f25a2620b8f892ff1e4807212560b7251fe843e4effe0fcb +DIST thunderbird-140.12.1esr-is.xpi 482738 BLAKE2B 616d18a1dfc5db0e0ce5ee4cf8f79c7d02ee1e60401bb0a6bc06eee4997f0ece12569a85a4fa42387ff20759e190a4c628b37adddb3b3aaadd07c07a49becc3f SHA512 877933e1fd10ea5adc46b56944551fb66d681979c339c0ecf2981f56e9134ded244bf2b02f6a3c0e88b22d3fad61a4f6364e9a14dc7ed131274a23dd0900c3e8 +DIST thunderbird-140.12.1esr-it.xpi 488527 BLAKE2B b92caab2818f6c123a618c6207f58e78e4f31349f2314ca43b691bb964466e03210d842555ab201e0c7c33767492dd6dca7d8bb1bd09de78b82cb1333235a939 SHA512 01361442bfd46b1b97480055735621333de0fdd3b6b80090ca68eed51b9f68b8cde86109ee3eda87e07a103e2b6521f091f4327cda64c730097ea1fe864500ee +DIST thunderbird-140.12.1esr-ja.xpi 539185 BLAKE2B 51e0858090aa2359be2516f1fc9f5be8e9948aa16d1f79b37e4009770bc4663c0ec246dec76f0a610c38702f7777330487bfc25a45bd848e2a612075bd52758a SHA512 0d50bd50ad8282468aef0bb6cc695b5d6d25a03179362b2c31157fbc7bea1472cc04e6e3fa98015d03ddee7f259f4e521c2aa25e3a2d0a33e68fbb145923c809 +DIST thunderbird-140.12.1esr-ka.xpi 554794 BLAKE2B cc4d0e2223556dca718aa861a72ca5225df0d6dc4208f4f6eb5b9c2521d68aeb815fdcb636cbc7b0c7171bda2ec0815b71391866eae8db252ff66b02e61afbcc SHA512 2ccef166cdf1e5da619b7278250db5d056ad69f839edfea9eee02b300cdf8285a0ae115257be730b681cf694e51681129ccd4f9d7c807c2a6c78e43b8b043f3f +DIST thunderbird-140.12.1esr-kab.xpi 470497 BLAKE2B 838e0c02871cbea9a5b3fed65ea2477e1b232337e08d007bf530087f58961b20749562790fb1ad080585048c3e323ad5eb078eea8b115f42922a52db3f9a94b3 SHA512 996579640a7d8870f7b19517acf973412dc036e7a3e67d551fd55e5fa29c3960ed1ab70eee54fd14f62439fea532e42c90edf46f7ab5e29fa5229dfedbf9e979 +DIST thunderbird-140.12.1esr-kk.xpi 573884 BLAKE2B 4eee791e14bbf77404e6bc05415f0e6dec4be7186cbefb4b5b005693b8ef01ef3fe52c69bccd07b3eb8f1b15a99a868f1cde6a92cadb69a46962ed6611d80f7e SHA512 3bcb43a08e8957df0ed4e7a0363b843926c39ce2815df993801df4c10109d7f3f1f369a1eb1c62d9a840a358996b86f2504f6b2692ca1541e40882940e48a00d +DIST thunderbird-140.12.1esr-ko.xpi 515591 BLAKE2B c9d9c3f21c28234812ef2975c778ef7768fd01cdfaff2d922e910abc06afd75036c23da99927a250731a00eb958216bed5287d64870846a5ce69e4fad3cd6b7e SHA512 e6aaa5ca26ec9bfe6bbe891d7dbed7cf3d2c41709c606627e58a99b09305c039fc2c298d9aaa5fda64b37358218fce87266da508963f736ceb219bd2b6c7a21b +DIST thunderbird-140.12.1esr-lt.xpi 453435 BLAKE2B 3b72777be411f1aca3bbeeac6b87385c3288b0504624226e49db1a53b941446e1a4777700c43c40cb219d12c37cedc77e7a1bfca9c31c95e2fe80ce98125b414 SHA512 2bbeed099d0b2dbf5c9c23d00de8e322e95d7620b97a13fe99b7af759446aafeefcb375cb71047d7b62d8a328bfc8ddd4a9506557f2c1bad97424da3314a33fd +DIST thunderbird-140.12.1esr-lv.xpi 392814 BLAKE2B 2e7777c1bfbb1c166c9d62c8fa70aa2fc51a243ad4c20b09f6ae61616afa12e09282ef1afe764ec7743d2280808112ab685becd6c7f7bd0aed45708c4467392a SHA512 770fd92a4baa1bb753b036688110d941743cfc850cd8546f25a7c5d6c433df85b19b192c2b8b9af5b10775ee6c2677aeb7f6e0e02365024036e7d510c0fcd296 +DIST thunderbird-140.12.1esr-ms.xpi 352179 BLAKE2B b4b57b85ad68636a06c4193b0f376bc46b46bb80ba99ac35e3a7896d3b0c8cc8336eaee6088f5f2635bdcedbba86bff50aec78590687008ec95da80b3af959ee SHA512 9a80039973f525d79fa8d17ee06530d98ce6466e21aa86d6adfbaa4dc810ad6cf467970a5f3ee5465f78c1a7c94f670c284c1c507757b09527ba0eba605d994e +DIST thunderbird-140.12.1esr-nb-NO.xpi 476121 BLAKE2B f8c7fef0e34e8cf13df4781a8e942f5f7e8cce8db0fd86f7085e3eccfd73cfa9ced30ba5195047483172219dabdbdd576a0f83e152afbfca4c5de0440eb31e72 SHA512 c428646d7178831e6543689f6132e3e6ba4c217271fe27a1a8ceeac1cd72a5f2f319481ec4dd79b9d1cd4772d6b7e05de15eb9356f39b4793be8ed2b0b232d3f +DIST thunderbird-140.12.1esr-nl.xpi 482117 BLAKE2B 625b10a49e9f7cd1d6d343057ed01a496f036393235856c66ffde5f957ccda9dcf3ac3a2c242e1adbc243e4b049117a9e715540b5d93b3cf4e86060d42413501 SHA512 5246a5b64935283aa4fc322b3bc604cafb2223f138c33276e9c05fd5fde9a8b1ce7415ca3391bb119474a4b9a88c843979ea0e3a616cd08a08159e9b06ed0f6c +DIST thunderbird-140.12.1esr-nn-NO.xpi 479760 BLAKE2B f232fbf90938fa36a1579079738ff7537cf3e939969296754fbff171fe2d5b926d46944bbaa43d2a332e5bf7399e7be6a81a9afe8750eec29fae363d2c788165 SHA512 7a432dd708ff1cda52b26af849ba32743cca210dd9e9fa281a795169d2b214f74f10f10127e023598e6404a134491bcb62f464a0404533bb17ce17f01ed5d8f3 +DIST thunderbird-140.12.1esr-pa-IN.xpi 435731 BLAKE2B 780d1caea1e50b7e94f60e6f9483b78a8b966dfc430b3cce03b0b48101078d6b80121e96f881f0007b3671a8b6316fde8bf22bb78ceb8c87288d758351c7e726 SHA512 85b537734901612724482028bce87c354c574f6273eeb7f79d7d8e2ecf38035ab0f89ec22317d71027497abda030436db3635f2760559d343961e25802c04098 +DIST thunderbird-140.12.1esr-pl.xpi 515611 BLAKE2B 891fee7504c706d60eec5ed0841923043993d2c5f3e80c947748a7ac8496dba07d0fa0207b8150c1d3b0ee2a5855d33ef2dce30ccc2bdf4f94c8f2fbc4758312 SHA512 a56c2f220b852d69aeabd87ed86e1569f558b94733a2e6c71891bc077698bafe338a73b2d2ff923b301fb7f494c4305fd9fdf7699148d513afdaf016dccee5a1 +DIST thunderbird-140.12.1esr-pt-BR.xpi 490166 BLAKE2B 316c9169c9c3e7206496632eb05b626a7d6ce5d621a090c75241609551ac1c40d7a5f2ce35ec52e8894b0c6010b70a374b3285b5ffba1e194f082cfeb4ac4aad SHA512 66df19af4cce2d03caa0e5d90febb281cf047a7630b650b7b350896e4bb7361d9bc6a77fc449fd92c66d371ccaf46d213619e56041588ae058f1b3892cba5312 +DIST thunderbird-140.12.1esr-pt-PT.xpi 494209 BLAKE2B 2933913521e45b1a357273b71a4465a4901088a6b439287f0b1fc9315fad0e8da3cb3f06ef31cc92fd7754a0a0ec9da1bbf749388287c47ade4660d15602d0aa SHA512 167fc58285a277a06c633ec2d39bf6a75e42b7093f8e997574b46dc115004d59fd0cf49612dd19724650b46584ca9ade422dc45d81ba9d81cf6e5646e5e11432 +DIST thunderbird-140.12.1esr-rm.xpi 487883 BLAKE2B 86916614231d34fd3c74f025985b1db34588601b8c67940aa161ea001dec2f266b265afe307a250e4dd45b3b88df87e62f619b8a3939c103b74a2e5b249e5388 SHA512 3fc025cc8890dbfe928f377b897c85ab60e94da42cf5ad197f724e28a2da2a1885081c79604028693ef03555e0800de55e8bedb12e9c9f05486d849a8442ed33 +DIST thunderbird-140.12.1esr-ro.xpi 501094 BLAKE2B 810c1c38b2048e00f14b976dec00de89566f66001fa3b005c72235786d469877c096e8b036bf5e9ed95c0e2bb24dee73fd5d6d0c9658f3ce4ce77ded93f15971 SHA512 b73ffc904a780914e1c6237ad78acb61235d1ca0d8ea1c38d20a0ac460608846705a44410545848ab1d59619e1d906dc8dc4823db62145de610b190ed15a0e60 +DIST thunderbird-140.12.1esr-ru.xpi 593343 BLAKE2B 23c6d40a7ca7f5130dd40f90abae7b51861662fb8958990de118e5a80933962702d1546c44e37c343360e9a21fc3a7533e297f26d3a61a066b4aa6a970d14e4f SHA512 40d98119309d1afd2620b593836ac0ab5cd577325721bd24d641080ee095a460c431de4f4497a3438683a4604297a4d296bb2437d6d68ca11a1119dbced0f8c2 +DIST thunderbird-140.12.1esr-sk.xpi 519389 BLAKE2B ce8177a104faa0612886aac8b4bf8fbe9764d9379c53574f1f05dc68e952b08670800c8569b41c24aafc33c1db7e591e7d92ce8f5c173f36b9be543edfb92b80 SHA512 82640bdb32465aa2d25220cdabd3436c0709325be45beee961b1cd8cd33e08604e597e5f934a6cbe1e8a571159fefdfa77362f55b65fc321d3edf414cbbe71a1 +DIST thunderbird-140.12.1esr-sl.xpi 485964 BLAKE2B d79eb4ae08d81a29dad2c7c3def0e13a3fdb23e8b6b155cc2e7770e8e8ed6c74775fe6683be00eb19af87ebfdc88281251cd505cba8bffaca8267a397e89f785 SHA512 58df2c590381ff8079a1f19fc3525a2b938895752d3e488ed099526d58b197bb9a4370c0ccd887529f136bf23f379a058e827044c84ef766d59bc6fcba084bea +DIST thunderbird-140.12.1esr-sq.xpi 506278 BLAKE2B b382f6343fa3d95af8e08ec03bc2902e6bfc4fc3549c2e47e032100a5d2a4561f0f51a20fdc921bb60facda5fff844d68bf7d9d84ef2706d3547d486bb943ad8 SHA512 a5cc3371bdffc9e9dacd4e5cf0fa35a87da524c8e8cabbf9ce7fd3f18066459e0f54236b332a1c0d5e884236eb4e502f259dcba3ed325ac2b9141fd4b7e4d5a4 +DIST thunderbird-140.12.1esr-sr.xpi 533249 BLAKE2B d0754b4fc9fd283532fd497381f0e557c8d755b4cb0ca4f4f9d2e9886da65dbafcd53994b5d0f11bafb55cac8054edd1cb198021bf1d5a0eb20db092c48d32f7 SHA512 6948baefaf752e76404627b1c60e8a4e8bb6c2f86cdfce7be5863af0a5be9bb73e570b3526b20b27460abb0a4dfec0a808fdb885ccb634ac6e8c6f6e2e319033 +DIST thunderbird-140.12.1esr-sv-SE.xpi 484419 BLAKE2B e4027941634ddeb45674bfab04af6b244b935b291372c8ed8f1a181934e7270031d16aeb4ba7bc29a5e1c6a1a3a434da792a0508ce72c0992722d4e2a514bd0b SHA512 4d497b44daafb094a91297797e66738ab45eea17e3eaebb6dbca6197a9b00eea9b59a987f3d17d781086e9bbd675c330282ef6deb2586a94b6672950da8ae55b +DIST thunderbird-140.12.1esr-th.xpi 569103 BLAKE2B b978d8fefe952b9d17c68dd9ce8f829b26353ba6bae3c6760d30496f6fc071cb12cd00100d04e01f47cf8a0bc6c9ab29c2d4e892c687fec617a6a22f5eb9339f SHA512 69a00dc751c2cf1a96abc06b2bc67534623f4a0c630020e044a0b76a0ff02c984a41caa223226043e5e245747b4c3b167464f04a45fb936d35d32740a73e5649 +DIST thunderbird-140.12.1esr-tr.xpi 496303 BLAKE2B 8f44fdbee26bc11af3dab66945b8b2abeb73180486d90cfab1c06aeb3195380cd88d88428039f48f315abab8327f452c4efb0aeb7edcb96d6c237d22be10af7b SHA512 4e38dea49cd86a45ae0ff9f50af0d6a14c98a401db305db8bf74ba7d00c103df014e4be908c1004c33d402d68eb2c790e93d6b8dc051bb981c3b25809ba480f6 +DIST thunderbird-140.12.1esr-uk.xpi 582151 BLAKE2B c01a3173e2c2abeffa79d5fde546aec56299bedd9089cc8880749f71a2349959f9e9c75b6e5e57cad4cca8f6db496212485a85f10878bf73f8e9211cb983d736 SHA512 5bb08d9a9ed094c43ad3b50696f4e6e23dc1c1226651fb51abf7eb63bd41409326f414d68b6c04942340f1e0356f4eaf99f1c936237516b5a88992fc5651936d +DIST thunderbird-140.12.1esr-uz.xpi 355267 BLAKE2B f717ec939ace26c2f1485a86cd5359c9d2a3867e1df202dd687107d0c6f93c35a7861e6cbaddb068392925f54a750f5c8459103ffb633ca0b7b12e08f4bac1a9 SHA512 48945a280e63882333cf9f69c9640d5399b00d4b7106d64e7d8f7b77dd2970e12d810a0cc34e57bb6f9c9c0609cbb2d528098740a18dc79c54319178b3796bd6 +DIST thunderbird-140.12.1esr-vi.xpi 518884 BLAKE2B 1382bbfd6ee12a779203ae9cc39f9bfa215cfefc0f8a4f1c001ae9b5f41ead1101fba88420cbed002afcde0bcf58b76b8bfd0299a287b45e9cfab4db555a4744 SHA512 fa3f7b604755c5131e59e03a2fc0f6a12049fbffe5c27ef39ccaf1c36344deb099aebce4f539f2d75c5df02ef0b3f8d7053d13fa6f3bcbfee2f2008d9a34612c +DIST thunderbird-140.12.1esr-zh-CN.xpi 507846 BLAKE2B 40c831344179e4a8d2c76e507efbb2c4a88c03db4bb19b62c442890d60c05fd2edee747dec437149572613d7cd7da16408c0eda12a934d2a8b3b8059374afc93 SHA512 87d14140eb79eede417398b08b772b47eb1914159c5ae32a5b3b799fb2b8f31bd397c37dc797a846948cc831c1caab99b0f528801cad16a453e23f7f6c3429cd +DIST thunderbird-140.12.1esr-zh-TW.xpi 511430 BLAKE2B 40fbdb0b85b336841fccbe52ec41803ac88ddf345a3b5a4d9b60d6ce1ec9386bdb33ece52612a4a3ffb6d8ceeccb9e05f5d050830f534c0830b471f71da8d3d2 SHA512 afdb1c3b2106e5f1dba8612f80c1dbda85ede1f6192c1014cd6702410c71f299b713f6480bf5250f158dfe4107631f4605de8f823ec60c81e0928420c1c2cfb2 +DIST thunderbird-140.12.1esr.source.tar.xz 751005032 BLAKE2B efda06afc5970c07d0d2a568473ca9cdf3a94b743215b01e5f0698edfe59d305ffe8c1745f87327cdb015af191da21cee3a502bbb464848643af6e01d4b1a5a6 SHA512 24e795483ba7bc112c0debe1becdaf79cc2de95703b9ee726d0216bfc1db7b33c169503f83ac867e5998a8d1d0284a6ef12c7d35d98b10d6432497c2db237477 DIST thunderbird-152.0.1.source.tar.xz 936225660 BLAKE2B ae4e9aabec38a8a415b478b88cc3a708dca10b369550bce8f6cabaca403072e1f79aff76fef2095bd47bd61f72bc7d2e12414832626efd0cf3d6ba51c7ca2dd7 SHA512 f66c87de4dd73c3c45e420a55d76c3cb6ac091a61794ccf58ba59d1a40cf8001dee19a6a7f4c6bef7d36ea94ed4e4f677449d3006b2004abbd3fab42ad1c9228 DIST thunderbird-152.0.source.tar.xz 933067296 BLAKE2B 3a6e624881e0a9c2dc8b8ea2eca7da043959d74e7395b799aa7e93804ba972df94211e4035d54b585ca34e300ae853843c4a1925707871c76eef48adb2210291 SHA512 51b950af634e7c7dfb7c043d69f925ed6d50d4c44341761e7e3ef02d5db28d2c539cd8d9286195e3facf84869f57b12a58760105b5195c449b4e1e4c9b6200d2 diff --git a/mail-client/thunderbird/thunderbird-140.12.1.ebuild b/mail-client/thunderbird/thunderbird-140.12.1.ebuild new file mode 100644 index 0000000000000..99cf95d894fa1 --- /dev/null +++ b/mail-client/thunderbird/thunderbird-140.12.1.ebuild @@ -0,0 +1,1168 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FIREFOX_PATCHSET="firefox-140esr-patches-12t.tar.xz" +FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.tar.xz" + +LLVM_COMPAT=( 19 20 21 ) + +PYTHON_COMPAT=( python3_{12..14} ) +PYTHON_REQ_USE="ncurses,sqlite,ssl" + +RUST_MIN_VER="1.82.0" +RUST_MAX_VER="1.94.1" + +RUST_NEEDS_LLVM=1 + +WANT_AUTOCONF="2.1" + +VIRTUALX_REQUIRED="manual" + +# Thunderbird will have separate release and esr channels, matching Firefox's rapid and esr. +MOZ_ESR=yes + +MOZ_PV=${PV} +MOZ_PV_SUFFIX= +if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then + MOZ_PV_SUFFIX=${BASH_REMATCH[1]} + + # Convert the ebuild version to the upstream Mozilla version + MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI + MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI + MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI +fi + +if [[ -n ${MOZ_ESR} ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +MOZ_PN="${PN%-bin}" +MOZ_P="${MOZ_PN}-${MOZ_PV}" +MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" +MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" + +inherit 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.29.4 + 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.5 + >=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.58: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 + # glslopt: bgo#969412, bgo#969871 + moz_clear_vendor_checksums glslopt + # TB-specific + sed -i \ + -e 's/\("files":{\)[^}]*/\1/' \ + "${S}"/comm/third_party/rust/glslopt/.cargo-checksum.json || die + + # 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 +}