diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-06 00:10:59 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-06 00:10:59 +0000 |
commit | 22eaa60297c2dbc92dd1658fb7d8e46878552755 (patch) | |
tree | c3e1147cecf778a6418d736658cedc5d7f2dfa2d /dev-lang | |
parent | e019d91362a4788fe5cc5788877327b813d0f730 (diff) |
gentoo auto-resync : 06:02:2025 - 00:10:59
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 22309 -> 22305 bytes | |||
-rw-r--r-- | dev-lang/dafny-bin/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/dafny-bin/dafny-bin-4.9.1.ebuild | 4 | ||||
-rw-r--r-- | dev-lang/eisl/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/eisl/eisl-5.40.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/fuzion/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/fuzion/fuzion-0.090.ebuild | 4 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 9 | ||||
-rw-r--r-- | dev-lang/python/python-3.12.9.ebuild | 609 | ||||
-rw-r--r-- | dev-lang/python/python-3.13.2-r100.ebuild | 634 | ||||
-rw-r--r-- | dev-lang/python/python-3.13.2.ebuild | 629 | ||||
-rw-r--r-- | dev-lang/ruby/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-3.2.7.ebuild | 296 | ||||
-rw-r--r-- | dev-lang/rust-bin/Manifest | 30 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.84.1.ebuild | 253 | ||||
-rw-r--r-- | dev-lang/rust-common/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/rust-common/rust-common-1.84.1.ebuild | 58 | ||||
-rw-r--r-- | dev-lang/rust/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/rust/files/1.84.1-fix-cross.patch | 30 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.84.1.ebuild | 730 |
20 files changed, 3295 insertions, 8 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 5d38729c6ab7..cbf7079a8b16 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/dafny-bin/Manifest b/dev-lang/dafny-bin/Manifest index c91834ffb765..10d022038d2c 100644 --- a/dev-lang/dafny-bin/Manifest +++ b/dev-lang/dafny-bin/Manifest @@ -1,5 +1,5 @@ DIST dafny-4.9.0-x64-ubuntu-20.04.zip 60772912 BLAKE2B 5904811590362705183e05e38c5f67a98b1601c28b4776faf3f33ac87d527e2c91493a0a693fd635799b8f416344acab2ed8c2897f3d1f07827e34565e8d720e SHA512 f44b94abf4fb9b42ee7b7fab584d1b6d65a90bdc515b2b4fc398762bcc33a759bbe2e22ff0c9fc556ca1794707cd7ca440e414c51be10ecd87a5b470df661bbf DIST dafny-4.9.1-x64-ubuntu-20.04.zip 60815385 BLAKE2B 76e4b7cf6bfea6f97bb04b77c034cf62732cc9fcadf1893f4783cf9e44cffc81f4067bbc001474b3b0a92f699b329f87ec77a2e34747a945d7786a33e6fff5b6 SHA512 37fdc7ab2f3feab6cce86103d57248e671daca91aead6588cb9f8de34e4b229178cb2da8bcc5bc26a45b85b76bb445c4c87c440d6e6a84409e2a3fdf7d34765f EBUILD dafny-bin-4.9.0.ebuild 1276 BLAKE2B f37bffa5af5c63da4b94e5ae203e46673fcc3797b12d60396981ef986d3a1d3b24df58ea5ce9a044613a6d0db4c8bce0282cc3a46f7f0355a4a610876a12de3d SHA512 35d347e45e9fca8bc06868284a48a9d38fb91ff3a8febe57b75c974869c67a6f75a3543ccf6d7a07503a374566b1c9a134abcf794aff783fb85cd24a078cb7d9 -EBUILD dafny-bin-4.9.1.ebuild 1277 BLAKE2B 7b7b9ed62e8030776ffc5d11154069e35653b4809cb9d7463e8081d22ea9170dd8d657fade500796411bb6158c05d73d3d626a71d2dd9c1524df5740a736fb1b SHA512 4dccece78502cd9c3b99e32fe6ff1043fe9f6139bb497fb4872fd0740e950d259ea5aee285941c1b59b9490e789ff3a670c517dea81a48820eac8ebd89e927fd +EBUILD dafny-bin-4.9.1.ebuild 1276 BLAKE2B 657a4ad09b816aba6bfbe81806d6c8f264c9f9edb0101148080eeae033c2987657932229f2871e863c02ce8da2cdbc4c266a8bda00765f7eab6a6741ab9114cc SHA512 68d0b40cc62464fb2e027e7981e09a7750d8aa5eaf4061e0cae67ae86550ab5b7102f3f74cd6de3bcc14072834abbc3d088cc7fea7354e86b4621a4f3f1a664f MISC metadata.xml 1826 BLAKE2B 66f000cee8fbf3bcae05da9249d5bc3388f9c05f32c45e96dd51b035aea220a9d49af25cb89b8b8a64a691408373c1ea02d0f345f9a4a554565f708a894664d5 SHA512 0cc12d9c49360bbc08bb8eccd3f7139ec149a9b731f0283b0f95a8506dd93458eb93f3347a978e55a86279ad85ee3233c1b87bfee36f22c9e40bdd14c0aef6c5 diff --git a/dev-lang/dafny-bin/dafny-bin-4.9.1.ebuild b/dev-lang/dafny-bin/dafny-bin-4.9.1.ebuild index 2907f72117f4..2e67e92be0df 100644 --- a/dev-lang/dafny-bin/dafny-bin-4.9.1.ebuild +++ b/dev-lang/dafny-bin/dafny-bin-4.9.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ S="${WORKDIR}/dafny" LICENSE="MIT" SLOT="0" -KEYWORDS="-* ~amd64" +KEYWORDS="-* amd64" REQUIRED_USE="elibc_glibc" RESTRICT="strip" diff --git a/dev-lang/eisl/Manifest b/dev-lang/eisl/Manifest index 9647ab3b155e..3f271160d756 100644 --- a/dev-lang/eisl/Manifest +++ b/dev-lang/eisl/Manifest @@ -4,7 +4,7 @@ DIST eisl-5.39.tar.gz 3137025 BLAKE2B 1aca7df4b629b9e9b71fa8355654d65a84cf3f08a5 DIST eisl-5.40.tar.gz 3140344 BLAKE2B aa00ff32302a6a9f1d9772f8e9c2690e47f1d466ec433c2f4519434a599d8b6bdb923e3bbdb1a278b3aaa1274ea139ff46e1bb736f972ab495f0dfc031de1916 SHA512 44e2ca7a35c3e200e7d8b0bd948427e0bfa81e678269df81d3e36e601123c1528c25a4b2d13b5d92956378b27c5211caa5e51113763099af4b9b65bf369382fd DIST eisl-5.41.tar.gz 3140179 BLAKE2B b60ec0209313973af31b0940317fdecd8e87c9de46093830d7e3c3924bbab9ef5da638a67b43b91a3c351d3d357817fcf26a56aeb2203e3f2a1865c797c743b1 SHA512 1b87a4c16b75289a95ffee20b7182151701736c96f3ddcdf1e00ef51356b668059b43cab39e9dd3b1f193b102f1f7cd32e435c0d212342e2544fff9507dfb99a EBUILD eisl-5.39.ebuild 1141 BLAKE2B 981c79c4e175032aad04446f902f5576da77c4bba907e7607bbc7109434fa219d88f2841241d008fde4d7c7494c14c8b1501c621cf41ac0074488dd8274a6878 SHA512 531d23a6d9f24368c919f09662e4f53fb6d21bc3d41a080b8f186deead807943121a546f5302d933f4dfa0a9e7668103dac45ccad3b3ac5e19d3b05c8101f65d -EBUILD eisl-5.40.ebuild 1142 BLAKE2B a8fc820c4882488b585a8880ebae3e28aea612fd7fba566428dbc79b07a6b1eeb6d650800e2bc1f29eaf98c9a205c3c344f470b23349f1e21525e573e6019ea2 SHA512 420028f87f5855c4332f0441124cface157b43823141f3eb84df01a369981eb7c080268d3ba133f0af99d7798611661668f8bef3d4ff73b9c3229392ecbe277f +EBUILD eisl-5.40.ebuild 1141 BLAKE2B 981c79c4e175032aad04446f902f5576da77c4bba907e7607bbc7109434fa219d88f2841241d008fde4d7c7494c14c8b1501c621cf41ac0074488dd8274a6878 SHA512 531d23a6d9f24368c919f09662e4f53fb6d21bc3d41a080b8f186deead807943121a546f5302d933f4dfa0a9e7668103dac45ccad3b3ac5e19d3b05c8101f65d EBUILD eisl-5.41.ebuild 1184 BLAKE2B 878e121281063a100bbbd9c5cfd065294c3cffded81f387b4e9fffb219ba91b380cfdfe73d597710b3884a627e5a0a0a6721675110ef6091a9c5cde7108e64a7 SHA512 77bd58e5efcf0c58d3428c011d241adc26998d581f23efddb6166c299d1013ec5b3abf83082eae0a5a846ee471daaceb416c73dd92a0d7ebe7d85c7a139cbc91 EBUILD eisl-9999.ebuild 1136 BLAKE2B d00e394ed97243a579bc35bc9da5fa60ad84861ea5c41a0524b514e360d80d732da2bc733ef1edfaf843c96bf2f0543912838e102336244442a7c934ac504c1c SHA512 5e7ef191a7e978bebcc696d9274f211d67dd4d99c36bc942402f60a76439b551d839d70b66531e5f6366b700e5e094f86b072fb6108a6cf4593bac8df38361a6 MISC metadata.xml 631 BLAKE2B fd171b07cf1f7beae7be774a5da360d466c83f01a6bd52dc69af436926ae5aebec27a2723c11498be21c4f96f6b82c6aa3571f4b84e763459ef78086450252f2 SHA512 dd9e329f24ce6d3922e92e81d36234b93151f71c88d6ba4b38557565a7c1c3bc4b7172d4d55f1d2d5bd6c5cada449691067cc71abd4d456941f6a8b78fe0df87 diff --git a/dev-lang/eisl/eisl-5.40.ebuild b/dev-lang/eisl/eisl-5.40.ebuild index b73ff04a67d4..fa1972eec46a 100644 --- a/dev-lang/eisl/eisl-5.40.ebuild +++ b/dev-lang/eisl/eisl-5.40.ebuild @@ -16,7 +16,7 @@ else SRC_URI="https://github.com/sasagawa888/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="amd64 ~x86" fi LICENSE="BSD-2" diff --git a/dev-lang/fuzion/Manifest b/dev-lang/fuzion/Manifest index c07321a13440..b5504fb0faa3 100644 --- a/dev-lang/fuzion/Manifest +++ b/dev-lang/fuzion/Manifest @@ -5,5 +5,5 @@ DIST fuzion-0.090.tar.gz 1271502 BLAKE2B 88d97759fb1213cdb2a428b6fdb4b3f2a662295 EBUILD fuzion-0.086.ebuild 1494 BLAKE2B ba674aebb775f0318b932eb43ceb3221eb5ae3eb9316c607b7810a0ec64551f184fb36082d95eca9b14ae2e301f35745f684b390b68d8c1b5355be4906e081ea SHA512 d77030ab157f1654eac06d08d143091705a291f3fd58f5e7be8576bde63f76a01ded59ec2fb04997471edd1514f2eda249f8e3fbed126fe1cae01fe4d800cab6 EBUILD fuzion-0.088.ebuild 1451 BLAKE2B 4b6444a25ef87948af012b7d3faff28e1c1f978402d2478d3df421d4428d4f3207cbde5b34961f03d94cea7157114d357d3d746657e536af71145ca8f2ce928c SHA512 1805f37a6ef9fbc783e54d4aae2379d3e2f5725139b7d07e37d0a8d6f1ece7ea81f6cb61f17aa5fc9aab582ca0b1250b2d795117218030ac3eceead662b3daf7 EBUILD fuzion-0.089.ebuild 1677 BLAKE2B d8e72b16c4c4033026ea8fe176c92b3dc978763ff5d3b947f2c54bf2a9d2261031e3173eaa092f5f527f21a25f3134383a034b43265303b8eee90d933020d042 SHA512 2861c6070ed45dcef6a5e058cdbe3fbdd804ac335791f342223200091a6cb600fb718c478bd5e7255f4038d8ffd1628bc7f3115ba5d40dd53d1729590ddc3f5e -EBUILD fuzion-0.090.ebuild 1677 BLAKE2B d8e72b16c4c4033026ea8fe176c92b3dc978763ff5d3b947f2c54bf2a9d2261031e3173eaa092f5f527f21a25f3134383a034b43265303b8eee90d933020d042 SHA512 2861c6070ed45dcef6a5e058cdbe3fbdd804ac335791f342223200091a6cb600fb718c478bd5e7255f4038d8ffd1628bc7f3115ba5d40dd53d1729590ddc3f5e +EBUILD fuzion-0.090.ebuild 1676 BLAKE2B dce26c72918b719d3f27bb6195dd6bbc96694c4e6fde098a6f2f59586d502bcb0f9ab31dc0d30e8ecf39d4c00cd2bc940f0f2a24759859914d437c645833e91d SHA512 f419e32143532c316e8f75efaa9788c0bac800fa2763d229675628d96c37c0c1c71eaf023f581fc0c1f46cd3835106658c581cfd5f3c8c6b0fd555eec8b29254 MISC metadata.xml 690 BLAKE2B d4e29609d56e8784a8653d928595ee20f096c9a1e408afda2fab5a79c1be188769b84e7b69a6e0b8d5004f9c648c75ee634f2c25d8422d04b0c621079de12b92 SHA512 df41bd000885fea2428ce7c6c675c3a8c50f450902311bf36b8fc9b6ede41f6c4b070eb3c1b77dae70aa63fe13fa9c0b13f28a1481f70df0fd2d29d1c41579d2 diff --git a/dev-lang/fuzion/fuzion-0.090.ebuild b/dev-lang/fuzion/fuzion-0.090.ebuild index d03f017a294c..d6fcfab4654f 100644 --- a/dev-lang/fuzion/fuzion-0.090.ebuild +++ b/dev-lang/fuzion/fuzion-0.090.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -17,7 +17,7 @@ else SRC_URI="https://github.com/tokiwa-software/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="amd64 ~x86" fi LICENSE="GPL-3" diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index e56e072c1c05..28251779292b 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -8,10 +8,14 @@ DIST Python-3.11.11.tar.xz 20085792 BLAKE2B a9a778eff94529e1029ae252ef28ecdc2f06 DIST Python-3.11.11.tar.xz.asc 833 BLAKE2B 6a9d873e181d636712567ea46823ad7f972f872d038092506e67bada24187441188b8fde4672c205ce6d37e60c4e0c69a8f3cc5d1915fd8f5dd8743292a16d1b SHA512 d71b0b42537fb636e8c469d62d13ff020149e4fb9d87eb17f8c999301195e418d134dbdb7e4ab49b06de16e96f8ef6bbcf2a749956fffca2ce03185f191c181d DIST Python-3.12.8.tar.xz 20489808 BLAKE2B 24b9a5abafdb9fedfc371e7acf0efce50bdc6702050c4f5f0b9e97916a899e3462f928cb217c48e6ffae6fdd4d2cd7c05c5f1d73eaa9ef646f4b3281db5ca977 SHA512 406ce1146c4c2c70d252df56bbe9e5970ef469395cbaa211a96af71f32de2cf7abd944906920cc18b4a470027e63a3f64bf7679fb4954b31bf4ca4baf24fa370 DIST Python-3.12.8.tar.xz.asc 963 BLAKE2B 5aeacf16d337949a66bb56e346447e7bbcd9166b60fc512c98bcff6862976732ef2e3ac59869cd9df29a653c2bafd4af63b1e6c14f4c6603efb85d5c3dd88357 SHA512 19493499ddb80764aa105e100585d2ef872798dc30fdff2e31d158cd7fd65b69ca133c6d9d16eb974660eed6ba474a26a2af3acd13a90522cf50e142492bd9a6 +DIST Python-3.12.9.tar.xz 20502440 BLAKE2B df1a8ba4996219c018fc14156958ca9c0e8af4854819064fbcf0c927258ecb3c5f46e562213799a87dafb35ae5bd647e1ce280affe2ac8ce6a85c351822b6693 SHA512 c840b14aa21e6a963d18c06ebaafb551d9c9a101b3866417e762fc4a2fde071a7a25fa257faba2956c7344bbc2413ed61690a712d26fba4d0dbeaa50e49b2574 +DIST Python-3.12.9.tar.xz.asc 963 BLAKE2B d90b9c1a3aafa1a942ef8d978b566829656db1114b74f1565b7cbba188cf3bf5637c1dbeec3432ae0af0f826a154c40f27fd8fc46350a757ef91f5c426908149 SHA512 b59251ca3a0a17c06ff7d165f6c025eb91127c80be0782642590f5c922297e0710544ac5a9ae977378e393f1c4861149576a0515af5ec0e54e6827c4010d544f DIST Python-3.13.0.tar.xz 22532980 BLAKE2B 4a4e397199402de8c9fe8e4d63443ed972cbe8a4f541743908d699c7987127d159d600fd14145b6a946e8671426279d230c9155fdc5863c1e49a945eedcbf21b SHA512 44a143c9b96b55b01885ec020c3364265bda55289615cd7d5071915b0d0178a6f35e7551a89090001fcb7f3172d38177a56bf8b8532b15c9dbc50295c9210152 DIST Python-3.13.0.tar.xz.asc 963 BLAKE2B d05f02692a9fea42b73dbfe5dc42bd6533555e5ecb848510d2b94bb7f0e55d4a0f89bcd20b073ed2c7f7a68be35b12cb6dbff6bc16fc9a4592ded2c339ada7fd SHA512 1b8bb0fe4eb93e31ec1770e90b94d44b5864c0391aad5dcba3a30d8e505d9b17107385414353c0060007f8a536254f49b8e919f36ddf6421a6e4330f817f1a3e DIST Python-3.13.1.tar.xz 22589692 BLAKE2B 161d5c0a7b4cacc4ce9983f9540a7e01662a7b76cbb34c5f3681582b0e7207574bdec5ad7bf79d820d8744b69bc2fb7196cf07a2ecadbfab6a158872f562741d SHA512 056c9b5fc0a6b540f41513d045f43c1ed463d15e0f345cecec703ec9c2335e53b4beb19de9c74ab2b236b023f934d5fd9ae7727a808634eaa01cfe66018a9a35 DIST Python-3.13.1.tar.xz.asc 963 BLAKE2B 47cbfb6bceb92716181a0ed8f41742958568e62609fa4996d341e465bd6be0ebcab586ba1ebe275aa3a99108221be047fab66ec4b7e90af27d9db7524b6b4951 SHA512 1b56b7c2f547aa39c75c18978e174debb113444ce3f9da3829ba6842e3160051e0de70bd49d306b8014299aa8aa911d7c67efe71dd648c3528cf8d7535a01599 +DIST Python-3.13.2.tar.xz 22621108 BLAKE2B 79c7dff8a15fd2487d62847a8e654c02433a89887aa4f93819020b60a30587e3ba92b101553d971b59e132677f9f74dfc41cd7c7901db78a7787607ec96c6664 SHA512 bb1c0598914c6d4326554faa568f660f10b20c701d0f36bf1fa58837b6498d728a407416b06ede39604caea1ca93f60545b83b01ae8ee65f55d4cc83242b63fe +DIST Python-3.13.2.tar.xz.asc 963 BLAKE2B 95a36c305dd452df23b4f119de05e1d3a2b2c9e0c2778a52dc4065f82b52752b68d89eb737cc54cced70623ad4a7b48c85fdff781bf7d7e3b747dacb1ef77db0 SHA512 5f019be530f688b0adf5d5cc9f2c2243e2f1dc7338559db14c1eedd12aadc85404d42c7aafd74e41828205d85f13f278876662ac30c8f3382a1ee081ba5f29f2 DIST Python-3.14.0a3.tar.xz 22749680 BLAKE2B 4a0457a98fe1a35c01a4607c11eefeb7ef4f4a3bc7bd8b04e129137c1f7f7ee8806fe5561e88dbf8866f461f2d7d3577618b7918fb85a0e99f7c225fd4593778 SHA512 e26c9736f00af680b5f1ff1ba0f06562c48550836088d79dd8b4c97016d52f9f76979de32fa8556e9d750a5dad488643e897807ab6cb0c1424882151fe5f3337 DIST Python-3.14.0a3.tar.xz.sigstore 4891 BLAKE2B c251bfc3e332174c5050c2d8524aea4865e28e73c39288ac151bea10e0039c3af545a26acc48b9ae8deed9befddb11e810103620be6a7934ea79e7b1f3182eb2 SHA512 dd7d6c543ba2ba8dc8d2a6c891adcf85de7eb857ceb3ffb33f5f06fbcf0a6bcd6517502cfd35acb86ec13d85d487313eb9a396d78c42d1c506d2261e1c4b861d DIST Python-3.14.0a4.tar.xz 22798932 BLAKE2B 4dd8632503e142456deefa749aa8d7a93b98c988bdfe905ae650e8e72b2a22de9e88b6d7ba65ec277748b4c8b919a176ca22552e9482f4883b96bf9129dd15c2 SHA512 b70671ebbd9f777fdcb661405c538c733600470ac34992a5b3df99d2f5afecc22cd8325eeec50eeef043181e634da91e535c166b9b5ed421d4e6aa41b79da3ab @@ -27,9 +31,11 @@ DIST python-gentoo-patches-3.10.16_p1.tar.xz 24964 BLAKE2B 93cf5d208f80f1017e4af DIST python-gentoo-patches-3.11.11_p1.tar.xz 11644 BLAKE2B d080e1b987ea0e1b397113f20a5c84f6a34d6619a3ed9f7389fd10d95636169563fba97d212477ca7f9b93d2bd0b66c9521fc61963bb468805a661ca3ab287a7 SHA512 f6045adf25923053fc9a60506b9164c9c062580d6886f1a3dcaca00dc4affe69aa9e138f8ce93f093798ccf33322ccca2aca674ab87457df98a93dcaca234b44 DIST python-gentoo-patches-3.12.8.tar.xz 10772 BLAKE2B 9833b5ee6c307a4aa1335fd966fcd64a0f3732a97a190abdd3121b3496ea68ead9436af4ec5e3e8c0e781fd68df41403a1b2e5f29f264fc8569a883141e5f7f9 SHA512 d5906845a6259f7349a0299e185f569750b493c64ea1f6537dc8bfc0babc9b54de7db1c4f1b5b6ec2f7076937ad07ca0ca9c4941bbb8d542da6c687957bdbd5e DIST python-gentoo-patches-3.12.8_p1.tar.xz 11088 BLAKE2B 4d7ccf4759b624aafde1ef2a0a341cda8f4d3e7c4d86586201a910d77327219e61b134985f2fe85e83892ad4ba607b4e661aed675cc038e4cc193efe9fbe6f6e SHA512 6f1d6ab2b9e958ae7d2ca3f204b7c7eb1435998919cf5a577a82bbf1339232f92a2f517c248afb9e1802850acd2b59b84c41e87f4b8582e19ec88155743cdaae +DIST python-gentoo-patches-3.12.9.tar.xz 10736 BLAKE2B 1f87d1bba8c094936e5cd3e0ef2eede0dbca3e658430f81b398735d8f02fff1f87739914014dbcb17163f8a969ffc5e7e4cce7d71557ce3c2e58487e6ed8b80f SHA512 342f11df85926e32455d52115d06b817a17f7ae104e3ea8e852046d321d829835bba7c07803c50dd5433ac8b615499428d5bc1a088b484ca0c4304eb8b2cb879 DIST python-gentoo-patches-3.13.0.tar.xz 8316 BLAKE2B 8fb8ba8f41f310140ad7066b614952023112d5043e5d82058364125611785144c1843e87eecb7669bcbab51c40d0694069526219f7419a7009517ce0821b74ba SHA512 0eb31ebfa3411020aa70b3b66fd7eec98b4b7a686b0e8f1f7ed76a8186a7c1ee85ccd9565a86a1d7ec13b975855eeb7303036af05e2dfdce3d64e4ad99299df4 DIST python-gentoo-patches-3.13.1.tar.xz 8320 BLAKE2B 2fef9c501df7ed7603eabb3e01a8c3bde5bcfae3a8ac9bbe772b458cb04ffa9598cf38f3a74f6dcbcda29e7bd294d664b8fb12f7ddd9e0e42ed6268300947bb0 SHA512 419e1f12daaf19ed2d2195699b5e8c2c604779562d84d6a68adb4016dcb13fc3e0383ccc4b01eb153930600e6c9cdcc518929ffce3d6343019226a6111e9d617 DIST python-gentoo-patches-3.13.1_p1.tar.xz 8672 BLAKE2B d35b8b47c6d549753d9a764fbc3538cb6517c809e69901f3221110ccbb0ea9eed10ba1f1637a5ffe4f90d8c3932f53815c7dcf844a7350ad89458763bf0aeea1 SHA512 0505bc1f7c8e264fdcad5459900e37d12ed9bea57e615ea42492fa211d3f0641e79c3e711a6970cd34a3a6275f36a22ed7ba64fd71c988bcdaebfcefc7b6a1d2 +DIST python-gentoo-patches-3.13.2.tar.xz 8316 BLAKE2B 2367808924c83c02b8b2ca765fd4768d4f12cb8e8451eab9d084ce5950a5a81829e573d415f9a16db2e053105def90b5f52c91423fc71e57cd182a1d9c824d8c SHA512 580332ca037c1453f314d5811f96f7bf74defc16cfe515c4fe82ea08a7bf3679aa88d5456db846d988bcf4fbc9eeb4ebe7cee01d135bd55c87931206250e301a DIST python-gentoo-patches-3.14.0a3.tar.xz 6036 BLAKE2B bbcb3f31acb533b8291f4cedcb89c0501a7054bbf1f98ea000c43e5a99e3b8bd160c6fb81e28bad90c85dd0256d523f72b9e25f30c30b5b5e9d60a9055a612d1 SHA512 9f87b3f1f326f88c924c49e37f39f63314199cfc354d452fef860ab36e143145a2c1d832c1b7d4357ade1c1090de00086bc5d6a9d7981bad210a99ffcfa2a858 DIST python-gentoo-patches-3.14.0a4.tar.xz 7452 BLAKE2B 5d3b0dc6f9c2f0ffeac50e4af1915a8d8ec29350c56203ec66d6580ae705a23316f4c85f28908000c50c58eb3400e63ff379ba26d219f48ca7f559633ba4c153 SHA512 0e571f6693e44f439c7ac499216f4cf70e487768116290c24ee66323c9113fc91d0b4b68c79d1d549d0a14fcee4f79ddc377dfd87932dfcf00c5c11d3784bedc DIST python-gentoo-patches-3.8.20_p6.tar.xz 50876 BLAKE2B df0df21c75972fb73e36f66f0c90d3f953b14d7a59bf97ce4214dce6e6d937ed52fbf3db8f3eaf42cde141bfe4d7a731b06e41723285517461c790912706be9e SHA512 48ef567f6972e7975cb61d34a876d8c0db42f1a3c0b832f9366091dd5f2ca854c02887808843d314816c8cf6d7b0738c40e7835fedbba7b84e57f2515dde45e2 @@ -40,12 +46,15 @@ EBUILD python-3.10.16_p1.ebuild 15531 BLAKE2B cec70438eef3917846e6d26035f33bf2a0 EBUILD python-3.11.11_p1.ebuild 16752 BLAKE2B aa28431e87c648e6bf7951c8b20c240f10f8e069fedbb41e8e6600c97d0cad0364df79dfcb60d0c8c057eb946d59b37b98aba52c0874455310e2fa7e440526d4 SHA512 1ca31c3e5965e94224e3784531d9d2adda1b93558bb2693b9a9ca82ba5a8e51f9d132ffe7fd43ab413699ae67d0043dae5b14e0ca621cbac34e19b014efd730c EBUILD python-3.12.8.ebuild 15671 BLAKE2B 7b4dbd1c4b60b57c12ca33c2523230a3d52f9d5ec6ef56b922e34c369476d07f31fc9aa93b6b3346c092dfefa6631c86d2f498c4f69fc88cc1e4b42dc0698435 SHA512 c53dabbaf74fe6e19525865b42b43b4754171df43c6295183debf108ee43365fd409b302ec6febc90c10e7ef3b42564d11084df746cf37824f437d1ed3e58311 EBUILD python-3.12.8_p1.ebuild 15673 BLAKE2B 8ac7372319b2614cf7f0e2601888ffce877f5b260f0b6de1f99556d1b531e2af6c3f36d709a6aad504a8d2b6e7b89163e0542d10de4838ea72886f2286899fb6 SHA512 4e1eaa2cb32f3c894a460fafdd16549eb0d0512c8bbd3ce6ce0276b00559de4423d4f4906bc1982876b5a3500d088ca780e5c2c4bbfc9a48960d432341217b83 +EBUILD python-3.12.9.ebuild 15679 BLAKE2B df15f2df5a0321a0a1e74c345c9f9f56a504b86b9d78b34e1a5856bfb3ff3203a13eb22a03de61edff3a5df414eb1d819fd7c64f94c83b7c3d1d18430318d6ee SHA512 e16a63c1c0aa36ed203eb6282d6cdb3e13a03b14c55b9d5979fe34a74871d202da664188216b8b780ee67a6ffbf56ade7dcb1b3c859bec32af4354d16d270376 EBUILD python-3.13.0-r100.ebuild 17198 BLAKE2B 004432880b1266a0589a3b7cada82990caec9e388141b9718e097619348a714131017e56065b425240edb842bd00c52a54e5dbdfa38b99657c5a0c73cff7e496 SHA512 29349d96ba87061dcf7b3ea4dcfbc2975b3d0897b757bc7b895aa8c9f142419cc91a0228279410e8caa87b63aeb5586190a675534a1996f9750898ce6710842c EBUILD python-3.13.0.ebuild 17468 BLAKE2B 874a2332e61e19ae632a7de535f75bec6e3cf5fe07634b41b6e620f5c5169477eaa0e67e416e6d9069ae6fb86b42f4cee2cea12213fe77668ca603678e69fd64 SHA512 9f5e9d435e87eacccb606aac25cad16d7ce42729a1c64ec051004404d36e2e7b476cd6b32fe9bfe36ed8773604a1ddb789de98d55e827e0de8bbffc09a37a878 EBUILD python-3.13.1-r100.ebuild 17206 BLAKE2B a4d06ff1df9e2975567a8a6c77ee0019eebcb91a7f0e7bd534b369d76108774a3b6378995a89f1e1db62ed2aa4c69fab700c4f1c2a9f2cbd8907a44f14061888 SHA512 2bff314880c19039ed6b6791a967bf381297274675e15572f6ee679012bfa822f0cb2f47879c94b51c901b6514f1838186d7d319881bdf63b6f1c66b10dd1d6d EBUILD python-3.13.1.ebuild 16858 BLAKE2B 4115d1b60d90714c06d485d5d15c6f29448158a2a51221e503521175a288cfb30cc249ce2505077bb673826e16904a93cbd970fa19e72d8e255632982fe62262 SHA512 09e752176200b14d2aa03d98f42f1a1b4c1566bd672ecdddd032dc778249328c7b41f2c02e32addbaeaae4c639a4366fd106f81c91805b4216afce3e5abae876 EBUILD python-3.13.1_p1-r100.ebuild 16678 BLAKE2B f70e5c4541719979f5588c97e9b19b5be0f2566783fdfdac558820bd94dcc5f34ec15485db5836587f28dd93c09af046aad91ff1be2855ebde82e518a1e337fe SHA512 e73f5893d2fef16bd668124f918c50ef58ad50307182800598824f782a95928788aa57e18db9f550427c5e8bb958024151cc7bf4c18556d84c8359241b7304c2 EBUILD python-3.13.1_p1.ebuild 16363 BLAKE2B 0d4182c46655d36e6b20a05c4976d3c6044a12e8ef07c9299dc72c9be18e4265b01a06f7b3c3b324c278b5df7611a2139f3804d826370f632c867f8db76f33fb SHA512 edc5ddd1c4c2c6fdc5c64d87b2c10b5c40fbbce32101250753d53a9c25b2d55e911b51b79ecd67aec8a3a9dc14e244615708a3714e0e1e4b0b19849739ff5cd7 +EBUILD python-3.13.2-r100.ebuild 16678 BLAKE2B f70e5c4541719979f5588c97e9b19b5be0f2566783fdfdac558820bd94dcc5f34ec15485db5836587f28dd93c09af046aad91ff1be2855ebde82e518a1e337fe SHA512 e73f5893d2fef16bd668124f918c50ef58ad50307182800598824f782a95928788aa57e18db9f550427c5e8bb958024151cc7bf4c18556d84c8359241b7304c2 +EBUILD python-3.13.2.ebuild 16369 BLAKE2B 62401f674d60de0d77c77344342d4a857541d3bfa78c776ead9bc3e127ef7f9b3c1090bb0c060f7cbde1280b4292dbfce055ae9b2b52bae19cd2eeeb746a6a18 SHA512 ab50773a2b103c4d1fa7867395768bc5b90cdccb931d4d65927ae7fc8e48cdb9a64de9a78f89f23154c54b697eae659e3627b04025fda130c8c2ba37de33eb03 EBUILD python-3.14.0_alpha3-r100.ebuild 16695 BLAKE2B 2be26e8dd417df40d72e1361709a16d48add9e5262b09bd04191867f2b0f75b8e71fc8dee98b7f7976e925e54cd18e10e478f6ea06fa34164ce0f1f499738f1b SHA512 dfa892d823a07a7b9356b50a40c066e310ecd8a5e9cc674423a09e390a9115244a46af53df57667b3752103a9ac5bc0e0b9f7a57cec22875499f1edf14895d31 EBUILD python-3.14.0_alpha3.ebuild 16388 BLAKE2B 7cb2e9c39471f0ccfb2c436c4327469cb6e709f55d38016276876d318042afe59d7df2dea8e829fc21017a87bbd1fa1e3dcad33eb39fb673761d8b9a364f101a SHA512 cc12477ef0388b47441b06f76fc4fc35258753f121735a2ee1648740c9894025b0e426d5bebf922dec17f8c9c10569ee0c62b538cd31b924bdb21ecf4a25b933 EBUILD python-3.14.0_alpha4-r100.ebuild 16695 BLAKE2B 2be26e8dd417df40d72e1361709a16d48add9e5262b09bd04191867f2b0f75b8e71fc8dee98b7f7976e925e54cd18e10e478f6ea06fa34164ce0f1f499738f1b SHA512 dfa892d823a07a7b9356b50a40c066e310ecd8a5e9cc674423a09e390a9115244a46af53df57667b3752103a9ac5bc0e0b9f7a57cec22875499f1edf14895d31 diff --git a/dev-lang/python/python-3.12.9.ebuild b/dev-lang/python/python-3.12.9.ebuild new file mode 100644 index 000000000000..34d02eeb6167 --- /dev/null +++ b/dev-lang/python/python-3.12.9.ebuild @@ -0,0 +1,609 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils +inherit python-utils-r1 toolchain-funcs verify-sig + +MY_PV=${PV/_rc/rc} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build debug +ensurepip examples gdbm libedit + +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-crypt/libb2 + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-pip ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( + app-arch/xz-utils + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +pkg_pretend() { + use test && check-reqs_pkg_pretend +} + +pkg_setup() { + use test && check-reqs_pkg_setup +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes _crypt + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + append-flags -fwrapv + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_concurrent_futures + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + profile_task_flags+=( + -x test_os + ) + ;; + hppa*) + profile_task_flags+=( + -x test_descr + # bug 931908 + -x test_exceptions + -x test_os + ) + ;; + powerpc64-*) # big endian + profile_task_flags+=( + # bug 931908 + -x test_exceptions + ) + ;; + riscv*) + profile_task_flags+=( + -x test_statistics + ) + ;; + esac + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + local -x PROFILE_TASK="${profile_task_flags[*]}" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-system-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + + $(use_with debug assertions) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + fi + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.13.2-r100.ebuild b/dev-lang/python/python-3.13.2-r100.ebuild new file mode 100644 index 000000000000..f2f4b2b6ff30 --- /dev/null +++ b/dev-lang/python/python-3.13.2-r100.ebuild @@ -0,0 +1,634 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 18 ) +LLVM_OPTIONAL=1 +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV} +MY_P="Python-${MY_PV%_p*}" +PYVER="$(ver_cut 1-2)t" +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="Freethreading (no-GIL) version of Python programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-crypt/libb2 + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-pip ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + ewarn "Freethreading build is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python. Instead," + ewarn "please consider reporting freethreading problems upstream." +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + append-flags -fwrapv + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-system-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --disable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + fi + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + # Fix collision with GIL-enabled build. + rm "${ED}/usr/bin/python${PYVER%t}" || die + mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die + mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if use tk; then + # rename to avoid collision with dev-lang/python + mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die + else + rm -r "${ED}/usr/bin/idle${PYVER%t}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.13.2.ebuild b/dev-lang/python/python-3.13.2.ebuild new file mode 100644 index 000000000000..39406d1356ba --- /dev/null +++ b/dev-lang/python/python-3.13.2.ebuild @@ -0,0 +1,629 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 18 ) +LLVM_OPTIONAL=1 +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-crypt/libb2 + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-pip ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + if use jit; then + ewarn "USE=jit is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead," + ewarn "please consider reporting JIT problems upstream." + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + append-flags -fwrapv + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-system-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --enable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + fi + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index 10b651738105..079c0579ec31 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -28,6 +28,7 @@ DIST ruby-3.1.6.tar.xz 15273916 BLAKE2B feb697b8d01ebde0042e679b814c4c95481c6afa DIST ruby-3.2.4.tar.xz 15175656 BLAKE2B 9c2300a958b03528d51f0d74a069c8c538ca4009835d55377509a000bcfb43893a8a80d8fda57011e77c72e6283cb259281d5ba7b37444546e49f2a9ad515cf3 SHA512 fb0af37be4b6ad7b98ab9f8a508952238ee68b5828e3926331e4db52e2ebc1e6046f31114069322db0cd3bea7c9b82ace91c8564573ddcfa1f960877b237dbff DIST ruby-3.2.5.tar.xz 15189072 BLAKE2B a37c92a0f751e81dcae328b8944c4ecf10f6aee4f4468d6d08bb924c9808c8556c5febb71a825dd62dbcccf56385138e6e306bf3efae3589bdf0512d16d99d1a SHA512 092348b84b513aec62e63ec10b326370d0e3d1fa3126c59c03c84f28e2d7741a4772c461b077ec6a7dac3964a20f434655729e1acd50a3438755d7ad64073305 DIST ruby-3.2.6.tar.xz 15126888 BLAKE2B d59352e5543b96abe3de5f10b578c2b910a0f18f848fb32a10b80f8e882e7c687a3149ce6ab6ba1271731b8668e1dd47754b778def13010a587aa8544e881943 SHA512 78f7fc76d47c772b9bc313cbcb57a2c0f1a975e09cfe46a3083f6f603d62b0031bd4c55896c8353c1c343974d45077e06e310111198d870883e06a0cf6fd03ce +DIST ruby-3.2.7.tar.xz 15128228 BLAKE2B a75717dde36669c7b62e7175fb74f2a6f5c7590e7b56ced3d35f1c626d3b7f67eed8b32705187708828622478166d3b630215f828773fe677af67996f0da6d3c SHA512 c10b6fd27fad3bbd33d780c0a3eccb5df2a8465a89d2294ea6f14c7e5e8f7c8ea30b8a8b68bf8903c76f9133c5d984d5d66052ec4eb413153c739e6eea24beed DIST ruby-3.3.4.tar.xz 16366580 BLAKE2B e10b81ad7838e3d443ce0b12b8372faebb001f00a32dc0fa1f5e37c46baae99ea714e7f2a8741f0294255312030e844f32fc5d1c3695545cf8303e85b3255f21 SHA512 b26461a13ff82a08a282f10108028bb2a2e4a28da6182a291062fc54089c6655d79c22cc69d59156f9b11cb10a17fe8c69d489343fbae123a45f03361b95c9eb DIST ruby-3.3.5.tar.xz 16403660 BLAKE2B 4fa242ceeaf0dbf0d048b3f116f149f299c1a0ccca500a47929344da523cd3c49365381777e56546fe94003ee90ccc1f2cc957697eb82cd8beb7311b0b00287c SHA512 dd5c6a7f74854e143e0ca46b9d7c0d1983fc4886f5f733cd108345dbf4b21f61ad978ad6806e05a57b7af28fd9216dd38d7145808188bbb3695a7f3a4eda3883 DIST ruby-3.3.6.tar.xz 16398228 BLAKE2B 7e2fb58ca1f5ee7ab9c2fd7b24fdbf9eef9805329cdf23c9926bac0268344f101475c2c7aacb26f73c4c5f73704727e19a9cc074c4587b9c53a115d6fb0a5e85 SHA512 c4b86188bf539fa737932e1ba5b746bc295e7c43b2f8cca2668eb7c88aa7228e2ce9032bbcd244a7d558a11bc842445b5fbeac3503ca7d223b63c53e08dba4ab @@ -44,6 +45,7 @@ EBUILD ruby-3.2.5-r2.ebuild 9353 BLAKE2B 6f4b528a55d584feb489bd24bc425666900e79f EBUILD ruby-3.2.6-r2.ebuild 9359 BLAKE2B 6b5a6f999bee0c942be5fcaaa374c18b1439f525ae456842eaae249cb77f9a5cd5041b3388d49be9dc21f887363e4f98cb9d05a5113e66e5ac0ecc37d8eb5835 SHA512 bec99bddb97c6bb8e475ce16d98b322cac79e0232c5d642cbe71c8d57b784a2d8b902d6af976a0628390187060ad36f580dae6e4d6f12e188f5a7f01d610e645 EBUILD ruby-3.2.6-r3.ebuild 9402 BLAKE2B 1b3abb683a2012d32908bb0b9b65ea5eea3af0de710ad8f52e10d4aae903aa1f6008da21990faeb666b11baa5e7ee0cd1b907a3c4c92d7a01f4f72fe1bc7b3b4 SHA512 9cebd301ab2f29ef7ee0cec101fb1031767224a06465237099f68f01f8baa18a3f21dca97309b069e1f91c94f4c93ebc806f67d6667f4fe17363a1b42b77039b EBUILD ruby-3.2.6-r4.ebuild 9518 BLAKE2B f1835631f045120e282ec2a77de5c432cb6d3f2cbe5be1713067c85b5275f2ea15709284418ec7b25164fc617f0e9cdc57845600c37cf787f546b403d6456bc6 SHA512 77057b210a90e99e0c81c0d07d61c34601e9c08ce75a9c6e6e58acfd19f0e8addbf8a56c61cd978511a3b14c20199bd3650ab73d13a7feec534f7d74adabc159 +EBUILD ruby-3.2.7.ebuild 9492 BLAKE2B a3c45e3b3be316426c707f60cbb312ede91ba673b77b2b1b291cb9b84480e85c34adb04cbccb41a17be9d507cb3d0de8ed9b9f835fd4928c52aff235ef85dc21 SHA512 c76402b0dd582c98af34771292fec925b4ebe4cf4d7899a1b1605bfa2856614e36172f9da2be31f1b8f93007324366ba3610bebf458c4869436f5b04c21ea30d EBUILD ruby-3.3.4-r2.ebuild 9342 BLAKE2B 1fb9189635dda8aeec17105c784b4fa5b4158853c2d4a51a02f640067b9d6b5ed9e268a99df931f197bb877c6c38b5eea7975775235d3b19909a74ab36339844 SHA512 019a14c2ba878385d12ef1fcfa00c4dcb09c504c5d36817822989b883eb76eca17558cd78548c3777b740346c0db570c1b8c1cc77c593d557685ff1f60fbf19a EBUILD ruby-3.3.5-r1.ebuild 9342 BLAKE2B 1fb9189635dda8aeec17105c784b4fa5b4158853c2d4a51a02f640067b9d6b5ed9e268a99df931f197bb877c6c38b5eea7975775235d3b19909a74ab36339844 SHA512 019a14c2ba878385d12ef1fcfa00c4dcb09c504c5d36817822989b883eb76eca17558cd78548c3777b740346c0db570c1b8c1cc77c593d557685ff1f60fbf19a EBUILD ruby-3.3.6-r1.ebuild 9538 BLAKE2B 3033453c764967229bc140d0851881a471c6fb02a8366657787b4b9cb139777443ca9fd50392ffca90b3ff1b91f51ba526bd1a58d4fcd2b471c297fe201ea252 SHA512 d979cd2df7949b4fe22bb5ca28c9a39e6256df024dab2c906d9abb1dec7e843b2c0150d875b27ac07936239a9583cb0b8429105a3436be8f4858a6fecd6789cd diff --git a/dev-lang/ruby/ruby-3.2.7.ebuild b/dev-lang/ruby/ruby-3.2.7.ebuild new file mode 100644 index 000000000000..f56b339d4232 --- /dev/null +++ b/dev-lang/ruby/ruby-3.2.7.ebuild @@ -0,0 +1,296 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +RUST_OPTIONAL="yes" + +inherit autotools flag-o-matic multiprocessing rust + +MY_P="${PN}-$(ver_cut 1-3)" + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/$(ver_cut 1-2)/${MY_P}.tar.xz" +S=${WORKDIR}/${MY_P} + +LICENSE="|| ( Ruby-BSD BSD-2 )" +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( ${RUST_DEPEND} ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231008 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.7.1[ruby_targets_ruby32(-)] + >=dev-ruby/irb-1.6.2[ruby_targets_ruby32(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby32(-)] + >=dev-ruby/minitest-5.16.3[ruby_targets_ruby32(-)] + >=dev-ruby/net-ftp-0.2.1[ruby_targets_ruby32(-)] + >=dev-ruby/net-imap-0.3.4.1[ruby_targets_ruby32(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/net-smtp-0.3.4[ruby_targets_ruby32(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby32(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/rake-13.0.6-r2[ruby_targets_ruby32(-)] + >=dev-ruby/rbs-2.8.2[ruby_targets_ruby32(-)] + >=dev-ruby/rexml-3.3.9[ruby_targets_ruby32(-)] + >=dev-ruby/rss-0.3.1[ruby_targets_ruby32(-)] + >=dev-ruby/test-unit-3.5.7[ruby_targets_ruby32(-)] + >=dev-ruby/typeprof-0.21.3[ruby_targets_ruby32(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby32(-)] + >=dev-ruby/bundler-2.3.3[ruby_targets_ruby32(-)] + >=dev-ruby/did_you_mean-1.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/json-2.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/rdoc-6.3.3[ruby_targets_ruby32(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +pkg_setup() { + use jit && rust_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. + rm -fr gems/* || die + touch gems/bundled_gems || die + # Don't install CLI tools since they will clash with the gem + rm -f bin/{racc,racc2y,y2racc} || die + sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb \ + test/fiber/test_address_resolve.rb spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -i -e '/^test-syntax-suggest/ s/\$(TEST_RUNNABLE)/no/' common.mk || die + sed -i -e '/^check:/ s/\$(TEST_RUNNABLE)-\$(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest//' common.mk || die + + # Avoid test that fails intermittently + sed -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' \ + -i test/rubygems/test_gem_commands_exec_command.rb || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + append-flags -fno-omit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + # + # --with-setjmp-type=setjmp for bug #949016 + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --with-setjmp-type=setjmp \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # Create directory for the default gems + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" + + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS.md README* + dodoc -r doc +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 6fd4f3283398..b7fc575b85c1 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -402,6 +402,34 @@ DIST rust-1.84.0-x86_64-unknown-linux-gnu.tar.xz 183288052 BLAKE2B 6a9bdf25e8ebd DIST rust-1.84.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3ceb1130faa28ed9caf86b0c66471b04aa2663bf6188230fd96a0c0d4ff7a4255cb0e7e3e6e71d8a3de86798bd7f53ccdafe21285ae247d1f1718fbd0aa04d31 SHA512 bb782d01731f8aeb4a54555ac2163bbf625e83a17f5d8e10fa76217b345b247b4d653b5bada065fe647c8b19e1dc66316b1ebea252525fa194cb7bdc6370c59b DIST rust-1.84.0-x86_64-unknown-linux-musl.tar.xz 263170948 BLAKE2B d4e43adbcc8ab3f49306d5ae624340f7e7b0844821c74140997510ca40d4bf252ff698e1295ab8138bae237d079c1e3cff6a46f895f55fbb7ba2c93054e1648c SHA512 6cf083cc2cda4591314ba49a302aba2aec8fd036eb9a72b775d16561d0739df23a1f3b0cb44d6539a068a47730142b09aeaafa1b0756703c51b539851e59bee5 DIST rust-1.84.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9abf6ad52601fa64e807a71bb6af5a9fd8c3ecda5589ec7232ffdbd7884db67535a5845216fe7ab9133fc114fdc12caee436bc1bb78a163f94a021060459b1e6 SHA512 f9a0c7fa85668b034f0a0891ddc0b9d8f624589c8c9485421e199abc9a82dec481ef3491a4e1286fdf6c6863221e7761cada393697ff1da93716321bcbca679c +DIST rust-1.84.1-aarch64-unknown-linux-gnu.tar.xz 241951328 BLAKE2B 39af8e2258ee496150c12204975c44ddf8dd54f4bdd9414d774444403b9d9f997d6b0ea06c86a850ce75f8bdfb2049076b0487132d3df69fd0c36c6d290dea7c SHA512 285720f5da5eb6fc4d10c98e0d5e5961ec73fb8c99f2fdd60e7954c5fbae27f01ee1f97542af4c6181b2f8071ff0e0f4d7fb53d4019f355eedba19698af93c45 +DIST rust-1.84.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9624946128ad2d054d9f4ae3b54aa40657c4deb92a6fb44ad4f38f79ab24afa0c5a568b21ec54e62862ff7abf57102b424cc1383920f67f23be20902e1e5ab8 SHA512 23bba5bd8cf9c3ae591c6f48261b7e54be532dfcb6ffe133c6b374b831e3e00df54c89de4b6f34787dd1c5801c130b1d7b8a3168be46a97d3e412832f56c11e3 +DIST rust-1.84.1-aarch64-unknown-linux-musl.tar.xz 218987176 BLAKE2B a5ce111633f0a999754878b1ed77c5ba2fd3e3649fea2c23c85709b168bea49c110a1f04e35b67381e724c0a942837ebfce1a06f4dbe545ba2edb64943d39265 SHA512 c3d9c0c25a0a722f21cf9515ac4f9f2cdc8b37bc0c8cae2239fd9924748f92d10834a41a85672b63740a6687c0cc75be33e2aab5c982acda7cd0c0571ad89641 +DIST rust-1.84.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 7cbe4b2adf445585b3535d7590ebb8b362f5f138b3bf8d7b5b766153fa3b24dba78e41d53686693016e53abfa2e9f4dd553b61254c699c7263a37a7f9c7d8eb1 SHA512 0a1d82e92bc1b1b4997f3d60562e13aa9af578052d72c63d2f0dd4c73c8e86422882051dabaa14dcc73b15a951043a6bb8f8bcb94213a757fa373bb9b3acfea1 +DIST rust-1.84.1-arm-unknown-linux-gnueabi.tar.xz 203627060 BLAKE2B 3d6294d3d594dac9468104d5b04f087862776084d3b6f21252bab9c5f084c193cdc520e68aacf161e940efa26446183705a76c0944a7e93229a88d6bdffceb90 SHA512 18e57c4c880c88773cca087614de1a2e77c9d1977d76960fb6041fa8e89ee851ac7dd4080ac37e07afcb780186a9cf8f5f76c3c0e8eea742adacacea38d105a4 +DIST rust-1.84.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B d84feab18653894552eb42aef01582eb8ab76f4ebf6c7eb9760ca6058a610cd7ee8f68990ead59293bfb568423fee3174d8b3e6d35b286b6e944af8f2a5f35a5 SHA512 7e8c9022e96b03dfc5dab4401d630f626cc0c49bd4969de060beb67ce0bb361bfb09400e91a08a00b5ddcb445dfe26db650ead495a3128bcae17776c970fb6e5 +DIST rust-1.84.1-arm-unknown-linux-gnueabihf.tar.xz 204000836 BLAKE2B c2708c8225c7acc8c5ff958ae107bb767769442f863c52f706bdb003dc4986a3a1f69ac9bd8c6024bfc76d232a938e056532314b01eb93bfe2280f3704010527 SHA512 81f308af5dbfedbcb7e77e571dace7378fc6a85a26f1a6663f932cab718742087f9ab178a45087a27e08a67bab10563c0eaf756b75b2e245ce1dc16f23886a33 +DIST rust-1.84.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B ac95d48013eadc0d1b4f69396ac8f461edaaae396d1e917524d9138061c122004ce598de86bd392bd573cc50cc91038d741234355fe0051bf15ec176718f92c9 SHA512 2e3d06ddb8c6a8201580f726ce239edc687970e8d8ac5df201026de260d2893dd84e622fd35e28bdfc98f4eaa19802e7588ff90930a9fdc3daf565907e62a0b5 +DIST rust-1.84.1-armv7-unknown-linux-gnueabihf.tar.xz 209293460 BLAKE2B 847b7ceebffe51508f0c59c26f17344e8a30ecd0eec1f777af5314a96a17522c889d1803cceceeb5a1e240ca5aadcebfb626d4f83bf276aaf2a7a57a4ee303b2 SHA512 023293e977ecdfc50454a171751755c48916aeb5301bff166dbbd3835bf849bbc0f85c08b61c7411938e696e5394c8bcc6cb6bbe135dc8b899c6d0a010da92ea +DIST rust-1.84.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c9043e263fea338940d5f7f3d45de307a0595106c5ebd4ac1f9f10fbb37d937ce51e845efbde6b093f66ceba40607d632b9f23d2ea885dcf9b887eb371225e31 SHA512 076aee4f5b93ec6478bdfb9ccbe614073fe4ef0c195b60b5c70e154e429765516a522d5c4a2bdb6fa1df0110d8fad60b354791c4c65ae01c014e2a9b4580f853 +DIST rust-1.84.1-i686-unknown-linux-gnu.tar.xz 236617104 BLAKE2B e4120991b23f8a253be7e9bcebcdba2947b9d21cbedcf02e4275fe854472fc9ba6ad87946c31c5aee0e46757b41ee393d35d5f3bb1a9eebc4a50817e4bd267ea SHA512 3b4e67c34fdc906a781de545bb82cf95f90bf762592f22f262a5efefbc5726c06575cc5c3ebbf8ca8c7d45950368cadcd6f6dcc208f096d811a8bfb0ad53b6f5 +DIST rust-1.84.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e18c919dccd29dc5521265db6f985ac53e9ccc2f4d7e07aadec2587e2a769acb72ee3249dbf2793679953b42e18fd957fff7ee3344b207ea1cda1e56dd4e91ab SHA512 60b34315ac9de14986d9cc05b1c40e4611ade8c568a288969d4f2d5a42cbfc930f11e7c628af9ad9707180cbbcad3c4e566f54538f8c36ff867663a25e2dbf8f +DIST rust-1.84.1-loongarch64-unknown-linux-gnu.tar.xz 234696928 BLAKE2B 947b5e165c1763f6d24778d8eb88c4779e68e4f1b6333ebd429795c1e61bef773a33bea4450bfe16951c00e45e5e3eae2a1f80c9f127b57c08858f504d9f2e8e SHA512 edaaec4c8c260ffbb4f78c4c64fcf23573055fac6de3f545100efc266b0f41a35f4f49964c404efa7950fda1434ca061063d6d0e354b6042dd2b64f3b16fe8ea +DIST rust-1.84.1-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f4c848f1f0f9b77c128e848b62d1f91b2b20e6ffcc4038da6556ffc59c5bd6f5d4139f8e617f5a1ebe8106e702123a69ac6d8c8be95d189cc933bd21248563fa SHA512 2bce7fff1c7370ae3af8f9ac4c75ee3d503a9bf85b605a98442a1fbe7b88a89ef194b7d1c34bb6a08d6696bc675cd220e787e05b4955b0e12f0aa62ef2545497 +DIST rust-1.84.1-powerpc-unknown-linux-gnu.tar.xz 225950144 BLAKE2B 036db582096a06fedf5e97467d02ddd75dd027836f38814c0fb52aea46afaf7aa769c030d572099adcf2e541df9d85ae6fbf9ad806af5a443bd2507f359ac2f9 SHA512 27cd36ef0243bdb367ddeb941654227eae2a412036f9d7dcd8d8c78651ab83bc9e5313fafdad355a155b726aba9b32731a66f88cb9ab91e30dd7abdf5803e1b2 +DIST rust-1.84.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1fc0a161cac7ba4aaf273d3a6f130ff86beb1ca7e539b50cc948a4e4b5bb8bb857e963d4d3ce2ca4573800336791d4bb1aef9236cc3ee228500feb48b0800584 SHA512 8d77554d446a7e696d0ddba29ad4578629678c88a2ba905415e4207c608cade8da2c67b7dcbd446210dc1a4e3639f20bebef1a15a9629da95a5a1be65e4872da +DIST rust-1.84.1-powerpc64-unknown-linux-gnu.tar.xz 222960252 BLAKE2B 56271e4c45216bdd422b5281022cc8db1b9a87475e983e1a7b43ace3937fe3f3743f6af6ff30eefaf1d16a147e273ab240b451b57108bf80112980b641ff8847 SHA512 1aa08a1cf7c3e40a6adf763306fe73197e8663ecf7d29cd266acb68ff60d7743836d7f7d9e9cd7c8f6bfaf61ed5452dbfb176b6c61181774b4fde7321e0c7941 +DIST rust-1.84.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c174fb8700c97b07c6e573ca8ae2df57daa9bff308584f2855289fe7eece81ba72eefd0e01cee29a694cf3eddb25da7f492c4369e5360fee62692ae2fb2f1315 SHA512 3532057cd95219cbe7483376ceee24b3844f4148b9436bc6da0c9ec6c75a6b7e5896044d06b53d7e4b0965498693fd22238b9a7d2bc5eaaec8abb55cdae084f3 +DIST rust-1.84.1-powerpc64le-unknown-linux-gnu.tar.xz 235702728 BLAKE2B a3d113abc5eb3855e9abb4aa8428843f2ef682ae2786612370e4dfce662afd00ef665fa4325d0b270703e6a0e3fc52214e20713169c46bb1d9fe0bfb5ebd1273 SHA512 3962689137db3f59a4894b1f6b5ec87da7f96a384da0fec8d4722589b1852ba8ffd3ceb5de5f1d83f8d3d4eecdf38bb54b8b913907f13a681849e5e50ec643b3 +DIST rust-1.84.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b12ca2366aa878274e24ed2d72db053d82b6b7c79b52e015841d708be8a0ff4d2950dedbd46916b0b3bca5a459b8abd674b7ace7fcd7f75d2728574f43e8a57a SHA512 1dc026ce19e375a0075df381e35921d841ad79d9be440dcc602810114d2bfad0eebd3c1cf99559fe30da599a0d3d995ff2579bb75a535c92091b0d6d579da316 +DIST rust-1.84.1-riscv64gc-unknown-linux-gnu.tar.xz 222166452 BLAKE2B 9a0835109e1343f745db303d44deacbf81e0fc8f8d1ac4724dd503a6a6c394c82da3bf677d32bc72355606bc065c69fc37a3af1740d6b4e22d3dd4b12f1bc764 SHA512 788febdfdb46e41092665b828bd53fe98eb0bc04ba750845a5308b6069364dfb71b06f18c293d42bd0f608910c294595ecba821335cbe2f5a4499e663e74db36 +DIST rust-1.84.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7ccccbef2b78d73eb2526d1c33adb20b145acf3ba1db234ec88a6b512c5bb7e0236892bd3593431eaaa670c98aa44d93ccf35ade406ab4321d058f6338fe37e2 SHA512 554b2cc566a5cc366eddb6de3c62862c0a39593e5331fb1f50138f5abae521e52e397470e1c841734d29a49ab31a24c02201c0fdf42c37a75673cb29e3744b95 +DIST rust-1.84.1-s390x-unknown-linux-gnu.tar.xz 225661352 BLAKE2B 1ca5afa5c46eb65acbd85925971ed8eeb2bf87aaeb1158616e5ed0f7aeac1a44e262b333a56672a56bc52730cdb0cee56c825d4c45f0ce016591b3996b07e32f SHA512 4f8e1a74a8c29243f6220b1ff4cf694f7ad8afacb5884b05ef88d7bedb05fe2b4a34b38d614e7d72b94c2a923c0c7de733c36f3d51e8dbf3bae9aadcc01d45df +DIST rust-1.84.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 44d6ea57f512ec3ae7e10bf475ce50eb1d4955de64033ae2c4f715be3323ca0c308d3049f3b18f194569ab6eca47abaa205607c8efb5d99432f5bae5311581d8 SHA512 fd447b1655a7033c5b22cbf4401e52b755867ec60e5bca1fa01e9b05e730c20f9c23d6eaff2c3e71287406ad823b25eec252d41187703937b638fab15c1c49dc +DIST rust-1.84.1-x86_64-unknown-linux-gnu.tar.xz 182944280 BLAKE2B ad8fd7b70e8687802e79a31eb913aa5f3dec61521bb98667c250988ccf69932d36fa94d15de3219aeb7820e776a818dbfe9a16ef9cc59059a7ac2d8e8e4e92f0 SHA512 cdc3ac3f8a3fd890bf6d43cd920bb72a077c66f273077409a8dea6d8a9a1f747169aebc5f645202a422c50b1bac5c55691e57a7b46b5b24bf2f1bfe8ad7ddb13 +DIST rust-1.84.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cc4f3a136c7b137743792db470427a0d7823ae37a88c52b7dce35cdb72602557119fa68d01e4fec338556148dd7d760b3b95740b6e23bf45e80042d9203b50c9 SHA512 1b6e80910fc91997badc3113412b177d136495c22c02a4483e0bf221e609617ba05a30f8756ad72931fa92cd1d837ec15c579ce27bcef65629622648880a9fd5 +DIST rust-1.84.1-x86_64-unknown-linux-musl.tar.xz 263174048 BLAKE2B b3ec6201d10e5044ab27954a515a27d582a5aba75bb32437d4df2037225fc13fdaed68537add5baff1f390600ebdeab451a000624cab3a0a34b178043f0007b8 SHA512 f0c40edfdfcbef8472d0cf3c1bd167b2c7d9c238147048ad9d45ac8fac7d41b1e311757974fd6478b531c6788005aa4003c22ce223b47a2ad6444df10cfe4805 +DIST rust-1.84.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9424c40f72bda9334c904fea44d91ecd229c15e571bc6840831d90ce8e535cd9bfc472925baf155ced21626aa74afdc8f1d143233a24952a1bd59d84c8e56322 SHA512 0cfd282306cc4596d6c10f927277532be276e06c0ecde2e695d06159729ac4a99148b0a8db3de3ede4e81e1bd4a67be74f8e9e696f445e83d10394f1834b73e4 DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4 DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd @@ -414,6 +442,7 @@ DIST rust-src-1.81.0.tar.xz 2901440 BLAKE2B 7ad2855c21728cc323108f7e45416a425a22 DIST rust-src-1.82.0.tar.xz 2966368 BLAKE2B 4162e7393ac21a095ac1541ea7b62fafa561ce2153bdd2b3723d0f2e0130fb2fb1325ac8583d87d64b6cf6b76400d12aaac144c781e89a177483adb46854c81b SHA512 4f7817eb16dbddf15ab09206738569370c42abe117086b085a7cc8f7174f9c2b42571707558642c72597236610eeeca32575b665acbc2cbc4f7709e624c16cc4 DIST rust-src-1.83.0.tar.xz 2998424 BLAKE2B de758c5bfb29865a3ab7ab02d17b0282272fa7d1cf5da333a6a19d6a16813320317785e9bab02e3ba9ca6ee9f26e0c96b00a117f33b74c82b13ece44133e3130 SHA512 e1f0ccae1fd4202d86cde1f1e2f4491983ec49fafb2b9eaca6260e9173bea0e0cc2567946e48e3ce48f0a620f63dc44d30334f06c935628158de110d43c7d53b DIST rust-src-1.84.0.tar.xz 3016148 BLAKE2B e948d4edb88f81ecfb49f56a3ca6331c4e9de17bd9f56af823e1cefdc5098abebc2bb013d7c12ca1713a43fec588f33befcb7146713eeade1511914f70146d62 SHA512 ccb45d57c7cdac311478a5b4689144297717e6404f9c4fb168127804f13f72c15433b32765f90ce56e6f34435229e754241cb3656b28a4b33c6070b6f79b7c53 +DIST rust-src-1.84.1.tar.xz 3016012 BLAKE2B c9edeaf0797a22e384c54b3fe3e7c833464c09f8828474e05400a561a369d836626387caa495689e4b14fad691a85d6859098c84347211a6f79e2ef2c8d9d6f2 SHA512 564c440a05b67fd3a5dcb4dea21800d32ae65ca12230b804b5efa4bd468fe1b185bd7ed89041782018f70f60afd7554d7755edbe20e9cdc930a9fad390deb317 EBUILD rust-bin-1.71.1-r100.ebuild 7172 BLAKE2B f8b6f4910cf00212f0d7288d10d29c72d88826728fddfc77f47a782103564a88252837931c699ea9cf7586e4d9507bdae2a3354df262414c368af95a2d0bbfb8 SHA512 24aa046084a58816a2d3a949826945e294ab2ddacbc1e2ccb4cf1914065f3e52f7c3f680330939194b29149a3384c711efa09a261277d4b2dec6aff6660142a9 EBUILD rust-bin-1.71.1-r101.ebuild 7172 BLAKE2B f8b6f4910cf00212f0d7288d10d29c72d88826728fddfc77f47a782103564a88252837931c699ea9cf7586e4d9507bdae2a3354df262414c368af95a2d0bbfb8 SHA512 24aa046084a58816a2d3a949826945e294ab2ddacbc1e2ccb4cf1914065f3e52f7c3f680330939194b29149a3384c711efa09a261277d4b2dec6aff6660142a9 EBUILD rust-bin-1.74.1-r100.ebuild 7515 BLAKE2B eabe846ec482e04cfe068420c8315eead88dbe229bedf5f2809b492dc360bf5f34023c89a68b62d1f92c5a3ba628bfd8c861e83980925f74c61d95d3f106db2e SHA512 e40c66befee2c16b579b630de2e0aae00eb5bd72680bd6ee724ab52f434dfc725b2c377d725d95a3500be818acad973202e9b802762adcb1b54cab0251280d2b @@ -434,4 +463,5 @@ EBUILD rust-bin-1.82.0-r100.ebuild 7824 BLAKE2B c62734b23b47f074ec71ef4c9ef36255 EBUILD rust-bin-1.82.0-r101.ebuild 7824 BLAKE2B c62734b23b47f074ec71ef4c9ef362551a94a0d8e2949573433a34809647d93e86ff7afca3d017dab587f5789a36789fb955776641d96c32acfb58fc4845a526 SHA512 af1536ddff50283b2712f8d383daedf3397705a26a9b8d8f1ce802cb5e5c2e04fdd23fa1ff87dc4ef9a9be597504bf828fed578c22d87bd57f93055177656c19 EBUILD rust-bin-1.83.0.ebuild 7810 BLAKE2B 484806eca705b0b19f0c99fd9c131fed70c1b64e516a92fe7b7d54935757f1e2ea150269cb105bf6436e462ef1cecbab277786113f6d0201b46c92a7b71e043c SHA512 f1ee0bac3e9895824a918a83a96027bdc8acb5d61aef72ada1c416b4fe11460523ed24944e9ecd3ecedad18a6d656023d6882d6808562f5d62d7d6563b2a6936 EBUILD rust-bin-1.84.0.ebuild 7817 BLAKE2B b037a3419c1de744417db49366f198de35ff73f3ea3d9aefe5c0d00c3f9bd6f438ed35f6258fe184857788864797b204ffd0e2bb6df07ff3308f4b568cd59497 SHA512 f6c12ce632f940528478f04678a15c5bc8f8368fb2613e6d8347dff29e05efb449d9e8ee878d71f93fb3f78f3ee328cc9d04154d1c3aac115d834121fd196017 +EBUILD rust-bin-1.84.1.ebuild 7853 BLAKE2B 7e9502afc30d27b7462be013bedb2d964dbcbec0e934da00040cf9868c04d5f129b4f09680687bfa4a03cc47d7257f8fcf74fb54a40dc17bae5746f6d288ff25 SHA512 6ae9cc189d97f94867834edba7159c727c6c8d2744e4d27dd8b3321da66198ac3707b91d71ed02b49126deb53247ac94c614dbbcc887c6db7579467c0821c31b MISC metadata.xml 1062 BLAKE2B de2d2adcb691a3e614457dd9a7f5d4a8eddffd548b2de8a229b6d397ae79f7e24484512a1fb2a85e02aa98c240ae73420dbe48e45790c0cd3f6381ef5a4ac24b SHA512 ee4d08b8eec8abd89e051ee5ec6cc928bfde7039b815d4539558d71d7c0576aea939b7781b4998d3fcf2c2e8752791d53c0ba6115df07fc2243c470b2a7467b9 diff --git a/dev-lang/rust-bin/rust-bin-1.84.1.ebuild b/dev-lang/rust-bin/rust-bin-1.84.1.ebuild new file mode 100644 index 000000000000..49153835aaa3 --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.84.1.ebuild @@ -0,0 +1,253 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL="yes" + +inherit llvm-r1 multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal optfeature + +MY_P="rust-${PV}" +# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src" +MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz" +GENTOO_BIN_BASEURI="https://dev.gentoo.org/~arthurzam/distfiles/${CATEGORY}/${PN}" # omit leading slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" +SRC_URI="$(rust_all_arch_uris ${MY_P}) + rust-src? ( ${MY_SRC_URI} ) +" +# Keep this separate to allow easy commenting out if not yet built +# SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " +# SRC_URI+=" mips? ( +# abi_mips_o32? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) +# ) +# abi_mips_n64? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) +# ) +# )" +# SRC_URI+=" riscv? ( +# elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) +# )" +# SRC_URI+=" ppc64? ( elibc_musl? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64le-unknown-linux-musl.tar.xz ) +# ) )" + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + sys-devel/gcc:* + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +QA_PREBUILT=" + opt/${P}/bin/.* + opt/${P}/lib/.*.so* + opt/${P}/libexec/.* + opt/${P}/lib/rustlib/.*/bin/.* + opt/${P}/lib/rustlib/.*/lib/.* +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then + die "${CHOST} is not supported by upstream Rust. You must use a hard float version." + fi +} + +src_unpack() { + # sadly rust-src tarball does not have corresponding .asc file + # so do partial verification + if use verify-sig; then + for f in ${A}; do + if [[ -f ${DISTDIR}/${f}.asc ]]; then + verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" + fi + done + fi + + default_src_unpack + + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die +} + +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + + # start native abi install + pushd "${S}" >/dev/null || die + local analysis std + analysis="$(grep 'analysis' ./components)" + std="$(grep 'std' ./components)" + local components="rustc,cargo,${std}" + use doc && components="${components},rust-docs" + use clippy && components="${components},clippy-preview" + use rustfmt && components="${components},rustfmt-preview" + use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}" + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + echo rust-src >> ./components || die + components="${components},rust-src" + fi + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${ED}/opt/${P}" \ + --mandir="${ED}/opt/${P}/man" \ + --disable-ldconfig \ + || die + + docompress /opt/${P}/man/ + + if use prefix; then + local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver> + local ver_i="${i}-bin-${PV}" + ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die + dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" + dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" + dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" + dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + LDPATH="${EPREFIX}/usr/lib/rust/lib-bin-${PV}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${PV}" + $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") + _EOF_ + doenvd "${T}/50${P}" + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + popd >/dev/null || die + #end native abi install + + else + local rust_target + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust-common/Manifest b/dev-lang/rust-common/Manifest index bd4112bc7f4b..d18b2dd3ee30 100644 --- a/dev-lang/rust-common/Manifest +++ b/dev-lang/rust-common/Manifest @@ -6,8 +6,11 @@ DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a320 DIST rustc-1.83.0-src.tar.xz.asc 801 BLAKE2B 3bacb43d50ebba579dc2d4f1726298a7887e303e15f039ef72b840e30d90bc2cf9cdbe4617a9ee113a2b1a48f1982e72cf30323d72cdfb9a65b5b4d734ca0024 SHA512 84b252ccaddc06cb05858ff64f582dd25823818c81b1e3a00362deeda06f09e6c36948fd316d5f0ca5e24949e6f99bb14a14dbd2af1cfbb85e679e27ab0a813c DIST rustc-1.84.0-src.tar.xz 354993944 BLAKE2B e4697d8a9f42484556ed490390aef535b2214ccb3715ade57936211c1c637737da5f2b9a6c53a30df0fba1744fbd80d4d1382c0b74f6b36b36098bf187557201 SHA512 9e964c1b964e74083a9002fa04b072fa8fe7a520b24ad55e88a89bb2a2a2cd5727c5438d6db425b824ae7502ab215c2dd3f49777efd65f76bae09965df2e070a DIST rustc-1.84.0-src.tar.xz.asc 801 BLAKE2B b1846702f36b92c479499f5eb704ce1e272131fc1b6b625c8d64c873a82ed79b1de8cceb1f21ae4b9dccf81e258547debf367b7b769ac94ed10a59dee18f79f1 SHA512 5ada0e0fed9901044eaa0d7cb657f685c7e183e91245714abe4a0a8bf3062a7de281932c7de7587220df0542511f6011d057bd8bed19d98c755eab74091cdfdb +DIST rustc-1.84.1-src.tar.xz 355078168 BLAKE2B 849e8c909493bf76ce9749b9dcb1967180223b91a41d690bc477e78557d4e24949c9a8d8276d824af8c54ad62bc4a998e7a8efbc0bbd2008a4f64f51a7690d48 SHA512 f1cc4765736551508408126e44086988e8ddc30c1a929bf7b61c6be85ad0d65928dd5fb1041cfaeee8eb37d2208f2c1917e276aef2bc9a8e40e34f6713b349e1 +DIST rustc-1.84.1-src.tar.xz.asc 801 BLAKE2B f3decd3470fd1eff33adbb376490a30eb8db28dd4176bde0fefe4f60acf79c3dd0e1a330d519b5319360136ea7d0a124f6720dea08617202d9e9298da992ccf6 SHA512 a241fe3efba293f3e872b74f09dd0d184e0239afd1416326d57bf1134d92721c65b187f5c99962b51671877a539f18e82d2d797c76af42615c11a8bb3905f796 EBUILD rust-common-1.81.0.ebuild 1442 BLAKE2B 2fca9110584bab02d27116bb7384ef4cdc0cc42323b469473f76fa09bd15fd4dd24a4597769d453d12c8e06b4305614d50120099feaeb142c2aafe29dd610348 SHA512 b948bc84b48deb6249c61d977dde1489374f5e0df679540a254ce4211f148eb5fff00fa4970bc63a07d4d08328fa821cee1172c388ddd8b48c1c0117a1c0259d EBUILD rust-common-1.82.0.ebuild 1442 BLAKE2B 04d044c0a244ce4e62fd4a8ae096c29c1972677e61ea3c8dd267817deafcdfc305087dc17b021e82376f96888d2374a9de774dbeb6067ee335a2f41dc87918c3 SHA512 279e84b9fba7fcf68c7b8666882411dff77d056258f8e315c141b736a910377bec28020d11fe09ec42921ddeb746e34cf2b8ef3f0503d4578cd8faeb416f257e EBUILD rust-common-1.83.0.ebuild 1442 BLAKE2B 04d044c0a244ce4e62fd4a8ae096c29c1972677e61ea3c8dd267817deafcdfc305087dc17b021e82376f96888d2374a9de774dbeb6067ee335a2f41dc87918c3 SHA512 279e84b9fba7fcf68c7b8666882411dff77d056258f8e315c141b736a910377bec28020d11fe09ec42921ddeb746e34cf2b8ef3f0503d4578cd8faeb416f257e EBUILD rust-common-1.84.0.ebuild 1449 BLAKE2B c75e4ec75e326ac31c632fee456df989b0eb24dfefa8b34c10b28223c67778343eb0c3f00be3e956949a46b912d321f9632ce07d1fb1dbe0bfa3d5ec3e6cf96f SHA512 110b0a401b560ff5f55075dc84df869a48257231de52cc8cd0661c50060963c9a1d32f96b149a5bf44dd3f79ab9a2140664ef39dd2b6fce2f8390ac893df7f8f +EBUILD rust-common-1.84.1.ebuild 1449 BLAKE2B c75e4ec75e326ac31c632fee456df989b0eb24dfefa8b34c10b28223c67778343eb0c3f00be3e956949a46b912d321f9632ce07d1fb1dbe0bfa3d5ec3e6cf96f SHA512 110b0a401b560ff5f55075dc84df869a48257231de52cc8cd0661c50060963c9a1d32f96b149a5bf44dd3f79ab9a2140664ef39dd2b6fce2f8390ac893df7f8f MISC metadata.xml 324 BLAKE2B 25e471eacc689a8af7e0251146bf712b020a10d55e3cb48285f174996ec66db8bbd146d4737db15ac3b2abf3e1f0415277b9bdca84d94f9b08a56e9242a4fcbf SHA512 723c102ec7017eeb72bfd6f37c16e2705e61bb626a93e5127eca2275a9367cefbccdd846fe8a699bc1192ae52cafe236f3fb6261fa6db361564b34880a9db2fb diff --git a/dev-lang/rust-common/rust-common-1.84.1.ebuild b/dev-lang/rust-common/rust-common-1.84.1.ebuild new file mode 100644 index 000000000000..0969c3472e3c --- /dev/null +++ b/dev-lang/rust-common/rust-common-1.84.1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc +inherit bash-completion-r1 verify-sig + +DESCRIPTION="Common files shared between multiple slots of Rust" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" +fi + +SRC_URI=" + https://static.rust-lang.org/dist/${SRC} + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +# Legacy non-slotted versions bash completions will collide. +RDEPEND=" + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )" + +src_unpack() { + if use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/${SRC} "${DISTDIR}"/${SRC}.asc + fi + + # Avoid unpacking the whole tarball which would need check-reqs + tar -xf "${DISTDIR}"/${SRC} ${SRC%%.tar.xz}/src/tools/cargo/src/etc/cargo.bashcomp.sh || die +} + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo +} diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 9da5db1521fd..39d618e7d56e 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -17,6 +17,7 @@ AUX 1.82.0-dwarf-llvm-assertion.patch 10589 BLAKE2B 2fe6a9e5cb4714c310539cee24c2 AUX 1.82.0-i586-baseline.patch 1818 BLAKE2B 59f396cbcc9421ae9394d0bb51053dc9addb8ca895ea8c4d7633b56361782b65f4e7f0699dec2999f2e188b4929f9036991444187f8ef35f6fea176a01999f83 SHA512 898dbde6a2f3acbe7a50023b88d3280ae85125e2bb99d18823174b541972766cf75a3457a34a024cea7348537fa6854af6ffc975abbc19323a20de87cbf5e5fb AUX 1.83.0-cross-compile-libz.patch 915 BLAKE2B dbb726de09c9c957f245ecce29c597f4c9c26bae0c14901c62ad51349f02d47c69fa687bd926f7ecf47aaab4ac5aac9378dfe7fa0a66dee95ff1765c5aa9b0cc SHA512 b9127b7656b8e5f79db3157d9425f97af0634088fad512e572357797a2f24f9e9c3635e06ab2efc5ad8edf86ffcab53adbf013e29162579642a382d0015ab54e AUX 1.83.0-dwarf-llvm-assertion.patch 10432 BLAKE2B 27f7c4145cf3046e7cb74071b72c5d7a4a3cfbdc97530c588f82225ecc8a76692d228804c3fb8e7f356d9e76b982d429fa369dc5f4607d8ad91e3a486c7cd5fd SHA512 aa0b4022f00fe126953d7d9bb6759c5ef1b6deaf7dd387e031e74c9d1cbcd6861c673afefdca5f494015ddcb64f23297f1176f22d4f3b63ec3dbd0c39527adfd +AUX 1.84.1-fix-cross.patch 1406 BLAKE2B 3af3e4d4c52c37a4580f1ec56d2b79f2751ad017fce4e5d615e74a495acdb7a6be2e0d1e8cb6bd6c2d30a1b739444a11e20e8fd4eb002cc2c1f17ac1167e5a04 SHA512 4dd606ed7a7d026f6209fb8e7507afee04dbc3be5956ef338fc1810385e9ead568f985cac63c8d1582c16153b597a46ec97cfbf677472e4ae28e7159243a5079 DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4 DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677 DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d @@ -41,6 +42,8 @@ DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a320 DIST rustc-1.83.0-src.tar.xz.asc 801 BLAKE2B 3bacb43d50ebba579dc2d4f1726298a7887e303e15f039ef72b840e30d90bc2cf9cdbe4617a9ee113a2b1a48f1982e72cf30323d72cdfb9a65b5b4d734ca0024 SHA512 84b252ccaddc06cb05858ff64f582dd25823818c81b1e3a00362deeda06f09e6c36948fd316d5f0ca5e24949e6f99bb14a14dbd2af1cfbb85e679e27ab0a813c DIST rustc-1.84.0-src.tar.xz 354993944 BLAKE2B e4697d8a9f42484556ed490390aef535b2214ccb3715ade57936211c1c637737da5f2b9a6c53a30df0fba1744fbd80d4d1382c0b74f6b36b36098bf187557201 SHA512 9e964c1b964e74083a9002fa04b072fa8fe7a520b24ad55e88a89bb2a2a2cd5727c5438d6db425b824ae7502ab215c2dd3f49777efd65f76bae09965df2e070a DIST rustc-1.84.0-src.tar.xz.asc 801 BLAKE2B b1846702f36b92c479499f5eb704ce1e272131fc1b6b625c8d64c873a82ed79b1de8cceb1f21ae4b9dccf81e258547debf367b7b769ac94ed10a59dee18f79f1 SHA512 5ada0e0fed9901044eaa0d7cb657f685c7e183e91245714abe4a0a8bf3062a7de281932c7de7587220df0542511f6011d057bd8bed19d98c755eab74091cdfdb +DIST rustc-1.84.1-src.tar.xz 355078168 BLAKE2B 849e8c909493bf76ce9749b9dcb1967180223b91a41d690bc477e78557d4e24949c9a8d8276d824af8c54ad62bc4a998e7a8efbc0bbd2008a4f64f51a7690d48 SHA512 f1cc4765736551508408126e44086988e8ddc30c1a929bf7b61c6be85ad0d65928dd5fb1041cfaeee8eb37d2208f2c1917e276aef2bc9a8e40e34f6713b349e1 +DIST rustc-1.84.1-src.tar.xz.asc 801 BLAKE2B f3decd3470fd1eff33adbb376490a30eb8db28dd4176bde0fefe4f60acf79c3dd0e1a330d519b5319360136ea7d0a124f6720dea08617202d9e9298da992ccf6 SHA512 a241fe3efba293f3e872b74f09dd0d184e0239afd1416326d57bf1134d92721c65b187f5c99962b51671877a539f18e82d2d797c76af42615c11a8bb3905f796 EBUILD rust-1.71.1-r100.ebuild 22077 BLAKE2B 1082eec69086f44922a4d9b4d7d0fbee5104c4653fe6320764748638389871081c5812aa0bed84ecd36f6d764e38a257c640518b3ca190797ca595506106739f SHA512 461a0bd207a4424c2512ee404202b14fdc8bf6d4bd628e38f325584ff4e452de0f3615e3a3683b2d1eae0b9498443eccb10f6800cf3c6be862f1643b9203c017 EBUILD rust-1.74.1-r100.ebuild 37690 BLAKE2B 93ff1451143f5282ef231911a3b820649052300b933a9e6fd602ce6dcbf6f88af118e2835e59d3b520ba7f09a292d71d1f9b7b7a48bbbeadaaf880ff0a0dc3ea SHA512 2709d8377472eda62ebd2d0c296b1b678c106e6cc33268823391f0e2072f06551e1bb9094017077f4bd56aa0a34bee3a329d0a6f27fd1f8304af6abcc9e9b241 EBUILD rust-1.75.0-r100.ebuild 23584 BLAKE2B ec9b5d0dc286ce5f1931df6e60817531f3ce6002a3916e47355c557693b19bdacdefd3e01d309880c8e48e53d4fc9082bab4aa2ed9da34c51df8b8c25e60305f SHA512 f759a9db473a3d19571b20669b9631446b71c508ba9cf42edc126e1da03ce8ad34478b6712f48711ee152001841d31662ea6f227faacec1fb51b625522415e64 @@ -54,4 +57,5 @@ EBUILD rust-1.82.0-r100.ebuild 23997 BLAKE2B 227d902466e31d42551be544e88839814ff EBUILD rust-1.82.0-r101.ebuild 24046 BLAKE2B d132b0109d9d1e68ded0357221609102f0e638069e4ec2bf61e53fb94b388fe67e97b5cb5ee3f29ecdc3a9f4c18a4ad6cef0e08addc248289ae3178c2e04aa04 SHA512 31f3e5bfa8345bcad487474bd8e0570c31e51a7e477d030f2fe61148e4598f069211139504a43958367b740cf38b18ff92e46e49d6080b7df8177453e9dae14e EBUILD rust-1.83.0-r1.ebuild 23279 BLAKE2B 183f2a6f686030c2efad110709d52b68c655dc374faa748f83c5d33ced7e44b81d5c321e843e8ffcd6c4d248bb8b6452986eb9f1e0b636e199404668f3a54518 SHA512 8220054d98db8bb50d9abd765ffefaafd360ad13ee566485e2f82930a8821b32c7b5e33080127e8fea5dbe655a81c8edd1563d0efa5c78be4c41d8bd4af22050 EBUILD rust-1.84.0.ebuild 22990 BLAKE2B cecc312f026169d94fdd5d435c54fe83f75bc5c6c0d3954b255d4a20dcca2a97254a7555e2c64c7961643bce0cb2779fc105cc0bf3dc6f4c1c3c3ce6f4736213 SHA512 c31e9762a00f862814865b70d7ec2ea1fe26aa7ea0c97f8795e29dc1a97e74c46d2f8381da47e11b389c112312421ee059134a29b3924a476b526ff49bf94d1c +EBUILD rust-1.84.1.ebuild 22975 BLAKE2B c15b5c751ce0190fbc1954e9729670b1ac22d8debf5b4c5afd574f7e4066b4278b4e0439bd957859fdc955e4e0aca1a4957aa35054de627f6618bff0fd99c771 SHA512 e2dff3275242878eabe607ff4f493ef9760869fc75f7950cd2941ed4f718b703ba8bba33018aca5544bf88a87fd0b346e7dd52756a911fba3a0a033ccc181145 MISC metadata.xml 1841 BLAKE2B 48a8167ae44a7f4892b917895298627ac920af6c488180980e65bdeec53b650455fc6d7dddad0a7a8257d473080082377fb6b6df6a834b294b6e6485e6784a1e SHA512 1f5fd792b65ccac89a61233004980d9f7cbaecea5d05f35f9cc2dc9cab4e3ccfcd46828e88770a1b8ba5ca23064b6a75eea72a0b32bcce52bb399b85ac95f755 diff --git a/dev-lang/rust/files/1.84.1-fix-cross.patch b/dev-lang/rust/files/1.84.1-fix-cross.patch new file mode 100644 index 000000000000..47d7766ae951 --- /dev/null +++ b/dev-lang/rust/files/1.84.1-fix-cross.patch @@ -0,0 +1,30 @@ +https://github.com/rust-lang/rust/issues/133629 +https://github.com/rust-lang/rust/commit/a24d859f19bbefe5371694f318568b0ab5a13299 + +From: onur-ozkan <work@onurozkan.dev> +Date: Thu, 30 Jan 2025 16:51:08 +0000 +Subject: [PATCH] set rustc dylib on manually constructed rustc command + +Signed-off-by: onur-ozkan <work@onurozkan.dev> +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -653,7 +653,10 @@ impl Builder<'_> { + // Build proc macros both for the host and the target unless proc-macros are not + // supported by the target. + if target != compiler.host && cmd_kind != Kind::Check { +- let error = command(self.rustc(compiler)) ++ let mut rustc_cmd = command(self.rustc(compiler)); ++ self.add_rustc_lib_path(compiler, &mut rustc_cmd); ++ ++ let error = rustc_cmd + .arg("--target") + .arg(target.rustc_target_arg()) + .arg("--print=file-names") +@@ -661,6 +664,7 @@ impl Builder<'_> { + .arg("-") + .run_capture(self) + .stderr(); ++ + let not_supported = error + .lines() + .any(|line| line.contains("unsupported crate type `proc-macro`")); diff --git a/dev-lang/rust/rust-1.84.1.ebuild b/dev-lang/rust/rust-1.84.1.ebuild new file mode 100644 index 000000000000..7f9acdb9a801 --- /dev/null +++ b/dev-lang/rust/rust-1.84.1.ebuild @@ -0,0 +1,730 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +PYTHON_COMPAT=( python3_{10..13} ) + +RUST_MAX_VER=${PV} +RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" + +inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \ + multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs verify-sig + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" +else + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI=" + https://static.rust-lang.org/dist/${SRC} + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) +" +S="${WORKDIR}/${MY_P}-src" + +# keep in sync with llvm ebuild of the same version as bundled one. +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai + LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE + WebAssembly X86 XCore Xtensa ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV}" + +IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" + +LLVM_DEPEND=() +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation +for _x in "${ALL_LLVM_TARGETS[@]}"; do + LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "llvm-core/llvm:\${LLVM_SLOT}[${_x}]") )" ) +done +LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" ) +LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" ) + +BDEPEND="${PYTHON_DEPS} + app-eselect/eselect-rust + || ( + >=sys-devel/gcc-4.7 + >=llvm-core/clang-3.5 + ) + !system-llvm? ( + >=dev-build/cmake-3.13.4 + app-alternatives/ninja + ) + test? ( dev-debug/gdb ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +DEPEND=" + >=app-arch/xz-utils-5.2 + net-misc/curl:=[http2,ssl] + sys-libs/zlib:= + dev-libs/openssl:0= + system-llvm? ( + ${LLVM_DEPEND[*]} + llvm-libunwind? ( llvm-runtimes/libunwind:= ) + ) + !system-llvm? ( + !llvm-libunwind? ( + elibc_musl? ( sys-libs/libunwind:= ) + ) + ) +" + +RDEPEND="${DEPEND} + app-eselect/eselect-rust + dev-lang/rust-common + sys-apps/lsb-release + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" + +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) + miri? ( nightly ) + parallel-compiler? ( nightly ) + rust-analyzer? ( rust-src ) + test? ( ${ALL_LLVM_TARGETS[*]} ) + wasm? ( llvm_targets_WebAssembly ) + x86? ( cpu_flags_x86_sse2 ) +" + +# we don't use cmake.eclass, but can get a warning +CMAKE_WARN_UNUSED_CLI=no + +QA_FLAGS_IGNORED=" + usr/lib/${PN}/${PV}/bin/.* + usr/lib/${PN}/${PV}/libexec/.* + usr/lib/${PN}/${PV}/lib/lib.*.so + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.* + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so +" + +QA_SONAME=" + usr/lib/${PN}/${PV}/lib/lib.*.so.* + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so +" + +QA_PRESTRIPPED=" + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +# causes double bootstrap +RESTRICT="test" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc + +PATCHES=( + "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch + "${FILESDIR}"/1.83.0-cross-compile-libz.patch + "${FILESDIR}"/1.67.0-doc-wasm.patch + "${FILESDIR}"/1.84.1-fix-cross.patch # already upstreamed +) + +clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die +} + +toml_usex() { + usex "${1}" true false +} + +pre_build_checks() { + local M=9216 + # multiply requirements by 1.3 if we are doing x86-multilib + if use amd64; then + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) + fi + M=$(( $(usex clippy 128 0) + ${M} )) + M=$(( $(usex miri 128 0) + ${M} )) + M=$(( $(usex rustfmt 256 0) + ${M} )) + # add 2G if we compile llvm and 256M per llvm_target + if ! use system-llvm; then + M=$(( 2048 + ${M} )) + local ltarget + for ltarget in ${ALL_LLVM_TARGETS[@]}; do + M=$(( $(usex ${ltarget} 256 0) + ${M} )) + done + fi + M=$(( $(usex wasm 256 0) + ${M} )) + M=$(( $(usex debug 2 1) * ${M} )) + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + M=$(( 15 * ${M} / 10 )) + fi + eshopts_pop + M=$(( $(usex doc 256 0) + ${M} )) + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +llvm_check_deps() { + has_version -r "llvm-core/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include <ciso646> +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + [[ ${out} == *HAVE_LIBCXX* ]] +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + python-any-r1_pkg_setup + + export LIBGIT2_NO_PKG_CONFIG=1 #749381 + if tc-is-cross-compiler; then + use system-llvm && die "USE=system-llvm not allowed when cross-compiling" + local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" + use "llvm_targets_${cross_llvm_target}" || \ + die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" + fi + + rust_pkg_setup + + if use system-llvm; then + llvm-r1_pkg_setup + + local llvm_config="$(get_llvm_prefix)/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi +} + +src_prepare() { + # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set. + if use x86; then + if ! use cpu_flags_x86_sse2; then + eapply "${FILESDIR}/1.82.0-i586-baseline.patch" + #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die + fi + fi + + default +} + +src_configure() { + if tc-is-cross-compiler; then + export PKG_CONFIG_ALLOW_CROSS=1 + export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig" + export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include" + export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)" + fi + + filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 + + local rust_target="" rust_targets="" arch_cflags + + # Collect rust target names to compile standard libs for all ABIs. + for v in $(multilib_get_enabled_abi_pairs); do + rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" + done + if use wasm; then + rust_targets+=",\"wasm32-unknown-unknown\"" + if use system-llvm; then + # un-hardcode rust-lld linker for this target + # https://bugs.gentoo.org/715348 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die + fi + fi + rust_targets="${rust_targets#,}" + + # cargo and rustdoc are mandatory and should always be included + local tools='"cargo","rustdoc"' + use clippy && tools+=',"clippy"' + use miri && tools+=',"miri"' + use rustfmt && tools+=',"rustfmt"' + use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"' + use rust-src && tools+=',"src"' + + local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" + # in case of prefix it will be already prefixed, as --print sysroot returns full path + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + + rust_target="$(rust_abi)" + rust_build="$(rust_abi "${CBUILD}")" + rust_host="$(rust_abi "${CHOST}")" + + local cm_btype="$(usex debug DEBUG RELEASE)" + cat <<- _EOF_ > "${S}"/config.toml + # https://github.com/rust-lang/rust/issues/135358 (bug #947897) + profile = "dist" + [llvm] + download-ci-llvm = false + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + ninja = true + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + link-shared = $(toml_usex system-llvm) + $(if is_libcxx_linked; then + # https://bugs.gentoo.org/732632 + echo "use-libcxx = true" + echo "static-libstdcpp = false" + fi) + $(case "${rust_target}" in + i586-*-linux-*) + # https://github.com/rust-lang/rust/issues/93059 + echo 'cflags = "-fcf-protection=none"' + echo 'cxxflags = "-fcf-protection=none"' + echo 'ldflags = "-fcf-protection=none"' + ;; + *) + ;; + esac) + enable-warnings = false + [llvm.build-config] + CMAKE_VERBOSE_MAKEFILE = "ON" + $(if ! tc-is-cross-compiler; then + # When cross-compiling, LLVM is compiled twice, once for host and + # once for target. Unfortunately, this build configuration applies + # to both, which means any flags applicable to one target but not + # the other will break. Conditionally disable respecting user + # flags when cross-compiling. + echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\"" + echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\"" + echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\"" + fi) + [build] + build-stage = 2 + test-stage = 2 + build = "${rust_build}" + host = ["${rust_host}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + rustfmt = "${rust_stage0_root}/bin/rustfmt" + docs = $(toml_usex doc) + compiler-docs = false + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + tools = [${tools}] + verbose = 2 + sanitizers = false + profiler = true + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debug-assertions-std = $(toml_usex debug) + debuginfo-level = $(usex debug 2 0) + debuginfo-level-rustc = $(usex debug 2 0) + debuginfo-level-std = $(usex debug 2 0) + debuginfo-level-tools = $(usex debug 2 0) + debuginfo-level-tests = 0 + backtrace = true + incremental = false + $(if ! tc-is-cross-compiler; then + echo "default-linker = \"$(tc-getCC)\"" + fi) + parallel-compiler = $(toml_usex parallel-compiler) + channel = "$(usex nightly nightly stable)" + description = "gentoo" + rpath = false + verbose-tests = true + optimize-tests = $(toml_usex !debug) + codegen-tests = true + dist-src = false + remap-debuginfo = true + lld = $(usex system-llvm false $(toml_usex wasm)) + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it + # https://github.com/rust-lang/rust/issues/74976 + # https://github.com/rust-lang/rust/issues/76526 + deny-warnings = $(usex wasm $(usex doc false true) true) + backtrace-on-ice = true + jemalloc = false + # See https://github.com/rust-lang/rust/issues/121124 + lto = "$(usex lto thin off)" + [dist] + src-tarball = false + compression-formats = ["xz"] + compression-profile = "balanced" + _EOF_ + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + export CFLAGS_${rust_target//-/_}="${arch_cflags}" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${rust_target}] + ar = "$(tc-getAR)" + cc = "$(tc-getCC)" + cxx = "$(tc-getCXX)" + linker = "$(tc-getCC)" + ranlib = "$(tc-getRANLIB)" + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix)/bin/llvm-config" + _EOF_ + fi + # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; + # but we patch it and set to false here as well + if use elibc_musl; then + cat <<- _EOF_ >> "${S}"/config.toml + crt-static = false + musl-root = "$($(tc-getCC) -print-sysroot)/usr" + _EOF_ + fi + done + if use wasm; then + wasm_target="wasm32-unknown-unknown" + export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")" + cat <<- _EOF_ >> "${S}"/config.toml + [target.wasm32-unknown-unknown] + linker = "$(usex system-llvm lld rust-lld)" + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 + profiler = false + _EOF_ + fi + + if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below + # experimental cross support + # discussion: https://bugs.gentoo.org/679878 + # TODO: c*flags, clang, system-llvm, cargo.eclass target support + # it would be much better if we could split out stdlib + # complilation to separate ebuild and abuse CATEGORY to + # just install to /usr/lib/rustlib/<target> + + # extra targets defined as a bash array + # spec format: <LLVM target>:<rust-target>:<CTARGET> + # best place would be /etc/portage/env/dev-lang/rust + # Example: + # RUST_CROSS_TARGETS=( + # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" + # ) + # no extra hand holding is done, no target transformations, all + # values are passed as-is with just basic checks, so it's up to user to supply correct values + # valid rust targets can be obtained with + # rustc --print target-list + # matching cross toolchain has to be installed + # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) + # only gcc toolchains installed with crossdev are checked for now. + + # BUG: we can't pass host flags to cross compiler, so just filter for now + # BUG: this should be more fine-grained. + filter-flags '-mcpu=*' '-march=*' '-mtune=*' + + local cross_target_spec + for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do + # extracts first element form <LLVM target>:<rust-target>:<CTARGET> + local cross_llvm_target="${cross_target_spec%%:*}" + # extracts toolchain triples, <rust-target>:<CTARGET> + local cross_triples="${cross_target_spec#*:}" + # extracts first element after before : separator + local cross_rust_target="${cross_triples%%:*}" + # extracts last element after : separator + local cross_toolchain="${cross_triples##*:}" + use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" + command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${cross_rust_target}] + ar = "${cross_toolchain}-ar" + cc = "${cross_toolchain}-gcc" + cxx = "${cross_toolchain}-g++" + linker = "${cross_toolchain}-gcc" + ranlib = "${cross_toolchain}-ranlib" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix)/bin/llvm-config" + _EOF_ + fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi + + # append cross target to "normal" target list + # example 'target = ["powerpc64le-unknown-linux-gnu"]' + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' + + rust_targets="${rust_targets},\"${cross_rust_target}\"" + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die + + ewarn + ewarn "Enabled ${cross_rust_target} rust target" + ewarn "Using ${cross_toolchain} cross toolchain" + ewarn + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then + ewarn "'sys-devel/binutils[multitarget]' is not installed" + ewarn "'strip' will be unable to strip cross libraries" + ewarn "cross targets will be installed with full debug information" + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" + ewarn + ewarn "Alternatively llvm-strip can be used, it supports stripping any target" + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" + ewarn + fi + done + fi # I_KNOW_WHAT_I_AM_DOING_CROSS + + einfo "Rust configured with the following flags:" + echo + echo RUSTFLAGS="\"${RUSTFLAGS}\"" + echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\"" + echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\"" + echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\"" + env | grep "CARGO_TARGET_.*_RUSTFLAGS=" + env | grep "CFLAGS_.*" + echo + einfo "config.toml contents:" + cat "${S}"/config.toml || die + echo +} + +src_compile() { + RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die +} + +src_test() { + # https://rustc-dev-guide.rust-lang.org/tests/intro.html + + # those are basic and codegen tests. + local tests=( + codegen + codegen-units + compile-fail + incremental + mir-opt + pretty + run-make + ) + + # fails if llvm is not built with ALL targets. + # and known to fail with system llvm sometimes. + use system-llvm || tests+=( assembly ) + + # fragile/expensive/less important tests + # or tests that require extra builds + # TODO: instead of skipping, just make some nonfatal. + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then + tests+=( + rustdoc + rustdoc-js + rustdoc-js-std + rustdoc-ui + run-make-fulldeps + ui + ui-fulldeps + ) + fi + + local i failed=() + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" + for i in "${tests[@]}"; do + local t="src/test/${i}" + einfo "rust_src_test: running ${t}" + if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" + then + failed+=( "${t}" ) + eerror "rust_src_test: ${t} failed" + fi + done + + if [[ ${#failed[@]} -ne 0 ]]; then + eerror "rust_src_test: failure summary: ${failed[@]}" + die "aborting due to test failures" + fi +} + +src_install() { + DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + + docompress /usr/lib/${PN}/${PV}/share/man/ + + # bug #689562, #689160 + rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die + rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use miri && symlinks+=( miri cargo-miri ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver> + # need to fix eselect-rust to remove this hack. + local ver_i="${i}-${PV}" + if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then + einfo "Installing ${i} symlink" + ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die + else + ewarn "${i} symlink requested, but source file not found" + ewarn "please report this" + fi + dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}" + use rust-analyzer && dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" + dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" + + newenvd - "50${P}" <<-_EOF_ + LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}" + MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}" + _EOF_ + + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use miri; then + echo /usr/bin/miri >> "${T}/provider-${P}" + echo /usr/bin/cargo-miri >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + if use rust-analyzer; then + echo /usr/lib/rust/libexec >> "${T}/provider-${P}" + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + + if use dist; then + "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + insinto "/usr/lib/${PN}/${PV}/dist" + doins -r "${S}/build/dist/." + fi +} + +pkg_preinst() { + # 943308 and friends; basically --keep-going can forget to unmerge old rust + # but the soft blocker allows us to install conflicting files. + # This results in duplicated .{rlib,so} files which confuses rustc and results in + # the need for manual intervention. + if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then + # we need to find all .{rlib,so} files in the old rust lib directory + # and store them in an array for later use + readarray -d '' old_rust_libs < <( + find "${EROOT}/usr/lib/rust/${PV}/lib/rustlib" \ + -type f \( -name '*.rlib' -o -name '*.so' \) -print0) + export old_rust_libs + if [[ ${#old_rust_libs[@]} -gt 0 ]]; then + einfo "Found old .rlib and .so files in the old rust lib directory" + else + die "Found no old .rlib and .so files but old rust version is installed. Bailing!" + fi + fi +} + +pkg_postinst() { + + if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then + # Be _extra_ careful here as we're removing files from the live filesystem + local f + for f in "${old_rust_libs[@]}"; do + [[ -f ${f} ]] || die "old_rust_libs array contains non-existent file" + local base_name="${f%-*}" + local ext="${f##*.}" + local matching_files=("${base_name}"-*.${ext}) + if [[ ${#matching_files[@]} -ne 2 ]]; then + die "Expected exactly two files matching ${base_name}-\*.rlib, but found ${#matching_files[@]}" + fi + einfo "Removing old .rlib file ${f}" + rm "${f}" || die + done + fi + + eselect rust update + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} |