From b62b85eedfa4ef4f14dc7e253fcf76bbae460e10 Mon Sep 17 00:00:00 2001 From: Joonas Niilola Date: Fri, 11 Sep 2026 10:39:42 +0300 Subject: [PATCH] www-client/firefox: drop 140.14.0, 153.1.0, 154.0, 154.0.1 Bug: https://bugs.gentoo.org/981833 Bug: https://bugs.gentoo.org/981837 Signed-off-by: Joonas Niilola --- www-client/firefox/Manifest | 107 -- www-client/firefox/firefox-140.14.0.ebuild | 1424 -------------------- www-client/firefox/firefox-153.1.0.ebuild | 1310 ------------------ www-client/firefox/firefox-154.0.1.ebuild | 1310 ------------------ www-client/firefox/firefox-154.0.ebuild | 1310 ------------------ 5 files changed, 5461 deletions(-) delete mode 100644 www-client/firefox/firefox-140.14.0.ebuild delete mode 100644 www-client/firefox/firefox-153.1.0.ebuild delete mode 100644 www-client/firefox/firefox-154.0.1.ebuild delete mode 100644 www-client/firefox/firefox-154.0.ebuild diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 77d252ae007bc..17c11bd0b2a12 100644 --- a/www-client/firefox/Manifest +++ b/www-client/firefox/Manifest @@ -1,105 +1,4 @@ DIST firefox-139-loong-patches-02.tar.xz 3096 BLAKE2B 2e9c0f3dac780c808a13f70fe3808df9976898360b55113def97bf3594893166e0647c70ebc389b2d14fa2c2453fc1dd68aba20d92178670ef97d70c34205e1c SHA512 e1244007290e2e15d14cf519e3ade6a4da06abe41c416de60569a11396609661cb62fb5b592e763cc079406699dc33d6a34851f71068f4d09bdf34021b035a59 -DIST firefox-140.14.0esr-ach.xpi 294362 BLAKE2B 0ec79c04b11cb9cd40d9550a82e685b9322c2703b861009cbfed54fc8aa32b558fd2c5c045e6449d4a580659ba0d2d6045a82171d1a28387cb2dceeb596df3f1 SHA512 b12e4057e868fd65e001bdbd173b88a75749f95ca42eb36e6bf82fe68f446ae719374fec1ceeb5594858d2b6a2aec3362c9f4d0b5104383c3a83e64659f491cc -DIST firefox-140.14.0esr-af.xpi 266631 BLAKE2B 0f8f765f598227a34ae05fc2e17e16dec19f9156c97910bbb88ad089ebedd1caae7bce3b0d340b6c1194903339bea9408dfd187c73d3fa86e9dc93f7f1723769 SHA512 bdb5ded79d76f8c4f35d4619ed0282f1d73c146b5b2a33d29a1f5cfc4d85918ab2d8b86e132c8ac09276cb8485946c3b696c2cfa48eba7a0ee557ab4bf1af96b -DIST firefox-140.14.0esr-an.xpi 332300 BLAKE2B 50cb62da9f137646fd57533c328945564a5b97328dd4362daa9d98759d47f6e2470c2d071d2c225e462cba2666bc8eb3516574cc4af858e51253db902bc8b8a5 SHA512 552b372d76e929522996731d65113dfe0917af4a786a1f7efeb0158c78cd8341ff7e1dcd5c543a36ee34a6477be71e683f367673b32d3d9837ba14b2bf41ccee -DIST firefox-140.14.0esr-ar.xpi 445301 BLAKE2B 8a096b8a570a34804466157921763677a427ce257fb8376033bda812bcc944b6bfeeeb610e020c25fff6a9d8a51f269eb3e695e06133b477a66b9d886e744e0d SHA512 3f958581b9cf1e97327cb429e62f5c4fdf7626e81274802476388a86259842e7ad2746d467795541e876c646bd3d18a5499778a4fa78e19efe4a6be8548dd911 -DIST firefox-140.14.0esr-ast.xpi 312222 BLAKE2B 4ae13de82c65aa13035c0606187e1899aba0d1044497aa5c0c2aba9f1d4462a88a18457837143c119f8970ba4d5752762a4655bdeb2026ba7c0df6e822269607 SHA512 86b50b7e5f2bceb9de106d3063d3c1ef306ed2ce604c491dd880e435f0312e479e76868c654549c5143db71d1cad22530091481e22e23cb315c420908b8b8904 -DIST firefox-140.14.0esr-az.xpi 318410 BLAKE2B d05ac3cc41fe60ef57ec78d19c9a1ee5833c5552825ca5f88be67aa46323c0dde8ab4a98f692cfd822d5f266e1524294741b67d2acbf204d7d58fd824b8ab926 SHA512 e65b840b767d005af91200df650936741368f6db61d31d0bd956bb244684ee03e73908a1b4dc2a8fb60c2c62ca77fb3ee27f37b1fdc9569c646c87db62cb896e -DIST firefox-140.14.0esr-be.xpi 521203 BLAKE2B 778c5ada18eecc56fccedefc55da508f81ba224a52d1edb2add37120e05c4869738b8c607acab2075e2f63d57a684b35f8f98b67c81df0e3c8c2dedaa61c1a8c SHA512 2d0e5dedde30dfe18833ad03532645b16068e9e086399a6b097152ec88de603153283abe248f724c4040e0ede8f19b8233fbabf033ab8ffb3a8a5dfc76f36c64 -DIST firefox-140.14.0esr-bg.xpi 457556 BLAKE2B 7a5cb0a78a449777b8d3e72276634e2f896ba264aafc93f38d83978cd8d9fdd609d12dd36578f1177e9d267aad9a8c9d052aa694f66333568f175db19e4ca098 SHA512 96ffc5358fc17ecc57d1feedfc8444cec71d1bd14f2b202326dd4eec57bedd4722f0e4da4f7c5104fdbc8d0e6fa40154af7644ccc2c521a380c4c7e6a5b84464 -DIST firefox-140.14.0esr-bn.xpi 413375 BLAKE2B b058bc590584146f7fffd2f60414265a8b7337d1cc0fc92dc4b47c955752d0f74be755aa0f1fdf4d46de4f4c31c95935c6ab63766cf485d2d509337f1ab351da SHA512 e2b9ecd0aa6d453047881b57600afe7939ec73d940943d41fdb319e09ad6d6071d5d2d72cd31a8e7122bfb6b2c9be9ddd88f9ae1e75e57c451d008446986a42f -DIST firefox-140.14.0esr-br.xpi 395320 BLAKE2B f5ab95894e1eb2b462af2a551734b38bac0690ed9e08eed44adfaa75c3c773d994b1f5b5ec9ff6de2615c40234509a38724838bad8b31072140f86ddc55851ff SHA512 8ffecbc5a95cf74991b6d5681c96f931a2b5434820025b3a1ad50d2b4ce568e5e869b97e89e395e2dcb4bcd328d1e5b31d61cfe09ae299f2a5348fb68bf062e9 -DIST firefox-140.14.0esr-bs.xpi 447174 BLAKE2B 4a0e2b2db9f2d0b86e18b912be807de7da82baa3386b7b8625a12b2efb6d1ddce15e06fb25b9f85c4849e99eafd209a74296062e482631b1666889b3618209e3 SHA512 fb4f3bd31292426341b78e51065e51d1ffc14ee238148b6cdb41ea1d4309d0b5b7d0e38986a278f11d844dce837ffac0875ac321375b4427b0a6eefe890426a7 -DIST firefox-140.14.0esr-ca-valencia.xpi 357942 BLAKE2B a7d25661d307ab3a536bbfd2cb2230683e54b7c70c3bec968dfefe9e46cdead1057589e4ea446cda68e35c6aa0dd92efc6492df4b3afc0fd66accfd3667fdfc5 SHA512 a3d7a1130aa2c578108fe8ccf2879cb8f0585181b626c67b268b53ee0d3ffdfe04a827df7666823758262d6a6aba88ef2e204302916bd0a82a8d5ae037631e71 -DIST firefox-140.14.0esr-ca.xpi 404832 BLAKE2B f23cb41fe99c1d1fdf681dd70adf8dbd6824c585f3bce225ac9492e54ef921ebbe0ae688bd989c65201bc1db6eb2029f87ac2e417e2f39178a9bf35a0c9d1f0f SHA512 14bbb031bc71c606cfff42eb22635b60532dcfcf93c4ecf199579efddd7dcdc306255d2057ec5c1cf1fd5594b6df13d6e06d137484ced0a5d5bd4c3e6095f754 -DIST firefox-140.14.0esr-cak.xpi 390846 BLAKE2B 2412f4c3882c57e360a42c85e2e35fa84be42b3e0626fbf0f62676f6814a78439c6a0c5b1e20c6a0b8848d15d997f30f725b784fe95898240b708898b6b057c0 SHA512 d69897fab9de09da9f85e58f2c8f0725368f7752a188d3d074c2ae6ea24897fae2335ead626869aaacfbc20dd8ca17c508db55bc4a0bb8f792ce7cded147a0ea -DIST firefox-140.14.0esr-cs.xpi 475933 BLAKE2B 09755f574876594a4aa0e5928b36671347df205a30a5e306811e0e41514705170cddae4717b6906a3d1f45982d719a96dfb3069e99501e58c85fabe28cc457a6 SHA512 2f25c5bbcd44d79df0ec13a5c29f8b0fb266f9074ca0416afdcd3e2a24456c963de18b8ec2aad6015bc49047d4f53c9318fa1c1bca6f1f34091be929e1ac59da -DIST firefox-140.14.0esr-cy.xpi 441961 BLAKE2B 2ab12d16698052b69c5d0f7cef1cf181b9ec8581b1294b05ddbb337ddff78dedccb9599ef634a94d7c901247783161dd3f5265a8d0ca05851f890d4ca610cf53 SHA512 fcfaf8d0973fb589932e8afbcab8763e2e3e4349a8e1587597b67cb846c326ed8806f02220279210d9e3c41ad557bae86fd388831dc28e96a3fa3933aefad823 -DIST firefox-140.14.0esr-da.xpi 431130 BLAKE2B 6c6105507ded311455200ba2d1d7ce3143093018d075fb6569b0effa8745a5ac4c15dfd3df02d6cb90895c10e6cc1000d713ff7adf7998e89757a01d17a08b65 SHA512 3189878545e31b28a80ae8bb9b616a5c3e3ebd367ac1ff5bdea5208f22dccf64264121301fcf32286c2e769fab38b2dd54466efabe7dfe76111edae2e19bd0b9 -DIST firefox-140.14.0esr-de.xpi 452700 BLAKE2B b5a073159e35d035b995402358f69664d79968cd76f9a216b6e6138971d18e0c8d0d033114424e263ca960181471756fa1e4856958c91a32ba54f49b803c016b SHA512 53f3e8865f72c15932f98f3ffb91ea406058dec66d7bc748ff78a92dde9fa65067ca2133dbe9e1a086a6ead16c7f9f926643a15c53c51da9aae806e4f90f5ffb -DIST firefox-140.14.0esr-dsb.xpi 466068 BLAKE2B ae68a426f9e58c5574c5fe1d9c21a61753563b82a9024d1fd51e59162910b3bb57bf08891736f309048707d4014460d4f8984406b1751b93b596cf109c845a30 SHA512 679bc46ffe06cbbf89d89f979413332faa11aa5fc54bc0e49011b3fc6d295cc0621d9afafc2e00b0d569b1d1e15e48e6c457f6bcc1cec8ad34fc4bd5b1bcf08b -DIST firefox-140.14.0esr-el.xpi 536816 BLAKE2B 27d12a17c38339d1e57f6e0508f7b751b2baf9e5fb98d80d8f84f1cf5a259000decad172042acaa0170a55dca1091dd3e793d7dedac868d2c9fb4349e5222f1a SHA512 ef55ab8d8b7f54949ca4f347b0360e4b98517c8e4a6f523e03f0c07919603ce85831fc0f95aa8f5003a2d7b73e2e330f54711f9666d9b38c4e6bb97b039624ce -DIST firefox-140.14.0esr-en-CA.xpi 411054 BLAKE2B 379d2a797507ac41a0ec4180afe5949fe225c03a59d6856efcadabd369b4cc0a71ee0434959b8ba21f8d11835570ad1edc70828d44d7a3c7a7616739154a9bd8 SHA512 8f4f86c517f817a528720bde1983d297fe7be97baa676ed2d3d6e264ea6162a748430e0cfc3f630193ce5c6516dda870b09573bfa75dde63859dc64a4ed9bbf6 -DIST firefox-140.14.0esr-en-GB.xpi 411409 BLAKE2B 480954a7e61892413327cc3487131af64855d61bcf83d1a269af93aac03dad112977aff39e2ec2edad1ece14a5af82636cd4931b3aaaafb3247c455eab44f4bf SHA512 bdd4f9e8b0accaa383b645428211772c849115c69f82f8db1c6c5dc00d7b3e73dbdd4bda3af263030dfe28e82e86efec468089fa2bdbdbf9d64122d31d1efc2e -DIST firefox-140.14.0esr-eo.xpi 433478 BLAKE2B 90f6f60efa11c3deb1a7a434cf01763dd67daabd39449dba51cc09c628ed84eaab4d3292053e5227f98bc1890b1268cb6066e6d1443cb0a07fc45942f566ab36 SHA512 7000f42b258976a843d8c91d62f0e7e19f84382e5d2c658a6fa7d040a2a7d7a281e16e5e9013a89e47b6322ed111b54cff134790d9821899593bb7988cf4faa8 -DIST firefox-140.14.0esr-es-AR.xpi 445514 BLAKE2B edb6ae0b8148258659ca1a5470efd6c2809d756feddec5aebb5d3bc3d59479129b5dc493b1d273568fb9c010bb8df94c5ec5d667583f20784bed6ea89c95ae97 SHA512 d1d32bdf5a50f36a98fe2485e17af6ccf93f226390926a18c54da7ae45e0af03958789b959fe18e143ddfb56421309cea59fafb1f459fe3b62bb2a44dc4ce1b2 -DIST firefox-140.14.0esr-es-CL.xpi 446306 BLAKE2B e497ca2acbf47a502ec6b92c856a2bb882ec8eff75f4031b74b0c8baec8c5f8a9c0ef417e971743670e8f8cbab6046430d42830eee82e910e344f75b686d133e SHA512 9b99e6d9fa3aeb680ecfc72cf88feb70a54c9bfbc9c8dd6dafecaee4f7aba0018f8817baaa1ec86b0c854f7eb37662ad0987bd02083d72c9435b3ce670c3924c -DIST firefox-140.14.0esr-es-ES.xpi 447021 BLAKE2B bae6d598aff4b0cfd5c7f5f046ee907bb24610c73703b566c5952636881214dae3c6c76e6a0c4abe019a9e7428a96502d9732052f30e4250c02619937479ba16 SHA512 9ade360083eb0bc5a01bf5c8ddd4a6f5fd9e16a21ddc14a9e0a9d58e162daf4b465cdb9cacb7d5fc81b7df3f12be24141b0a7c81daa57e7e2db94463e79aa86f -DIST firefox-140.14.0esr-es-MX.xpi 446238 BLAKE2B 828d25fdf167d77881067f7d25b728c3a1a98f1488d36044a9bd1cdd6552aa810f3f1482c1a038eb40ddc9a46fc45f3fbcb8e14699118e059fbff66fa06e940c SHA512 1de2b972334b0d8a963665b25aa0d2f0e7c1fc0c2f3fb075f95717024926c4ec4fbf14b7e0563a6e9e5c648b176687a4ca8582c02ffe2bbb949c19132852ad9a -DIST firefox-140.14.0esr-et.xpi 359326 BLAKE2B 68f6eadb49700f3f632d1a7117b581992b1b49a33023ce14e87b91791d374f9c0be55e7d98f6054206b986b0d9129d19a5f3c607dafb1aab2009b5265ca516f3 SHA512 ae72c2f07b37f476b89a1c2e94c4124da9804ff9bfcd6cdd557c93ad2e7671712ee29efbb6755f1d1a5f15697f345a8aff2764f8f87a90cfb82c9313fb892d6f -DIST firefox-140.14.0esr-eu.xpi 417292 BLAKE2B 492d6e8eb55239bf5045d0595cfbbfe0d65e35b828606bf7cf19045b19bd55e0b8d26f7fe1eff0958ad298920a683c1845c9357ba2edd738dbd6a9838663cec3 SHA512 f186650e1adcfc3ed17ecdbbc7562b831722ec0f57562901a9cd04b82e866647e3729a889876578b1f85d983ef611a4d6a2d224c7afd00236303eeac69566bc8 -DIST firefox-140.14.0esr-fa.xpi 421636 BLAKE2B cdf8f7ac55e29e763769201f431b153f6301d8168e3c01c25b4bbf4e6efe86b3b26cc921f3d621bef05083cb28e3241dd2bec5cd423fa046f7edd5735fcdf369 SHA512 3f2f81bc27c74b92e67bf6555db02dbf0593c88c3af034c745d406d02217de9822d124b2a907e6d516039e03700cdecf07433426986372eb79b97993aa336b09 -DIST firefox-140.14.0esr-ff.xpi 310190 BLAKE2B 25d341adfd5661615a5d825824d0c559d5ab539311e06e0eadcfd8c62e7beed800bd95d104a252b523edf5cda76966df5fd1b67ba6aa6dc122a6abc4aade1040 SHA512 16ac44d33bcc91c7012a1f4ea255f9c98c5a47e356347987f7e6c7c385b7ca682e5d9b051009a5d10eb72d4748a929d085f7ec12dc8b8e290fa010d69a2286ae -DIST firefox-140.14.0esr-fi.xpi 430160 BLAKE2B 6e3e586e17b2615f3227ae68fd225590d1158771910f18244c495ede4205650d5da9da57a6390aaded294caf566072b9c176cf575dbc6b54d2f5279bf14fb1b2 SHA512 eb1cdbdfc4fb7bc021f8cd8a027a1f168ba42078a945f88e17e4de7f4f36a56ea5c75fcf373451d90ab8d6cac659847b9177c7022e101e31452a07adb1ffa891 -DIST firefox-140.14.0esr-fr.xpi 458448 BLAKE2B 7da55c43cc690efeac13082be0012200304c51c27db977dbc53bd2d4dc5cee9399e929ec8f4a97b3699d1b717be1e3445926798749874fd355e274adde6cf7b2 SHA512 0901339f0f974627ce535cf220886d26722ed6cc514222a79165aaf1de99b03e4ec23591d384a65f5cd42ba164ba2ab17c5083605ead5d49f39fbd48750a19ec -DIST firefox-140.14.0esr-fur.xpi 451843 BLAKE2B 9940cbf0fccc8fae942ceeba893960b3fe0c651247a0b78a9f66a9de35b43b6b6bdd15e0d7190846e98f60ecf9ec8ea4eb428ad23da68fe246d8036b754f9886 SHA512 982d6cd8e242e7a8d5eaebb2eb887ce8c3ea4f96b70b3d1a31ca3c196a5db77986d878002df795bf51232c44bdd87c43c754359837ffb18d9adae13a8ab9e2f7 -DIST firefox-140.14.0esr-fy-NL.xpi 442167 BLAKE2B 86fdbf762e2dd32617e85c930b9e6a872f06503b7e546afa97c5d8b515a25ec74285fad915b65a5d419cee6b219c776ca340b44445f2e8e40bb9312739d2d5dc SHA512 b17e1fcdfe1d88331fb9f51aebb009576842da0044ec27167c45826453d831aaf2372e31330971efa127606b1bc60d190459ad7fd171063fb6dd84a15346cd3e -DIST firefox-140.14.0esr-ga-IE.xpi 315285 BLAKE2B 4dbe4bda5eb0d5306d53df354b8f42ade098349e0616b9cc1094bb3c10bd98698bb000deaea1df70789cdb68771bd76b42b4b27939849190b9ebb9f5d274d7f1 SHA512 5afc1738f83648c56753d1e9c4a2836ad07c403deef836e030b057c422bfafcf8b3d95bcc392cc552a3cd95af53e0fdc108ed90e3ae8b71f6c2c024fe6cd916e -DIST firefox-140.14.0esr-gd.xpi 399427 BLAKE2B 96ea5bcb8961b0d9e53ce50ed6bcb4b211a7ece42a06b20a7da77970f1aeef7e6e31ed07b2afaebe3a6c4883cc4492013477610a5a9c8967e33fc6b6ce38585c SHA512 febce95034edfef6c9181a00a3de9267c41f81b4a4fd8c41424748f1abdb8a10b621e616f8bdddc21264b34eecf2ee753146316938e4ed6ef955b9d726381998 -DIST firefox-140.14.0esr-gl.xpi 442908 BLAKE2B 93005ec720c1a71a493fa8820a15abbb7229e0d5fec47b207c41bdbcba01daa5b641ee0594849b930fc16ef974532bc6adc7dd621ed7980c631e1ba091217b1f SHA512 3c6f0ce954416718801acbc85b0d84e0e4ebb2513574fff3e8d18b60b393c7fd2aa654f09dd4482dd1a7ee17c60d6900e36d48983c9cb911f56dc05b1500b9cc -DIST firefox-140.14.0esr-gn.xpi 451085 BLAKE2B f13698d6777d1aef084bfe4a7dbcd2fe9f6a28270ac7e75202f5b80e3d4f8cd3f07877a6d62aace3083c093e878e7edcb15d1766fd214e3d3cac8de5bda831aa SHA512 2cbffab87f275c8044aa6a9950637d7c509b8bab97023e7fde26e80ef2158765fdbd16c2eb894d265fe054922f2496d3f39c1b7663ce03aea0a54fc0f8f7566f -DIST firefox-140.14.0esr-gu-IN.xpi 358979 BLAKE2B baffcda6b13bde1b98ef1cfff5d9bb347f516d60ce9ac4718c865c48085ffe28919924ea99c010378e1a16f04c0e927b0352397c60b6b3de6eacdcec4ae6ffc8 SHA512 df6b36baa512fe35b64903a8ce719affbd77918161bd83268151590b44476aa41d4e488cb7cb046fc8d87ed7efb96efb52807126333ede1ae9fc34afd553071d -DIST firefox-140.14.0esr-he.xpi 444991 BLAKE2B a2b20b2026f471b9e919921c1fd6b75345c2ac1ec33dc873cfe09e6f399f93a940a0533becc8012b66c430388feb23efbbc47c95af1780aa4af1a7f0361760ff SHA512 6144390987b00a4033244f5a025cf8f6efff32c5a563edd9b64b4292bae228d57e526a951f71e7d05a62ca7180b2a1d973d3ec89ead50e42a9457d9dc9cef150 -DIST firefox-140.14.0esr-hi-IN.xpi 377454 BLAKE2B 0e9c93214d5b58ad1e59d7290b34ffcab853d24c8913761655e0c9921c074697b88fa96da9db526ffc0c495c5aa8a551d4ad2a70e9cbff49d28a58133d396623 SHA512 e94d673685bd8c5ee271b6046a95eb647871567a5716c00c7c9495121e20564f452722a0acaf1cbd009ee16d88965b23c993dfefab02ac857252b93543e24037 -DIST firefox-140.14.0esr-hr.xpi 437697 BLAKE2B 0c4f0725737901192ba427b1e9f16f971c90a34c7a402898c1722404fa8474ccdfd93e9d30772c75351e70e9605536bdd6d91975231068d7b44afdbc52c19792 SHA512 d7d9a11079bf898e2c58269236c523615c57ca9d61ff523284c5ca2c50ffbae5aa824f30e4be183c6bce028a26926934844688c66e11b2cd5d5afe427eb5cdf6 -DIST firefox-140.14.0esr-hsb.xpi 462698 BLAKE2B a1c6749092c2c142476d9f333e2a8e00c7804c8c5740df51ebc3fc5d47fa17e61b1cc57ad14d119aa3d56eea4262ea5658169385b3812e2724144fe2ae33614a SHA512 09304178bd6687289877d0d7f033c91479ed1486e97130dccbef04a28a05d922de20e0d8c64066d87ea07f73a113e0b3723d416993aedaeaa782563557b386bd -DIST firefox-140.14.0esr-hu.xpi 466171 BLAKE2B 793ed9649d74f3b6f3dd322af454a6bbedaaf9f33129e8e57f1e58b0b2694453c0724a979102239c60f99f78513becf1f03ce98dc8b1aef136034dad362b9b4d SHA512 106ea0fe4cf5398c131dffab5600f5b9882bf245357f9110dc737a5f9c6234914b8a9406751df8f71cf95d4fc78e04514ea74b6882ee8dd6423aaf29fe76909e -DIST firefox-140.14.0esr-hy-AM.xpi 461615 BLAKE2B dc02db6d7a536970f1adcea2edfd754cb0182085832bdad8debe1095498dcbec079c586cb36e84458dbaae2eadf6adf8d562066b825522275b5f73dba493a267 SHA512 38219c8c16dce5acd5a39c8549da953fbd0fa95c1455f02b59de008123357c1416af04cdf956709083d781b3c4a88ff1b0976d1182a69f4408e7ee18d2db4d80 -DIST firefox-140.14.0esr-ia.xpi 430119 BLAKE2B 0ec2ee3c2c3ace31aa5a971e59498f82e9777b61b32e92646a38d1e7873f3e7329bcae4d64bd96192ae70046f61936c360f019b6bb4502293c3dcd6570905bd9 SHA512 cc06b72e96ed63f709d472bec0e78084e9a56cca2ce330f8fd747ba97bb2e10ae4c0d495a600c5f1886640a1c7f60d04eaa1cce54dfc6839ba7bf06477143ac7 -DIST firefox-140.14.0esr-id.xpi 422745 BLAKE2B 8c635fbe70497776d95e07ac7a13860ee8c63a138bf377ab42296e46f5133e480bdacabef879ec6a95264341d29caf4c1536eb00505482dfc046aabdb075c46f SHA512 6cf435f358e908863cbce3ce38c64d2c7ccd23c91cb86ba2b56315d35a640e2d5374a3a984f3f326ea50341b0aba57f82e6503becf70c0ba2a4c1e9b6c0238e4 -DIST firefox-140.14.0esr-is.xpi 432681 BLAKE2B 8602ccddd198e05781665b5d984547de690a9753d5d1e6b611b41594e6b5113852b42ab537c177e76cf5ba4115f8b8c4765d9f60acc27642e504fffc475d8acc SHA512 6800aa65512146b10e218af44c6ca9eb18d7ace1e0f99593f4b72e49db2cadb599749599f093c04b4640d66ec332df6072d90765ccfb74a9911bc5bc1cc4aec9 -DIST firefox-140.14.0esr-it.xpi 440904 BLAKE2B 1bc80b7e42d761229acdb99b6a7426a8395ccdde68c75813ce80820848a7101b8e17d7ecfe2689dd5c6a26ff03ad4c8cf4c01bb479eebf96aeb3758c642a93f7 SHA512 6d0480f8dc01c35b40f46f104845f987b20425c8fbb30ce8b839ee1596eb0e148e62df3e2ad532d6632ab515f316c18743d813a14ce2d94b15f4e36ad65ea88d -DIST firefox-140.14.0esr-ja.xpi 481318 BLAKE2B f1b2cfc974917c447cf8453f2774933089577aef8c62a4afe7003e45ce78a031d7fec8cebe41af4d5ad2affb51d514845521414ea4de75be8e8612317d5826df SHA512 8363b1f80e13bfb755f096b9ccb3b71701a40051b91ffeecbbd6f36845216986d3417fb2de3932dd1174083092524e04b2e57c448d7ca3171151b51159599c76 -DIST firefox-140.14.0esr-ka.xpi 494873 BLAKE2B 13efc1a3530ecb4b31f0a0ecee330bd4ae0fb2f95afebcd83cb28e493d56150ae291bb4b542160fabc8c34d183750da5387095828f5c5991dec8e93c6845948b SHA512 d267bf9f1d303937eed6e5df71708663eb0e8a76d08118810ee8aa8424cd3850daa8a9c1084a0aef062490abc8618cde50320bcd307a9ff04ef126278e71917b -DIST firefox-140.14.0esr-kab.xpi 422855 BLAKE2B de3c9b9d10f06ff8629b0a342466ce265403b377cc1a41893b17f0a006da22bb635181df9f22b152500052c7c61a62c3429d0a7c0c5ea09c185da163d66657ef SHA512 699099626ef35656ccd312f501355da260aaf1ccab47ab7125219e8ac062eff792795c7c64fd60dab9bb7e7603f718f844113bb8dae814718f8f264d9b941316 -DIST firefox-140.14.0esr-kk.xpi 506694 BLAKE2B 1bcaf3ad4fe9bd3c6caed1c00611a04d726483157006249767528b5b04350ffb70037b0f2dfa337a9255ac946b618962a82e0c84876d4bdd2b407cc35ba01a6b SHA512 53e6a335af7156da445f27d4ab3bc3571e24c1bdb5afe6506b3934e404908fe1f79f98e362a9e4263f5ad70370ea8ef9d2c400d31223497ec7a3d906fe0563c4 -DIST firefox-140.14.0esr-km.xpi 348780 BLAKE2B a741ba0bac84c028c3c13a4196142afb7a6cde31fe5febb9a3e0d996d093d04b94cc97378ab86e09b5aac3ad51c854e55b653d3d3197ea246986a1967d0c0baa SHA512 8bb8337fd28da1d0ba902208727a4ec61b1d7264192554015f52d9e4e6efd8fdf7931cc5759985974a4699d75f86daba70bfbcebb2391ad2eddb0c4048f31554 -DIST firefox-140.14.0esr-kn.xpi 331783 BLAKE2B 5c6100f014ef19cc93b32a17b4cab723fd07a6b71c06ff567056adadc5c6b59e0e76942b472aeabcbac7ef50cb37221c6a78c8d82d13a3b8e417f27920ec3f91 SHA512 7c8db57a6baaf5bebb6cf361fd0f988318efe0159b8949506198464ec80c8443cfa4da97b57932bbfdcf0e807e799e7c31b961e17da955b4f55ebb299b9a58dd -DIST firefox-140.14.0esr-ko.xpi 467540 BLAKE2B e7830951f202419fe1372a9bbc59c054991ac6c0e6a42655b9babcfba12ede2d0d7ef37caf0e24f3f5bf32e1d22fb0617db7820062334ceec535dc8cfc78974f SHA512 63e93e86803003892506f943e6b272dd79f1e59edb3dac119cecec3018ea43e93437d6ae8581e25971db6030984ba72ca50a5d8cfdec714c62c32cbcc677f58e -DIST firefox-140.14.0esr-lij.xpi 319285 BLAKE2B 022ae8e5d7ba735b043fa6b504d078b597facd6859224880a265787803a809f3dc68168fdef6937f4fcec27ff323e0663a02eb67ebb5208c9bda26b4e81b3d2c SHA512 1d446fb32e217b860e91005fdaaa26258e64b2d1692f6b1114ad82e945a4313f678dd3c58afee2f0028f8837165f0d31374a8d10380bd56726ec0ebf7d4ff234 -DIST firefox-140.14.0esr-lt.xpi 379962 BLAKE2B 7dd75200a604317d66615df7e5bc99e49d967289564f91928a1a9b1809e3d0eb679451e5372fc4aa9762be5d2e79e1bea8f4cfb6299d10ad49ba9ef732b29262 SHA512 bfe2345694d0e4b597964c039ce545257f1fba5bc09cf563c9a3b367577fe646d54d0370c7347149ed0029b7a84af5d9884ff202e12784e55ee86ffb7411ec48 -DIST firefox-140.14.0esr-lv.xpi 389081 BLAKE2B f5d50cc391615208d197629a07ff17d2a34c7cf208c49fda80280ae35dcb83c04787f4f7ef21ee55a42cd2fb4f713081ee3dfdc1033a25267d19c7af706b0347 SHA512 0aa17cdd06871ee28d3d3538181758197f55bcaebc36e56419eac3e6549cb3bda7978795990501d91ef587489b3e40860d73e85f24c2df196c25a5ff8f17f6c4 -DIST firefox-140.14.0esr-mk.xpi 316833 BLAKE2B 4ead945f752378e0ff08e4460f6e85f877833ed87fb2f137f307d101e78dbafdebeb174a38747da0869074433866346b8c50a2a79ee7f8b875094ff4aabe7888 SHA512 3b49ce8c985effe862d37513f35028cf706257d029e90a1b4deddc9d729af8a12036f87a31ca9003f0afae9df1021ab079d5b1a207778acdc2faedadca7edf4e -DIST firefox-140.14.0esr-mr.xpi 356253 BLAKE2B 8d11737f8e6506ff3456dcbae1fafd7e5d61995ac2a3935381be6456db10fdbd68055db794cf8ea795bb294e0eacffaf5fbff43a144b310e707359045b3cec6b SHA512 03be1e191786e577569bc1178516bf89cb18f48121dfe9ea1edfd2f6df6a809f0d5fa3bc6936c21f506e19930480fad6bbef4b162b283211abdbb229c5a9cb91 -DIST firefox-140.14.0esr-ms.xpi 295380 BLAKE2B af78c6254a86c7319e89a14e54c6872e86398cd85aa80d90d00b278b0eb73889731bc1fad999b7f848c76322e2c3958e9689dacbb6aa9a18e71be63014b904f5 SHA512 9fc32284fd92c6169c76462147a849c0eb74612338a5e224cdf159ec25d512b4b44d6fad260d39215f56c9d9b57310164eb80586f764a8232a1c84d304adde0c -DIST firefox-140.14.0esr-my.xpi 343046 BLAKE2B 7a7f8d20e40d016f71f1aa550752cc9f5f276a21a0c0513bf3396654a4c82d2e244fda46ee7143cc44cbc6257b5b893b4c5731d9e19ca33cfff39a982ed1fb85 SHA512 ea8987024ce29b52d81dfd8cf8107a7c48c7b165c1227a6fae7cfefcecf5cbca26027a1ffea0c3ffb142d604a6c592016200dd8425d73bc5eaa5c1cc65e8dcd0 -DIST firefox-140.14.0esr-nb-NO.xpi 429338 BLAKE2B a78669ee78e02995f331b94396346e7f73f8b16357e3f199b66c5884ab79e1afce0b156a2e640a407fdf23fe7166cfc1025ba2853a5f84fe6de5bf90b2279b64 SHA512 e3a0b000b0eea038a552cc47ee9bfaabc90999efd9292261c931f31556a0af7f5f49b5cb754e33c82321f041ed217c9f7f93de31dc0fb95478b83569605a220c -DIST firefox-140.14.0esr-ne-NP.xpi 349010 BLAKE2B 3c29f3ce5ff2839446f3705b7b7bd0ffafb0eea5d9fcd6e07e5df41a91a555412720deb2898bb97bf50ea704e87d7bbc7c3df474970c93c04d9c168ca9f82054 SHA512 0fa2e6cb5fbf1fc42f9563ad1691ef1749609548b71f7848d5da1aba50dc3e650e7852c82867d3790c2b4b29c778b81f50db07473d31cd617efe0f16600a618f -DIST firefox-140.14.0esr-nl.xpi 436194 BLAKE2B a35ff6529dafcfb1a8a36c24797ec0e1171e2673e79750990553b4e21205446fc5a2539afdd4965823455526ff7b6ed487bd67b85b59b85bbf1bcfb62a88e6e0 SHA512 637f9a0b9bb5927077313bfd4c38fd94f87671fcc89f34ab8f17dc6b9092c0c4c6d3aea52fdd11e181a910e0c9a8292255f966885e9dc8fd6a4e1be63a27e3a5 -DIST firefox-140.14.0esr-nn-NO.xpi 432226 BLAKE2B 52ba0df2443a10aadee11bbf283ce0cf6fb03028550353b0735ecd5a62846a451e35af40cb85b1bd5049b2dac7157f0b6e7da1b5e640de5e0eac59be18bf9689 SHA512 d69489b6b7c4c894c878069bb759474f3d6bc0a1de840e5a4d9f0f5b65c6941e727bd4000ab445e3dfea21aadc94b9adb98ff50cb7a35fce936ec4917a5fcb50 -DIST firefox-140.14.0esr-oc.xpi 410941 BLAKE2B a11c44e851cf183fb15d58d3b3176026d8dac75f0f5bda7c7239f90c41b898c553286054a3b65c44a4b6b76cf78346f365a26b58b12e0ec7d8ddf89f16b5f2fd SHA512 4554657f5d0b59e27afc35f4c4be8fd210227679f361646c590a1789b69060bac942d4da57532c4f72fdc1b24d8761a9c5fd2283af42534c2b99b6c213fa28dd -DIST firefox-140.14.0esr-pa-IN.xpi 494417 BLAKE2B 07aceb19b7b19369d62b711ced0fc4a1b0ece87c2fa8162e5838bbb30624259c09a64b3e9fe098a754ff80bf975b11b9752e1f231d2bcb271db039ec53c99e18 SHA512 b74c6313dcb6df3c4625ccd236972a2056151143025029d55a3ce15784774af812e3b065bf621463920b4f12708bc5e3b4a96f9dd17d3421e3b1fb6cc29a28c5 -DIST firefox-140.14.0esr-pl.xpi 460935 BLAKE2B 44d0c2e9b10bb74743945c4367e913ed1b35fab183ccc8e2fa9feefbc78eb917cbb860860812b440b9a14752117d0571cb6a932a56a5cad4bd21ef2e8677351b SHA512 232372267712454cf99565bac2a230a9dc02982e931e98f32b2195c09eae61b17b4ff9dcd755a76916fe94caf09aa08a7e4dd6fb3487dd1d8083c57829572e32 -DIST firefox-140.14.0esr-pt-BR.xpi 440773 BLAKE2B f29620272ebdcfe75e4f7c4bb505d3539a27d944ef713c161ff4324060770069e6b6d8acacef3d3acf7ef5ea935ce1b40669d6f2c2f9c2e631cb7f82df244aaa SHA512 985ec8386919e7e3c0862beae11135c186ca775bbb16360c84c937a8e91e80ff2a5d2307e878ebae6febc005e24e91cd9aa6bdc9db22ca01afdb8d47728a92df -DIST firefox-140.14.0esr-pt-PT.xpi 446422 BLAKE2B 836e5ebec0df2ddaba8c5c65b10a018ac7b7b99308d434495c66715dac0d904cfd46060132ea1d320bf397a5b39be0114270fe66e889dd08a4e6304e448c4ae0 SHA512 7bf64aa04b7cf61dfacdd5a13d5349331044e358f0b067aadc1f0d3e2554c8657747e9a2f80585c8918e0c22329082e71b9370a10708e2a0592611d74547d9f9 -DIST firefox-140.14.0esr-rm.xpi 438027 BLAKE2B 0eef4fd0983a6e8665c36c052c229fbf63c7f5cf7cf64b26083d28f132d6c5ccfde477b3f55d815a85ac8090d44c2e3a6ccbf7299563bb83de6db06f1dcd2f3c SHA512 86ed1c34f289b224f8442d917925628f9e3191a26e9321072d842cc738ca55486660ce1bdae68695ca345561404b5e6ae19a8ba7badc7ba34e16649d65e42e13 -DIST firefox-140.14.0esr-ro.xpi 452833 BLAKE2B 398df9ff853895b6109472b4d34134be71e636556794df313eec45ec35f0dcb1fdc3116b3c18cc53162b2998b6c6d2b144727219c34ba4ce2b3ce6a1ecd673d9 SHA512 13542b4fd44c41016252d8266b2de8c9edfa3f31cbd186defb7101402781c4ed5e3bc887a949bcbf1b5e14cdfe8210438b380eadef5e50dc6c09e55518737fb8 -DIST firefox-140.14.0esr-ru.xpi 525189 BLAKE2B 0533ab65e8633befa9a95a6d660adedf37c89a93e4a15255136ea30d81e5be77c0a4b9d79b961ce009f46999d53dabeb3ee543de76f524d6f0dfc87392a92b1f SHA512 4d3b1541a3072580e32c11c9a82ab7dd6cb4ecfd18266683817bc6e9115cb113d7ba5e4236b60f04071d4542daaf57052fbe88cd8aad8fdd4e8b59b1ecfe562d -DIST firefox-140.14.0esr-sc.xpi 410469 BLAKE2B be8ad63a71723198018677a317f3772aa40360bb696979731f4db83f60aa941e2e46eb8a277c95c52f9bd476c8188393966ac352c7bd535a1f9999a0c2bdf1d6 SHA512 eb04a15b08c83bf26cec9f6d44552169b9b212258ac282150d9650ebb4b959a73099e6de0721a2d19cdbf67cc1d4baa63b3c840a6aaa973ee2b97c72ed13d426 -DIST firefox-140.14.0esr-sco.xpi 322654 BLAKE2B cf57433c3d16fa1ed541291f289ce92805e13fdcc42000a422c5167d4bb5090cb75c9e23afa542f0d775fa671f1deb3a5d97eeaa21c835f186a24a137e4f2ea0 SHA512 31287ed9aee373b51e511a7a6b3f7dd40c97a0dd1e129d541f71178dc28432610e860c87eb092fbe8c02d9496d8f8d8c6b2707fe6583ba1bc15b783d54921f65 -DIST firefox-140.14.0esr-si.xpi 411606 BLAKE2B 1dd5d0f711d81767b402dea158a3144ae52067d9c3f8062daf412837a595f36439e60e37f700c045639ffb6c846460186a19e83fce3836330e482f8f367e6d16 SHA512 7e9bf11c21e7122e0e4d14a6dcaed2f0d8af411a5ac20be989f3c766abf52efb44c7fdc3e263370f56a6b052b5dbc1af180e11849f0fb432a060820af55e4e12 -DIST firefox-140.14.0esr-sk.xpi 468227 BLAKE2B eebe8a48b09204a5b9acce11e9d30751378e56cdc04e07cccd23da8b9e89d387974cc5677bb3af52588bb61d938539cb48ead98803401c93a1530f2ead8e1b24 SHA512 74cdd4476ae919e13545783120cc84266c549084bb601a30cddb8752bcdc79d6861ec2792fd3b51cc89eb328bd8046752113f2fec7c176e03e1b241aade49c7c -DIST firefox-140.14.0esr-skr.xpi 485875 BLAKE2B f2fdcbb141cef772ec569e93e5c13565632656434a23e6070957da0b20babd57d7fcdf25798e3e429159aa180f83800a076e97fe7a7a856bff15fb888d8fec28 SHA512 d151372650ae29ff72efdb20f79e86eabf80dde0a8ed267a9f78bc0882641a40f55de14c20007fcd41c2ce49e386affd93085418f6d016b2c62cd25657a05dc2 -DIST firefox-140.14.0esr-sl.xpi 441207 BLAKE2B 9607b4a7a99dae9ae3e7301cbc338cf4003a7db5cf7423517fd2b8d741580c4cbb060e200ea0e647d4a5bed63d88f97fdcb87248a7a87c1d23b8eaa94e7ebd78 SHA512 d56ba1f5fd745935bcae18f5f056402d99d3ad112540425f209a9d43fba242860170419ec6991a2889e603e74d398eebe9409abfa45c5adbc167ccc9ff3e1a7c -DIST firefox-140.14.0esr-son.xpi 273125 BLAKE2B 615f70e20c7956fbea2755af07f783e7e2d565bd4903c7913a9b50c52e912d728a70e7a600a0ffc3c195b87698e8f7f95b50af17812455b01dbac7604bff436e SHA512 0ad906b5af7ce8fa5aa21b43ff817b444e13ad5285cdd03eb99756ab9ba74372a1e9a9dde7c3779faba6a83628f6114319454c66d441eff1e011113e8c3a89c1 -DIST firefox-140.14.0esr-sq.xpi 456016 BLAKE2B 0c9f3c16db7879e051d46478787fbc6c0fc86a2cc6f883f94648158e2d7be3685384b445eaaed1581d00dd8ff75300d903fd113cc837a0efbfea9573e5a2d540 SHA512 f790a4a59dfafa4959d80516363dfec56d961a6d920e00ecac71ea70bd91a0953bff47ed235c0a1e0a932cdbb4c74ceb852f9cb0772b498f522239091607cee9 -DIST firefox-140.14.0esr-sr.xpi 453372 BLAKE2B f00b69de577bb0e1271bb7805a879cccca6b4273f87726af8a91d6e8a2c0f02e17996a99505c32b820ec5b4986a5aa53cc7f5fd91286c9988b51e20cbfcb5578 SHA512 5b192f96efd66e00ce31a2fe2c0db40ed9bce88f072bd6e2f1fda622e0524ba6cb6da7fce52739e20eff64fca2d836f9e9bade6bb727fefc7b8d01098ac5054a -DIST firefox-140.14.0esr-sv-SE.xpi 436154 BLAKE2B 3a040af66ce8a0496a132ceb5dbec3033209a7b4319fd01fb06432e6781594d1e6243a13678d828adf8835016228761ca2c5e20c814aeb4849ce3d5b6831dead SHA512 5c5f6183118269a539769b81185705004b6d149e79e94bf23ca57fa7c2f16ca8aaa2164b3e791c952c6dddfa235970b79c04b1bbcdf2964e7973c0ff7d7b8da0 -DIST firefox-140.14.0esr-szl.xpi 341679 BLAKE2B 6314b9a69bdbd35592d8b1806d517421127cc58af7846d8f9c43fb2b9d11815683c0b98de0fd78c750f82af5115c317de2ad4535a532fb30279a2eb98380fbbc SHA512 764c9d18ed76a4d68afd052ccac4052b72b82af73b20658644219083efe1dbd38c13fc0af3426ea796c63bbc61166e43a72bdf1e52c8d65713dbad98d57619a6 -DIST firefox-140.14.0esr-ta.xpi 338149 BLAKE2B c47b4591af49ac127a2d65c8479ceae909e98d07817d52da5aa742f5c4dbd69b1dffe28725b1baf10588c24508c51025452b0323c52f584e6de038d7a70b0251 SHA512 942a356c7b97089030378aaa8e21cf28c7ee8a4fd11ac5fdb5afd6510b81d2f7487b1a9b796f228328c5cb36e457778be1fb70e23e60f606e474fdedb9bc4afa -DIST firefox-140.14.0esr-te.xpi 382194 BLAKE2B 6ccb8d7c9b85af10f043dbf9d6bac1388bd0e1177bff0c192102d28732a3f529afa9c9e58007a417fda009bcc014f629bab82d8c4ca28d29e01aa9c58ac493da SHA512 e5652b65469bf8eaa7bfce22cbe6cf0aa31fcfb09bba3a5058d455e55669b9eacd81db66020fb4579bb2c5e9989a671cfbcae925bb7d905d359c2260df756b21 -DIST firefox-140.14.0esr-th.xpi 505497 BLAKE2B 2561adfbefacf0bb77a9d18f3e9fe21e711ce830555404b3f735b50e2b9fd19649b2258177a8aabb68ef60b7cad3469f2900379213d1141cf01318a6df94fb3e SHA512 04bcaf1b829f5a6d28e7bda3f769bbdd19fc62910e774a6f5854301151302d1961d8b6552563c458abd8902d2f3e9975a2d2d91855610a5cde98add66e910e35 -DIST firefox-140.14.0esr-tl.xpi 356653 BLAKE2B 82c7a77607c673cb097f857899510a7994e71551d025d157dca051459f852202e4ec3d4fed17c4f360e436579fda6616780d8b0c883281169c0fc33403c6b751 SHA512 99e048a41d63793f860551c7751fb36e18b755a44f3045b541c976cef2f2a7b030a1d522bc925417038ea0ad85bf1b1f67c529f7436f8c2c14f1939e1199cdb3 -DIST firefox-140.14.0esr-tr.xpi 449322 BLAKE2B 76e375e0951ca68095a04f85d2d580d4060f3e70629319ea55a77bc2f067721eddc33c27eeb7a1a1bd0a43b4e3eba8e4e89f4b9061de54798bdd48ef210346d9 SHA512 4fcfe034c65ecf428239e587e6af076ba2f249bf8512e9ca270358f3bd5d634f75f5dafe78c484f76fb28e39d63d6937efcd3973807165daeaba78393942b25d -DIST firefox-140.14.0esr-trs.xpi 324521 BLAKE2B 375c54192e88efbe7c63bb476a033cd2e6b67bddc4af087b36127ea2a9366ea9bfc801bf657f3f7d8cdede5390b27920b35c0c9a52ce9ea7dcb7952119628a2a SHA512 29ee89fb59858503e72a9f827287d4e2624d307f32056958efeee58fc6bb80f0d94778f712af947a8ea94fca4648f2e1616403698e0ca7a718c8f2d3858e3797 -DIST firefox-140.14.0esr-uk.xpi 516737 BLAKE2B b349e7b16d777631d02c6a3cbea9be8c4fa285af7235ca48a87e22d509f2fd031a7c10167ddc7b9305a51796f005af1b04b88e5dfb1450091eb45a9dc0524b2d SHA512 10ca9a99d3960be67a327058f64845215aab70203a6fc404d4f497a2581a8ee6946c96301d3419ad3ff9ab746126b3ed83dc2ed018594f924f717b117e165b1a -DIST firefox-140.14.0esr-ur.xpi 370189 BLAKE2B 9f5c4ee615fba0e2329058b7c782e2ed649b2eb122b3a6a26106f8e262c4ca58ee96e79129045400a603e2a8ad79b97ef51aa3912e145431da6deb1cebe8b268 SHA512 d707ca33d4be0a07cd43867b0b33545871408cd3089fdfe7a9a5c8dfcfea7bf48c8564c3925fe478ec55777aea33172b7452a2063772a357398d2c920de376ce -DIST firefox-140.14.0esr-uz.xpi 303492 BLAKE2B 3fd53dc9408f19dfe81ec06804ec7458bf461231319c980b1482c258d1fc52691985a3102f904dfa3fb2ef78e9dacf96461ff3412e24485283d8e9d3a6e908b8 SHA512 c5d19e5b13baccfe71924fd3125fb693c2df3b913fe6af551c8dbf8fe841df5888f1521c7e4ca09b5924227d81e5d96ebcab038daff9d330cab26e9d4165b66a -DIST firefox-140.14.0esr-vi.xpi 469151 BLAKE2B 782d914274d37e4d3d839009c0346a103b08c9b55d85ff0367376db0c1961eb02fd6471c07a8877d6b72052cc706cce31b2f458adfec02371d74bfbbe3a7171c SHA512 7e99ec0d517da3f7ef7877af9199ec04608e9bed9e05e58bbd7f1e372ab751a9b8c521fbbe7f5b00cb3568061c5251983027362ce89982b3afed99a7339e64a0 -DIST firefox-140.14.0esr-xh.xpi 272799 BLAKE2B af90e0fc6369afac7e97fa6061993f7182d57c94da7ca36a6f8436d11543d9eedbd9aaf86f04e1e32eee702c0c327b1072846c2fa05fc3d6a4837de7e1d5d1ae SHA512 e66906b7e9ec631c461993547216dc746a2ff159d152b9e4d32a7833d8db40421867d0bb53598fb7222669d434b76e5ffc79dce0453bfdb607a870684f60922e -DIST firefox-140.14.0esr-zh-CN.xpi 460710 BLAKE2B d2362e836a4c9f2704b5a71341d8b879214fa2c3eca929caf78a83e602d648421f8a9f6e9137af8f9b324cfb084f80654dc068115dbb5992397a917f666e1bf7 SHA512 2f25715b7ff26857a6f4855ddc54e89822b6a196cbbee089a32c3c35c47c271e368ee7d0c1ba6967c0b8193efe919f4862372cee51ef40ac5e0c767bb3199468 -DIST firefox-140.14.0esr-zh-TW.xpi 463733 BLAKE2B d3fe463b15c94a11e21a5e04688e00342e53d8cd468761a0dee680574ec5989f95fe0662fa6754f834fa8235eb89b780ff4bf453f66b1634ee70b64c41f59480 SHA512 5e6de37718bd95b5f1c5241fe76d01a3008081491c056745c97a09202419e4dda0a656dd8ad542008aa10fd1fcf68164813334c0dca289d76f8f323256b8b732 -DIST firefox-140.14.0esr.source.tar.xz 643083928 BLAKE2B cede36a6a323db711972c10159de2ac014c7554ce93f301a521f80ced4e4a3f4938867aa3ce423434e0365cae136ba30f057eb053120803e55a30353f4665f21 SHA512 0609cca9bfaecbff56cdf13458534bd8cfa43f139056867d3b6394a767281599ee600f83165ad25565ced59b552592aa84431357458ccecfbe5bf104dca501c7 DIST firefox-140.15.0esr-ach.xpi 294365 BLAKE2B 6f6e7283809a6790fc37afef0e3052afdc37235ac2b8f1879d22e02287d47619a6d2cc85a43b528325c33482917b70045b09e5a935e5db4f3a0609bac3ff6733 SHA512 13bf2d1e2109adbcfcd5d9fa386dd17a810f2a2598cf2f166583308ee01e3cb34ee8ef450544fc7a66dbd2560e4b1ad212287ad4120d0930da8eb62c1f2c309d DIST firefox-140.15.0esr-af.xpi 266641 BLAKE2B 0820d9b2fb60468f21c2a836e681e80b5aa93a59a7f76b8c03efafcbddc1f9573bb6ed1bd432b860d903de2b4d1bcf53078b186345e54699c111e9aafb78f42d SHA512 454c1726146438f11dd0a1196127dd7dd11478ffb9229480881df88e4d92aa722d9be2df74941bc34de0945ee8d37332c51e1de2ab3a1b83e9cb1fe8e842208a DIST firefox-140.15.0esr-an.xpi 332302 BLAKE2B 87c3b120f985ebc6469ec05737beebad3a4561b44b803b079a52835e8f5e7b8d08b064587138654e59fcc2c03d3d4770dd9424dedeec713caca3075ee80b2bf6 SHA512 f95d3fb252bb98f6a1bcdb4789c5929dd0483b008785de3686acbc21344d4f9338f7aedb833db6c43b08239d8914e362f2dd28a63c7b62f0bf6384f4396d4d41 @@ -202,14 +101,8 @@ DIST firefox-140.15.0esr-zh-CN.xpi 460697 BLAKE2B 569ef8cf77be6ca18c30f10bb116b3 DIST firefox-140.15.0esr-zh-TW.xpi 463736 BLAKE2B afc6b0f77719b455c4be37de82804cf034743d6f426034774b306890a11f390f638a8e78dc38914082169205bab52c1ca715892666ae6f1d8fa1b1017ef221dd SHA512 f8b73d88e4a969c57c6462ce59979a84656d64146bf7ec17b295b4a9a76299a2a2198baad3707d3017100bd226796e6317bfc593e47c32d87919db56e65111d2 DIST firefox-140.15.0esr.source.tar.xz 640054332 BLAKE2B 2267af31f533a17ff8e77b79d635c408a00df9e936f110f19ad1712113689fdf2c3765807f803a4761ebb455e96c2163c74b2ada799fb46cab29cf70e231486b SHA512 c3a9c92776fc0fe4ec84e83d608822a84ab424bef3e9200de8e17f161369d13bb4a5caf5de326dded23edaf1c6b424d831218029786d4cfd1d857ee2634efeff DIST firefox-140esr-patches-13.tar.xz 15628 BLAKE2B 824c3d42f2f6cf70932fe395cf11dfe9043e09e20d6dfd2bd64ce4567206def45424e82b738f27c71648f0b2d97608746d22565cf7aa35713dedd71a24cde449 SHA512 d4d59818944f6a8213598308a1095a0f3c9818e6c517587e4630056d432a0e9673ad627447ca18dfa884dbb35bc2921e54cfc63f9c5646765e0f66a75279584d -DIST firefox-153.1.0esr.source.tar.xz 801285696 BLAKE2B c72b60b0cace881b4cee125615f6710b3c2aa1d5498100b7d764ecb324f0bc961c992f9829cfd051ffd54985ed0403b8684ec47d9043b30994338dc293455905 SHA512 0e5be18878a1bb8575d4ff03b499a092663fcd1779a05b59b82a8b663a3d7047cf3d6f971faeb3d1262f83b23022a703a2033e8ea38bcbd9c85f44bdd35d86c1 DIST firefox-153.2.0esr.source.tar.xz 807705672 BLAKE2B 73798f3bb282f39ceb302989caf74ca4385c9079b98c783f8ac16401feae820a7183fb35ece9308bb1e029356d1e7d6ebe745031ed4f0706de565fb3ab8903df SHA512 a8cd4784bb52ca89c0fe37404e894c044f6145c62e9fcdeffe621fde81ae4602078be575e26c90d83e5e47f26675d3ee897cd6a20027d09d4ba7d0e785ce39bc -DIST firefox-153esr-patches-01.tar.xz 11308 BLAKE2B cfb7e8528f46e780ff10d728d6f2f00215c9cb940f3ba289aafee183199fd2a38cbe866697b5bd89458d8dce7e82e9a7dc6977e817bbeac1a01178a64adb0405 SHA512 11895ae7eba03b12ae60c280c3ea555c2954dd15eaa8a459f9a95b96629723ed599ab4e7738b33f1bdb0d09d19bccb53d511eaac9913a58e6418c11fe93c92bc DIST firefox-153esr-patches-03.tar.xz 13056 BLAKE2B 25dcb9db586180e2e695a148eabcf226a271abac110c632bfca0f8f659387c2d14c5a5fd5706eb300cf990a4f424e34abc3d7edb3db0e62b662aa0ade47b75a9 SHA512 686164839139581802e08cae254d84e2e5c13a8f0826b47be645c697024af89eec51175f823586851ff18de717a366362898bb5a42ecbaa863ccfaf11af66dd3 -DIST firefox-154-patches-01.tar.xz 12796 BLAKE2B bc9cff535a3a8ca67564ffdf636e3d4741e4cb3307e2acaf07c58448061ab16dad0827ca51df670007c58424fcd2e8670e30ef3a59ba98428676eb19b34903ce SHA512 4ca08c6ede5a4d1e02c84ef023d33026d8e25b864a581e552096510eaebd1c674f230b4d8c1c6f4d8f7489fd1981c26b6a4713b574416bde770d28505b6d7c1c -DIST firefox-154-patches-02.tar.xz 14064 BLAKE2B 43fe3a4d309eed7fad5514d54a2a261c9914223a2f28f2457b0671793e050484f108ff55fa91f40d6256ed3d1657082bd26219aa79c27da06eca04999578a56a SHA512 efe0aebb62e847cb8d0399a4a3020f4826ab894a0bd34534de12a9ea8361a8352ecba564e1474ea92e3cf92d3a126fed5b0584ef5be3ccc1bec7466f5d5ce130 -DIST firefox-154.0.1.source.tar.xz 811414168 BLAKE2B c3c67fbda172085c966521b8710286b91ea53fa5607f38d19a46d52e76ced44681d5bc979d9b1b0e8d6e4be54ffc0424000cc5408e55622fd716941188a69d03 SHA512 9141e34978c2ecbe1b267b3cc63136142625734618e67cbbbf6536e1427af66d01f19851200eba0db7c715991f39e7d5d0200abb9e2cd7c15d58a8a411b1b412 -DIST firefox-154.0.source.tar.xz 811370872 BLAKE2B 7806cb56f721bd8fb0bcb1782765631f772b58600ea0f7389d7389d8635a3616d71162b090cb9d8cc8822b118b50b5b0f6d83c0831c34054b513da6193bcad38 SHA512 a77cd664982add628681167ef5939bd6bf0c894aa380cca66f9b5fb265947874d1e819d42264f1dd07c843f8a6dc020da268cca9ff1e064fca019de91af9b996 DIST firefox-155-patches-04.tar.xz 12860 BLAKE2B f16f2ce03d625f12c1512ab8271c6bd368b5774482b4173723fbfed7be4f37444f084d6b18c047310dc76ed4be42b18f5580934cc5e9afbb6058173c869a63df SHA512 8f341eaf640d3b75e95b152e36e59836ef7cacfa4182c8dd759e2303fadc3261c28a1f81440f1456aa5477ccbb53542f79599be021d208cf4b1a025eebce07ba DIST firefox-155-patches-05.tar.xz 19468 BLAKE2B 463a5fe05041a97fe6479c362e3898d58d2dbd487bc2b860791a145c625e4a8a57b1646579947aeae28ab2d61dfedc0e003852a3447b9516b2001b8de78e74ee SHA512 a7a55b4eb27301536ab874044aca2b487091f8b63c7f9e1d7220507edeff738e06e043f1de2b8d7938c96a32d112bdeea39a43e38b4787b96894a5d211b16a83 DIST firefox-155.0.1.source.tar.xz 811591200 BLAKE2B 961ba27f944df8814b4c8937fc1d73e11cc67882d607a52f6bee81aeb29fe6250941ff92b4fd16f9aa9c53827299d1b859577b11d1c5ed14ad2080c27671401e SHA512 6d137a7a315cb1d0aac1a3fe314af80fe290c49b7c2e47f8687b25d4720927b2a0dc71a3da9d75f6cab479067db114caa6732d17e888b0abfce99238a8af0f39 diff --git a/www-client/firefox/firefox-140.14.0.ebuild b/www-client/firefox/firefox-140.14.0.ebuild deleted file mode 100644 index ca24dad13d1b1..0000000000000 --- a/www-client/firefox/firefox-140.14.0.ebuild +++ /dev/null @@ -1,1424 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-140esr-patches-13.tar.xz" -FIREFOX_LOONG_PATCHSET="firefox-139-loong-patches-02.tar.xz" - -LLVM_COMPAT=( 20 21 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 - -# Minimum version required to build. -# Max version supported by LLVM_COMPAT. -RUST_MIN_VER=1.82.0 -RUST_MAX_VER=1.94.1 - -PYTHON_COMPAT=( python3_{12..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=32.0 -WASI_SDK_LLVM_VER=22 - -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" - HOMEPAGE="https://www.firefox.com https://www.firefox.com/enterprise/" - SLOT="esr" -else - HOMEPAGE="https://www.firefox.com" - SLOT="rapid" -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 flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="Firefox Web Browser" -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} - ) - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/${PN}-${PV%_*}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv ~x86" - -IUSE="+clang dbus 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 test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell +jumbo-build openh264 +telemetry wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wasm-sandbox? ( llvm_slot_21 ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -RESTRICT="!test? ( test )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - selinux? ( sec-policy/selinux-mozilla )" -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] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - 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="${FF_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 - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.0.0:= - >=media-libs/libaom-3.10.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - 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] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# ESR and rapid dependencies. -if [[ -n ${MOZ_ESR} ]] ; then - RDEPEND+=" !www-client/firefox:rapid" -else - RDEPEND+=" !www-client/firefox:esr" -fi - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -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 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 -) - -# Firefox-only LANGS -MOZ_LANGS+=( ach ) -MOZ_LANGS+=( an ) -MOZ_LANGS+=( az ) -MOZ_LANGS+=( bn ) -MOZ_LANGS+=( bs ) -MOZ_LANGS+=( ca-valencia ) -MOZ_LANGS+=( eo ) -MOZ_LANGS+=( es-CL ) -MOZ_LANGS+=( es-MX ) -MOZ_LANGS+=( fa ) -MOZ_LANGS+=( ff ) -MOZ_LANGS+=( fur ) -MOZ_LANGS+=( gn ) -MOZ_LANGS+=( gu-IN ) -MOZ_LANGS+=( hi-IN ) -MOZ_LANGS+=( hy-AM ) -MOZ_LANGS+=( ia ) -MOZ_LANGS+=( km ) -MOZ_LANGS+=( kn ) -MOZ_LANGS+=( lij ) -MOZ_LANGS+=( mk ) -MOZ_LANGS+=( mr ) -MOZ_LANGS+=( my ) -MOZ_LANGS+=( ne-NP ) -MOZ_LANGS+=( oc ) -MOZ_LANGS+=( sc ) -MOZ_LANGS+=( sco ) -MOZ_LANGS+=( si ) -MOZ_LANGS+=( skr ) -MOZ_LANGS+=( son ) -MOZ_LANGS+=( szl ) -MOZ_LANGS+=( ta ) -MOZ_LANGS+=( te ) -MOZ_LANGS+=( tl ) -MOZ_LANGS+=( trs ) -MOZ_LANGS+=( ur ) -MOZ_LANGS+=( xh ) - -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="17000M" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -ge 16 && [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]] ; then - eerror "Firefox-140esr can't be compiled with +pgo using gcc >= 16. Use:" - eerror " 1) gcc < 16 instead, such as stable gcc-15.2.1," - eerror " 2) \"clang\" use flag to compile Firefox-140esr, or" - eerror " 3) disable pgo via \"-pgo\" use flag." - eerror "Everything else works with gcc-16 except +pgo." - eerror "" - eerror "Follow Gentoo bug #975851 or upstream bug #2041879 for progress." - eerror "To skip this check for testing purposes, export I_KNOW_WHAT_I_AM_DOING=1 env." - die "Firefox-${PV} with gcc+pgo cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="9900M" - else - CHECKREQS_DISK_BUILD="9000M" - 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 - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -ge 16 && [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]] ; then - eerror "Firefox-140esr can't be compiled with +pgo using gcc >= 16. Use:" - eerror " 1) gcc < 16 instead, such as stable gcc-15.2.1," - eerror " 2) \"clang\" use flag to compile Firefox-140esr, or" - eerror " 3) disable pgo via \"-pgo\" use flag." - eerror "Everything else works with gcc-16, but +pgo doesn't." - eerror "" - eerror "Follow Gentoo bug #975851 or upstream bug #2041879 to follow progress." - eerror "To skip this check for testing purposes, export I_KNOW_WHAT_I_AM_DOING=1 env." - die "Firefox-${PV} with gcc+pgo cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - 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 - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="17000M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="9900M" - else - CHECKREQS_DISK_BUILD="9000M" - 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 - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -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 - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - 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 - moz_clear_vendor_checksums glslopt - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # 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=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - if use telemetry; then - export MOZILLA_OFFICIAL=1 - fi - - 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-updater \ - --disable-wmf \ - --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 \ - --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 ppc64 || use loong || use riscv ; 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-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 - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - append-ldflags "-Wl,-z,relro -Wl,-z,now" - - # Increase the FORTIFY_SOURCE value, #910071. - sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' "${S}"/build/moz.configure/toolchain.configure || die - fi - - local myaudiobackends="" - use jack && myaudiobackends+="jack," - use sndio && myaudiobackends+="sndio," - use pulseaudio && myaudiobackends+="pulseaudio," - ! use pulseaudio && myaudiobackends+="alsa," - - mozconfig_add_options_ac '--enable-audio-backends' --enable-audio-backends="${myaudiobackends::-1}" - - mozconfig_use_enable wifi necko-wifi - - ! use jumbo-build && mozconfig_add_options_ac '--disable-unified-build' --disable-unified-build - - 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 - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - 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 - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=tar - - 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" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # 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_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -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}/browser/defaults/preferences" - 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-r2 \ - >>"${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 - - # Install the vaapitest binary on supported arches (122.0 supports all platforms, bmo#1865969) - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/vaapitest - - # Install the v4l2test on supported arches (+ arm, + riscv64 when keyworded) - if use arm64 ; then - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/v4l2test - fi - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - 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 - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - 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}/browser/branding/official" - - # Prefer the upstream svg file they use when packaging flatpak so it's always up-to-date. - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${S}"/browser/installer/linux/app/flatpak/files/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-symbolic.svg firefox-symbolic.svg - dosym -r /usr/share/icons/hicolor/symbolic/apps/firefox-symbolic.svg /usr/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-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}-r3.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 - - if use gnome-shell ; then - # Install search provider for Gnome - insinto /usr/share/gnome-shell/search-providers/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.search-provider.ini - - insinto /usr/share/dbus-1/services/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.SearchProvider.service - - # Toggle between rapid and esr desktop file names - if [[ -n ${MOZ_ESR} ]] ; then - sed -e "s/firefox.desktop/${desktop_filename}/g" \ - -i "${ED}/usr/share/gnome-shell/search-providers/org.mozilla.firefox.search-provider.ini" || - die "Failed to sed org.mozilla.firefox.search-provider.ini file." - fi - - # Make the dbus service aware of a previous session, bgo#939196 - sed -e \ - "s/Exec=\/usr\/bin\/firefox/Exec=\/usr\/$(get_libdir)\/firefox\/firefox --dbus-service \/usr\/bin\/firefox/g" \ - -i "${ED}/usr/share/dbus-1/services/org.mozilla.firefox.SearchProvider.service" || - die "Failed to sed org.mozilla.firefox.SearchProvider.service dbus file" - - # Update prefs to enable Gnome search provider - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable gnome-search-provider via prefs" - pref("browser.gnome-search-provider.enabled", true); - EOF - fi - - # 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 - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - # bug 835078 - if use hwaccel && has_version "x11-drivers/xf86-video-nouveau"; then - ewarn "You have nouveau drivers installed in your system and 'hwaccel' " - ewarn "enabled for Firefox. Nouveau / your GPU might not support the " - ewarn "required EGL, so either disable 'hwaccel' or try the workaround " - ewarn "explained in https://bugs.gentoo.org/835078#c5 if Firefox crashes." - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - if use hwaccel && has_version "x11-drivers/nvidia-drivers"; then - optfeature "hardware acceleration with NVIDIA cards" media-libs/nvidia-vaapi-driver - fi - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -} diff --git a/www-client/firefox/firefox-153.1.0.ebuild b/www-client/firefox/firefox-153.1.0.ebuild deleted file mode 100644 index fc77254f5af73..0000000000000 --- a/www-client/firefox/firefox-153.1.0.ebuild +++ /dev/null @@ -1,1310 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-153esr-patches-01.tar.xz" - -LLVM_COMPAT=( 21 22 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 -RUST_MIN_VER=1.90.0 - -PYTHON_COMPAT=( python3_{12..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=32.0 -WASI_SDK_LLVM_VER=22 - -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" - HOMEPAGE="https://www.firefox.com https://www.firefox.com/enterprise/" - SLOT="esr" -else - HOMEPAGE="https://www.firefox.com" - SLOT="rapid" -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 flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="Firefox Web Browser" -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz - ${PATCH_URIS[@]} - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/${PN}-${PV%_*}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" - -IUSE="+clang dbus 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 test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry valgrind wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -RESTRICT="!test? ( test )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - selinux? ( sec-policy/selinux-mozilla )" -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] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - 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="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.126 - >=dev-libs/nspr-4.39 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.0.0:= - >=media-libs/libaom-3.10.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - system-icu? ( >=dev-libs/icu-78.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) - system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-pipewire? ( >=media-video/pipewire-1.4.7-r2:= ) - system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - valgrind? ( dev-debug/valgrind ) - wayland? ( - >=media-libs/libepoxy-1.5.10-r1 - x11-libs/gtk+:3[wayland] - ) - wifi? ( - kernel_linux? ( - || ( - net-misc/networkmanager - net-misc/connman[networkmanager] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# ESR and rapid dependencies. -if [[ -n ${MOZ_ESR} ]] ; then - RDEPEND+=" !www-client/firefox:rapid - ~www-client/firefox-l10n-${PV}:0/esr" -else - RDEPEND+=" !www-client/firefox:esr - ~www-client/firefox-l10n-${PV}:0/rapid" -fi - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -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_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="18700M" - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -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 and bmo#1988166 on musl - if use elibc_glibc ; then - rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die - rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die - fi - - eapply "${WORKDIR}/firefox-patches" - - # Allow user to apply any additional patches without modifing ebuild - eapply_user - - # Make cargo respect MAKEOPTS - export CARGO_BUILD_JOBS="$(makeopts_jobs)" - - # Workaround for bgo#915651 - if ! use elibc_glibc ; then - if use amd64 ; then - export RUST_TARGET="x86_64-unknown-linux-musl" - elif use x86 ; then - export RUST_TARGET="i686-unknown-linux-musl" - elif use arm64 ; then - export RUST_TARGET="aarch64-unknown-linux-musl" - elif use 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 - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - 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 - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # 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=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - if use telemetry; then - export MOZILLA_OFFICIAL=1 - fi - - 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-updater \ - --disable-wmf \ - --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 \ - --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 ppc64 || use loong || use riscv ; 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, bgo#977845 - if use riscv ; then - mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc - mozconfig_add_options_ac 'Disable JIT for RISC-V' --disable-jit - fi - - mozconfig_use_enable valgrind - - if use valgrind ; then - mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - 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-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 - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - mozconfig_add_options_ac "+hardened stl" --enable-stl-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 - - ! use jumbo-build && mozconfig_add_options_ac '--disable-unified-build' --disable-unified-build - - 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 - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - fi - - ! use jpegxl && mozconfig_add_options_ac '-jpegxl' --disable-jxl - - 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 - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=TAR - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - else - # Attempt to fix pgo hanging with gcc, bgo#966309. - export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 - 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" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # 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_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -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 - - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/distribution.ini distribution.ini - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - 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-r3 \ - >>"${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 - - # Install the vaapitest binary on supported arches (122.0 supports all platforms, bmo#1865969) - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/vaapitest - doexe "${BUILD_DIR}"/dist/bin/vulkantest - - # Install the v4l2test on supported arches (+ arm, + riscv64 when keyworded) - if use arm64 ; then - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/v4l2test - fi - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - 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 - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - - # Prefer the upstream svg file they use when packaging flatpak so it's always up-to-date. - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${S}"/browser/installer/linux/app/flatpak/files/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-symbolic.svg firefox-symbolic.svg - dosym -r /usr/share/icons/hicolor/symbolic/apps/firefox-symbolic.svg /usr/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-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}-r3.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 - - if use gnome-shell ; then - # Install search provider for Gnome - insinto /usr/share/gnome-shell/search-providers/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.search-provider.ini - - insinto /usr/share/dbus-1/services/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.SearchProvider.service - - # Toggle between rapid and esr desktop file names - if [[ -n ${MOZ_ESR} ]] ; then - sed -e "s/firefox.desktop/${desktop_filename}/g" \ - -i "${ED}/usr/share/gnome-shell/search-providers/org.mozilla.firefox.search-provider.ini" || - die "Failed to sed org.mozilla.firefox.search-provider.ini file." - fi - - # Make the dbus service aware of a previous session, bgo#939196 - sed -e \ - "s/Exec=\/usr\/bin\/firefox/Exec=\/usr\/$(get_libdir)\/firefox\/firefox --dbus-service \/usr\/bin\/firefox/g" \ - -i "${ED}/usr/share/dbus-1/services/org.mozilla.firefox.SearchProvider.service" || - die "Failed to sed org.mozilla.firefox.SearchProvider.service dbus file" - - # Update prefs to enable Gnome search provider - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable gnome-search-provider via prefs" - pref("browser.gnome-search-provider.enabled", true); - EOF - fi - - if use jpegxl ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable jpegxl via pref" - pref("image.jxl.enabled", true); - EOF - fi - - # 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 - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -} diff --git a/www-client/firefox/firefox-154.0.1.ebuild b/www-client/firefox/firefox-154.0.1.ebuild deleted file mode 100644 index 05fc750267cfb..0000000000000 --- a/www-client/firefox/firefox-154.0.1.ebuild +++ /dev/null @@ -1,1310 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-154-patches-02.tar.xz" - -LLVM_COMPAT=( 21 22 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 -RUST_MIN_VER=1.90.0 - -PYTHON_COMPAT=( python3_{12..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=32.0 -WASI_SDK_LLVM_VER=22 - -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" - HOMEPAGE="https://www.firefox.com https://www.firefox.com/enterprise/" - SLOT="esr" -else - HOMEPAGE="https://www.firefox.com" - SLOT="rapid" -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 flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="Firefox Web Browser" -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz - ${PATCH_URIS[@]} - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/${PN}-${PV%_*}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" - -IUSE="+clang dbus 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 test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry valgrind wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -RESTRICT="!test? ( test )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - selinux? ( sec-policy/selinux-mozilla )" -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] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - 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="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.126.1 - >=dev-libs/nspr-4.39 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.0.0:= - >=media-libs/libaom-3.10.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - system-icu? ( >=dev-libs/icu-78.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) - system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-pipewire? ( >=media-video/pipewire-1.4.7-r2:= ) - system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - valgrind? ( dev-debug/valgrind ) - wayland? ( - >=media-libs/libepoxy-1.5.10-r1 - x11-libs/gtk+:3[wayland] - ) - wifi? ( - kernel_linux? ( - || ( - net-misc/networkmanager - net-misc/connman[networkmanager] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# ESR and rapid dependencies. -if [[ -n ${MOZ_ESR} ]] ; then - RDEPEND+=" !www-client/firefox:rapid - ~www-client/firefox-l10n-${PV}:0/esr" -else - RDEPEND+=" !www-client/firefox:esr - ~www-client/firefox-l10n-${PV}:0/rapid" -fi - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -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_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="18700M" - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -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 and bmo#1988166 on musl - if use elibc_glibc ; then - rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die - rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die - fi - - eapply "${WORKDIR}/firefox-patches" - - # Allow user to apply any additional patches without modifing ebuild - eapply_user - - # Make cargo respect MAKEOPTS - export CARGO_BUILD_JOBS="$(makeopts_jobs)" - - # Workaround for bgo#915651 - if ! use elibc_glibc ; then - if use amd64 ; then - export RUST_TARGET="x86_64-unknown-linux-musl" - elif use x86 ; then - export RUST_TARGET="i686-unknown-linux-musl" - elif use arm64 ; then - export RUST_TARGET="aarch64-unknown-linux-musl" - elif use 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 - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - 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 - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # 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=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - if use telemetry; then - export MOZILLA_OFFICIAL=1 - fi - - 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-updater \ - --disable-wmf \ - --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 \ - --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 ppc64 || use loong || use riscv ; 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, bgo#977845 - if use riscv ; then - mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc - mozconfig_add_options_ac 'Disable JIT for RISC-V' --disable-jit - fi - - mozconfig_use_enable valgrind - - if use valgrind ; then - mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - 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-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 - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - mozconfig_add_options_ac "+hardened stl" --enable-stl-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 - - ! use jumbo-build && mozconfig_add_options_ac '--disable-unified-build' --disable-unified-build - - 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 - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - fi - - ! use jpegxl && mozconfig_add_options_ac '-jpegxl' --disable-jxl - - 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 - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=TAR - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - else - # Attempt to fix pgo hanging with gcc, bgo#966309. - export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 - 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" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # 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_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -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 - - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/distribution.ini distribution.ini - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - 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-r3 \ - >>"${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 - - # Install the vaapitest binary on supported arches (122.0 supports all platforms, bmo#1865969) - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/vaapitest - doexe "${BUILD_DIR}"/dist/bin/vulkantest - - # Install the v4l2test on supported arches (+ arm, + riscv64 when keyworded) - if use arm64 ; then - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/v4l2test - fi - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - 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 - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - - # Prefer the upstream svg file they use when packaging flatpak so it's always up-to-date. - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${S}"/browser/installer/linux/app/flatpak/files/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-symbolic.svg firefox-symbolic.svg - dosym -r /usr/share/icons/hicolor/symbolic/apps/firefox-symbolic.svg /usr/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-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}-r3.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 - - if use gnome-shell ; then - # Install search provider for Gnome - insinto /usr/share/gnome-shell/search-providers/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.search-provider.ini - - insinto /usr/share/dbus-1/services/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.SearchProvider.service - - # Toggle between rapid and esr desktop file names - if [[ -n ${MOZ_ESR} ]] ; then - sed -e "s/firefox.desktop/${desktop_filename}/g" \ - -i "${ED}/usr/share/gnome-shell/search-providers/org.mozilla.firefox.search-provider.ini" || - die "Failed to sed org.mozilla.firefox.search-provider.ini file." - fi - - # Make the dbus service aware of a previous session, bgo#939196 - sed -e \ - "s/Exec=\/usr\/bin\/firefox/Exec=\/usr\/$(get_libdir)\/firefox\/firefox --dbus-service \/usr\/bin\/firefox/g" \ - -i "${ED}/usr/share/dbus-1/services/org.mozilla.firefox.SearchProvider.service" || - die "Failed to sed org.mozilla.firefox.SearchProvider.service dbus file" - - # Update prefs to enable Gnome search provider - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable gnome-search-provider via prefs" - pref("browser.gnome-search-provider.enabled", true); - EOF - fi - - if use jpegxl ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable jpegxl via pref" - pref("image.jxl.enabled", true); - EOF - fi - - # 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 - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -} diff --git a/www-client/firefox/firefox-154.0.ebuild b/www-client/firefox/firefox-154.0.ebuild deleted file mode 100644 index 1dc626bc5d36f..0000000000000 --- a/www-client/firefox/firefox-154.0.ebuild +++ /dev/null @@ -1,1310 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-154-patches-01.tar.xz" - -LLVM_COMPAT=( 21 22 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 -RUST_MIN_VER=1.90.0 - -PYTHON_COMPAT=( python3_{12..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=32.0 -WASI_SDK_LLVM_VER=22 - -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" - HOMEPAGE="https://www.firefox.com https://www.firefox.com/enterprise/" - SLOT="esr" -else - HOMEPAGE="https://www.firefox.com" - SLOT="rapid" -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 flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust 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/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="Firefox Web Browser" -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz - ${PATCH_URIS[@]} - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/${PN}-${PV%_*}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" - -IUSE="+clang dbus 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 test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry valgrind wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -RESTRICT="!test? ( test )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - selinux? ( sec-policy/selinux-mozilla )" -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] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - 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="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.126 - >=dev-libs/nspr-4.39 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.0.0:= - >=media-libs/libaom-3.10.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - system-icu? ( >=dev-libs/icu-78.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) - system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-pipewire? ( >=media-video/pipewire-1.4.7-r2:= ) - system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - valgrind? ( dev-debug/valgrind ) - wayland? ( - >=media-libs/libepoxy-1.5.10-r1 - x11-libs/gtk+:3[wayland] - ) - wifi? ( - kernel_linux? ( - || ( - net-misc/networkmanager - net-misc/connman[networkmanager] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# ESR and rapid dependencies. -if [[ -n ${MOZ_ESR} ]] ; then - RDEPEND+=" !www-client/firefox:rapid - ~www-client/firefox-l10n-${PV}:0/esr" -else - RDEPEND+=" !www-client/firefox:esr - ~www-client/firefox-l10n-${PV}:0/rapid" -fi - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -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_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="18700M" - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - 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 - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -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 and bmo#1988166 on musl - if use elibc_glibc ; then - rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die - rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die - fi - - eapply "${WORKDIR}/firefox-patches" - - # Allow user to apply any additional patches without modifing ebuild - eapply_user - - # Make cargo respect MAKEOPTS - export CARGO_BUILD_JOBS="$(makeopts_jobs)" - - # Workaround for bgo#915651 - if ! use elibc_glibc ; then - if use amd64 ; then - export RUST_TARGET="x86_64-unknown-linux-musl" - elif use x86 ; then - export RUST_TARGET="i686-unknown-linux-musl" - elif use arm64 ; then - export RUST_TARGET="aarch64-unknown-linux-musl" - elif use 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 - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - 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 - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # 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=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - if use telemetry; then - export MOZILLA_OFFICIAL=1 - fi - - 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-updater \ - --disable-wmf \ - --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 \ - --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 ppc64 || use loong || use riscv ; 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, bgo#977845 - if use riscv ; then - mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc - mozconfig_add_options_ac 'Disable JIT for RISC-V' --disable-jit - fi - - mozconfig_use_enable valgrind - - if use valgrind ; then - mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - 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-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 - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - mozconfig_add_options_ac "+hardened stl" --enable-stl-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 - - ! use jumbo-build && mozconfig_add_options_ac '--disable-unified-build' --disable-unified-build - - 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 - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - fi - - ! use jpegxl && mozconfig_add_options_ac '-jpegxl' --disable-jxl - - 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 - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=TAR - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - else - # Attempt to fix pgo hanging with gcc, bgo#966309. - export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 - 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" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # 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_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -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 - - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/distribution.ini distribution.ini - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - 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-r3 \ - >>"${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 - - # Install the vaapitest binary on supported arches (122.0 supports all platforms, bmo#1865969) - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/vaapitest - doexe "${BUILD_DIR}"/dist/bin/vulkantest - - # Install the v4l2test on supported arches (+ arm, + riscv64 when keyworded) - if use arm64 ; then - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/v4l2test - fi - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - 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 - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - - # Prefer the upstream svg file they use when packaging flatpak so it's always up-to-date. - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${S}"/browser/installer/linux/app/flatpak/files/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-symbolic.svg firefox-symbolic.svg - dosym -r /usr/share/icons/hicolor/symbolic/apps/firefox-symbolic.svg /usr/share/icons/hicolor/symbolic/apps/org.mozilla.firefox-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}-r3.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 - - if use gnome-shell ; then - # Install search provider for Gnome - insinto /usr/share/gnome-shell/search-providers/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.search-provider.ini - - insinto /usr/share/dbus-1/services/ - doins browser/components/shell/search-provider-files/org.mozilla.firefox.SearchProvider.service - - # Toggle between rapid and esr desktop file names - if [[ -n ${MOZ_ESR} ]] ; then - sed -e "s/firefox.desktop/${desktop_filename}/g" \ - -i "${ED}/usr/share/gnome-shell/search-providers/org.mozilla.firefox.search-provider.ini" || - die "Failed to sed org.mozilla.firefox.search-provider.ini file." - fi - - # Make the dbus service aware of a previous session, bgo#939196 - sed -e \ - "s/Exec=\/usr\/bin\/firefox/Exec=\/usr\/$(get_libdir)\/firefox\/firefox --dbus-service \/usr\/bin\/firefox/g" \ - -i "${ED}/usr/share/dbus-1/services/org.mozilla.firefox.SearchProvider.service" || - die "Failed to sed org.mozilla.firefox.SearchProvider.service dbus file" - - # Update prefs to enable Gnome search provider - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable gnome-search-provider via prefs" - pref("browser.gnome-search-provider.enabled", true); - EOF - fi - - if use jpegxl ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable jpegxl via pref" - pref("image.jxl.enabled", true); - EOF - fi - - # 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 - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -}