From e96f09a840f1ac865c504febe44bad831c63750e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 11 Mar 2024 06:45:54 +0000 Subject: gentoo auto-resync : 11:03:2024 - 06:45:54 --- www-client/firefox/Manifest | 105 +- www-client/firefox/firefox-123.0.1-r1.ebuild | 1453 ++++++++++++++++++++++++++ www-client/firefox/firefox-123.0.1.ebuild | 1450 ------------------------- www-client/firefox/firefox-123.0.ebuild | 1450 ------------------------- 4 files changed, 1455 insertions(+), 3003 deletions(-) create mode 100644 www-client/firefox/firefox-123.0.1-r1.ebuild delete mode 100644 www-client/firefox/firefox-123.0.1.ebuild delete mode 100644 www-client/firefox/firefox-123.0.ebuild (limited to 'www-client/firefox') diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 2254120db536..4482b44b1aef 100644 --- a/www-client/firefox/Manifest +++ b/www-client/firefox/Manifest @@ -311,106 +311,7 @@ DIST firefox-122.0.1-xh.xpi 409562 BLAKE2B d02a96d174bc5cc1cf7c2399c57340d8392ac DIST firefox-122.0.1-zh-CN.xpi 633790 BLAKE2B dab2b232aec155b0a304f2bffa000424f4e1d65d44a8c7cd4374a48a5de42af382db4e523c7113b8f1c59661457877a109c3bfec10f9b0102b827d729fa4df8c SHA512 3283249b2e42a3f726f98a1e1526f73bf38a728d703bce6f7a1c41cacf1f86581debaab8ff73057f1fb11b1381656c422b2c7146750dbb32ed4573df31b95a0b DIST firefox-122.0.1-zh-TW.xpi 635798 BLAKE2B f098894718db43f15999844f4756921e37f40a4926f1a3ca717b0a7ec7b5ee9e9319075eab50e01ad51a849b2cfd39b06732e4c510e09b0809b8a0bf9596d39b SHA512 748744b619608a9bc4a28e85fe7cc8ec4a17c7e4af1e3a5ab5a74a4ac265c9e4c5c4f639a06cdcd1cf6e5fd57e377929ab31ce46ffea576d0f7889e84e259d01 DIST firefox-122.0.1.source.tar.xz 533052916 BLAKE2B ea4346b88c7f3e7e2126eed6b0f4b1460e70fa430944a7263d42ac762e10c8440967ebbae25ceff15e7afb451e1a890ab7e97ff60619a465152e9ff6a7691653 SHA512 1d4fe1ed351edd748ede2ef6448798a32de9ed7a075a54a7ed5f7baa7b0c4c7f932c2e29f443c9066829e39f22a1dc94be5d00cc994193e949b72aa4a1c8ba41 -DIST firefox-123-patches-03.tar.xz 15096 BLAKE2B 586a7a1ff7cd76c29c1a71296f2829a1ed2338df63b92e320b5bb07e8e154642d06772aa4215f77f1d85ab7f1b899c92f04a5606300a3fda970f594941554187 SHA512 e89ca3fd9a09ff4f5623e12bf89ff91d91ab59a24239ec3ac3eb1868413b36bbb85c8329c2ba0f4f4ad2b27116dedd4ebb53e2ad6c11aea85475b70fb2945364 -DIST firefox-123.0-ach.xpi 457917 BLAKE2B 526671c503a074bd638ee43d5dee13c9d48791f27c313ce7bf7291cbe821cacb88006c2fc1cbde0254886d77bb995ac46fdf83640720d9957ddd02ba44a629dc SHA512 f6f6866bb406763855ae10e021d9a02d7ed11972e627f77a9a9ef4308550d7515141435f1e7688302e38e78d995dd83d06d7184c72385f2b6461cdf1fb1ca5dc -DIST firefox-123.0-af.xpi 412259 BLAKE2B f1ab00cc1e76777e785a5f82603955f1953a7b9a242ff58c230871f1e58913c4da9d2fc5836bbe646006dc5941e0061f36173c52ce8afb7ae616ad836a9b0036 SHA512 5debe069a919b6d33f4d3fbbae06399f7b048cea3053e825673a9ba864d5464b01896bb67ab8a68ad44dece437edeb975bfe4803a36df0088af82541b52412b1 -DIST firefox-123.0-an.xpi 499253 BLAKE2B a4eaf5b5dee2c73552a3562a2aabc09886bd5636f1899bf03f4a63e6d3c47784e86e13d9dfbcaf3d0da38095e86b5f48c71b76b20972dfbb666906f274c13858 SHA512 c3c3d3a353a9a4fb5d7004b7277192f79601e3ae94ac1169e50594bcb29a19b31bdb67963efd021422917840cc04a3adf22dab58ace0646e0507b96a1704f22d -DIST firefox-123.0-ar.xpi 596975 BLAKE2B 876cf47bec4d2650e9507243cbfb32908d25a68eba05203cf9a833f527ed6af913061bf247a43d1853e3863f972130024998a81fd43ebfc07463e506ff0def65 SHA512 07a97ae8876a7c1506d969eeb8bff6af0f0e8ed0e0b5e106260c55c86d1125e9014a731e28202a1a0a714e50e018758d38108ea755fc78a3edd0e8ffd9844032 -DIST firefox-123.0-ast.xpi 490097 BLAKE2B 38c046f0474bea05b80a9a7636a4f8e6fa7f98e28d0c7a0511593a2b474d76ee76def6b2d26c6f6f84bc5b5919e50800737602755fbd0e07318eeb994f385f73 SHA512 df4c677484f35cafbc55ff6ad9838d7a71655317cd91b8699501b73f9038b3e6403e36859ec34e34bed85bcc09259fef43d7dc3ab14afac7f525fa07c269e31a -DIST firefox-123.0-az.xpi 484199 BLAKE2B 36a1d4b6e222f5e67034d89d1469e8ea671f7d6204d44ef0721b30ce95705dde18701e5aef4eec7b4c0c02c9f84437c702167d4cdabc128c34ebb4c87c1697a3 SHA512 c11d92859df9b96f10d6e1e012335ac326e06bbe9fb74669554f154295a2aefd27dbe832ca2e7b61923d4e2a1edc4ec09ec85c8b26fad3e1a9c679dd796020f7 -DIST firefox-123.0-be.xpi 693186 BLAKE2B a575dc21da2d8d851df9309b1a58c9ffb47e0974c40f3495f9b99de6fb0a4a8db59fcaeff783b8e47119895c01593944c929c199ad2e4aeac3f30bc40eaec742 SHA512 10d734c7487c1ceb99920e9170653593e0ac8d0448183cbff98b2f1dbe2880efac8377ec7acfba942d981a8b053cc2ea17ad9d2906249fa70dffeec3aa85ca49 -DIST firefox-123.0-bg.xpi 594622 BLAKE2B 6970b077da017bca16f6ec8f5627e5ddf2f29ed26f0e7ecde97186c6fb2bdbd5500b9ab99701b812ccb4049f28d71701250cf89b3ea37f7a4383dedb2ea7e5b7 SHA512 20e396ab8a531f70ed25ab2ac1d69a382f66d8d57bdece529c166d181e70aeb11c0cc27781aeea430c97d980110dae2893a91799490f03db938ac4e3d88d69e5 -DIST firefox-123.0-bn.xpi 574573 BLAKE2B 2e2fcbc1dc35e8d1ec00b57ce26e8cfadaac7b009605fb79b69c632fe2998183f050f8959720496544b212c38b8f89b082b415bb36fc565c85d3ba09dec45215 SHA512 d3774fd9c21e73a877b9c0775e5925be326f0dd98933dccb0342e37c84986b17cf1b33acecacab979bb7b082a0ea81f96c172e4681b2e1370d3d448190d9e084 -DIST firefox-123.0-br.xpi 576392 BLAKE2B b4a2f2a21c16d6b196c0c9d128678f95e228bb9842dde4e41771ff0d0a3021f242b736247651f12532533744d60cf61bb661e8c916c5926fe0af58aa8095555a SHA512 662d44da5449ae0bb596414e0ab48b9d640e04eb2e9f3fefb321041a05f02130510767c9a6c585edde9bf8d528aa0978d2e658abfc6bad3d1e2b593292b0e95a -DIST firefox-123.0-bs.xpi 464831 BLAKE2B 2a769b8022aa49c7dffd46a65731a419ea2e288c043ebd0ac01b6848296ae4bd94cd808b116359bd0c3b32d792ed182583b66af8329acc150efc13efe6a0b567 SHA512 f48c895223605f047e273a7c8af37b7ae0e4ad263e80894cbb4cc7f9ea8bf82b43b959293d58ea62d2db49b1c5edf7ec43de8112634979ad9e6efaecdeac96f5 -DIST firefox-123.0-ca-valencia.xpi 539330 BLAKE2B 04afa810977da9eac43bc8b089d7a37071b6797253689283d2ba70c60a8f4a25fca90e841cf8c924d1c0f6e1a850bd0ec2abccd6f569a0647cf6d8d89fdf45c4 SHA512 31f5a483d10faaed68486d76a3cab5b82ad5bb78287d20b608e41d3286989de56758fe225cda48a7deccc371b9d9ebbe632715821e535775e6410fe346d5faa4 -DIST firefox-123.0-ca.xpi 577386 BLAKE2B e558ad67825be92f829c77f1fd2306e6ae17d6ff1271de469d7aaff3933c46295ef7f32d4d279d05e2447aaa54ef3b207de1e3c199194f6e29e743c92d879255 SHA512 99cf554bcf1964b5cd5cf8f136fe1a6cba84b801a54373a281405dfc5073758d275db1f6834d116d815708d64de9712480fa0cc752dd5d4698210d9d6a0662c1 -DIST firefox-123.0-cak.xpi 584593 BLAKE2B c70b06b8b1072b2aa23251e33013c0c4811576c0c29599d1bb06ce6d8c084fbc80df15aaca565d4042873cb7a25b9611fbb1a1eb6974270d6b27c30cb404b1ba SHA512 78386cb171591649d73957db57fda00ad23704c8595347912a44090ca7f519494722f4cca6e0fe4ede5b3dcfef515cdb51cfb0b8b29b28b704af302c15701242 -DIST firefox-123.0-cs.xpi 638562 BLAKE2B 7a7bfe7a5f4168bdc66ebb688bd535925e2ddd7fddcaf3356857b28e65be129265a86c2df4f1173b7c89d4de3276740cdb9ba753fa2f133b1a588a20bc40ca0e SHA512 549a2820e95d9a49329d9ae9b2bd2a8ef0dff68daec996f7ef18387cae65e650c09a7b11cc9e0972b0920c4d619aad75fed109b34f6dc7e075aa87b8d30deda2 -DIST firefox-123.0-cy.xpi 604994 BLAKE2B 98132f7d1f717bfda4e9b729cc0d0c9610df9029fc5904eaddd98e235136881ae71249db4519e0e3995d8a7f3480993f929ed88f4f28a148c8eb9939205ae635 SHA512 97fa7781b41137b63a8b81fae4d255fe71b0475f7d7fec7ed0e1885c972b72322006e27fa0093fcf13f9e340b34f0165a139aa08fa9079d44e54017b667316bc -DIST firefox-123.0-da.xpi 593087 BLAKE2B 024ee01d3de6221ae07b038cbe3107bdcf70413cf5c1c00df108b1475c1ee21e13cc04e4826edc3d5cbd2e59a197baebe26acaea061eaeee8db8069b595bbaea SHA512 974a7d4d2b4ee62f067c2fb0017a323120abf13cee41cf1e579cc0fb033e09a4c0ba0df79811d04392baa88f0e58acb4635860f12c76085941d3d371ae0019c8 -DIST firefox-123.0-de.xpi 614421 BLAKE2B 98a730b3c96541e1c39c1ba82812eead9cd8d3964f7c65eecfceb40107b7a745327185bba3e7067c1c120d8ee30d333a3d668a8bf53e314a9507f992385c78ff SHA512 37bde470a50d8a5a062a0dbec5c87c578240c55571f9b2bb7009c6f608e7bb56cfb88c90829884e39f6b51a855e816bbeedab62765f71c6c98b8ba816f87cedf -DIST firefox-123.0-dsb.xpi 630614 BLAKE2B 15be9bfeb1ab0ace878c8d84a5eba51afd5ef6767d7a02505d80083fc4f88577c6480c785d1ddd3d269ef5fdf26f54ed9bff7ca41729dbfd8600aa12d6ea89f3 SHA512 7fccce90e6a6671363422c408f19172789d7ec3522e8554b2ee68f38aa861a903f5fe9fd1710c4bed2da6835e5dd03cae2c6993a17589e1cecac5709987ff01b -DIST firefox-123.0-el.xpi 710118 BLAKE2B 3b15bd48f109310a1889dc38a70df39ab5451b4bba5622bf3434bc37b4fe32f26799967d5148432d8ff630fa0899d12f53192ee9aa006a760069a64f5c3b7434 SHA512 182d368ec9ffc9fd65d32123554851e22a644514e2f58d3ba2a0ac12a164ec888c0cefd2da3cd5ae862d4e00e17b6dac58102d32b88fb34d93df6256f032a666 -DIST firefox-123.0-en-CA.xpi 553287 BLAKE2B ca828e8218cdfcac300d2754e6d83655610e49ba9568f61e16b58e6ed059cc2ea1457494d528a2d5c1307a5ab7ae1d0654bf021ad406c9b35555585c966e3524 SHA512 43c64a0f283e79f0e681e8514a32d864a836b722f2543c979c3766d83bbdfe5bd1ddaf2a3c2d305efb6d5722eef19fc07eae8823d5223ca73fc77c8feb08d3c0 -DIST firefox-123.0-en-GB.xpi 567236 BLAKE2B d89210f67a5dba7176142142aa244218b308158580baf79e243eef208dae9889466d7222d457fbcdb0fdc614406dae9715345ae00e82378d0a60559c71a37f42 SHA512 22db9036b953ab2a8270bf84e4b50bb6cdaeb6fdf84ffaf7844d254ae61aae78c7c5f2af3498ef83ccc27d3f6ab0a5b61edc5f381dccbc0dbb3847d0f8c02a8c -DIST firefox-123.0-eo.xpi 597065 BLAKE2B fb488c8265a9cc8e312c605bd701327e270b66282fd7dd2626fb40458e3200e98959757415edeaea6bb17ceec443e9265416d3e39a5217a4e63da83d7bb531db SHA512 e88a65854b32add9be62206fc137a7c0443cfd2ffb4d277412e9510c1ea0cc4abe0e88ad1ad15a209aac8319f1f5ecad29f1f9e5b556b0b19a1cc86b5be1c511 -DIST firefox-123.0-es-AR.xpi 608581 BLAKE2B 702722f3785450792e6be0eb8b5463527547799eaa3a62ef9a8be13cfdda2108fdfbf61c1613ff2da05ff38fffb4a980c768e58b1515131bcf73dbd49d769645 SHA512 1e80dd9e289c278f8d63c2dc398b33a96819d5fd5d42efed884f958fef07afbdd013b548fc3271a56c164810e9c001ffb234b79960242da82f94797df74408b1 -DIST firefox-123.0-es-CL.xpi 607672 BLAKE2B 5ccac5265786c9feca6fa956ea4ea66042d0b46533a0d9ecd6ed6502e5ad95e30da47ea08b729ac2a7da75ae8fb730ed844f163a366ad77e60bbe9868541c0a5 SHA512 471e32f65952b40aa166d7f11aab392bf8db7390b81ad9b0108d72264e11b21d8e6844434680c62f14e295d825dc933c2044eadc93c85b42d8551ab993e60459 -DIST firefox-123.0-es-ES.xpi 601862 BLAKE2B 62fe900fcb4a0f4ff3cb4a261c7bb6adf644051ccee43cf4d2cea39fcf716a233bd7ce3a3fc495f529c010b7b9beec3e688850d11b2f1f61c7bbad328a847573 SHA512 c1d554cd8095faf1f36498f37e623f7bc12893e22a9b91d03c21299e044b977c297ad12934be7636b70d271433cac133f7fb9796dd2ff5145c6c4edc307f06bb -DIST firefox-123.0-es-MX.xpi 584670 BLAKE2B e50d6179d4e3a2a2af7b927f4dad3fb734b0a2d7418044aeeb2e7203ceafc393a3beae94f5998e728be78f9d850762d0eba0aa398ff68197c4ab0a3a4d52e57c SHA512 04794fa4022ae1b09936f030a6193bc8104acc984eb3a60d6ae56685f3b16bd15a60c68f5c1827ee0c35fee7c911384a487646b2ad6a0b421dd7806a5f2bfd34 -DIST firefox-123.0-et.xpi 532878 BLAKE2B 90c71fa60d9e2ade0bf7ddc27b905d2be0c881b423e30d0338275bc3e9c2c2063d255bb906c08cc8606876978fcb4e2cd97e7ea97a160d08b63c6dc4e2b28434 SHA512 a97142ac5b7ca922b9b22bd9f74e8acc3ea4090de73cd96f8d407726c2df1a2d033f11dccd65fada9ecfb5aa14e39828f11e14497fc1d8ce0ffcc3a982320755 -DIST firefox-123.0-eu.xpi 585340 BLAKE2B 2d1b7d65d30074f3bfd89f2bc9f826fff180eb3b60ba5c9c1e751280cefa234904dabed08c6bff3101a6ec5e95dbfdbb46d0ce8c1fd79598ccddffb71780c8a5 SHA512 0cb1976921868b261839831e361e2003f8d1de85fc0eb21a810bce6d88edf88e88a0b37cfedace85a81b35ba813ebdf91a4635c8faddb43488d306716e1313d7 -DIST firefox-123.0-fa.xpi 583091 BLAKE2B e80592db98d30da9056a5148e8a7ed1fc9301dcd485f964873330631cdd4832e8df82dd22347af018f12fe380e3dc594c9295484c7511f3c6ac7e9579dab7a26 SHA512 d66f4f2eb91a95424f3237c24947e07e1ab7bf0a5a840959601985ad3fe96d135801b380d7da4e4fca728d6ab71536874dcdedf87b6430044a2fcba136d10c3d -DIST firefox-123.0-ff.xpi 469553 BLAKE2B 9ca0e56aee05eb2a571e693f72b3f0ed5ad95b666fcb2fb99f96bffb26cff80033340b0eaa06ec1207066f27643672acb282251c511e4eec1e4cecc50fe67109 SHA512 1a5140b3afaff9587b2824827e452479149470acbcd963285706e06da1213edac67e5b02e664ba3a3f40d482796fa9869c500513d79f0f96b3b53ed8446612d4 -DIST firefox-123.0-fi.xpi 589469 BLAKE2B 9b018b7046b4955e97b84c9fc045a4ed587e1afa48b458d4f2a4f795de77ed518710e507eea43e8c07fbaaed93b49da4064df6da8a0103dc164d45c8f38757e2 SHA512 3843d47033730aa838fa770b20b6f345c91eb569cd4d6353a8bd8e3595345b272411f2de0a216e0dcfecbaf8f8e31ee4d8ab715677352e0ac8c6ead4e275aa84 -DIST firefox-123.0-fr.xpi 620138 BLAKE2B 2f079886990dba7e0fc9b0648266e3361b98ff29a32e3edd38660fa4a68594e9b628115eaf994a28e05614a536d6c65d243fd8fb41c69d7c1ed1713c1e978465 SHA512 2d2c7881d3d03c2c57e8aa8d263d1b885d8c64e6c479b49aca4aa87dc188fb96ba801700aaaaf07abb686bc25845521186f5246160f1198e422a12e1359a65fa -DIST firefox-123.0-fur.xpi 614035 BLAKE2B a6efb44cac72b1b85b0de944655abac511cc0c3f6acbf97b6bffbbd260416f47a409c9aba2882fd40614b41c9466a646b19b287bb2bf10ddcb0eb1e050639428 SHA512 aff085b1f4a5a9e54de18bd0a96c1d36341767c6d314623f6b39253c8e74f3b63c2bcd820dfcf1cb9491ba4d457fd4887fc5da81d54bea60a853a56800a78167 -DIST firefox-123.0-fy-NL.xpi 604114 BLAKE2B b96deef0db1f87ffc12cdd0ffa86a9c896f161684ed4eb6d033ddc04b326ebacb55419760de4087ffc4264c49a5cf0346b88eca931270464a3a1c4da429a38aa SHA512 093ca9224c048c74140d55ac7036aa5d481c42589f615721506610f36670b40b07dc5a475a637e876002c3f9515d7f64c84e85cc3caf31d9a034baf40558db6c -DIST firefox-123.0-ga-IE.xpi 465377 BLAKE2B 03f17eb8aa18ea48dab29b37f53564d2578d71964ba9df952d47eace1e4e8044bbfe2dfa463cd3011624e1ee4d28f3fd9a57548b149bc3e13cbbdaad0cb53b3f SHA512 27e5d712120ff2cb8613d157aa14be94ababc42d8e6357fe14097a5a952a2cc2774be88429dab61b78b5799c44c548be2fd5ea351f21d4ab22a0f2dd9ff69d8d -DIST firefox-123.0-gd.xpi 584538 BLAKE2B 8774d7f8f53ecfe8112d826077280402a88f3807b6b0e2fe50380f5e7db2aee75b19b967227e780a5e89d143bb01896731eb49882a156143b0f2334fb6619f25 SHA512 0a9e0266834a85fb80103bbf23d3f7c24d97420611d5a072b8b28d3467a00eb9d024e15968e236283ddf9367e4e0839e20953ea22d905503e4e1c04c39756c9a -DIST firefox-123.0-gl.xpi 592783 BLAKE2B 6a9a9b6f8deef1316bf52458e7f58674e921c7f81d87b06d1787cbf61d54f4cafc644edfae650175158f5f8e7acff2e85839e573d27556b51dfc5fa49a554022 SHA512 22a0d5f831cc238f0de9d03db0a40df23130c8a4b8d3641f9bb0c3130e75d191d75fe2957aeda3e95e6e4adff4e6fad0412aaa88c47a28e8e3f6441d18610369 -DIST firefox-123.0-gn.xpi 618418 BLAKE2B 902ca734b090d1bf20a4a071a3d79d06438b43e0fe1b18ee432532a4ce885e4fddb9ccdf6270c9ef59ef092efa1db4f6ac1bcd437d617c41605c208f83795817 SHA512 c009e5f5cd8e1946dcc7276f54b8adc4ae898149fb7716929f350059b7fa6d439d3ff58fffd6859724c62ecab17cea2f8d8e3cefec572a2c018f2c9b6c9347d4 -DIST firefox-123.0-gu-IN.xpi 520457 BLAKE2B f2df0562d49b6f2949eb6220459c33d53c1397712dfcb7507df0e466c4cb157e0197091c4c26ee2c82aa0c5cd1e64eaf14568768e74ccf82a53bcf8c051022d9 SHA512 fe76deede8feb4a76f047d1f8a0e0d599f07b176a9de8d006edbaba5652fbf8fd9390b030047bcf47554723876b7c75f7a956e2c33c22e83ed9c0288b9dd6d46 -DIST firefox-123.0-he.xpi 612985 BLAKE2B ab05356fbc513f51c8b078682afc08b6497d8d0e8a1d35777d9b2076f27d8ee0246c5040fedb414ad797d3086e6704419b641b3523ec66dadad256b6d92f3157 SHA512 bcde072943b86a95b6b4da251b6f7541a837f13cd7a083db635bb01b7c18b62879187d44635a16b656685f77a3702f6f5fa97c3a7e04bd6f40efcdb779c7846a -DIST firefox-123.0-hi-IN.xpi 558455 BLAKE2B 1dc8bf1efa89584b6cd3fdc1fc5586bba313f1b93731eb9b0e725c77ba2634c600845f75fe64049b8eef50a20f179e0e61288a500c61896ce281a490d2320b1a SHA512 d515c60a931408574b6771a1658456f366297fc8f8e922e39af38c04b09b070c238dc2142be5e896bc31a68d50487cac008e0dda253e8e7b1dd8b9d420dda989 -DIST firefox-123.0-hr.xpi 549950 BLAKE2B 1c7cb014732590917c1f104590c253f51e888790a77ab3974826307b5fde1011160bf5e0a1da10c4e8bda5a0ede24ceed49891ac1d9e1c96843dfeb567762cfd SHA512 cfc8fdc853b9cb6a853bbbbce8254ef8758380a4800bcc6e408948f4026b94acd236796d822ed99f789b9a97cc2c1cd48d2ac0ac91defeb6e8c033878b73e8f2 -DIST firefox-123.0-hsb.xpi 626593 BLAKE2B 53eec0a74f3b0ee074713f4d947331bdb86dd613c612180cdcbfdaa4f93412475907cb960f07ee4a29e2b37d1d7d080cfee04e037d3623cdbe5ef537bae835b2 SHA512 650ff21e04c2d69c567e12a5784f528a89d65e7cd24c07775574e8496705411ecb92acd67bab10a7440caabb6df6c574bc30a68f6e11b8d8d653bda989629fe3 -DIST firefox-123.0-hu.xpi 630539 BLAKE2B 9c679d581a1cd9b2f125b4446a619805635295ecbc88b6dcde60525edee53dbbd168ed987165b75f41593328bcb2d7d1d8b6f4aecb18bf942eeea54bcf2629be SHA512 e26b265684256d48e250155f414b56587950871259764ccf1a1cd7892f06ccd5c138733ea51e07e61c118262e7810a5223568ea30cf2c184eaf013c9b778fc45 -DIST firefox-123.0-hy-AM.xpi 607750 BLAKE2B 21a77ff2527e3dd90f21b6abfa60f7557bfa2f52607a8fd0818f7ace93405aae949ed75eb6a5d05e4b85a5f63bcd7abe488a7d623ded98b76e45f118262beee9 SHA512 5c205000f4c4f798a6a916f3f51d30d84ac1c6c43062621e916ea7f2e78a1e427381059474d736cb9f800db38f3557e513de4a90c10fe06034f4b1447d4ae1c5 -DIST firefox-123.0-ia.xpi 591956 BLAKE2B c09d5f9343a014e5b2e24c56e7c380c7cd936b0f3f7137c7be47382d45d0d1c1dd8803472a4eff457de7a32f1d3919cf7f62813c5dc2503542e3ae3e7c5d59c9 SHA512 1d8bf1b4610866068b75aba238acf4942efa6f0e1fe1b91c33128572c69eb7e54049e1512a8f4381486b2c4fab9013016bb203aeb831e5484098041ee4e7b6c3 -DIST firefox-123.0-id.xpi 566910 BLAKE2B 4f055e2592a0297ae5649863e2bc1e3a35787548ff2c97209698faf1e1d158becc6c8d7f188fd4df7e477b1efa31d48061867ac16da9e1bdbee7918dcbfea40a SHA512 14491501a6c5815646548acbd1926439cc05fa38d3804e798a466893f770093d199a69ca367955f350d25c7e4f3328e01a1386018d5fa255ff6439ff29a86793 -DIST firefox-123.0-is.xpi 598363 BLAKE2B a9f2ddef203a60ba0611d389186cb52c708894d33babe7fe98a233a123b8247698c75d573b4fcc79488b21045d6180f318500c687ab70d0a51eccbe877506a5e SHA512 6405fc8c5ffae2ed0484abd655627d57c46a2884415bbc0dbbf48f1db1eb6a0dbb6ecf6cb765314ae33796a6cfa1b2b3bcf04f6deab3bfcc2cb8cef5ca134f32 -DIST firefox-123.0-it.xpi 550961 BLAKE2B b1d5e52a37b6e35b191a2f052526a5e11c392d79f8b4d19380c8b5ce24ab80cc6475803343ec2b57711f90fd606c8fd4f354bf35a20c971184f36cf8941dc9c8 SHA512 98fa386aaccdb17ff652b99aa2e58504b67e073cd56cef9845c6f839732acd57bd0a4d86d30b8be72d21a390ac2eb9f4293ad694ef0ba3e9699355c2eb88e3fc -DIST firefox-123.0-ja.xpi 659306 BLAKE2B d2fe303c0b62ad8612637222a43b56f178017df5c114275502c80f3a25869764788be5184eda043e8817a4b1c21628975b372ddca3462bfc0dc76a74b2afd9e9 SHA512 b4914dc69c8248049aa2f4f20debd10f36cd0007151a5a2d15449562c4dddfc981d518e6e4cc5b86ece7bb1e1befa0d5498f6abf1ac9ef58c31d4a088a537da7 -DIST firefox-123.0-ka.xpi 653087 BLAKE2B abaa88d1aa5c702926b1123c834adb99c7eca7cb910f5c3840e31e183196a34fa68634c432ddbb72b2d289e2922fe7eebc5d1fedc4a68706c3e62458c4592a1a SHA512 c75b6e073f314418087ad33912b78ff2935eb8ca2529ad736cf934883308e6629eadf258614e58b547b154e3d592fc5f86499c59e22d477cb2e3d831f195bcb8 -DIST firefox-123.0-kab.xpi 594589 BLAKE2B 5c0927bc4cef11f25630587803be8ecc1455687b4074e22a8de3f76134a9d9921301187b446e5e649c125b20aeb8cfc7c9f104809fca82d5bcc98112fce26005 SHA512 9fa8194e4a346412eaa557d21304223aa848fbf48a1f54a57f2c77191117eedc04f0c566551fb81cf1ef3673bac9820f2b50a1d337b33217a2c8cb2ead75a1fa -DIST firefox-123.0-kk.xpi 686109 BLAKE2B 90df93b4b7d3f51f4fc2a9c5a813809e0b842fafed3149b4d733401c3e0a210a3860657b5eee2f2be6fe7b84de6a269fbad19bc2d3dda2f039090ef9214983ec SHA512 546aee3598adb1eb208d7f54147f201051550577424c4890a2901f332758ef2820720fcd9940ed54439c3481494465749f5fb589708ffd3b4beabcf2116c6112 -DIST firefox-123.0-km.xpi 519172 BLAKE2B 4850bc78af140f98a7d71add458b4aa68afcc0ae7147ced062e5297c4c34123681569c4ca9a6b9059946bbc61bf6c40d35b27697e5036d4b33a25188045e97a6 SHA512 c4de85a359db4f01ec0d790372e92424cd4e6d4af2f1f264e97f35a9df127e3286ce4d516373ad01d7f261c5f9f41fda980f93997edb448dc759767b418da8c0 -DIST firefox-123.0-kn.xpi 484642 BLAKE2B 38c85a502db7d982d0ccba74a41c86bab6706db63e97a32787ad273eec920a5dbe4f235d255ae129dfbac1d7d652f6d76597b7690cb4705ab92a2954bf7ac4a2 SHA512 ae66134a1cc69141c4b8bf30c11bf31479a6d117d183f5dc21fbe44591de2db333eeb94569da95de693791d54802641be23ef3180c2285709f886f087a52cc3a -DIST firefox-123.0-ko.xpi 641122 BLAKE2B 25ce4ef947ee5920ba2b18abdd9c9d5ddf2f8301640a1386878221ba38a367da337314f341e7510da1533c3c6aa4e708e079c514a74e6247aa48279951a885f4 SHA512 ec35637a95889116d50bc76f57b8c358e0f69efd47a191ea2bd3376443f550bb287b6712f077444b40faff13eb322bb9d9bd1b0cc3bb7c77b56881c86464ea7c -DIST firefox-123.0-lij.xpi 477615 BLAKE2B 5478faafa9922303b82182144794a297fb1f119a1907f46d9eea18819fed9ac2f6ee0abfe2d8b0b6ae96d0256a69744f54a000cdb325a26b5543c1289080412e SHA512 2098d827facbbe95b6661f70f647ec56853f456887e4f8c5df64795925064515a3a27f4d8b40b77ebc2fe078d877876045c90d4eeb86bbc612911fa74468bad6 -DIST firefox-123.0-lt.xpi 565835 BLAKE2B fd7bec3050a97dbc7988553c8c66130a175fd24f63f6264491d7b1a5229ea767840e76fd348bc94cfde5a3d89278df7bc20babb668f398e7023c62650bbd4e02 SHA512 2f75fba3a55534d19fd3e98bee40f8cee264aac982c7289bed9472c4051dba93e7dde8d06727bae79584b560393a09f4365c0b1aaa19b6e7a9bc17176156e5f3 -DIST firefox-123.0-lv.xpi 463234 BLAKE2B 310b0cb2abcb504db3c4d75e7f378f42f22b0f77b03b1a0e7283bbcac1ab0a5085f04d803fedff8829ea03a93da584f3e1f462f04496eeac2764af716e220012 SHA512 5e0eca6a34cc1ef1160856137dc0cb379d5eceb47a3ea7a9c573320cc2df275e06137567b9fb3674bf08f1228b7050df1a62c93e33079a6355e8ea24f8cf31fd -DIST firefox-123.0-mk.xpi 486675 BLAKE2B e6697e18065defe2d7b9363133ce1fe7d6b71589f4c8da6a1005d8a4c1e8fb52b3b1d24b7ae9cad1e7ec72e9349195139ef9100f41875df821bf42ecb353a722 SHA512 f8c3871b9f837174f799fa8ca1465f0fbaa505c41a98efb47d991aa5347a4cd2423274530f4412535a9ef558f71efcf2ae6e7339fe7a04646197d853b2671582 -DIST firefox-123.0-mr.xpi 525565 BLAKE2B 85a827a8bee53a5a89aae10954b6b68d7afc1fbc626b39b042226f91fa4c665b8cc85f8d799c4b2c8aa9fa35dfab49cd0ceb44b67478d454d9cfc36b3c78f95d SHA512 d7c03b67cd150521836dc08f3bcb091bc29bab76488b204cfe95d7a03c1622e05e07dc67f038e799749894c0ab29503bc79861d6605d3c016da684d86bd2ced2 -DIST firefox-123.0-ms.xpi 443256 BLAKE2B d9598c35843a224cca88a5e88152907b3f7f23eabf3a077f37319e65ba0742318a62d4f5771d4bcc37e56918d91e31e105bf20ae8e33a322b325db1b3806d961 SHA512 326030a18d0b63c6dbbba09852d3b1fcb5e82b09c5d4704c9fc6dbdcb9faaa6131d386a35eaf6034f9216d9f057320219d88564683bd24a7a8ae60066896bcd9 -DIST firefox-123.0-my.xpi 510616 BLAKE2B ee42dcb904d06c4517e0c68f465a310a762be94fd418fef5e9577d6b8cfcc5087245f57d7caecf42ba4f2f479103ae211c740c973474aeeb5fc6955eb6102d72 SHA512 f9966b883f65e02043a1e54099ec1a136601536e9dd187beeda4405968c3d3fd86d1658e097b312f14d9a4d8575f2e66b2bd5e1f08a6be3038068ee0b2ef1c11 -DIST firefox-123.0-nb-NO.xpi 587936 BLAKE2B 24aa8aff14564bac2f0cc30236e926bdce6b607e53b665d7d6e53bb0d747dd223473a3a6320011361c6c0d9844a02a16f76b2b03f755863dd2fcbee346fb592c SHA512 9a9f821db797f8ebcbb8fe9814a909eae97ec6fffee9825b3e6d64369c7074e09391ced7df4f0f443aa2c9613e4ecb25f2561a26744f79378a59d11279a216d1 -DIST firefox-123.0-ne-NP.xpi 481817 BLAKE2B c5a6d2cb7723d454922460157dd12762acf2e9009ec3df8c75e79151bbb3de587cb5559bc5b6b81c1cb60c89505595a89e8818fbf610e735fafcf58a7f58fd30 SHA512 08ee987726490c7599ecabff8549bc2de9a03437bc5c54021159a7e9448356e4b75732143caff2c757fadf99509cc22afb717db967f0fed72f1ad0000f7b1626 -DIST firefox-123.0-nl.xpi 597976 BLAKE2B c430bbd5cb3f55235a1bd28efe24d2601844db85822d3f488dd0140d4031e6c32bf17b0ddbd94503760288f1107d66a8a5aa0cb54b44ba50ed28d6615626ddcf SHA512 6cb6c84a7759f956af5241aec3806e60e6dd95c55695bb89e8c4676d432c69d00a895f82dbcf71022f1489ac4f2e9df6b12f91d02102b11aaa11ba5cc46c11d4 -DIST firefox-123.0-nn-NO.xpi 584872 BLAKE2B 965b8cf3fe6361d9032023c7ce9fed561ef01448193a6d5770322fd04f43b065ff52a8e5b3256e4c8b83372912b156204eb81669a8946fc3be938986bb1338e1 SHA512 6ae8707fb367dbca10a0442cf31332bb5a0e32574d430f6404c136895b5c04f7f293758f08d84c24fc186d028f8870f6d0702b5ca79e4e8e0c1d334e93548db8 -DIST firefox-123.0-oc.xpi 600746 BLAKE2B 3e9dd95fa04b328c909f713c0369c851ec3cd17231b7cbb3ce186edc654b5163813cdb58a0efc86b6cd8e2c12c9fc623f8a37a7b1a535f87e0c7dd932d4ee91f SHA512 aa1ba1455a563364362c22edd1238d55beea45fe129907be1320f3fb62a4acd098b0f6606e4c4300c189081eee4f2098237520eda2191d587578ffb359ff3660 -DIST firefox-123.0-pa-IN.xpi 672413 BLAKE2B 084a9d049b07b2737c703d1b73989294eeb7005084d60ea6d1970dd391769d527795cda15ff550c441a9fdde9abdcd3bf96a6ac04c53cc5ef65f51f1297d8ffe SHA512 14c95b175474d0cea9eb1020ce0bc457da4a3f53b069f1809a95230e66bedd6ef608e226b954240e9eb145389cba8fd8fafc24daac4a4b06c46796b04ba6ddc3 -DIST firefox-123.0-pl.xpi 618514 BLAKE2B 62346119f245e9c74bfd30ba2f25ce6cdf269248e2735b775ad1b7f85e2472293ea89350b0c4cf1467d89f0f66c80b6eb6965fa9cf84da32debe16ccb8090f36 SHA512 2c08962022faeaeb923d31e590e0f75169e1068b78f7eb3e9246dc34254c6ebdbdf72166ec635dc30a3306ce65551d4df3a57b9f97684b7d07a076a44553ee70 -DIST firefox-123.0-pt-BR.xpi 602757 BLAKE2B de9506c78d815f5ced66a6145d293715d7f634e70c55acea14fff39d685dab630dc31783b4ab204f49e4efced2b4e6ef694771084729687e36bb1c6ccb2e4b69 SHA512 e740f421e63b76c55450d67524ed1d63a40eeed78cb6365527785048596459eae6b38d915ee94674ec22f3f929f3b845c07222b4a0776ccffa9b44a26b7047f3 -DIST firefox-123.0-pt-PT.xpi 598151 BLAKE2B ab8cec7e6df717b1d1502edf43569b7cbb47088f47eb9aaddf03417bb25a7faf041bf69243b895f0a0ffa5a0b8994854c0dc8253fd9e937fd7265e2400651b4d SHA512 9ca5402bf76c2026fd09a45070551e645c6416b1fb2083fb2afdbd7bd812ac67885e336f4230269b51ee48d163edf37e55b7515d34613f4c9d3e07bd5ba192bd -DIST firefox-123.0-rm.xpi 598501 BLAKE2B 8d634058e9dff25c6d3fef16eb2c527432614195ad2f5ab139b920dc01ccfeff4feffe4717701a2d5fc23c3e5db2746f50ce8155c8a98cc30512dbd5cbb0a559 SHA512 3fd7aa7c1d673b8ac86104bf6c628c42b44f913652fb4191c673a2db9bed60f729c9552f7aa385f35ce659576ea85914d0470a10887960e736206e8eb9f1fe87 -DIST firefox-123.0-ro.xpi 542065 BLAKE2B e208ffa5f0987f2a34e7421e7ed5a79d752ce4c75da91248ff2c171c66110b0eb649162dbad997fd154048a4641132e997e19a50fddcda025cf713ae6b6dd61a SHA512 3c677c6f37da2b340f3d2bd6306b7f5f9ebbd77a6e579038a0fe162f3396450e9a713bc8e4cfab280fb3f17f0e520910f60267abbdcaa377abaa35eb022e3ff6 -DIST firefox-123.0-ru.xpi 698101 BLAKE2B b2d7c28efd39baa1739944d92cc6cf4fa340f8435afb1ee5940e019e24e5a58a4130d426731a3ae66adb7d4e7128e7bcd5a8ca3c7c566103d19bcfbc2e271c50 SHA512 f9c20c71b99b0a9cf9ae7def3d21f4714922d23dc18445b0796521b30a2f44c4c6ab02eff50639467bc83015e6dfa317a61359b8c1ff420bd8663b1477a65964 -DIST firefox-123.0-sc.xpi 571129 BLAKE2B 3fea10bad3fcb49daf23e0d753358aa7c4c5a3005f389c86bde20597587d1364817b4f84aaeedc8793c95e3267630f2e497967f3a6e55f8b6177df8a70c42c05 SHA512 0b9950e70915ceed7700665b1cd54be20fcde7cc594e0b94eb78799f36daad330cc28abe516cd4b0aaa85bfd8ffb5bd0a434704a9ccec9e91c05b8983d65f93c -DIST firefox-123.0-sco.xpi 504926 BLAKE2B badb3981d46f760c3cbde3ea2300f3e9ce309fa538b41725fff4d052d6568901f650ab7add8441bcddbdb19f0d8c7b530f2b0b7ff63b30beebf5396967f3fc58 SHA512 6e356acacaadd343f714010f7fd2f890ad16576f72b6ed9203d8785e9e7c8431d01859d1b175450fa9e283407b06b2395b99b4cece9c7ef5a8eb6efeafa24081 -DIST firefox-123.0-si.xpi 598464 BLAKE2B ba4934b881e589071fa7079105ea1f22d5c920cd8ffe38686409afac6e969e74d7fb98958b58fa0a4f77dcfdcf206d11153f55b1ec455ae489929e49ec579f60 SHA512 7143a551eac1e2c1148f54e1b8b9ee6a4bb46fab351e03972f9b17a454def63e87b5929ebe7896540d299ace308a056b9a85eaae137bf44d7a820a9c0d86c120 -DIST firefox-123.0-sk.xpi 631992 BLAKE2B a60793cb41ee00976129158c7198a319c53a2c61514f33e836d28a83c3c5304f5ada51176e6cc4d31f7821e53c20236fb50aaf2fea85b550b29694a472650b96 SHA512 c233453f2d22d0cc5d971dc3a34b13419be0323729cec05450cffccff102d86d805c5bcb4adeefb1bb702275d2bc31919f526ff8dc7f0522f42eca1502354279 -DIST firefox-123.0-sl.xpi 597973 BLAKE2B c261a72be883f2f1f842263005deb58ff0c0e90029efe790d7c94fe6ff37e859c54bdbcf6ad922a67505550dbf7ce244b181f671a7dd158121ee3cedbee5086b SHA512 2d2d62f98b3b63c1b6cd64e2621bbcde8771234e855ae567be030c10096110fefa6921739b2feb5883a162e59f2691553d1fe044da8e6090ddda1a41558426f8 -DIST firefox-123.0-son.xpi 410877 BLAKE2B 3a1835f52391eaba2129fa5b9ed3588e19b6d17f33a07cf7471dbff7a01b61814953f41bf069d2ce579ee994938f78100efbad222f624939530c3bb2f09db05d SHA512 0a8757d1a7ab2c23cbbba318830dbb3026976fe60006f54a86a0cf8e2885d98f552a83ed45a8c6cbda28037544ac4b618600a340f404144868e54fdce8550611 -DIST firefox-123.0-sq.xpi 618311 BLAKE2B c3a07d2216babd6bac389d9b4124b74ce025ed3e3e6c238f8aa181473dd35e1f3f766ff3d46bb68e3c4e117fd7ec048c243be585407f4dfec83a321910f0ae78 SHA512 e79c15edc0b7d74fc0f1497dd6e6eedd35008e0a05cd67b593bdb094d77b9b7e5aa495375a079ee56de1c85a046cc5234b230d374ba15947de20a5c4b2c99165 -DIST firefox-123.0-sr.xpi 632229 BLAKE2B 6d497669bfba8655b28ab5188fd9fef73b393f17307204d2ec90a4a5931bab336a699d2ad788e3a7a83b37ca4421863045468ee129615001fa8e6f3a7ac5d354 SHA512 5ce91e065c76eff1936dbaf5d1da88f5e9548ba123bf38ca7f8aa1f9010478810e3039efcf411c56649e6b6a64648241833352da23bc69df0d124ac04adf729f -DIST firefox-123.0-sv-SE.xpi 599955 BLAKE2B a04afe95eb171dbd918e7f226c1ad0aebeaa95ae19e529ff63793cba01fe7aa9dbdd5c04d078afc7bf15bb3267ddf92eb0d9e87bf8f1339410d43ce44b14e155 SHA512 3aef2afe77ccf373bd0651e63fe07ff662f11def5e4e9af08dd09a3b20dd7ceecaf16b1c645a140f48aa8ea31e026ddc189f37c528cffd8f765b3e5a1f5b2ed7 -DIST firefox-123.0-szl.xpi 519783 BLAKE2B 74e9a20a6f2907e8795c37bc380dbd13e554e7ca81caf242bdd03fd4737c24ebeeefa08befa9c565352e30add125ca0b4fb6f162131d9f5e41ff528c520c6289 SHA512 0ae6cb6e4e91a09a9d0803d4268f9e4764349a61ce19eee37a91e783351d9a440215cbfcbf4838a2e26c956a89ca69e4f0eddaa8e206c84e5af686ac301e1629 -DIST firefox-123.0-ta.xpi 500768 BLAKE2B a432d3c5522cf5b11db098f3de96f3f90f04c66a3274715906ffd746ed6d579d37170a264e2133ee4c40eebd62319a477f3508087712bf5e353e6b5d9227b717 SHA512 a275d1a34edbbcb10dba640d31425a173d787b2f9915209c8d36a1ce16b6066d32a98d89bb0eea7ee4ace4ca9dd8ea1a4114801daca2bd6705f6813ee9906797 -DIST firefox-123.0-te.xpi 551981 BLAKE2B 254a7c5b07028e7e1a16285e796446c306ee8d2b8f32161252f4d42d7088c1945c038ca397dc59ef77be9f0c6b911fb43cb98097b6b3f43597571d2be6b793c0 SHA512 d5769a4ea1ff328e864ba3be2d040b4d9f6a834bc070837526f4ae04a4ff2894a2136192cdef16caf5c6170b0220878ea489bfd89cd40e32a5588d1bd41df499 -DIST firefox-123.0-th.xpi 675224 BLAKE2B 72283e1763ce2f74923f8fb4e12dd45a0438f2045236d566de7fef64b58a20d99f55596354ba95cfb1f64fc66893f439d4c5ec79f3fa5445ca32058d256ad582 SHA512 06d8b9e3ff0c1434c100f2c519eded08e42ca799996e30d45b79e30be733246563a64786e61c9a416606c295bd9548f59e78793a314bab47f3ff6cfa3b251884 -DIST firefox-123.0-tl.xpi 527408 BLAKE2B 33b2fc246d28310a45d0345f86ad0d781c1a88f98f83ea114b2f4dda6ab3760375c62a3d10fad594dc1a4866de1ad7e2647b6733743239f5cb4d00e42ef7f466 SHA512 c554ea9f39422230aa382814c8b5e6908dfbab2de8318da00cf98cdee590f78acbfdf99abb81fd683cd61e12e89090cb77ad2ab48d70160f1d883b5d7ed283ed -DIST firefox-123.0-tr.xpi 612224 BLAKE2B d007e90ee063382afb72c96a76899ed93ff50c8ff4f74c7af92ee94eedaf1265fbcde3e89743fb8fd3af8392b567ce904d68294dba23200ea4a5120e6692ef28 SHA512 305cfe5210f677dab4992595eb8abfcaa74f73496a1fc498fa78cc74596a491c27916f1a4b82df4778810b2292340bf0d6b6ab5899718663b682cdd9d8e5a942 -DIST firefox-123.0-trs.xpi 497336 BLAKE2B c523d7a1f3ab7c2933ec2c3b2e9061da905b59af95e77acb2a2fe4c9a7973c36b260dddb292b82f67c7514af2d98afe64c731f17aa5bed4ac266832b13377df7 SHA512 7b2655e77b1dfe437a78c833971e53f317e04a0796ef3c7941aea6481713f93d0ea1055d074de5133a4da36bb4aec37ce6605f0b3c848fde090f8c4b452a1bb5 -DIST firefox-123.0-uk.xpi 690835 BLAKE2B 13efbe1734cee60ef0ad2149433afee0b4e7eb3eea0fbba8e767b33b4e9a1481c089b38641909e5c82548428944901bdc4219d6f7a3f2bce24277828df1599d7 SHA512 f90f58eac4b80325c4d9b9e69f442f4f2f1e6109146be9e3fac1942401b03e896728d4e5efb5304ba6fc9e669a931cb81ceb83a05633743cd92c5694d2622c53 -DIST firefox-123.0-ur.xpi 553254 BLAKE2B 2ac0667ac1b7b4a166f693957f1e1431014481e4ea4510096b3f55ac736ec7cbf36866ae0990956f63c7bac3043a6aa3b049a655b07405557c19eb931b509a97 SHA512 4205a386561a954f1fdfdc4b707c4f0963e0a673e96b14cc37b6b587081165fd36590354e260ec880bee668efdff7c7d0b9ff47534f9f9eb6d36e6338f11648d -DIST firefox-123.0-uz.xpi 473023 BLAKE2B c0c22ce8f8365a510b88ed8aafbc6d4d93e09c370f71984ff156b395f95c385d20bad78f88c08248b6cfdc90799d31cc70f252606e4294033efc7a18e758e990 SHA512 5670f3e015fe5938b04526ce7e57e4e4545798371f1410fb301483bafba8a0f898cf22949c5c1694b52ee02886c83ee37e7c71de124fd2dc9bbeae5de918d7a0 -DIST firefox-123.0-vi.xpi 636499 BLAKE2B 50a92d2a2183bb40c7af633f0e97632872eac798d508fce41a835077fdd9aa3380b6982b76f641621d8130f265e384464d38265345da3fecfff20594284adfa1 SHA512 c47b0f456a6e667ce74d422bd428403bf8c6eff2810db8a56e50ea720c823057ce1b75ee88aa7e8ca7930be8535ef5a0dfa71e4b78f9e16979341b357914cdf1 -DIST firefox-123.0-xh.xpi 411732 BLAKE2B 291ebf52902ab8b8f2950039a48e18d10bb884775deadaf747e3979053efa70ade9ebfbc14d415d885088edac79efa1757713ed7d6069368cb6405bf714dc61b SHA512 3dcd91766e2c666278bf109f799d0215f17c76e74d601e8a780c75cda75fc5dec8211d2c107ec92a6122aca7574abf4e3609a2fd7330dae342be0cd19dbddd6a -DIST firefox-123.0-zh-CN.xpi 636727 BLAKE2B f701d7189510162cbbe4d055f0dcf97d8e2e0447792853b767e49e128d94fd803d7596c3ee2a5d10d855909be5f0fe466779f90d97c1a0737fa81810327ce586 SHA512 e6ea24d931233da6e4df4d58c883204421debaa83ba1ef71555a2077a34b214d5fb6269900de157c025a1ae3a76e74671729444b6576694240b1614fdf74222f -DIST firefox-123.0-zh-TW.xpi 638883 BLAKE2B cdb02fe348c19e116393421e5e8edc357b124c75708559d2e1559ac4e76b9a05f2eb529242162a5c7c875bb8b6a7890ffc619c0e18f800d2fefef9909a8f3d8a SHA512 d0f4bf4da0e7e2138bcfe0a242fc325ccac7f7938004de292473d1d7b8f52a414e4aa4b24fa2541ad8ac201bdde4b960d51218674c60ba50785f0e65e3d46f22 +DIST firefox-123-patches-07.tar.xz 15028 BLAKE2B 66112f61d81fc1587c264df16b7747437257201387a0e62f84ad6070ddcd0e046efc4c5535d415ef9e013a7b8a54fc1f9ba6570b80091434a8e81b6c2e008712 SHA512 f4d1e276fb6c44de1fffdd75e9514129cfa392b51e68318d53522da5a54e6dd982a1ea382acb114279f59568fb5791e4e6231afc4e8e32e05f38717e505d858b DIST firefox-123.0.1-ach.xpi 457915 BLAKE2B db457b2fbf4d77f1cf43bcf659e850ab220db9a353bb7d1b37375a49ae7d3d4e08746808c95c7e238ae86d4e99a319a338d36dcff1380414d006e80dfffd87b5 SHA512 9c4b1c5354fd85f7cf970ebb7945689781f9a48ca2ba821d8b36f10271953e0c04a29121fe96ead456dabaa1ad383a2054fb27545a805e9f5a9b8f62e1bd5c40 DIST firefox-123.0.1-af.xpi 412261 BLAKE2B 2c259ce7fae9050f82e9bd990a92b56cd7edbb31f49b443e1389f3c77f130368fe6a0ae95185258d6f918e395e566ed04c36b9034398b4b33c8fef89189a9bed SHA512 7fbe58b6bf79c104397226c27f3ff5c2037a734e805157990bfe0466d1ef060f78daddbce64013fa9de892c4b88a1e13a05bdcc7b5b6ef7235a174da754f176d DIST firefox-123.0.1-an.xpi 499255 BLAKE2B ed6e3ae358073705b8b43f9a589012da022aa8a2b26fc7d6eaad9818aa08b1cf2b4d7762342dc80a31990056aeda1bbd59bfec6e0dc2e0a39a8e25757936baec SHA512 10f56c4326d42e392c5e99140308eb5be7b9b0123cacfda5c482e2b4ece66a43d50d55e972a675f0326ffff781832471cbb5b9ac17252b17e8bd27ed7b845e51 @@ -511,10 +412,8 @@ DIST firefox-123.0.1-xh.xpi 411731 BLAKE2B 81073b387f637a20b1824ef7857ba50bf4187 DIST firefox-123.0.1-zh-CN.xpi 636725 BLAKE2B ee30e56d7024f938d377235f21f7cca6cf9e7842f751905cb66e1efcea1eb5f3b88cb6321b42ac1290b9650d18db872c615dfd6cff4a52b65219725314a63f60 SHA512 8273369640c951b50c903f42a649295873f4b51c2e5ed86dcff472b68808aec807f33be4dc19f03e520970077aa2c1370dd921b95eb5fb270e3112ea098bf96f DIST firefox-123.0.1-zh-TW.xpi 638882 BLAKE2B 53e3dde71f3e24423c6ebede159915d307a4e98216b7a2251f64620a881f2b529d903fd35bb59d3c03c485997a380c7ea19f83febc614451366659782adec8b5 SHA512 09a17639d1aac87110d47056e77a681310637a58b4211e982da43986fbe9eacc6cc19c0e00cd007f063e7981f86ddb274b3bef3b6e345ab8eb77f173c7e343f4 DIST firefox-123.0.1.source.tar.xz 545230176 BLAKE2B 837f2edf2dcf51f19d8cad1f8234723236f318defa1196885b019e46878b377a24a83093ccbf8ef43e7ea94ddd1520f2918bcea520c59379453d40251ff972d6 SHA512 e9af61c1ca800edd16ab7a0d24c9a36bbb34813ed0a11ff62389aa38fa83deba394bca5d95cdaad55ad29ffa3c0e5d3dd15ac1099f7fa3649f4b6c835b7498c2 -DIST firefox-123.0.source.tar.xz 537279276 BLAKE2B 6c9bfce3cd9c5ab3aa929ea20b50ef5e2c90d161a472dd374dfa20b7902fe1aec5504b94576a3e746945e30c6e21f189c17ce67328e6160df40e885805fc874c SHA512 a19567a13e1b663e538c4af17491146adad1f0ab977995e8da9ce9ed428008ad20902dee4efb82d54e1319a0e31768609696bc822563d75732b622760129d8bb EBUILD firefox-115.7.0.ebuild 39582 BLAKE2B 50b3f8942c717bf46127baff82dc587b2e5946488712d127199100aa2b32752e68656b567cfa177b4b4f7c32c4c6c5e82c1cc3ba65fedb48e24a8e3a59b1405f SHA512 d92ebf5d524a6d92b7de07f47d7611aafcacae7328344e27ee8960c82e9429bd989621eda159ca06000b06a97328619f8b87e5a035d4e5638938fca72fa46cdf EBUILD firefox-115.8.0.ebuild 40131 BLAKE2B 075005b8f056a3220b0e25860e87698e377388471f90e156dff30fa0c554d48317ec5b0784f9058cf8e6e109ad290eea7db4bc2ee0df63d6b0d17a493f6fa7b1 SHA512 cda2b831f8738e2fc67894ac22e913cbda202d1e72f204655fcd7169b12cb1a7aa7c10a1b24ca61328ea4bdf0427a8b76a497d1be3d3fee77539caf4e2b573a3 EBUILD firefox-122.0.1.ebuild 43363 BLAKE2B d215e52ef1a0c12c36c1956ce551ffb80fef00c8dadc60b0a8d4e08f22308fc4216a0c02abf81490b9ee54abdc9a8c2edbdab4939df9282608a427d19cae9423 SHA512 0195715e17e34da674ef69785af0261ef4a229f55679b088cbdfff25e89cebe5f965a3f42ad48226c9eb47ab3951c88969e256a26f6639ba3d74d42ed7b21fe7 -EBUILD firefox-123.0.1.ebuild 43244 BLAKE2B e964b95784230b88a8ab84a7bce9a37ad654d30255bb7947c4e15aecd43e909ea9689acf9c399b0e5ddb1c2cc03267eb85032e72cad6087724542fb278963618 SHA512 b01c70ddc1a1c59781e0e8a897e81de1ad7f64c77776e7c5e52dbe7fd9eaf90dbbbb5a2c10a04b5cfa275fc576866904672dd0b0e4c19ccdf691e01332abaa6b -EBUILD firefox-123.0.ebuild 43244 BLAKE2B e964b95784230b88a8ab84a7bce9a37ad654d30255bb7947c4e15aecd43e909ea9689acf9c399b0e5ddb1c2cc03267eb85032e72cad6087724542fb278963618 SHA512 b01c70ddc1a1c59781e0e8a897e81de1ad7f64c77776e7c5e52dbe7fd9eaf90dbbbb5a2c10a04b5cfa275fc576866904672dd0b0e4c19ccdf691e01332abaa6b +EBUILD firefox-123.0.1-r1.ebuild 43323 BLAKE2B 5ef77c7385740655f208229ee8c2842a154fd8e8104bd4fed8056c305e3acdc713028dfdecad83008c6f3d53baf841f8e19648df3f7fe1436acb8bb1df6bf82e SHA512 70a5eb75b656651f0de0c5bd5feed78cef0063984afaf2b1fcb2f5e667f0b5350faff4e69e3435a0597a935f9a7c57af38753c2e5cb5267b746dcad9de644dcc MISC metadata.xml 2597 BLAKE2B b449997bc096ed8fb7bde41a5acb8d9f4c1c8cfc9663c06ff603cca756e8868d40049fd292a459a00d80b4e8c3a74e91e29fcb04abe87277640fe65d070f0bda SHA512 703c7f6a2b46748786145b0973a7b8439e530c96fd7c50d773efac7d5d9bf74ccb4f0c252f2701459944f2b3ced22d3e57ddf049b9aed0c8f0e094cabddda251 diff --git a/www-client/firefox/firefox-123.0.1-r1.ebuild b/www-client/firefox/firefox-123.0.1-r1.ebuild new file mode 100644 index 000000000000..212281037b27 --- /dev/null +++ b/www-client/firefox/firefox-123.0.1-r1.ebuild @@ -0,0 +1,1453 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FIREFOX_PATCHSET="firefox-123-patches-07.tar.xz" + +LLVM_COMPAT=( 16 17 ) + +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="ncurses,sqlite,ssl" + +WANT_AUTOCONF="2.1" + +VIRTUALX_REQUIRED="manual" + +MOZ_ESR= + +MOZ_PV=${PV} +MOZ_PV_SUFFIX= +if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then + MOZ_PV_SUFFIX=${BASH_REMATCH[1]} + + # Convert the ebuild version to the upstream Mozilla version + MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI + MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI + MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI +fi + +if [[ -n ${MOZ_ESR} ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +MOZ_PN="${PN%-bin}" +MOZ_P="${MOZ_PN}-${MOZ_PV}" +MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" +MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" + +inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ + optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + +MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" + +if [[ ${PV} == *_rc* ]] ; then + MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}" +fi + +PATCH_URIS=( + https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} +) + +SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz + ${PATCH_URIS[@]}" + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="https://www.mozilla.com/firefox" + +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +SLOT="rapid" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" + +IUSE="+clang cpu_flags_arm_neon dbus debug eme-free hardened hwaccel" +IUSE+=" jack +jumbo-build libproxy lto openh264 pgo pulseaudio sndio selinux" +IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png system-python-libs +system-webp" +IUSE+=" +telemetry valgrind wayland wifi +X" + +# Firefox-only IUSE +IUSE+=" geckodriver +gmp-autoupdate" + +# "-jumbo-build +system-icu": build failure on firefox-120: +# firefox-120.0/intl/components/src/TimeZone.cpp:345:3: error: use of undeclared identifier 'MOZ_TRY' +REQUIRED_USE="|| ( X wayland ) + debug? ( !system-av1 ) + !jumbo-build? ( !system-icu ) + pgo? ( lto ) + wifi? ( dbus )" + +FF_ONLY_DEPEND="!www-client/firefox:0 + !www-client/firefox:esr + selinux? ( sec-policy/selinux-mozilla )" +BDEPEND="${PYTHON_DEPS} + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + sys-devel/llvm:${LLVM_SLOT} + clang? ( + sys-devel/lld:${LLVM_SLOT} + virtual/rust:0/llvm-${LLVM_SLOT} + ) + pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) + ') + app-alternatives/awk + app-arch/unzip + app-arch/zip + >=dev-util/cbindgen-0.26.0 + net-libs/nodejs + virtual/pkgconfig + !clang? ( >=virtual/rust-1.70 ) + !elibc_glibc? ( + || ( + dev-lang/rust + =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-libs/wlroots-0.15.1-r1[tinywl] + x11-misc/xkeyboard-config + ) + )" +COMMON_DEPEND="${FF_ONLY_DEPEND} + >=app-accessibility/at-spi2-core-2.46.0:2 + dev-libs/expat + dev-libs/glib:2 + dev-libs/libffi:= + >=dev-libs/nss-3.97 + >=dev-libs/nspr-4.35 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/mesa + media-video/ffmpeg + sys-libs/zlib + virtual/freedesktop-icon-theme + x11-libs/cairo + x11-libs/gdk-pixbuf + 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-1.0.0:= + ) + system-harfbuzz? ( + >=media-gfx/graphite2-1.3.13 + >=media-libs/harfbuzz-2.8.1:0= + ) + system-icu? ( >=dev-libs/icu-73.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-png? ( >=media-libs/libpng-1.6.35: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] + x11-libs/libxkbcommon[wayland] + ) + wifi? ( + kernel_linux? ( + net-misc/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/libxkbcommon[X] + x11-libs/libXrandr + x11-libs/libXtst + 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 + )" + +S="${WORKDIR}/${PN}-${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 "sys-devel/clang:${LLVM_SLOT}" ; then + einfo "sys-devel/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 "sys-devel/lld:${LLVM_SLOT}" ; then + einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + + if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then + einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + + if use pgo ; then + if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then + einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + fi + fi + + einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 +} + +MOZ_LANGS=( + af ar ast be bg br ca cak cs cy da de dsb + el en-CA en-GB en-US es-AR es-ES et eu + 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+=( 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}" +} + +# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily +# placed here until toolchain-funcs.eclass gets an official support for mold linker. +# Please see: +# https://github.com/gentoo/gentoo/pull/28366 || +# https://github.com/gentoo/gentoo/pull/28355 +tc-ld-is-mold() { + local out + + # Ensure ld output is in English. + local -x LC_ALL=C + + # First check the linker directly. + out=$($(tc-getLD "$@") --version 2>&1) + if [[ ${out} == *"mold"* ]] ; then + return 0 + fi + + # Then see if they're selecting mold via compiler flags. + # Note: We're assuming they're using LDFLAGS to hold the + # options and not CFLAGS/CXXFLAGS. + local base="${T}/test-tc-linker" + cat <<-EOF > "${base}.c" + int main() { return 0; } + EOF + out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1) + rm -f "${base}"* + if [[ ${out} == *"mold"* ]] ; then + return 0 + fi + + # No mold here! + return 1 +} + +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' + + # TODO: don't run addpredict in utility function. WLR_RENDERER=pixman doesn't work + addpredict /dev/dri + 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 + if use pgo ; then + if ! has usersandbox $FEATURES ; then + die "You must enable usersandbox as X server can not run as root!" + fi + fi + + # Ensure we have enough disk space to compile + if use pgo || use lto || use debug ; then + CHECKREQS_DISK_BUILD="13500M" + else + CHECKREQS_DISK_BUILD="6600M" + fi + + check-reqs_pkg_pretend + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] ; then + if use pgo ; then + if ! has userpriv ${FEATURES} ; then + eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" + fi + fi + + # Ensure we have enough disk space to compile + if use pgo || use lto || use debug ; then + CHECKREQS_DISK_BUILD="13500M" + else + CHECKREQS_DISK_BUILD="6400M" + fi + + check-reqs_pkg_setup + + llvm-r1_pkg_setup + + if use clang && use lto && tc-ld-is-lld ; then + local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') + [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") + [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" + + local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') + [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") + [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + + if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then + eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." + eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" + eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" + eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" + eerror " - Build ${CATEGORY}/${PN} without USE=lto" + eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " + eerror " llvm/clang/lld/rust chain depending on your @world updates)" + die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" + fi + fi + + python-any-r1_pkg_setup + + # Avoid PGO profiling problems due to enviroment leakage + # These should *always* be cleaned up anyway + unset \ + DBUS_SESSION_BUS_ADDRESS \ + DISPLAY \ + ORBIT_SOCKETDIR \ + SESSION_MANAGER \ + XAUTHORITY \ + XDG_CACHE_HOME \ + XDG_SESSION_COOKIE + + # Build system is using /proc/self/oom_score_adj, bug #604394 + addpredict /proc/self/oom_score_adj + + if 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 + + # May need a wider addpredict when using wayland+pgo. + addpredict /dev/dri + + # Allow access to GPU during PGO run + local ati_cards mesa_cards nvidia_cards render_cards + shopt -s nullglob + + ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') + if [[ -n "${ati_cards}" ]] ; then + addpredict "${ati_cards}" + fi + + mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') + if [[ -n "${mesa_cards}" ]] ; then + addpredict "${mesa_cards}" + fi + + nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') + if [[ -n "${nvidia_cards}" ]] ; then + addpredict "${nvidia_cards}" + fi + + render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') + if [[ -n "${render_cards}" ]] ; then + addpredict "${render_cards}" + fi + + shopt -u nullglob + 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 + + 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; then + rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die + fi + + if ! use ppc64; then + rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die + fi + + # Workaround for bgo#917599 + if has_version ">=dev-libs/icu-74.1" && use system-icu ; then + eapply "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch + fi + rm -v "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch || die + + # 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" + + # 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" + else + die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651" + fi + fi + + # Make LTO respect MAKEOPTS + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" + + # Make ICU respect MAKEOPTS + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/intl/icu_sources_data.py || die "Failed sedding multiprocessing.cpu_count" + + # Respect MAKEOPTS all around (maybe some find+sed is better) + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/python/mozbuild/mozbuild/base.py || die "Failed sedding multiprocessing.cpu_count" + + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/third_party/libwebrtc/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" + + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/third_party/libwebrtc/build/toolchain/get_concurrent_links.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 -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/python/mozbuild/mozbuild/code_analysis/mach_commands.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 + moz_clear_vendor_checksums proc-macro2 + + # 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-gpsd \ + --disable-install-strip \ + --disable-legacy-profile-creation \ + --disable-parental-controls \ + --disable-strip \ + --disable-tests \ + --disable-updater \ + --disable-wmf \ + --enable-negotiateauth \ + --enable-new-pass-manager \ + --enable-official-branding \ + --enable-release \ + --enable-system-ffi \ + --enable-system-pixman \ + --enable-system-policies \ + --host="${CBUILD:-${CHOST}}" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --prefix="${EPREFIX}/usr" \ + --target="${CHOST}" \ + --without-ccache \ + --without-wasm-sandboxed-libraries \ + --with-intl-api \ + --with-libclang-path="$(llvm-config --libdir)" \ + --with-system-nspr \ + --with-system-nss \ + --with-system-zlib \ + --with-toolchain-prefix="${CHOST}-" \ + --with-unsigned-addon-scopes=app,system \ + --x-includes="${ESYSROOT}/usr/include" \ + --x-libraries="${ESYSROOT}/usr/$(get_libdir)" + + # Set update channel + local update_channel=release + [[ -n ${MOZ_ESR} ]] && update_channel=esr + mozconfig_add_options_ac '' --update-channel=${update_channel} + + if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then + mozconfig_add_options_ac '' --enable-rust-simd + fi + + # 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 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 + + # Enable JIT on riscv64 explicitly + # Can be removed once upstream enable it by default in the future. + use riscv && mozconfig_add_options_ac 'Enable JIT for RISC-V 64' --enable-jit + + if [[ -s "${S}/api-google.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-google-safebrowsing-api-keyfile="${S}/api-google.key" + else + einfo "Building without Google API key ..." + fi + + if [[ -s "${S}/api-location.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-google-location-service-api-keyfile="${S}/api-location.key" + else + einfo "Building without Location API key ..." + fi + + if [[ -s "${S}/api-mozilla.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-mozilla-api-keyfile="${S}/api-mozilla.key" + else + einfo "Building without Mozilla API key ..." + fi + + mozconfig_use_with system-av1 + mozconfig_use_with system-harfbuzz + mozconfig_use_with system-harfbuzz system-graphite2 + mozconfig_use_with system-icu + mozconfig_use_with system-jpeg + mozconfig_use_with system-libevent + mozconfig_use_with system-libvpx + mozconfig_use_with system-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 + + mozconfig_use_enable geckodriver + + 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 + + # LTO is handled via configure + filter-lto + + if use lto ; 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 + + if use pgo ; then + mozconfig_add_options_ac '+pgo' MOZ_PGO=1 + + if use clang ; then + # Used in build/pgo/profileserver.py + export LLVM_PROFDATA="llvm-profdata" + fi + fi + else + # Avoid auto-magic on linker + if use clang ; then + # 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 + + mozconfig_use_enable debug + if use debug ; then + mozconfig_add_options_ac '+debug' --disable-optimize + 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*' + + # Modifications to better support ARM, bug #553364 + if use cpu_flags_arm_neon ; then + mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon + + if ! tc-is-clang ; then + # thumb options aren't supported when using clang, bug 666966 + mozconfig_add_options_ac '+cpu_flags_arm_neon' \ + --with-thumb=yes \ + --with-thumb-interwork=no + fi + fi + + if [[ ${CHOST} == armv*h* ]] ; then + mozconfig_add_options_ac 'CHOST=armv*h*' --with-float-abi=hard + + if ! use system-libvpx ; then + sed -i \ + -e "s|softfp|hard|" \ + "${S}"/media/libvpx/moz.build \ + || die + fi + fi + + # elf-hack + if use amd64 || use x86 ; then + 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 + if use clang ; then + mozconfig_add_options_ac 'relr elf-hack with clang' --enable-elf-hack=relr + else + mozconfig_add_options_ac 'legacy elf-hack with gcc' --enable-elf-hack=legacy + fi + fi + elif use ppc64 ; then + # '--disable-elf-hack' is not recognized on ppc64, bgo#917049 + :; + else + mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack + fi + + # Additional ARCH support + case "${ARCH}" in + arm) + # Reduce the memory requirements for linking + if use clang ; then + # Nothing to do + :; + elif use lto ; then + append-ldflags -Wl,--no-keep-memory + else + append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads + fi + ;; + esac + + if ! use elibc_glibc; then + mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc + fi + + if use valgrind; then + mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc + fi + + # System-av1 fix + use system-av1 && append-ldflags "-Wl,--undefined-version" + + # Allow elfhack to work in combination with unstripped binaries + # when they would normally be larger than 2GiB. + append-ldflags "-Wl,--compress-debug-sections=zlib" + + # Make revdep-rebuild.sh happy; Also required for musl + append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags + + # Pass $MAKEOPTS to build system + export MOZ_MAKE_FLAGS="${MAKEOPTS}" + + # Use system's Python environment + export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach + + if use system-python-libs; then + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="system" + else + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" + fi + + 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 + + # 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 tc-ld-is-mold && use lto; then + # increase ulimit with mold+lto, bugs #892641, #907485 + if ! ulimit -n 16384 1>/dev/null 2>&1 ; then + ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." + ewarn "Please see bugs #892641 & #907485." + else + ulimit -n 16384 + fi + fi + + if use pgo; then + # Reset and cleanup environment variables used by GNOME/XDG + gnome2_environment_reset + + addpredict /root + + if ! use X; then + virtx_cmd=virtwl + else + virtx_cmd=virtx + fi + fi + + if ! use X; then + local -x GDK_BACKEND=wayland + else + local -x GDK_BACKEND=x11 + fi + + ${virtx_cmd} ./mach build --verbose || die +} + +src_install() { + # xpcshell is getting called during install + pax-mark m \ + "${BUILD_DIR}"/dist/bin/xpcshell \ + "${BUILD_DIR}"/dist/bin/${PN} \ + "${BUILD_DIR}"/dist/bin/plugin-container + + DESTDIR="${D}" ./mach install || die + + # Upstream cannot ship symlink but we can (bmo#658850) + rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die + dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin + + # Don't install llvm-symbolizer from sys-devel/llvm package + if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then + rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die + fi + + # Install policy (currently only used to disable application updates) + insinto "${MOZILLA_FIVE_HOME}/distribution" + newins "${FILESDIR}"/distribution.ini distribution.ini + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Install system-wide preferences + local PREFS_DIR="${MOZILLA_FIVE_HOME}/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 + + # 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 geckodriver + if use geckodriver ; then + einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." + pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver + exeinto "${MOZILLA_FIVE_HOME}" + doexe "${BUILD_DIR}"/dist/bin/geckodriver + + dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver + fi + + # Install icons + local icon_srcdir="${S}/browser/branding/official" + local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg" + + insinto /usr/share/icons/hicolor/symbolic/apps + newins "${icon_symbolic_file}" ${PN}-symbolic.svg + + local icon size + for icon in "${icon_srcdir}"/default*.png ; do + size=${icon%.png} + size=${size##*/default} + + if [[ ${size} -eq 48 ]] ; then + newicon "${icon}" ${PN}.png + fi + + newicon -s ${size} "${icon}" ${PN}.png + done + + # Install menu + local app_name="Mozilla ${MOZ_PN^}" + local desktop_file="${FILESDIR}/icon/${PN}-r3.desktop" + local desktop_filename="${PN}.desktop" + local exec_command="${PN}" + local icon="${PN}" + local use_wayland="false" + + if use wayland ; then + use_wayland="true" + fi + + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die + + sed -i \ + -e "s:@NAME@:${app_name}:" \ + -e "s:@EXEC@:${exec_command}:" \ + -e "s:@ICON@:${icon}:" \ + "${WORKDIR}/${PN}.desktop-template" \ + || die + + newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" + + rm "${WORKDIR}/${PN}.desktop-template" || die + + # Install wrapper script + [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" + newbin "${FILESDIR}/${PN}-r1.sh" ${PN} + + # Update wrapper + sed -i \ + -e "s:@PREFIX@:${EPREFIX}/usr:" \ + -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \ + -e "s:@APULSELIB_DIR@:${apulselib}:" \ + -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ + "${ED}/usr/bin/${PN}" \ + || die + + readme.gentoo_create_doc +} + +pkg_preinst() { + xdg_pkg_preinst + + # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse + # does not need to be forced into the LD_LIBRARY_PATH + if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then + einfo "APULSE found; Generating library symlinks for sound support ..." + local lib + pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die + for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do + # A quickpkg rolled by hand will grab symlinks as part of the package, + # so we need to avoid creating them if they already exist. + if [[ ! -L ${lib##*/} ]] ; then + ln -s "${lib}" ${lib##*/} || die + fi + done + popd &>/dev/null || die + fi +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! use 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 + + if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then + elog "Apulse was detected at merge time on this system and so it will always be" + elog "used for sound. If you wish to use pulseaudio instead please unmerge" + elog "media-sound/apulse." + elog + fi + + # 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-123.0.1.ebuild b/www-client/firefox/firefox-123.0.1.ebuild deleted file mode 100644 index eaa23fdcc1b1..000000000000 --- a/www-client/firefox/firefox-123.0.1.ebuild +++ /dev/null @@ -1,1450 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-123-patches-03.tar.xz" - -LLVM_COMPAT=( 16 17 ) - -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -WANT_AUTOCONF="2.1" - -VIRTUALX_REQUIRED="manual" - -MOZ_ESR= - -MOZ_PV=${PV} -MOZ_PV_SUFFIX= -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then - MOZ_PV_SUFFIX=${BASH_REMATCH[1]} - - # Convert the ebuild version to the upstream Mozilla version - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI -fi - -if [[ -n ${MOZ_ESR} ]] ; then - # ESR releases have slightly different version numbers - MOZ_PV="${MOZ_PV}esr" -fi - -MOZ_PN="${PN%-bin}" -MOZ_P="${MOZ_PN}-${MOZ_PV}" -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" - -inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg - -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" - -if [[ ${PV} == *_rc* ]] ; then - MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}" -fi - -PATCH_URIS=( - https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz - ${PATCH_URIS[@]}" - -DESCRIPTION="Firefox Web Browser" -HOMEPAGE="https://www.mozilla.com/firefox" - -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" - -SLOT="rapid" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" - -IUSE="+clang cpu_flags_arm_neon dbus debug eme-free hardened hwaccel" -IUSE+=" jack +jumbo-build libproxy lto openh264 pgo pulseaudio sndio selinux" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png system-python-libs +system-webp" -IUSE+=" +telemetry valgrind wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" geckodriver +gmp-autoupdate" - -# "-jumbo-build +system-icu": build failure on firefox-120: -# firefox-120.0/intl/components/src/TimeZone.cpp:345:3: error: use of undeclared identifier 'MOZ_TRY' -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - !jumbo-build? ( !system-icu ) - pgo? ( lto ) - wifi? ( dbus )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - !www-client/firefox:esr - selinux? ( sec-policy/selinux-mozilla )" -BDEPEND="${PYTHON_DEPS} - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - clang? ( - sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} - ) - pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) - ') - app-alternatives/awk - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.26.0 - net-libs/nodejs - virtual/pkgconfig - !clang? ( >=virtual/rust-1.70 ) - !elibc_glibc? ( - || ( - dev-lang/rust - =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-libs/wlroots-0.15.1-r1[tinywl] - x11-misc/xkeyboard-config - ) - )" -COMMON_DEPEND="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/expat - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.97 - >=dev-libs/nspr-4.35 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - sys-libs/zlib - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf - 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-1.0.0:= - ) - system-harfbuzz? ( - >=media-gfx/graphite2-1.3.13 - >=media-libs/harfbuzz-2.8.1:0= - ) - system-icu? ( >=dev-libs/icu-73.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-png? ( >=media-libs/libpng-1.6.35: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] - x11-libs/libxkbcommon[wayland] - ) - wifi? ( - kernel_linux? ( - net-misc/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/libxkbcommon[X] - x11-libs/libXrandr - x11-libs/libXtst - 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 - )" - -S="${WORKDIR}/${PN}-${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 "sys-devel/clang:${LLVM_SLOT}" ; then - einfo "sys-devel/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 "sys-devel/lld:${LLVM_SLOT}" ; then - einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use pgo ; then - if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then - einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - af ar ast be bg br ca cak cs cy da de dsb - el en-CA en-GB en-US es-AR es-ES et eu - 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+=( 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}" -} - -# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily -# placed here until toolchain-funcs.eclass gets an official support for mold linker. -# Please see: -# https://github.com/gentoo/gentoo/pull/28366 || -# https://github.com/gentoo/gentoo/pull/28355 -tc-ld-is-mold() { - local out - - # Ensure ld output is in English. - local -x LC_ALL=C - - # First check the linker directly. - out=$($(tc-getLD "$@") --version 2>&1) - if [[ ${out} == *"mold"* ]] ; then - return 0 - fi - - # Then see if they're selecting mold via compiler flags. - # Note: We're assuming they're using LDFLAGS to hold the - # options and not CFLAGS/CXXFLAGS. - local base="${T}/test-tc-linker" - cat <<-EOF > "${base}.c" - int main() { return 0; } - EOF - out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1) - rm -f "${base}"* - if [[ ${out} == *"mold"* ]] ; then - return 0 - fi - - # No mold here! - return 1 -} - -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' - - # TODO: don't run addpredict in utility function. WLR_RENDERER=pixman doesn't work - addpredict /dev/dri - 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 - if use pgo ; then - if ! has usersandbox $FEATURES ; then - die "You must enable usersandbox as X server can not run as root!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6600M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_setup - - llvm-r1_pkg_setup - - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" - fi - fi - - python-any-r1_pkg_setup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset \ - DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XAUTHORITY \ - XDG_CACHE_HOME \ - XDG_SESSION_COOKIE - - # Build system is using /proc/self/oom_score_adj, bug #604394 - addpredict /proc/self/oom_score_adj - - if 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 - - # May need a wider addpredict when using wayland+pgo. - addpredict /dev/dri - - # Allow access to GPU during PGO run - local ati_cards mesa_cards nvidia_cards render_cards - shopt -s nullglob - - ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') - if [[ -n "${ati_cards}" ]] ; then - addpredict "${ati_cards}" - fi - - mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') - if [[ -n "${mesa_cards}" ]] ; then - addpredict "${mesa_cards}" - fi - - nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') - if [[ -n "${nvidia_cards}" ]] ; then - addpredict "${nvidia_cards}" - fi - - render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') - if [[ -n "${render_cards}" ]] ; then - addpredict "${render_cards}" - fi - - shopt -u nullglob - 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 - - 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; then - rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die - fi - - if ! use ppc64; then - rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die - fi - - # Workaround for bgo#917599 - if has_version ">=dev-libs/icu-74.1" && use system-icu ; then - eapply "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch - fi - rm -v "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch || die - - # 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" - - # 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" - else - die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651" - fi - fi - - # Make LTO respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" - - # Make ICU respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/intl/icu_sources_data.py || die "Failed sedding multiprocessing.cpu_count" - - # Respect MAKEOPTS all around (maybe some find+sed is better) - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/python/mozbuild/mozbuild/base.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/libwebrtc/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/libwebrtc/build/toolchain/get_concurrent_links.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 -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/python/mozbuild/mozbuild/code_analysis/mach_commands.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 - moz_clear_vendor_checksums proc-macro2 - - # 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-gpsd \ - --disable-install-strip \ - --disable-legacy-profile-creation \ - --disable-parental-controls \ - --disable-strip \ - --disable-tests \ - --disable-updater \ - --disable-wmf \ - --enable-negotiateauth \ - --enable-new-pass-manager \ - --enable-official-branding \ - --enable-release \ - --enable-system-ffi \ - --enable-system-pixman \ - --enable-system-policies \ - --host="${CBUILD:-${CHOST}}" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --prefix="${EPREFIX}/usr" \ - --target="${CHOST}" \ - --without-ccache \ - --without-wasm-sandboxed-libraries \ - --with-intl-api \ - --with-libclang-path="$(llvm-config --libdir)" \ - --with-system-nspr \ - --with-system-nss \ - --with-system-zlib \ - --with-toolchain-prefix="${CHOST}-" \ - --with-unsigned-addon-scopes=app,system \ - --x-includes="${ESYSROOT}/usr/include" \ - --x-libraries="${ESYSROOT}/usr/$(get_libdir)" - - # Set update channel - local update_channel=release - [[ -n ${MOZ_ESR} ]] && update_channel=esr - mozconfig_add_options_ac '' --update-channel=${update_channel} - - if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then - mozconfig_add_options_ac '' --enable-rust-simd - fi - - # 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 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 - - # Enable JIT on riscv64 explicitly - # Can be removed once upstream enable it by default in the future. - use riscv && mozconfig_add_options_ac 'Enable JIT for RISC-V 64' --enable-jit - - if [[ -s "${S}/api-google.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-safebrowsing-api-keyfile="${S}/api-google.key" - else - einfo "Building without Google API key ..." - fi - - if [[ -s "${S}/api-location.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-location-service-api-keyfile="${S}/api-location.key" - else - einfo "Building without Location API key ..." - fi - - if [[ -s "${S}/api-mozilla.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-mozilla-api-keyfile="${S}/api-mozilla.key" - else - einfo "Building without Mozilla API key ..." - fi - - mozconfig_use_with system-av1 - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-harfbuzz system-graphite2 - mozconfig_use_with system-icu - mozconfig_use_with system-jpeg - mozconfig_use_with system-libevent - mozconfig_use_with system-libvpx - mozconfig_use_with system-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 - - mozconfig_use_enable geckodriver - - 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 - - # LTO is handled via configure - filter-lto - - if use lto ; 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 - - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - fi - fi - else - # Avoid auto-magic on linker - if use clang ; then - # 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 - - mozconfig_use_enable debug - if use debug ; then - mozconfig_add_options_ac '+debug' --disable-optimize - 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*' - - # Modifications to better support ARM, bug #553364 - if use cpu_flags_arm_neon ; then - mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon - - if ! tc-is-clang ; then - # thumb options aren't supported when using clang, bug 666966 - mozconfig_add_options_ac '+cpu_flags_arm_neon' \ - --with-thumb=yes \ - --with-thumb-interwork=no - fi - fi - - if [[ ${CHOST} == armv*h* ]] ; then - mozconfig_add_options_ac 'CHOST=armv*h*' --with-float-abi=hard - - if ! use system-libvpx ; then - sed -i \ - -e "s|softfp|hard|" \ - "${S}"/media/libvpx/moz.build \ - || die - fi - fi - - # elf-hack - if use amd64 || use x86 ; then - 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 - if use clang ; then - mozconfig_add_options_ac 'relr elf-hack with clang' --enable-elf-hack=relr - else - mozconfig_add_options_ac 'legacy elf-hack with gcc' --enable-elf-hack=legacy - fi - fi - elif use ppc64 ; then - # '--disable-elf-hack' is not recognized on ppc64, bgo#917049 - :; - else - mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack - fi - - # Additional ARCH support - case "${ARCH}" in - arm) - # Reduce the memory requirements for linking - if use clang ; then - # Nothing to do - :; - elif use lto ; then - append-ldflags -Wl,--no-keep-memory - else - append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads - fi - ;; - esac - - if ! use elibc_glibc; then - mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc - fi - - if use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - fi - - # Allow elfhack to work in combination with unstripped binaries - # when they would normally be larger than 2GiB. - append-ldflags "-Wl,--compress-debug-sections=zlib" - - # Make revdep-rebuild.sh happy; Also required for musl - append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags - - # Pass $MAKEOPTS to build system - export MOZ_MAKE_FLAGS="${MAKEOPTS}" - - # Use system's Python environment - export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach - - if use system-python-libs; then - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="system" - else - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" - fi - - 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 - - # 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 tc-ld-is-mold && use lto; then - # increase ulimit with mold+lto, bugs #892641, #907485 - if ! ulimit -n 16384 1>/dev/null 2>&1 ; then - ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." - ewarn "Please see bugs #892641 & #907485." - else - ulimit -n 16384 - fi - fi - - if use pgo; then - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - addpredict /root - - if ! use X; then - virtx_cmd=virtwl - else - virtx_cmd=virtx - fi - fi - - if ! use X; then - local -x GDK_BACKEND=wayland - else - local -x GDK_BACKEND=x11 - fi - - ${virtx_cmd} ./mach build --verbose || die -} - -src_install() { - # xpcshell is getting called during install - pax-mark m \ - "${BUILD_DIR}"/dist/bin/xpcshell \ - "${BUILD_DIR}"/dist/bin/${PN} \ - "${BUILD_DIR}"/dist/bin/plugin-container - - DESTDIR="${D}" ./mach install || die - - # Upstream cannot ship symlink but we can (bmo#658850) - rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die - dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin - - # Don't install llvm-symbolizer from sys-devel/llvm package - if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then - rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die - fi - - # Install policy (currently only used to disable application updates) - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/distribution.ini distribution.ini - newins "${FILESDIR}"/disable-auto-update.policy.json policies.json - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/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 - - # 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 geckodriver - if use geckodriver ; then - einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." - pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/geckodriver - - dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg" - - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${icon_symbolic_file}" ${PN}-symbolic.svg - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="Mozilla ${MOZ_PN^}" - local desktop_file="${FILESDIR}/icon/${PN}-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" \ - || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/${PN}-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \ - -e "s:@APULSELIB_DIR@:${apulselib}:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" \ - || die - - readme.gentoo_create_doc -} - -pkg_preinst() { - xdg_pkg_preinst - - # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse - # does not need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - einfo "APULSE found; Generating library symlinks for sound support ..." - local lib - pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die - for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do - # A quickpkg rolled by hand will grab symlinks as part of the package, - # so we need to avoid creating them if they already exist. - if [[ ! -L ${lib##*/} ]] ; then - ln -s "${lib}" ${lib##*/} || die - fi - done - popd &>/dev/null || die - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use 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 - - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - elog "Apulse was detected at merge time on this system and so it will always be" - elog "used for sound. If you wish to use pulseaudio instead please unmerge" - elog "media-sound/apulse." - elog - fi - - # 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-123.0.ebuild b/www-client/firefox/firefox-123.0.ebuild deleted file mode 100644 index eaa23fdcc1b1..000000000000 --- a/www-client/firefox/firefox-123.0.ebuild +++ /dev/null @@ -1,1450 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-123-patches-03.tar.xz" - -LLVM_COMPAT=( 16 17 ) - -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -WANT_AUTOCONF="2.1" - -VIRTUALX_REQUIRED="manual" - -MOZ_ESR= - -MOZ_PV=${PV} -MOZ_PV_SUFFIX= -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then - MOZ_PV_SUFFIX=${BASH_REMATCH[1]} - - # Convert the ebuild version to the upstream Mozilla version - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI -fi - -if [[ -n ${MOZ_ESR} ]] ; then - # ESR releases have slightly different version numbers - MOZ_PV="${MOZ_PV}esr" -fi - -MOZ_PN="${PN%-bin}" -MOZ_P="${MOZ_PN}-${MOZ_PV}" -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" - -inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg - -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" - -if [[ ${PV} == *_rc* ]] ; then - MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}" -fi - -PATCH_URIS=( - https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz - ${PATCH_URIS[@]}" - -DESCRIPTION="Firefox Web Browser" -HOMEPAGE="https://www.mozilla.com/firefox" - -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" - -SLOT="rapid" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" - -IUSE="+clang cpu_flags_arm_neon dbus debug eme-free hardened hwaccel" -IUSE+=" jack +jumbo-build libproxy lto openh264 pgo pulseaudio sndio selinux" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png system-python-libs +system-webp" -IUSE+=" +telemetry valgrind wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" geckodriver +gmp-autoupdate" - -# "-jumbo-build +system-icu": build failure on firefox-120: -# firefox-120.0/intl/components/src/TimeZone.cpp:345:3: error: use of undeclared identifier 'MOZ_TRY' -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - !jumbo-build? ( !system-icu ) - pgo? ( lto ) - wifi? ( dbus )" - -FF_ONLY_DEPEND="!www-client/firefox:0 - !www-client/firefox:esr - selinux? ( sec-policy/selinux-mozilla )" -BDEPEND="${PYTHON_DEPS} - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - clang? ( - sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} - ) - pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) - ') - app-alternatives/awk - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.26.0 - net-libs/nodejs - virtual/pkgconfig - !clang? ( >=virtual/rust-1.70 ) - !elibc_glibc? ( - || ( - dev-lang/rust - =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-libs/wlroots-0.15.1-r1[tinywl] - x11-misc/xkeyboard-config - ) - )" -COMMON_DEPEND="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/expat - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.97 - >=dev-libs/nspr-4.35 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - sys-libs/zlib - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf - 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-1.0.0:= - ) - system-harfbuzz? ( - >=media-gfx/graphite2-1.3.13 - >=media-libs/harfbuzz-2.8.1:0= - ) - system-icu? ( >=dev-libs/icu-73.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-png? ( >=media-libs/libpng-1.6.35: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] - x11-libs/libxkbcommon[wayland] - ) - wifi? ( - kernel_linux? ( - net-misc/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/libxkbcommon[X] - x11-libs/libXrandr - x11-libs/libXtst - 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 - )" - -S="${WORKDIR}/${PN}-${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 "sys-devel/clang:${LLVM_SLOT}" ; then - einfo "sys-devel/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 "sys-devel/lld:${LLVM_SLOT}" ; then - einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use pgo ; then - if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then - einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - af ar ast be bg br ca cak cs cy da de dsb - el en-CA en-GB en-US es-AR es-ES et eu - 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+=( 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}" -} - -# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily -# placed here until toolchain-funcs.eclass gets an official support for mold linker. -# Please see: -# https://github.com/gentoo/gentoo/pull/28366 || -# https://github.com/gentoo/gentoo/pull/28355 -tc-ld-is-mold() { - local out - - # Ensure ld output is in English. - local -x LC_ALL=C - - # First check the linker directly. - out=$($(tc-getLD "$@") --version 2>&1) - if [[ ${out} == *"mold"* ]] ; then - return 0 - fi - - # Then see if they're selecting mold via compiler flags. - # Note: We're assuming they're using LDFLAGS to hold the - # options and not CFLAGS/CXXFLAGS. - local base="${T}/test-tc-linker" - cat <<-EOF > "${base}.c" - int main() { return 0; } - EOF - out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1) - rm -f "${base}"* - if [[ ${out} == *"mold"* ]] ; then - return 0 - fi - - # No mold here! - return 1 -} - -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' - - # TODO: don't run addpredict in utility function. WLR_RENDERER=pixman doesn't work - addpredict /dev/dri - 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 - if use pgo ; then - if ! has usersandbox $FEATURES ; then - die "You must enable usersandbox as X server can not run as root!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6600M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_setup - - llvm-r1_pkg_setup - - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" - fi - fi - - python-any-r1_pkg_setup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset \ - DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XAUTHORITY \ - XDG_CACHE_HOME \ - XDG_SESSION_COOKIE - - # Build system is using /proc/self/oom_score_adj, bug #604394 - addpredict /proc/self/oom_score_adj - - if 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 - - # May need a wider addpredict when using wayland+pgo. - addpredict /dev/dri - - # Allow access to GPU during PGO run - local ati_cards mesa_cards nvidia_cards render_cards - shopt -s nullglob - - ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g') - if [[ -n "${ati_cards}" ]] ; then - addpredict "${ati_cards}" - fi - - mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') - if [[ -n "${mesa_cards}" ]] ; then - addpredict "${mesa_cards}" - fi - - nvidia_cards=$(echo -n /dev/nvidia* | sed 's/ /:/g') - if [[ -n "${nvidia_cards}" ]] ; then - addpredict "${nvidia_cards}" - fi - - render_cards=$(echo -n /dev/dri/renderD128* | sed 's/ /:/g') - if [[ -n "${render_cards}" ]] ; then - addpredict "${render_cards}" - fi - - shopt -u nullglob - 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 - - 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; then - rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die - fi - - if ! use ppc64; then - rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die - fi - - # Workaround for bgo#917599 - if has_version ">=dev-libs/icu-74.1" && use system-icu ; then - eapply "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch - fi - rm -v "${WORKDIR}"/firefox-patches/*-bmo-1862601-system-icu-74.patch || die - - # 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" - - # 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" - else - die "Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651" - fi - fi - - # Make LTO respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" - - # Make ICU respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/intl/icu_sources_data.py || die "Failed sedding multiprocessing.cpu_count" - - # Respect MAKEOPTS all around (maybe some find+sed is better) - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/python/mozbuild/mozbuild/base.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/libwebrtc/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/libwebrtc/build/toolchain/get_concurrent_links.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 -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/python/mozbuild/mozbuild/code_analysis/mach_commands.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 - moz_clear_vendor_checksums proc-macro2 - - # 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-gpsd \ - --disable-install-strip \ - --disable-legacy-profile-creation \ - --disable-parental-controls \ - --disable-strip \ - --disable-tests \ - --disable-updater \ - --disable-wmf \ - --enable-negotiateauth \ - --enable-new-pass-manager \ - --enable-official-branding \ - --enable-release \ - --enable-system-ffi \ - --enable-system-pixman \ - --enable-system-policies \ - --host="${CBUILD:-${CHOST}}" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --prefix="${EPREFIX}/usr" \ - --target="${CHOST}" \ - --without-ccache \ - --without-wasm-sandboxed-libraries \ - --with-intl-api \ - --with-libclang-path="$(llvm-config --libdir)" \ - --with-system-nspr \ - --with-system-nss \ - --with-system-zlib \ - --with-toolchain-prefix="${CHOST}-" \ - --with-unsigned-addon-scopes=app,system \ - --x-includes="${ESYSROOT}/usr/include" \ - --x-libraries="${ESYSROOT}/usr/$(get_libdir)" - - # Set update channel - local update_channel=release - [[ -n ${MOZ_ESR} ]] && update_channel=esr - mozconfig_add_options_ac '' --update-channel=${update_channel} - - if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then - mozconfig_add_options_ac '' --enable-rust-simd - fi - - # 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 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 - - # Enable JIT on riscv64 explicitly - # Can be removed once upstream enable it by default in the future. - use riscv && mozconfig_add_options_ac 'Enable JIT for RISC-V 64' --enable-jit - - if [[ -s "${S}/api-google.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-safebrowsing-api-keyfile="${S}/api-google.key" - else - einfo "Building without Google API key ..." - fi - - if [[ -s "${S}/api-location.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-location-service-api-keyfile="${S}/api-location.key" - else - einfo "Building without Location API key ..." - fi - - if [[ -s "${S}/api-mozilla.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-mozilla-api-keyfile="${S}/api-mozilla.key" - else - einfo "Building without Mozilla API key ..." - fi - - mozconfig_use_with system-av1 - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-harfbuzz system-graphite2 - mozconfig_use_with system-icu - mozconfig_use_with system-jpeg - mozconfig_use_with system-libevent - mozconfig_use_with system-libvpx - mozconfig_use_with system-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 - - mozconfig_use_enable geckodriver - - 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 - - # LTO is handled via configure - filter-lto - - if use lto ; 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 - - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - fi - fi - else - # Avoid auto-magic on linker - if use clang ; then - # 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 - - mozconfig_use_enable debug - if use debug ; then - mozconfig_add_options_ac '+debug' --disable-optimize - 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*' - - # Modifications to better support ARM, bug #553364 - if use cpu_flags_arm_neon ; then - mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon - - if ! tc-is-clang ; then - # thumb options aren't supported when using clang, bug 666966 - mozconfig_add_options_ac '+cpu_flags_arm_neon' \ - --with-thumb=yes \ - --with-thumb-interwork=no - fi - fi - - if [[ ${CHOST} == armv*h* ]] ; then - mozconfig_add_options_ac 'CHOST=armv*h*' --with-float-abi=hard - - if ! use system-libvpx ; then - sed -i \ - -e "s|softfp|hard|" \ - "${S}"/media/libvpx/moz.build \ - || die - fi - fi - - # elf-hack - if use amd64 || use x86 ; then - 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 - if use clang ; then - mozconfig_add_options_ac 'relr elf-hack with clang' --enable-elf-hack=relr - else - mozconfig_add_options_ac 'legacy elf-hack with gcc' --enable-elf-hack=legacy - fi - fi - elif use ppc64 ; then - # '--disable-elf-hack' is not recognized on ppc64, bgo#917049 - :; - else - mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack - fi - - # Additional ARCH support - case "${ARCH}" in - arm) - # Reduce the memory requirements for linking - if use clang ; then - # Nothing to do - :; - elif use lto ; then - append-ldflags -Wl,--no-keep-memory - else - append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads - fi - ;; - esac - - if ! use elibc_glibc; then - mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc - fi - - if use valgrind; then - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - fi - - # Allow elfhack to work in combination with unstripped binaries - # when they would normally be larger than 2GiB. - append-ldflags "-Wl,--compress-debug-sections=zlib" - - # Make revdep-rebuild.sh happy; Also required for musl - append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags - - # Pass $MAKEOPTS to build system - export MOZ_MAKE_FLAGS="${MAKEOPTS}" - - # Use system's Python environment - export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach - - if use system-python-libs; then - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="system" - else - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" - fi - - 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 - - # 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 tc-ld-is-mold && use lto; then - # increase ulimit with mold+lto, bugs #892641, #907485 - if ! ulimit -n 16384 1>/dev/null 2>&1 ; then - ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." - ewarn "Please see bugs #892641 & #907485." - else - ulimit -n 16384 - fi - fi - - if use pgo; then - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - addpredict /root - - if ! use X; then - virtx_cmd=virtwl - else - virtx_cmd=virtx - fi - fi - - if ! use X; then - local -x GDK_BACKEND=wayland - else - local -x GDK_BACKEND=x11 - fi - - ${virtx_cmd} ./mach build --verbose || die -} - -src_install() { - # xpcshell is getting called during install - pax-mark m \ - "${BUILD_DIR}"/dist/bin/xpcshell \ - "${BUILD_DIR}"/dist/bin/${PN} \ - "${BUILD_DIR}"/dist/bin/plugin-container - - DESTDIR="${D}" ./mach install || die - - # Upstream cannot ship symlink but we can (bmo#658850) - rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die - dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin - - # Don't install llvm-symbolizer from sys-devel/llvm package - if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then - rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die - fi - - # Install policy (currently only used to disable application updates) - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/distribution.ini distribution.ini - newins "${FILESDIR}"/disable-auto-update.policy.json policies.json - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/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 - - # 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 geckodriver - if use geckodriver ; then - einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." - pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/geckodriver - - dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg" - - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${icon_symbolic_file}" ${PN}-symbolic.svg - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="Mozilla ${MOZ_PN^}" - local desktop_file="${FILESDIR}/icon/${PN}-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" \ - || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/${PN}-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \ - -e "s:@APULSELIB_DIR@:${apulselib}:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" \ - || die - - readme.gentoo_create_doc -} - -pkg_preinst() { - xdg_pkg_preinst - - # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse - # does not need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - einfo "APULSE found; Generating library symlinks for sound support ..." - local lib - pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die - for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do - # A quickpkg rolled by hand will grab symlinks as part of the package, - # so we need to avoid creating them if they already exist. - if [[ ! -L ${lib##*/} ]] ; then - ln -s "${lib}" ${lib##*/} || die - fi - done - popd &>/dev/null || die - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use 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 - - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - elog "Apulse was detected at merge time on this system and so it will always be" - elog "used for sound. If you wish to use pulseaudio instead please unmerge" - elog "media-sound/apulse." - elog - fi - - # 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 -} -- cgit v1.2.3