diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 6b8a6049fb1f7..54b27a889d611 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.12.0esr-ach.xpi 294369 BLAKE2B 4d5bd78846f5bb735cd169f56de16c64c2c6d78deba75ecbc3f88f80f737233760dddc9634d6b868324b5bf216bf46137e358e4f9affd73495a9932c4f7961e9 SHA512 bedde4c59a55a3456345edaa63b12a4b630ee3cdbbd04c71c493a9e60f6ec89d7e880ebb81b0b5ab82e334486a0b0d3cb7198d54f7c4e67d1356b81b1effe8f9 -DIST firefox-140.12.0esr-af.xpi 266638 BLAKE2B 00d5cc1d52a1a9adfa944290c10a61142b2cfa38cbc322ae0a1bec069d085f52e93b30c5580ba488373577beb62d286e65333e9495ff39d5be0f4c66ae110fd0 SHA512 ffe01f5d5b1daa2a2e241108c4225a641d338dd2e56f70c9135f5ddcd5c202b509c896c6363e0735694b088cc0f1e09d6a8bff5eb2f0161e07f06cb2e624c6a7 -DIST firefox-140.12.0esr-an.xpi 332303 BLAKE2B 7ba87089eb85748132e728f5ed15ca490c2ccc2cec581e12654bf2fad3412bb37c09ae9e03598d5b9da8455609952a81f955ce5dd70d66eefe5e4383ae585ab1 SHA512 57a5b58ac328be2bcfa44286aedb3bcc5b90ff26d31b84f2fc6017dc54fa4a94f9bed4d081debb9696371554c516e19741f649d91ebe72364b044506808175b0 -DIST firefox-140.12.0esr-ar.xpi 445296 BLAKE2B 0c70257c68acc0ec26c5e145ee8885828c0635e05ed316f7fa53c0807f718056efd105e0c89bbbb3e4b0f4acfdcf033b46ba44aed9fd0f7927312b49397f6f75 SHA512 5fd22a38e79ed2bdca6a9579c5c893746201b438d61fd44ba98e5d33d98a2d325d187eb42cf0d8ccce0333c8a73e960671b09e65e735d723049623590cd4ea4e -DIST firefox-140.12.0esr-ast.xpi 312214 BLAKE2B a1324ed06b22f5539c492399c32c55c54c0f24f081f80b97d60c134bf48c3d0f74803cd947919702cecd18435b7147e9eb33f7753021f791b451a9d826f004cd SHA512 26d9ce8ee466791b614e7aae9dad0df9b9090e212c85204aa07e869a2fe19c8fbedad93c26dd2a75951117d93fbde4d9c5077f15ad3ad9177652be5944321211 -DIST firefox-140.12.0esr-az.xpi 318397 BLAKE2B be2f2b271c9bb974d2657d5ebdd38caab9d0e83d8e0b2d8843814627b17fc6e51b12a585109c11e763088842131af3d277627663143102be6cf9ccedfa583622 SHA512 20e07375db7ad684be57f19a7db8c635c003a9e7676777e4f91f3dc0567b8fee72a535e93d411b347874c238c61d9851723e7f5e8c0b8488dbb0d9913104e709 -DIST firefox-140.12.0esr-be.xpi 521208 BLAKE2B cd0cd793e847085a980703c990720695e89ebef0d9b7ff67709df079912ece5c24d1f58e8246b1fb34465af694ebde606fc7e52f62e98ba1df5383c29d08f0f0 SHA512 f006fa71676831843898f7a8ea5cb0e94d149e2bcf92d4b1866e4d249ae1f0a0a08cd98a5e7ed274328038037dfa1162a1db2436daa19e3557007c98391a8f43 -DIST firefox-140.12.0esr-bg.xpi 457549 BLAKE2B b47de03fb6316864f5fec389646a36a40f0d3d71c56bc4a22e7d6f2f533a35f79c5901b87696a5c5f739bcd0a63eaf43770d133b2331e777db490254405de524 SHA512 0c2b4e492d4737ee3e45b019b18f5ae98207f9aac7c66954e16ac4f361163cb840f4f7670dd8d4000f4eb229035dc920c86a3c34515da40cecc3cda519d7aaa6 -DIST firefox-140.12.0esr-bn.xpi 413372 BLAKE2B 0b8f01cf8123a29be4716fb016fe82705579802183be0749f30b37182ab1da6cbc683876da9b08e470f0c137e94216b775ebe214ca2d174f663367f38c9be464 SHA512 98441b841f3887c7fc850b24d9cf6b60ae2a62021df31755e276f822ae2ffaacbe7e156331c4a9ceec8a6102741a3a77ec3726bf3931f2ad182feba8addfb737 -DIST firefox-140.12.0esr-br.xpi 395302 BLAKE2B 5754312cdd652fcd1b3bc9502c6e7b026985b26677bdded9c61da237e5a5416807a19ccc8ff562fc7cf04a87d1c895c5b176b5b4502fb679d8086ea0424bdd06 SHA512 90347a334db31ebc1bd838dd1787a4127cd94bc071fe1f6b439c16f9e3f51421c5fa8f4cb5b88e3bdf23194076de9f54f793f9f0863267b02157a276af7929a7 -DIST firefox-140.12.0esr-bs.xpi 447172 BLAKE2B 3d9054f1e2e5e1a26ca37d76310710110152791a6963c5eb4aac7287790fd67a144688cb98aa343f18a970e36be20471b359a028a388b2121b5829cf5a022b79 SHA512 c7bbad36038fd1e163fb161ae89037a4f23647ede2272f79db32afaef3aa3dea1845d11ad283c6a3bcbce247359f9add8de2728ce518409d97c34ee1fde999cc -DIST firefox-140.12.0esr-ca-valencia.xpi 357944 BLAKE2B 061f75fc9ca6682c083d596ecd898370d6c04a053e801025fc57a70e197a70e691c5ba6a156641ae85b34cd61b8a7f58c7dac13cb43666a3b6c6e23146a865b4 SHA512 e8e488a0a22b173f528ca1044042033d94a54f1bc90d01f09cd465d8085f9be828826a9fa1b3e810bc67ec4be0ae0b282d39123440d9d0b8c87e4f839f7c8f1d -DIST firefox-140.12.0esr-ca.xpi 404823 BLAKE2B 47693eb82d5224586f2d12ea373755c03a22710181440465801c3f60dec5d71de8baa7e6876026bd709d610435eb0028604ef4e6617d5faeb5214ff40be33ee2 SHA512 3ab96c00886f44ae276884034515de165c8b7f421920b127e8aad4eabc1f7b0f36395715a43c44cc0bb86bbf7525a34fe7b6d7b37b0f062cf7403e6074acccf8 -DIST firefox-140.12.0esr-cak.xpi 390833 BLAKE2B 1335fbe92269f43a2ffe88f1fd5520d3bc8921b3436cf267513b46fc3783a9fa04fd76a0b621c583926c20fc2b389f0bf5173ffbe4bae672c87a7547b6536ffc SHA512 c8e6187db9baf3770e61487fa8aad00388ad06c832bff8d6fef48b8165c305e4716330408570d33cca64b42985a3c27498880dd2e48ea48596575762bcc094c1 -DIST firefox-140.12.0esr-cs.xpi 475920 BLAKE2B 28393ddd3821f49f256278c394f265e5b85b6dbfa3a2004b3c635ae2afebfa0bf4bcedda8b4f29d53239436aa43f48f5add753fa1e126326ff6c8758c0841aa5 SHA512 a78214fb630112521b012dd01a93a823f325e66f7cc257b6e9fec0c4ce5b8ba40ad361cf5d04f9f9691618bcc725636054f7c50abf86b11a70a84697e0642e06 -DIST firefox-140.12.0esr-cy.xpi 441959 BLAKE2B ffa23fb30a048553486170d264fa8158b3357832df6f5fec25d00d0e8bb8a7d3db1719876ce5baf2aaa41a0cce1ebb1f28e0cceb4a9f934e1dbaee9f9fd23b34 SHA512 cdc420de635f67271b381eef8bd55de92332da1d81e4f579faae76571911e1a9b4a70054b70246b44f3a0115750d126d51ad16ce00156db069ddfa1f5fbc47cb -DIST firefox-140.12.0esr-da.xpi 431125 BLAKE2B 894c813e60dd821c2619cadceaa18780f2492db0e6a12ef9d339fd2db0f12ae9dac717f88c93a027141a9e2bea1086574003c89738c4e087578b099cad0d46a5 SHA512 11cb3b1a910ede972faffcc8d14181ea501640f8b56463b47770ffd2b2772ebc5846f20925ec146f2e5bc75162279b93f63e375afd412386d09eb8d7280dec9a -DIST firefox-140.12.0esr-de.xpi 452706 BLAKE2B 0d862e6945452b3e8508db73b61edd6f3168bd25d71056591801d9771b5a0e1da105748ff20b81a88cf0d4799e38f6ce5d0b2fb111eabe5440fedb6873f8cb5d SHA512 68406290a79cf8d7765ea94571951d070849e273deefe7021fbd5f031bbc2f92fe8243c6d9e97801f2802a42ce970c3711f717f226839ffe81682b21a3c4eebe -DIST firefox-140.12.0esr-dsb.xpi 466064 BLAKE2B 2ad5a059398ea014821d846aa1e46962b4567d13c4351c18481dccb8279a88b10476b32505e9ef77bfe95297a2ad62398acb05ee410808bea88c21ccbb398a4d SHA512 ce4247fb452789766b429e45a4bd24eb137450e1e43dc713774ce85e53a339789be6caa391cf33dadfa99b8afdf933771018d9552f6bc5137509d1f96a3f6542 -DIST firefox-140.12.0esr-el.xpi 536817 BLAKE2B 8d39f8dc621ce37665918f185f1abdcd1155a44f0f10bc9ffa9d344633f1fd27ae166a63cb091d47544f2f7ff95cabd32d1f3ebd1d0733187ea1082b3af7f431 SHA512 bd45bcc6969e9b9aff28e5bc015e0af280089718ca89d2f4dcb04f35ea5e172addab3ec0f2802bd181655b811a4f858e6f99d3fad8865c249ace789deca1495c -DIST firefox-140.12.0esr-en-CA.xpi 411055 BLAKE2B f1447f13d33abe88eca861b75434643a25595755dca77996e383d030ac1dff0d810e59e169cd615f31e4f2b6af2c4b7d097f9dfbe393a00e69e94404c30d0072 SHA512 b8f28428af025006b339a54eb7f7a13218970712d88f28476456c4b3f35a54cc33ff856796dcc6fb9868e6a700f5bb3fa7de3a96dcf4f4b0927ea79d1779b0e6 -DIST firefox-140.12.0esr-en-GB.xpi 411403 BLAKE2B 192973c199ce97ebc8e6d30435227c4163d2efddd8ab4a2196bd858ff4b82755b465b2b610425c0383a27e1957d2654f7177d581a65ac01a71fc1507a3ff50a9 SHA512 26a48cbb48d6a62ef5db0a1b9a0d610534da9a102a88f2f693613d32f28951e27836625e70f3d7a8c69b11f3a4cf6bd06720bc303eeeaf9ee71e7b3a32c2dfb6 -DIST firefox-140.12.0esr-eo.xpi 433470 BLAKE2B affe62424c8c3eb6b80c85d2e605bb68b6199542b3e0226d2f57186af6487530def628b553b9050fccb289e57173c327f1229f7e612f0aa44e652cb09452dd81 SHA512 88b1f74ec9c01bd4ca949809e84212e6a3e626aca7fa492cbc181fa11cd95390eae50309d5645e9f91caab9f527734a2a5fa0180086effbf99e7ca97f892ba5f -DIST firefox-140.12.0esr-es-AR.xpi 445514 BLAKE2B 724d7966540fc103a6b1dd38dad8a78b4ce1c70e0e7007fea3873e63d4cf1e938323413078a26b70518eedfdf58da6b3cd8ff8223548f90fc830e28fc48c6742 SHA512 4b7575da0e8aaf4d2394e770bf92e5446be76d702b3a7956bb5c8ed51e022af73122ae29dcde5576c67d661a1825fd9cf32632ad187d4640ab931d95649529fe -DIST firefox-140.12.0esr-es-CL.xpi 446310 BLAKE2B 3403fcf586b1715d270d61e65978e95dc4cd0d176e8479f14a83f63932f24478f3eb291f5d6781f62f01a379a81594aff1d48cac63095d51392c07b5a70ad7a3 SHA512 ed9218e9f946adb79463e077bd24daa9c6fd3b51b1684bf1de2b02601637ca154cdb7d665fc9d1f20dc18b4c6d41a8e72b4b8c6a91406c04d0dd71b9e32ea9c1 -DIST firefox-140.12.0esr-es-ES.xpi 447011 BLAKE2B 65843843c536cabe662f6f80acbd9514658d74ceea6c111a0a44531fdc9b7a4e2e5ccb689c28b4821e15f70f52fb6c53399c6ee5cef69a1a3b191201a9f40b6d SHA512 d08b2138527aa034077d54da9f7d3d4434f948a62df5abf992fb91206e687952d1ea00049bdbaed1ec0b1e7432e25d34e80b84a1e2ae4f56308ecf8c371482fb -DIST firefox-140.12.0esr-es-MX.xpi 446247 BLAKE2B 182f9b73b86d42117874779c034a44548d8112422199deb78b7a29bf253a106ba497dae0a9a14f2a968ded31de7e470497a2d90bec2c89de860b84e1e01e1393 SHA512 c64cf8426c0451f1a16200f584f360c284ef9fd4f88cb2237aeb3a06997be3b9807d1c4febf840c198eecc0617168596870b19665f8a4ce23959505aee6a61e3 -DIST firefox-140.12.0esr-et.xpi 359329 BLAKE2B eee8c042faadf541b8ce08b6b46db15e9d97584f7e3635ab6683b9173b3505b18882d7b99efc3ea9973b05ed50df5b2c6f07cc98ed7d69dc4a8825735e35381d SHA512 aae451354660fc70604c71416eb51ae8ce48b5ed1f1762deaded30f129466815699569360f9b3cbb85ed4456577c47e1e4c74d7956244e39513d888efee6e4e1 -DIST firefox-140.12.0esr-eu.xpi 417292 BLAKE2B 96caad91fe2d1ee2b18d9ce2f4b58b0bb05d471519e86b5b9eb49d7f578f5fbbe08f58c86e06ddcb437fe5ca9451592268148a1a0f435c08121585a4a2e394f3 SHA512 6f4709fcbc38c3ec0518e0ed87e5fdd7d6fca2095626e6aa4a76eae642ef54a19c7591ea1804902ba32fd146882ce3cb56018fece77b67864665e8eebd2ca7cb -DIST firefox-140.12.0esr-fa.xpi 421637 BLAKE2B 4676b6d93647edfff8d1840e2f62aca8ee187160116c748ab9355af5b3545013bae92db3b7633247d953f3a4bbbee693c3afec273de833656c8239291a260f9b SHA512 1ff0432e880ff8fd5efb2452c5773bb32920342a735375a3e81a4bc3a0d498ab5c9150f700bea8247e2f237f04e8db1c156e57b09eec34389ecc5ec64d8eca57 -DIST firefox-140.12.0esr-ff.xpi 310178 BLAKE2B 3bc9fb705aeae0c89dc6c357365512313e3fbb57a8b2636c8bbc4745427ddf3403c1a93858d44086a7457fab2d81e789d9b8deadeb1f7fd21b8296853e0ee3d1 SHA512 cfcdb102b79c7fe70c645e2a13bdcb09ebed5df166ee314b46bfdbe00575e64e5253cae5815748e2f8cda15488d4fc8b11c8a962e502b2b01e537c212dfa15d8 -DIST firefox-140.12.0esr-fi.xpi 430169 BLAKE2B e8c8354939f2ef3b82e2b217205c914b379653ea4a3fb585c2e34596de6a8377510ed1a798f3967e90fe40842c5478f726f7da352bbe0f27bb7949839633de79 SHA512 ec941796fd75f2bc11ab2f441b9f57ee8c765ba5a72ee8f3c5bf1b6959d21800067f0e9d1aa857479dab4fcbf52b8c154fb5afccb22b00bf74798bcb8583fe5f -DIST firefox-140.12.0esr-fr.xpi 458457 BLAKE2B 8b211989289256c5f16aeda0a3448d3e5e0803b1beaa98f9e44905c372e44da614dc5f5899a971ebb002e3f032c6c409de1f9d66b57e045982b538dd1dcbffe2 SHA512 c3f967d6265f1f07fd0d6ea514b6b236331806a1a0eeb781303efe7773e08f402bd69d932c51065288cf87f078d67bfd1faf25128b78870eb20430a1ca7cb25a -DIST firefox-140.12.0esr-fur.xpi 451828 BLAKE2B fff68ad15ff3f685d13643f8d2c1da56ddc74d5fdb43c8ae585777449d888bd2866b576b85dbf9b229d3422b11026a7d97d5b819877bbc6bb0048de37e4c9e43 SHA512 d2dfe5b265461b8fd30e9226966fedeec75d1e876d68cdffa80ba9f6b0ab65ab698379f3eaa55323c5ada7ccd8ea5c988157b6f89c1614d9e90902952c9c53eb -DIST firefox-140.12.0esr-fy-NL.xpi 442165 BLAKE2B 82de0c2e1eea66f11a8d27b1d88b4ad8caf655e90f4869d647c678dd2a93fccf5696b495519f4f2a4004f8dd407238f216c6b95fc590065a6b12884eb5f2d001 SHA512 5b757bc6079d994ae3f7185bf632d467b96a9b5916f7e84e6217840cbc491e52b7c4f84868844746b20499695cd17b5eec52abce85490629be36a4fe8db70f3c -DIST firefox-140.12.0esr-ga-IE.xpi 315266 BLAKE2B b3e5b1cb621e1cbec236420f7796853065dc01f4674232ea00c5feda7f84f9eadff654b6dc1191ae315f195283ad93f146794f0d543a264e1ef4e266fa676d7c SHA512 6c5acc21eba4b986a2bea635d7e285b9492e4ba56848840fe66ed826724107a6a2295f1f814ce760203d8b7ca3016e9f6a7a8d5ac0cc8fb9d7d13db63f05296a -DIST firefox-140.12.0esr-gd.xpi 399422 BLAKE2B 44f5e6049c2ec8fce71d3d01e536aabdcf4d7acf1fecc36f467b08b839357c5fb1b1623836b79221ae2c2019f2df49793beb4359abd3f9a27d266cd49bb7b53f SHA512 53bcdaf3dba22502087c8476f3b51bb0afad4b0d03e685634296bf881edbbf398a94f28289e917fb394a86c0934f2c8cdafcda8b9e4bf2f7f9565cae30df0642 -DIST firefox-140.12.0esr-gl.xpi 442912 BLAKE2B 20bf3589cc7dcadb09fe47814dc8f35699c518d31e991028c69aadeb077b44070fde99419e79e69ed554f080eb18fe3b35ba518afa734512689e9e7d03ebf780 SHA512 5ff69ed507842a9316a4568077f8b34a51db4fb93b8cd22702a1daedfb7399afa0488808174b370d6fd7b71804db36fe01709e6c9c2d12197977ddda64fe0f23 -DIST firefox-140.12.0esr-gn.xpi 451084 BLAKE2B a6bce4effbbaf55e5e36c645f299cbe169e68224885407743cdd02b5154bc8376ce2dd161f0e1a339ddaaf207b224a44ec077543ef91f300f0f4d9db98803ace SHA512 03ccbceece2740ad7e91eb758709a7bbd3df4c0150c7d26c943261d38c6512025f3192d2dcd9bb627e1f84306cea0295d59ad6332b131aaed5f26e78d370d7d5 -DIST firefox-140.12.0esr-gu-IN.xpi 358981 BLAKE2B bd0d71dd6101a5f17a797c1219c4b7a36a14d84f90c069077be0a172571ba3979f0ca7281dadbae5cc8a128f3d80422adb22cd2db64bfda5542e5093d18bf1ce SHA512 924b4d7b82dad78bbd7030231abdeda525029884d4cd76790f7ce5c5e587b7344b3b3b26027f289164b226254717f7d6f4207549153563e6fa14fea71a6593a3 -DIST firefox-140.12.0esr-he.xpi 444982 BLAKE2B aff4f688f74e77fcc59caef8431c7e8775f0779f41872d8c032d7307c7a55e1f0f52a8a08dbe0ad673faafec3b42608195ecf973bfc48aa60ee33bad85effab6 SHA512 8acbff4f04a0cabac9fbdaac754e54bfa236f326adf7445bfa7826209dcc4b71329f0896d39447ecd87682229cd88feba383d82edb055d94d0e173b2bff23767 -DIST firefox-140.12.0esr-hi-IN.xpi 377462 BLAKE2B bdf99a3589e7c2b1079bc56678417ae2b2ae185e8066f1cd6c87aca75c1b90b58e0c2e74824dbc893292c0c1fe565dea3f4c73b9a93e92a3b01767ccb33171e9 SHA512 edbd82b70ded994245a7317a6520bf9e2ea8593b072ba53ad091c102b6257e0f143049ba7e89204c04a8467de4e3360f4423012c3b3ecff4207841745c9ce441 -DIST firefox-140.12.0esr-hr.xpi 437683 BLAKE2B dc6d593cd5a8ecd9506761d8597308bcf771880ee2ca7d36a480fc9b2eaca843789271dbad3004eb488f4793bc6296e55007eda321e08740879f8d521bbc6409 SHA512 0c4655273c27604f395c161d7f360e5d8f0e38c85a3defc86f22a71fc4745eefa0fb1ca06f78e5c67e40e7378ae41e8f15979b9b282451eda10b34e4b9d37e61 -DIST firefox-140.12.0esr-hsb.xpi 462697 BLAKE2B 0e40899031fc2d5695f626a0dcc3fd5fc2f9bae79e0382b8723d0cd1868964b5f1be154fd4012f832a58554875494a106c371feb3e317f3224f6eea32cc6c13b SHA512 bce2dd77322b05c512a1b69b8a4d3ef4431293ed4ea91daaac9cb3c18015079bd1bcbf3e701d2477bda70d92ad149ced0556c5a672f1919ef8c6a3bc95491d2d -DIST firefox-140.12.0esr-hu.xpi 466165 BLAKE2B 2690b0f040261f18d7969e48b7a69ba16823399e815cba31e75a4baa29cacf85df90a80cd53e993a1f60d834a288f00607cb8013fdfcd821f0b50759a66cc09f SHA512 469c24c049f8f5f0e5d1973fa0c85b5ac89041ac9d347730f4012d66da80e0e12cdb538ed7c9901dd19aac1280a6783951acf6a416004e4f07a6274a660def20 -DIST firefox-140.12.0esr-hy-AM.xpi 461608 BLAKE2B 67b11e540caad90c8753cee16c292ed99836e3807969d092616237e4260ddfd0e2a85a714c37abef16781023e834f937ff5ae3576d76adf197f8de23419a040b SHA512 09cc9555b763843e0537ca4741b7a11b6fdd65064bf5152a39c291d7ea76e39e40f9db5de423f06914f2411ce4fc8c26ebf82635971c76877c0e69b867e2f653 -DIST firefox-140.12.0esr-ia.xpi 430120 BLAKE2B 21b6b5eb6af07d7d910d8852e3169bcb1a8936e2cbc15cdfc9433b85be0b945d93b7206bdf7ec4902e4e12948aee36f181b5fdb54bfaa7d966473ffc42379f01 SHA512 87ff234a8c4ed8e4c3977e4400d4de01db6bc6cefc78235b6c7c375582a63fd7edab381c044a2ef68034bd48fade833a8a5b945c5ddfe08e0df82b00b4df4f6d -DIST firefox-140.12.0esr-id.xpi 422759 BLAKE2B bdc68942bc4261be7a5be96ceb960fd6052de73959a503ed3f04abefa19ac5be8647e7933a61ac60f5a2cc3978c4197d1a13e56130a285e2109ff6b0369a85a4 SHA512 7dc4fde25374f144e4149b0148be6b4ea0c0238bba27a8c1756abef1a16f3301fca2ead22793a10fd8a0f9de296976974e185e2dfcd34cedac975afb4b8c43ca -DIST firefox-140.12.0esr-is.xpi 432680 BLAKE2B 9cbc7c1b9e721dc9464996f894b46142f5860df7989ca7bbe2d4e82bde84c9b5da4b46ead5786551b88feacc5465a15586f12949f1b87601d328a8c4bc0439c6 SHA512 8646c9aa194c04a742eb19f51027f21ddb64412999f885c340fc2336e760048b35f46337c26e418dc2a143e27e8d18d12c6092f1c2b60121bc172bdbcab4a3f4 -DIST firefox-140.12.0esr-it.xpi 440904 BLAKE2B ebaea93f91293ce490b7dc62a00caec32c77d499b37b7452ece0c50aa563ff973fc97de6c8685150cd38b46759c0296eede56f3ee46967b1903ae2ab807ef60b SHA512 a130a42bbf4598f8aa035d9c203cf90b4e43b4dea01452d550e7393745be7f7998182729245dcbc939a62794f87ab39e21a24438fbdda953e8b39fc5b56504fe -DIST firefox-140.12.0esr-ja.xpi 481322 BLAKE2B e8086347826b89c754167516631dd49bf954c320b175082e6f75947ecedc8ed17aa869bd9186abdbce08b289b38e5368f948267167c64c57a32664ea12e7fd55 SHA512 d374403dd02e34e719a77327a485572f56da5590ce2713be817f4f1eb49efe64a3ad92cd5ea195e73eb5386a6f692f30688e1ab0e33c6147c28542c2c31cc2de -DIST firefox-140.12.0esr-ka.xpi 494875 BLAKE2B 00ac8829d4c9e20342e1cd7f4d6a9dbe614d2069b32ecf7aa9639f134cfe314d4c14f6b1bc5c9df07a6cfea99be201e52165f12a585ba959308cf0a73013a67c SHA512 69f2842ad9fc2e208d91b4cc10eba72026cebd0cc438271f2a1363e5032415b6347e29613b4b9b308e8122272f82f387b4699e437707e1da4373afd143cd1c8c -DIST firefox-140.12.0esr-kab.xpi 422856 BLAKE2B af131d75299e842621fb18b96a0bf49faa91f5ca2e970ce30c25d87333bf2bad09a3a0400ae5c7818cfb9df9c4997ff1b4cddb1adde546619460ed5e7d7760f8 SHA512 f8b6eda3508b9d9b45acb48f1fbb3e09d5ce4f0fb7bfb317f17bb3be6059799b17306a3c668f789b35be43e75332c17ccc68b5a86db88da50cae23909b710506 -DIST firefox-140.12.0esr-kk.xpi 506691 BLAKE2B 63f802ac1bddb167e94ce180c96f62bb922cc92ff1f9510cf03d5ca2ce4a733dc71d869fd212477b66e78764f58b93e397c00bb796ce4ab0893e274a2c24a258 SHA512 8a0d51f5612c52b7c3cab24e1e0300ece99e7de95c835cae5286bd7ad461ce7ad28d39ced63b9e120e466c70ad9a812a5f83b681af380efdd148c3b359603b09 -DIST firefox-140.12.0esr-km.xpi 348781 BLAKE2B 847a95417d2eabe826fb8d877217882b8b3e17e1d80164bc51dcb88933bd51f5cfb9b70e211ab84137414368fcda6e24323c1d1439a29f5546e788cd70e776a5 SHA512 5ce97a563e1dc6eb1f1c7c197f489dcc089b8d0d6c474f7cb023c7e66b5ee2782502ece60512ccd04409897c01af3b53f4d27e11306d4694b055f5ae0a9a448a -DIST firefox-140.12.0esr-kn.xpi 331784 BLAKE2B 1284904d15d21c444a3cb5dc195c9ad09f1c4f5130091a25e28085e94bd59ed5ba038f44a9ecac872f059fdfef31c549b218b65057eaa4fc4848c5a65e0d4e44 SHA512 530f5463f0285e746bd83bb502259c32fe772cffb04c7ea05950b3426d7bcf705f0048187e3f52f236692df0948b1f0f3ff8d8932ddc334cad934cdc2f9d7dfa -DIST firefox-140.12.0esr-ko.xpi 467544 BLAKE2B aba6c80ae2a2a58ce3f961ad31dd01563b67bcef2b6e65b219d6c2e186d3c923baa27e6bc6457e5ae1878909c96b422c6d9a3648452e553a89d610ca3daa3647 SHA512 44b714914f7727794fb57c2148f0ddf6897b20e3f79d1c5e6f534d34f17c5d07a61b23fe6097839e9b923e2dfb4f9387886299b52c5941693dfde2acd3b18e67 -DIST firefox-140.12.0esr-lij.xpi 319283 BLAKE2B 4fe7d0eed926df60bf59d46e933c302838f39b31a2ca79559621f6aeb8ed30eb6098c167c075e3bedfa96ed88aa0e1acab9861246e84025e99556040778e3965 SHA512 c6bb4e39adffe51bd59fa9c694d2c6aa2dc5c2f1ee855d96b1228dad0efafd942ccc790b399a1a2a7899e00fff41bf5f39614369748b4cc9e668190351382236 -DIST firefox-140.12.0esr-lt.xpi 379952 BLAKE2B d1f7e9c1d5586c3dd575268f3235d91e25bc8ac9eaa8b1dce08c8d53fb0406ff9910d5dc73a48a46d38052e9a7e8ce1eadf8531fffdda4a2bcbb95854bcf1546 SHA512 e5a9197c0e3696b6c75b1f7aa238608016afdb4dd3ed20f23fd7d2bef60f2162c08510074e39ad05ce7ecbfc6970f5a0e4ad1b81468a16a2b2054a9158e60fc6 -DIST firefox-140.12.0esr-lv.xpi 389078 BLAKE2B 2ea071918858aa39fa82a8bb166a165533b91e37d42b123885f53d20b5e17e18bd63acb29d0cf626a5e33305eaa0f184ae1faa07bcc16a1dc3c7d8c6b9f69c5c SHA512 60bffb4d94a099f53c4e1a5e46d4b45a02619dae6cf4d8c6ee766b87657cf92dc483bb9386419ea8b80d1f0144965001d513be7b14218a9a09fabe689fd1366f -DIST firefox-140.12.0esr-mk.xpi 316840 BLAKE2B fbfab6f892233d4c2d9784d0fa0ea08cf94257269eb9242aa1f0d15ded203ea8aa7fa6f0cd41af2f1a408c24daa67669fd188934b1eda29b042874cb84ca605f SHA512 f5a1197e5b0e85f81bd5a857bd10693dd2f663b3ae03a87aa76698575c2bee41a969fb26fa9e09e95462c2aebfde202ba83daa265892720ce5ddadcf758a73cb -DIST firefox-140.12.0esr-mr.xpi 356248 BLAKE2B f894ca26751818adefb5b35ee91f3491dfa49ff3954d7a4dd3573bd812913b9746680122525e83652ad9ba420ab0ae61cbe47f48a17d13b9dc26a6e5be9831ea SHA512 921c54f17cd5f2912bb9b5bac50e36bf14dd9b7557ad2b084f712aee0c0eda6cfd5336e473daeffcb3fbfd3b3e8a05df2b559c42a6109791c712517fffbfaeed -DIST firefox-140.12.0esr-ms.xpi 295388 BLAKE2B 935864ff937b70ac3704fb4fe8888814accae6e5a300a1e8537e01697b065ffbf7be2c53e2ae8b7aca0fc59fcca27d066d61410e204d4f33a16c0acf6854f7da SHA512 7bcaa3be52ea5f64a39302da94d267e4fe9782f64f49b08791139e41367f4b1c71510f01711e1813724f3a264c32f1a0bfeb159990e09bd84cb9a70ba1788cd5 -DIST firefox-140.12.0esr-my.xpi 343033 BLAKE2B 6fea4c314fde7cc38b3ccc3604170944fb28e5c1144733f653bf4dc8bee36cd7076eb42d9db53221253d833ddfe65ef81e56abd5a6758b0890f2f095d4988244 SHA512 b7785d03fe2254684677b07dab74dcccb49fd6d46baadb36c408a025f80626da4abd57bb773902249ea24710d83d0ff6ee2d40a4694ac1fc08586bbaa092190a -DIST firefox-140.12.0esr-nb-NO.xpi 429340 BLAKE2B b1223ef4a6d87d899c7fa0c30f13945705d42d4c42b3abb100269d8f727f1be233a4d98cb56ea2b4cc1470aa5a9ade64ac311e2122f0572e16e003ba8977da91 SHA512 d99ea07b336929ec78ad815fa42f696629e57661a74f5841d83e5cdf364fe309c61f30b008753fd2f4c7f421bcdc50de029698a33046a71eced8c727da82ffb3 -DIST firefox-140.12.0esr-ne-NP.xpi 349011 BLAKE2B 56c6a198389b800dfc852fc785797e58b83579c6425b9d93e6e2df3959b00c81505407fec1a582b14f2af62c99c1df2f59dfe4d196e346cfef33487b3dbb2d8d SHA512 cceda3ae8e600b9a3b2c58347e0cdfc2eafe5de04c440115a2fc191ad5d8270e21ebfc28f06bfaa7e93343e826e09057f7eee3089633d2ba30b4b4ff655bb443 -DIST firefox-140.12.0esr-nl.xpi 436185 BLAKE2B 07c2c8d85afc09373c6d5865791ce121052d0688fc891acfd5c0bf17dd8b7f456c2dcc558888e75bf67f80eafea812de0402e56a6c8ee93eb32f20b495ff926a SHA512 a3591d51d90ebff10778ff0f0fc31c1b247fa72808ac92af496228221f680e639b07e747cf6b00a2533887165fd8176bd4cceee35c4ca3de237cf78295fb3161 -DIST firefox-140.12.0esr-nn-NO.xpi 432218 BLAKE2B df78b2cc0947e574ad446b82e0c496717cc4010bbf465f505780b947fe20b244bdab76a07835329d788321ef91baf0a8de3fff7ce417f2026f39793afb284206 SHA512 eb87ec55c6b84c52426410471f9bc8a28781636cb0e54949904691d7003637494c784d70cffb6c42654ee93187fe25682627e905159def6aa555d91d28c45de6 -DIST firefox-140.12.0esr-oc.xpi 410938 BLAKE2B e1380abe2bd6cc20dfd4aa5d102d210d0a4c2a32b8f6bf7ef79b05a649996e6a97f5f0c2e2bf795aadaa262f4a9819cc0b60ccbfd2299bb7d1e31003d9ce786d SHA512 a7226d5a656240fa017e2d7085d9295af4f68c1c75d6ae843a21ad888d17de067434a4323fa2648fe42df3e1b6707254caf444784711752e47ace1738d24bd60 -DIST firefox-140.12.0esr-pa-IN.xpi 494407 BLAKE2B 80e27a23fa5a02bc22be51cf0c3c6a39432038695b6850a9a665db13db2700be2332dab51238f2d2471c7368a2174c99cd7948148e70f7276b7abb6f377f91fe SHA512 79ce55725b57753ddc0425544daa2efcad240ed21ba81996275c3dca2b34fa2493aa4aa40d1c2b7f9fe05894100e82f76dcf5409f646c7bd19dc3d02ccbbc1f9 -DIST firefox-140.12.0esr-pl.xpi 460925 BLAKE2B f739ac9b90b3f7ae3c8c42d4eb32a73905fe5468a89ba98ed2d20516c5fabd658bc6eb45d365b5c41bcdcf8ba39c787955111b0c6a1afe460fb097b7bc7b64fc SHA512 96f1c421dc80c0b1c8d3cf4b5136160e84167634d688cbbccad6959b9eb1b47e3887842ca6575919ad4d8f47a18b321ab969ba53e94164086e90646b9e4f3c5d -DIST firefox-140.12.0esr-pt-BR.xpi 440764 BLAKE2B d9b756f498f7cb4637156dd2ae6c7449c6b0beb6c0b5d56035c827c2d38df5b642ec29a86d0fd7e23febf12b5c230cfd90caa552d1fdd70964fd2d4bfa814901 SHA512 b023b4f79c21dce37a16d733e044cc60af00e05ce643b86e992961a4b8ac6aafa9710aecf6ae6c168bad6bec8993a600b25138daaec0f8b9d401200e5514e4b6 -DIST firefox-140.12.0esr-pt-PT.xpi 446419 BLAKE2B 9ddb92157283441652c031888f49ce1d0f26d0029e2c288fb64ebc11bfc875d1616449a85353efd0fe5d35053c3e166fa665be42dfe6308f808cedc63a969e29 SHA512 87e5d5ef294087cb30ef1898c5488d6e86b5879ba8b4835ec8e66552f1a9a09bca55dc19768a7f977980dbf8b67aa762024ad7c5176e449b2457063e86fb5f24 -DIST firefox-140.12.0esr-rm.xpi 438015 BLAKE2B 94f5bb09dcd2d08c25e41102271b039c6f940a4987e333a5193ba8589e31b6a0f8435a037b83438a34b0d2b6c65416a4a8d81e0fb2d2a3be6dc5910eee3c6157 SHA512 d64bbaf71b92543b74551410ec25522fcfaa585ea73fa6e10f8b8bb74df174ed0300a8fea0a6d7ca35dc8c7a03ec62e9dc0df4b43bfaff818c5ff486fa2cdca6 -DIST firefox-140.12.0esr-ro.xpi 452828 BLAKE2B 4596a696c5edb0c02700cfd3200d115701b987ad59bb99ed7181a30b6fdb344c5a32c966a0df19828ff098905aaf6404346b570085f2f78dfae01e3f892d2adb SHA512 d3ce4fbbc4e2f13adb156b3147194ca037a4a0d6a625e2a78e6606c85d0b7c4c4f17b1923f1a78b95b38a1a506d04633da1c2d8ccb79d791d50bef3440d16470 -DIST firefox-140.12.0esr-ru.xpi 525187 BLAKE2B 0efb1a0638a6e129d2caeb5ad6e1aab100d0e02be6d9d87300ecb17bffec2ec8c888c42a732340696e79dc910ff186fda5655f15335eca1bf29b9e661ab5f83b SHA512 65c454bff5c2e9b59df31260f891c3672fca2e4b0fd15d5b687c044c8d514ff3ef8d2297b61162572ab10d84b8f5d0388eb3d23a87df4a65d781b1825d40465e -DIST firefox-140.12.0esr-sc.xpi 410470 BLAKE2B 531aec60f3cc0fbe1c4121a1ec238fad5aaa08e1f774f3abe6a4dacb1620384a942c3380013b02a19bdc0edb9d63a8d814279902edd073d02c9128e9a7d76728 SHA512 a620989c19597456b74982bc702f85786aba83dfaa83e868b740f653b3137429fe7f80a0d7471f98305e1cb038adfde3d46515e7a9116ccecffe30adc7fedda2 -DIST firefox-140.12.0esr-sco.xpi 322646 BLAKE2B ab109a0dac3d485aec49653fb0059d8477ce620016ccac56903b095d746244ac00ef317396a27b04075d66ad2b11b4568724db8ac187ec3fdf71dc9f8a9ef076 SHA512 a5ac1db6bb463fa973810fefd99fa75ee566def42430d5135f5d9941e0348d1065fe2b020643ee1def1b9d6de12e32ae5aa228b56b48264cb476aa1c34c4c704 -DIST firefox-140.12.0esr-si.xpi 411601 BLAKE2B 15b41d171df210f28547474fc7a758e3b6f895943a2086760be5c1191ac467e5ca0dce476fbc3c1ef330b4abce88eeb454d7b963e914ac3936ee80093935944e SHA512 2f8459e1cf6b54e0a716ad49307c973554ec4f8b6f87827253f4bf3e3e493af4a54a5f71e1c8cb51980c799b143a3297d5ebfb6461f5f82b92bac0202dbefaf5 -DIST firefox-140.12.0esr-sk.xpi 468230 BLAKE2B 022b4aeb39056971faa78ebf7aaa3a87d7b08dfed55381b5fb4544e50b6d9be913b325e3fb36e0f95a43f1ee156644d3c675a1ea23b810c5af1b09b0b6d68be1 SHA512 f3fbd245effe3e00cd8f2cccf5a5bd68b89d3ba9e4fa1f1885fc8a928c73b85f6ffe0a0af2bac91b5c4b68e27152263da28472fb879a1f70fef1e15bad9cf6bd -DIST firefox-140.12.0esr-skr.xpi 485868 BLAKE2B 6092e04633c9c35948a7c8f09e5d9c3d0c94ffa85633acbf8d0e79fc8006acdcffdded0e3d58655e04b2a0ff18051f912231e9e67a5e7de6332efb15861fb2c6 SHA512 5d4c1c920ff872a9ab421a361d2248eaa7be03ee11c40b697d49f81c9887a32cec1f9a4bce0778b457019a17c239092fd0949ab1f7f858cbcab99fa1cc46aa55 -DIST firefox-140.12.0esr-sl.xpi 441199 BLAKE2B 96be7de4801f91be5117accaf5de0913dfb1d3115634858bec1e6eddd82bb9df90c503ae45e15bb512a0cfac76d903a9198d7f23c74b98a7bb0437e92ba5208a SHA512 2f80e8448bf3df92eb434708f88425a1b64bd1a643a305c68d5cbf507c421cc79622de8cc23e0f8e2e00362d783517f4a61f7b99dfc9627d1f7ab9a9f745549a -DIST firefox-140.12.0esr-son.xpi 273126 BLAKE2B ada6d0140114173a2357af060e664b3c960f1daf79d3bbfe44cf0aaac1bbbf4850d91d308d7572b3b9513d007466db035503c7f903a8fc83c9ca4010671991a6 SHA512 9b1a5d72a6a4b3ec32bf1761190d1bafbf96e23ddb64738464aca5adbb0b06f05527b42e7428a7fdac8da76645b3c5c0e87005b6443679948c3cfb42c03e4ea6 -DIST firefox-140.12.0esr-sq.xpi 456016 BLAKE2B 19e7b5aa90967f263ebfacc2e51ecc5e6fb682b4ffc2e8a6b6a9196c33745c486f458f71ab032ec1728f9e5553e854ea0bbe506a51484add3b08d3dc5e97dd34 SHA512 a5ae645f3c433a1d56d759bc863845dbe239bac80c8a3bec12154a72311f6f8acc46950dbe334534dde3611208b32f5fbf5d1dec6ae1b72d81ffa71499fa5e4c -DIST firefox-140.12.0esr-sr.xpi 453371 BLAKE2B 9c06acb88f43951273aeb02fa4338bfb505db73dfdb67adcf1b89b673f2d8f6c322b20493d95ed29ab4dd0d64909d89995968daff499e1459b771c801b76cbea SHA512 69961fc2b4285deab6feefef04949cc96b6e4b8df9b55188fa59d2317eea08c2051d149de78fd22bba10c5ea5ff1193347e1ea572ea2730af755b5077260dd7d -DIST firefox-140.12.0esr-sv-SE.xpi 436151 BLAKE2B 3c07fc036ae8b0b0be14447eed01e77f043363d4b4eca38da63b69ff57ccdef357dc31e60fb9aa5d40054b2b812040ec99655c2dfa4d0dc5dcdf0a599114ecfc SHA512 893fb96b2dd032be715dd41f45dc7e755e9842dedfc4df7641212da1b71ee15180796fbd638c43d973d927658b8ca8cebbaa5dad5adebb2c5ee449c997f46c92 -DIST firefox-140.12.0esr-szl.xpi 341678 BLAKE2B 6db43fece0f0bf3c64aaf622b9e3dec881c4134969c052c5251a2094a8853cca238baad9fc52308440758bc9126219c7aa0454648d25ebc53736d4d2875b1a0e SHA512 a4e6c5b388c4357dc7ae0b822467e4907532123336c3a1405bcdbaec7516e592741aeb502d827f3b014df193b25149948e7e9299e3b55dafdd3bf82458053b9d -DIST firefox-140.12.0esr-ta.xpi 338148 BLAKE2B ad5b1fe4cc901d1de3d09e74852fe326ff8ffb22ec68705734d037352a099df94900cfe9ca9f6dba4c052b1c010c2271460388b81472a81e77cf6f4efc4e9c0c SHA512 907441aa7b0f266df68c5a6129bfc115925e6dfade0445a77c731c4d0a289ab443bd015f9648e5ea870a8db4fa8e17e5d3e566647cb29d29c9b4fa85e6d2328c -DIST firefox-140.12.0esr-te.xpi 382201 BLAKE2B eed17be503cb28721933bffdbfba3f8b9cd1462f04cf4b07488972afb913290d9df8f4b144890b476b2a6533d32539f12b82627ad12598e599eef74e8ce9a656 SHA512 127fc9d9626cc178a355b3e489a0ea50ca648477ac3c6488f295d2186bf75f81b91e5395eec158ca6164856455cfb7dd06033da883d8c499302d083a6c76d38a -DIST firefox-140.12.0esr-th.xpi 505490 BLAKE2B 412b9d94ed35861e41f26ad71f7ac9f81631648ab1342178d27ba34e3f6386f81276926aa8d871d1b209dc8be459f0e98e3b3abe696ea10ff6b4c51cf6be6bf4 SHA512 2249e3c8261281340831239360596ff3cad81745329e1e4a98f905a4842930a2acaaa3146031b2488a13fd56cdcb7ac02446618d7d6e8515fe666b13d7db5c55 -DIST firefox-140.12.0esr-tl.xpi 356664 BLAKE2B d34814b19ff0cc560350e4c393527508c8cf5e4b3e784a33b726ea325d2199e6d016023c7ae8454e9375c7e65a1c356753851c3c79be6b7a9ded934ca9ec07af SHA512 c0a141fe993f22b5d965369565e6961b33aceeb30eab9706ddf9210c3a8ed29c8207fddd2f951f46aed7cfb469c66eda708d3f88b045186672079663c945583e -DIST firefox-140.12.0esr-tr.xpi 449313 BLAKE2B 0e7fb18bf5564e37f36b6b2b5002e4628f9df3cc2f38318e23a387c276e101bb29962ce0b1bd3161bada79da11b04955d4e60e2d6ea64bf3c9f2c11fa038163d SHA512 b3f9c83a6e6ed13293a5b31ab05721890327e37654f55803f359f971190ca206cceff4795389c924199da0158d0f8c9b9bb901091c648c6fb348740725b4ba2d -DIST firefox-140.12.0esr-trs.xpi 324513 BLAKE2B 8f696e81215b06698b1da1e2e34b168f1f2387a6bb9610d21bf23b0f75bd530bb65b0c2f54390f8574cf94c6bec369ca585ad7ce079ed2670c06acb78ac84acd SHA512 f436443761fdcd329b32801e9b8f99a9313abaf807d335249643c955f5d0f105873948ab313f5bbf1fa4a3810b10fdd7962f1bd5f73196e8edcfe3b0b9e4a6cf -DIST firefox-140.12.0esr-uk.xpi 516734 BLAKE2B 9e793317d5d67d5bc580559d16a75a28c32ab1f7d4dd0818d310abeed4d4beca6230d2bd263ed9ba9a4e7aa441f7cc6b8613222afc253808b6a1527729d97316 SHA512 0df220b5890d0e36985cfa2bdb9151eb0abaf2e039a065a47296877abd99825c670587c127b5214002c4305f72f075dce451558b85ab04bdf01f8d689849a7c3 -DIST firefox-140.12.0esr-ur.xpi 370182 BLAKE2B 6ba5d6d515d25888dd8577f06d40593903c086161c0bb4f81ec653c2eee4985611967271c79d50f5803dda490554b39455c32d34cbafd2dcbfb1e4dc1ef7edc2 SHA512 9fa56cbcc64a99bf08c6db542b4b5aab734f0dc58515e4e6c27b086eb0ac37948853cb59922df6a29fbcb76f34aea0988f24a942ffa6656b06992159133360da -DIST firefox-140.12.0esr-uz.xpi 303480 BLAKE2B 874c28163c19f42daee18c08e5808343c7f9e84ae248d0d0bf91e5a664d0af9a5c02cbf28f593ff2052cb371aaa2ba6d10c5581a4630ddbebec636f63880912a SHA512 496a8d2bf29efd735fd6e3478210987934ffff477f4819c0a40b620911258417b99b0200403f615978286a9a25348d373b31c17d992ac2edef714d702702bb88 -DIST firefox-140.12.0esr-vi.xpi 469151 BLAKE2B 526f1fb9222cb34815460ac4b8299e69093611d292977cd56a3fe557b83f703295a92289b0ccb863e6d9e043c5837a0a87a3c2dbc6dea418453f27d61bc12684 SHA512 1fe5a73e2405af48ecbfb119aaf6322cf2f054ea5d35f5ed7ced450b9c242ba63de12054f4b9e1a4e9835bdf299e4230e122bb150e64afbab615c7d73ab0b4e0 -DIST firefox-140.12.0esr-xh.xpi 272793 BLAKE2B d4295534b45a2122ebd3631c7159725c979c3f4b6f4e17e301bf701b4492988edda8ce4852122e9efab7dcbfd1cfc13d600a07e383a818e83b7f1d23cbd0d3f4 SHA512 05e7a86760a7e1100b11a1d0af77cc12609876fa820bd51b08f0d7ddbe105a7b727c620e4d45edf5f4c0745b31fdf40dc46db044e621b2b3999f871f00ae95ba -DIST firefox-140.12.0esr-zh-CN.xpi 460702 BLAKE2B 7a1bf510a8aaa5be71c43d19cc8d772724b2594847a55cc99de26c66d95744563cf8ab4e2b95632dd4b6bf967de975fa82cecf5dc9d3bbbc6a302a1f339df782 SHA512 1a92be8dbb8b555ec73f66c683cf83584fc6957675015df945a13ecbafd586157e7ff9a55f67f3c04d5e732a3b432c8749136296e4555c9f9f85bdd9cbf3c96a -DIST firefox-140.12.0esr-zh-TW.xpi 463739 BLAKE2B 0a61c6cc92a2b7d9acc0231a63dce5ab0f1f58a56e4bf75c27ffe0272e7d6b13877a6cbf8f399c7dfa02b438fb4f9d59915a144f76eaf120aba8d020dc1e5694 SHA512 8d9ce4bbf1d4d637e52704ffaa747c0047a310af00e9c7b79ecbf1deb6f6cfc946c8b850f3b8024bce42e0a55200ed1afa6cbcd25eb149a400b7aeb85129d7aa -DIST firefox-140.12.0esr.source.tar.xz 641934156 BLAKE2B c9e3b2fd860edf1e91475419a7420f9d22155cd641226c70f381650d9df2fbb450c85d8f4e1b02eaf7ca86d4ce09ce8cba5674e1afcc4810ae5dd3cb70050cbb SHA512 3d598dd964bca074d11b71f84d586811b0a736bdd4d1e6cedb9286c56b1e11584e85ca1d0369c9b2f8d9e4d0eaf014d1b9232a96e71ac25f71fa9ed0807f642d DIST firefox-140.13.0esr-ach.xpi 294360 BLAKE2B 90d0861c4297bc06cbd3015eca7bf9e3da71fcc120ca1d3f5487f5c4a2e22ca7dfc17fcda50bd78aed1c2e02390fa2a884e9559ff5fd93aef3e43d7f46015b23 SHA512 76f20c4c65714816ff13dafc961663a6aba76afa097d8e928e1521795ecf55ddc1ff712e86ac67469e723069c493a2094688adbe16faa9ce236393485b17f344 DIST firefox-140.13.0esr-af.xpi 266634 BLAKE2B acd0c690e42b9261fd8a346a450ac92c3e8217289d6a80b5d897fbef83d2c87bbcf8bd069eaa4d1dac18a76020119a865a8797bec72bb4a65f4769c04df9792b SHA512 88cff9cd52ffb4086fe92863ca4ce8c24e8479cefd71f5ac1c359175da4c67f3ea2f1d9e14db54ea3cbcdf6299dd7060035a4067014582f81a3f4406132fe507 DIST firefox-140.13.0esr-an.xpi 332304 BLAKE2B ea01b3b1fe832009526cc96cf01e67622fd36092aa98ce3baa516a160c48e74c46866ddba3e807c20b76a3e58fddd358f9633687eeaf386d02fdef2dd38dfb08 SHA512 495a892f7e4144bc1f9bf9bf4aeb0353b7b78112a7c370d87526f77b3274ebd0f527a93865d9f115314221f52d117153fa573f7127f11b3f3642a413c419de23 @@ -201,13 +100,8 @@ DIST firefox-140.13.0esr-xh.xpi 272788 BLAKE2B bbd6d9697af5d8e86bfcb27bbbab84dfb DIST firefox-140.13.0esr-zh-CN.xpi 460701 BLAKE2B ca604ca9dbe5e0c6870a53e3a2e26f2cb0a2598a052eea0f0661d1246846fe32eb50c7ded0b6c8e82891bf7258fd16c45a3f86e5add921fb12a94f7441dfa89c SHA512 33b07e03404e50e536142cd8005596b0ec80123fe744a69397ef54641b37b53bdb73be584aef972e087d74e3a6fe813d00992b1c04a1e55b715af3b77b1668de DIST firefox-140.13.0esr-zh-TW.xpi 463742 BLAKE2B 1916a6e8b55770aaa9128778d95d9d324ed9af137b73c9f0df8dbda7544cda2cb65bebb56584a8c962a4a115c43b21d0d6281bc0425e3e5708b7bc0a3c53fff7 SHA512 64ae4615b3c3561c4cbda05775347f3559b0b32dec596d6c878a6276e9e77f7583c9563b33e0c5a3b6d03cd376a3ff811fc35fad546475eefebc283269db8aea DIST firefox-140.13.0esr.source.tar.xz 644768324 BLAKE2B c30fcd2ddd6361cd0a94d4b4fa9cc3d48874e10da273f49fc42fd1397a09974aec18b35e9bb3aa13652736116dfdb4c6a2816ce3bf86acbce6ffa9340ae0f41a SHA512 937a4103d71c5e1e4bf051821729f6ea70b5c18d444930a487695cc23d74712a0134047248f6ac02305e01becb705426a55b9d89739f02a01eda01ecf5bc27f1 -DIST firefox-140esr-patches-12.tar.xz 16200 BLAKE2B 51110f80537b2c3fd2e53e6c65c8d19b78b6ec828161da8697dfb3eb008c39e036517c78b0491f1131351967d3a775154d795bafe978850415b2f9fa5415b8a2 SHA512 a73007646116a1e50da1e2cfab623794283ba6890743c17bfefe4115ee4b1dca5a55fe1ed798a6efcad0c2ff708dd38bab0d328007b4ebd99c9c90f880920bc4 DIST firefox-140esr-patches-13.tar.xz 15628 BLAKE2B 824c3d42f2f6cf70932fe395cf11dfe9043e09e20d6dfd2bd64ce4567206def45424e82b738f27c71648f0b2d97608746d22565cf7aa35713dedd71a24cde449 SHA512 d4d59818944f6a8213598308a1095a0f3c9818e6c517587e4630056d432a0e9673ad627447ca18dfa884dbb35bc2921e54cfc63f9c5646765e0f66a75279584d -DIST firefox-152-patches-03.tar.xz 14440 BLAKE2B f081628d26a591637df5f9f316a368045cfdacc5d9b5eb732777272c4d3be7a42691443f194ca1a6538b2262b4c4b0bf21bbcd53836a98fb90cc8b442bfd13a8 SHA512 ea6a1a3d7cd9ada4950cc69e63b79b1d5dc7ae2218de856198c24e24eb9b52f552db54dc8796e6a795a61524319182b87d3f2f49f588a1a0719c66ce1f26df5f -DIST firefox-152.0.5.source.tar.xz 800076384 BLAKE2B 011cae8194c98ada33d47f468ce3e23c7c3056f09c9ee0c69cd8eb58007d88002436a374bcb8eb9cbffbbde27b083004c53b752a5a4b6d342af220193ab2e7f7 SHA512 6cf2dc7f28a6a3430f2866df4ca35063cbadf234c82a34fa651e02d909e5741e50cd986fef1bd97d486b51244cb639b2b103514688347bf7f94fd16d264cc4f2 -DIST firefox-152.0.6.source.tar.xz 801138984 BLAKE2B d0a55f6f30a78516d244037d593ccb08f6803498b582508af35d5b2811097f00584c5b1760c488ae6e7073837b88087ff94ab36eee9af8d7a110350515fc94eb SHA512 c4d877837d7007fb611c38d49d9b6dd3bc4c5c9ca900b54e722e140ce7ecd0924f69b5cedc7f8c1fe602e7efe1d7159b019de27999e29235cd631821bb13e6b0 DIST firefox-153-patches-01.tar.xz 11308 BLAKE2B cfb7e8528f46e780ff10d728d6f2f00215c9cb940f3ba289aafee183199fd2a38cbe866697b5bd89458d8dce7e82e9a7dc6977e817bbeac1a01178a64adb0405 SHA512 11895ae7eba03b12ae60c280c3ea555c2954dd15eaa8a459f9a95b96629723ed599ab4e7738b33f1bdb0d09d19bccb53d511eaac9913a58e6418c11fe93c92bc DIST firefox-153.0.1.source.tar.xz 803443372 BLAKE2B e7b1749b81c81744d3461c18b48e84a72adbc130a54256321bb2a854f8e96fc315d5dc97ad685610774e27de39145aa6897b9c832a1da9fd9f7ecd89555f678b SHA512 310d1aa27b7902ef5e052962e3b7d2819d0f5f6e596fddeafee53f09e9390d4801f5b654f4ca1e9fd4c15c71241fc31844afaa4d086f82c51b516a401fbe7f40 -DIST firefox-153.0.source.tar.xz 804256908 BLAKE2B 418cc4576a8a98bb957e93712c146629720d5de960d29196395436f05c2eff95adde1dded34805e3b5e664b4a9486af3fe58acdb945d068bb882321e30a4e1a4 SHA512 a1af5866e1c9a732818123f2f041bfd5993d093e96dd743b583312fb11d2b39d429df750f9ec22ded64b58a209bb1ecabc7aaf73057d7a64c7349e4da043d66d DIST wasi-sdk-32.0-arm64-linux.tar.gz 142940986 BLAKE2B 45712415f916c2749bac9002157def84f75d005bcac0403cb9b5a814623a1e0c2a2f24092d55478ca5204afa82c7499cabf405b8e5c6e95a514351801da4a91c SHA512 e39f3130290e63a7c2674e8838bd6569ca6a630c0231e2a303d6bd4a6b7f9c78b59a99606193c3ba3e200d93d9221339d23653e98ef720632d54c5c6866dde69 DIST wasi-sdk-32.0-x86_64-linux.tar.gz 143157058 BLAKE2B 62b83e2db70b24361962b392551c604b21c59535b8d34a5e652447d7b722b033327334f0e17381d28eaa6dcb31fb02aad9978c66b761fb592b6de502012aeb57 SHA512 f77c08d1eb0f8e765bed4955d4794b33bb38149df5a144bebbe43e91fce3cfda7210cdf57073c0ff23c1d3c68105b6c69b4782af1643a0be2f3310001a2398f0 diff --git a/www-client/firefox/firefox-140.12.0.ebuild b/www-client/firefox/firefox-140.12.0.ebuild deleted file mode 100644 index dd6fee2ea0e63..0000000000000 --- a/www-client/firefox/firefox-140.12.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-12.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-152.0.5.ebuild b/www-client/firefox/firefox-152.0.5.ebuild deleted file mode 100644 index 2b925fb58a07c..0000000000000 --- a/www-client/firefox/firefox-152.0.5.ebuild +++ /dev/null @@ -1,1389 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-152-patches-03.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 valgrind wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry 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.124 - >=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" -else - RDEPEND+=" !www-client/firefox:esr" -fi - -# Firefox-only RDEPEND -RDEPEND+=" ~www-client/firefox-l10n-${PV}" - -# 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" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="10900M" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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 - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="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 - # glslopt: bgo#969412 - moz_clear_vendor_checksums glslopt - moz_clear_vendor_checksums encoding_rs - - # 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 - elif use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - 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 - mozconfig_use_enable valgrind - - 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 - - if use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - if use valgrind; then - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - fi - - ./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-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 - 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 - - # bug 835078 - # might work fine with vulkan, starting in 152.0? - 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 ! 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-152.0.6.ebuild b/www-client/firefox/firefox-152.0.6.ebuild deleted file mode 100644 index 2b925fb58a07c..0000000000000 --- a/www-client/firefox/firefox-152.0.6.ebuild +++ /dev/null @@ -1,1389 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-152-patches-03.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 valgrind wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry 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.124 - >=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" -else - RDEPEND+=" !www-client/firefox:esr" -fi - -# Firefox-only RDEPEND -RDEPEND+=" ~www-client/firefox-l10n-${PV}" - -# 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" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="10900M" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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 - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="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 - # glslopt: bgo#969412 - moz_clear_vendor_checksums glslopt - moz_clear_vendor_checksums encoding_rs - - # 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 - elif use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - 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 - mozconfig_use_enable valgrind - - 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 - - if use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - if use valgrind; then - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - fi - - ./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-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 - 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 - - # bug 835078 - # might work fine with vulkan, starting in 152.0? - 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 ! 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.0.ebuild b/www-client/firefox/firefox-153.0.ebuild deleted file mode 100644 index ad6b1736bfb1f..0000000000000 --- a/www-client/firefox/firefox-153.0.ebuild +++ /dev/null @@ -1,1389 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-153-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 valgrind wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate gnome-shell jpegxl +jumbo-build openh264 +telemetry 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.125 - >=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" -else - RDEPEND+=" !www-client/firefox:esr" -fi - -# Firefox-only RDEPEND -RDEPEND+=" ~www-client/firefox-l10n-${PV}" - -# 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" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="10900M" - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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 - - if ! use clang ; then - if tc-is-gcc && ver_test "$(gcc-major-version)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable lto when compiling with GCC for now." - die "Firefox-${PV} with gcc+lto cannot be compiled with the detected gcc version: $(gcc-fullversion)" - fi - fi - 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)" -eq 15 && has_version -b "=15.2.1_p20251108-r1 - note that even with the 16.0" - eerror " releases, make sure the patch set is equal or newer than 16.0.0_p20251109-r1," - eerror " or use the \"trunk\" version," - eerror " 2) compile Firefox with Clang by enabling the \"clang\" USE flag, or" - eerror " 3) disable pgo when compiling with GCC for now." - 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="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 - # glslopt: bgo#969412 - moz_clear_vendor_checksums glslopt - moz_clear_vendor_checksums encoding_rs - - # 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 - elif use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - 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 - mozconfig_use_enable valgrind - - 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 - - if use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --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 - - if use valgrind; then - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - fi - - ./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-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 - 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 - - # bug 835078 - # might work fine with vulkan, starting in 152.0? - 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 ! 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 -}