diff options
Diffstat (limited to 'dev-lang/rust-bin')
| -rw-r--r-- | dev-lang/rust-bin/Manifest | 31 | ||||
| -rw-r--r-- | dev-lang/rust-bin/rust-bin-1.92.0.ebuild | 339 |
2 files changed, 370 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 1ef5bf3ed9f5..061b3abe3614 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -701,6 +701,36 @@ DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz 192170744 BLAKE2B a06c63e3c534e DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4bfa68287897a1b5916c04a56909aaeaa305cbdc4a9bef377295429221e48451a6f4670929c9d35e80a0d40478352702673bdae4958a924d4124c26e888ff561 SHA512 35e678a3d164b5f198e5aac2ed1c1a6af8fde83b84c84be6e3ce51a7099ae0a3e7d25510b45a1b2d6bb99599cda0f18ceec46883982bdca6ece94eb1e381ed0b DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz 295368056 BLAKE2B 3057d8cc29bc789bd1c4d9d0779a0b2ef4b26c2278373960558a316061db72a77edf37e330eefe5c3ec66b69cf184fb46a14641162ba6ecf96f909d3ac7db100 SHA512 98a03725e216687be237358b1a6598470e98322af6cf51fc51d7ede23ae58b0107872a7f8ee2e4e69e9531b821be7145a975c86899a97728e809260b35ab7f23 DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B a8fb18793e536aec99626bf3d85890cbbbd8c2ee5e2a2917999543bd3153b026db1072419ad464e35ecc508e3e3fcb9cae450b4f590359589545fe9adbbcc26d SHA512 0c3bce48b1ddc7d97946ad5e27f8dde91dd14743577fe60056f7c6558139bab7d8aec4ce76901abd2633a61eb122bc30595779cea047ff7a714e83fda2921cb9 +DIST rust-1.92.0-aarch64-unknown-linux-gnu.tar.xz 169667388 BLAKE2B 268524a8066b68dfc2aa4fa524679b3ecc1bf47f74aab47b794eeb0a3ecc76255b7056ad1a852512a52a06802a2dc457bba8c60107d0cb9b464215c344c5430d SHA512 ade2921e938d7bc76638f7f3a47c23c35078cc9d92dbe4a6f032c74204ee41029e276479726154094d06f21e085a44b3a494649940e136a375b066952599eee0 +DIST rust-1.92.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B af7d38ab3fe8656c6234bb7bfd6129e52107b8f55f2cab7b234b74bd7219c9f8de7becc15b8f26dfb424085a15652876b62f8d8bacaadf612b4137a36c642eb4 SHA512 38ddf0d10ec9ad6b859b676c95c93736f8f5135235d0723aafec59b1a2d55e077e549d3b97fecf4b1794d120e3ecc4ed1828170df53b0ca4ea89fc252c500539 +DIST rust-1.92.0-aarch64-unknown-linux-musl.tar.xz 243864176 BLAKE2B 1f204b6b324aca414854f823bc16279444e27e9317092fe7a52f87420a1abcc3e56496baa9f69db00da3af8e81685b1fdeee53537f22910c26513fb7a4a6f6fd SHA512 c86001441d76110a5cfe79c4928997ca7d6211928607fa25f2cbbe06a279ab410d285f24c40dd112ec7d707a71d205b5b784cb465aaccbfb040895a4de44995d +DIST rust-1.92.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2e1d204cd5b420b28dcd8058c573a923df355cb6115804c8f763838d77cb4a430843f5aa44e7b58150ce4aac4920d8e74180ed94a9c2533530dfca472764822c SHA512 27d817e6390c7dede11133b75ca42d839179a62829c1376a866d2c9435c0f5f669fd55d5e8a357cfd359c3a0fffdf7315f296652a44818f313c70b76dc118a35 +DIST rust-1.92.0-arm-unknown-linux-gnueabi.tar.xz 226603088 BLAKE2B 7515c103ba35a953ec1ff76e346d4468ebc9e468896b8b63217536dd60ebc069a55d0a3a0dcea378993edbc9b80c1bf38b0cd3b6d36d3798dffc759845023f63 SHA512 af5b205a4f8cf4216adc7ba842e33165ccd9b6837d28c886a0c781310ef5afb0707826ada83fbd478c02a7365d5e784f3aad0df5526ffe64747ac3df85f5ccab +DIST rust-1.92.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B bda65222f9cd8e8197e69de7916ba20a53ed7e2a3eda62582b24eb39dbf39c76fe4b0034b3b89ef1d84fafcb7ece0c4884ccc90a4d84b5bbb1381f1cd5166c07 SHA512 c6c8b81c2e20a71eea1a6dff526708f6b6868c13f102ffe7178329f481183321f55a8e99d9edc5047dbbe33bee4ac0bb5fcb5c91abc4113b61252c84947c8845 +DIST rust-1.92.0-arm-unknown-linux-gnueabihf.tar.xz 226977168 BLAKE2B 001e8ef2b098b796801aa5d544c69325d771f5ceae18bd49666d6075d0075987e31e13bd22d8be8049850818070a0d2a371606f94a859bcb8074433c68d5cdd0 SHA512 373bbf25efae00e3f0ba291434facd0a1493dbe5732675cadf9c083be434a58faa93e0701281018e30495ecbb9181bf1dcd5440be167ac47b208fe6ff4b9ce28 +DIST rust-1.92.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e91a70eae027b9232a8d795403addce6c9ce93aa6955602ab1395921812e8279de7351fdef3386973d08cd210c78d98f6ffd6f84e01b8c42fac488e43e9c4843 SHA512 85c3cfab75724a454a6cd4e3e4acbbefbc9a424093fbb8428c3e7d61d9eff06a4d6a82ae7289b340422cf2b670fbec1d04d4134ffbf765309a941a4ed7f5e16b +DIST rust-1.92.0-armv7-unknown-linux-gnueabihf.tar.xz 229391128 BLAKE2B 0f8f124c535ffb2fee7ab3ed4a5d66ca2c80093e835ab579c2e66eb87c1014c2fa3c3e4a112976de259760fc362d8f0f181af491d0b5ad3b7a54f2219baf1361 SHA512 973e1c93f06a9db6270d2af195c74a0bb78bdb0a62661ffd5b3980c425190a4497fa4ce75cefabdc040c266fa58e65f08df6bbac480baeb67244baf00a9214dc +DIST rust-1.92.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 34d7bf789aad9769c935c8128ce27d25d60c1f2929a2be1a00454d90b332c8786a2d67f730c3964c5263e7d30bb4f102ed83d0f1e11ecddf12520ca823080347 SHA512 8d0ca423952b5ebd512f73204c0024665781c9dc827d2e0a1b3faebf721c6ea6bb2b03f4eadfba0dca6168b01f023c8bc2efcfd2e3aab8e7d757a52e394e58d8 +DIST rust-1.92.0-i686-unknown-linux-gnu.tar.xz 266952280 BLAKE2B 4bab20abbd86eecbaba177beba98cda7458bb78de8b7544bda6b645f0aef57112953135d9c6561b0563924a9d01d0e9b8d4930446f2bc7b1bfad2148b9fe4a21 SHA512 44af49ebaba392c9cab6f21fcc31bff69f4aa4ff56621909cb23970da94b774daff7716692a7b6d5913372f27c7081edc572fbc352c1984bb9bc62fb4b4d176c +DIST rust-1.92.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8b18e860fae047b69b0ca2bb76e720ff545852045267a30a1a9e40a24af1671031eb4d14749fa84a1286ec3aa0a70dff438b1698081e9f6efdddba3ff08608d5 SHA512 c24bcc5da2b0672fdb9f096a9c44c3dbf31bbae6b7339d5404912b50da8210cc49288e1391e9bb6e8b161b6248975e3b2c7a8b1d776c2b0658b25af253636529 +DIST rust-1.92.0-loongarch64-unknown-linux-gnu.tar.xz 260244032 BLAKE2B 360823455bdc56f1c12539c4c0ef24a2cca0b083355fc872eb065db02b8e78c74472770253db40b1bce593c8e397e8701f279f42c78b296a444d28926ff34e8c SHA512 889dad9bd4dc2076fc6d917fe00f8ec0ae97c5cbac73d7a83c0d6206d5463ca43eff8301bfb9a653a102eba3ac4c8b50db291667d00dca9c9e259d759208f2f8 +DIST rust-1.92.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0491bebf5609afdd7f9e7479db3e52b0742f8cc3e4ccfcb425214f047bbd8461a4c3bc99646c5f9a466f9aaac2cf0432879b2571e06b8c678b78efa2d16e55f6 SHA512 434165ef1019cf87ddcff0e9784739e2670c1c2a59a813d250a7b433aa34f2682095675bd17203abc0a4f8a7ea01c904913679c224e6c8c5495ed53a172135e7 +DIST rust-1.92.0-powerpc-unknown-linux-gnu.tar.xz 249263952 BLAKE2B 8cacfb3bcbba699f280b754d489e0fdb917fcd2e1e1083fdd10467392d29c56eb597d0bd31e98592963fa82bb507c8838763a5aba209a909b2dfb5ab3f27c3cb SHA512 6f4fb3fdbfee99bb7f2dbc70cab055c237e2e0223fa46e2272a96c2592a1160b71268b2895b95093a048e6ff784fe07ecca2709e6475c68cde8a32ab3f6bb480 +DIST rust-1.92.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a3ea0070162418a06e866ea70b60d3cf63a0e739ad916295e7dc692d12aa5a303bdc08cdc72a78f51e865f1914ded82cf2f3545f91b5b453a8fcac58cdc76554 SHA512 39d4434f767d5ce3fe869f9574ab3fd371f8687fbc1b28c1aad9fbac4e5ce8342574b97b24013e2c718936194e97e37e419919c376f531cb7f5d5a139ed3e0c9 +DIST rust-1.92.0-powerpc64-unknown-linux-gnu.tar.xz 251652784 BLAKE2B 66a6c1ce7155e33c8f75d882f746601db13b9c932cdfcab824bcc352205062998d0ca0f1b9c58f709692d344be43a0058d0228a58f34dbafa59d9d3421412b5a SHA512 090dfc19fb0ee9f156c3a24ca4965f4385c20551dfe2c6b248d335ebe6d9a12bfca3916ea27f571f67aea00e1d89371e92e5a6b128ed10bb590a8a2c10b0aafe +DIST rust-1.92.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e1100d2ba8cf241fa3fce2219e07428a0591815afc1cd4fb192cb062f6bd99ed3bc45d97c74d07a31ca27d9af2872e8dad9a8641ff66deddc6e9a7b56ae3877e SHA512 360662ba1a7b9db74136569ae8ec4e4ebefee336c35b1c85e0f0cc0a25a5caa1ecc5e4d0c6477346bff8234a8849bb3330c3c9201e3765beff8662d8fb226bdb +DIST rust-1.92.0-powerpc64le-unknown-linux-gnu.tar.xz 270620124 BLAKE2B ae766b234b330a7b16d641c376e42fa3680e33b78e7f0778ff5da61eca0b0c8e2142701cf50cd31848d750f10fe876d5494a99a7b694ede30f9aff2dc2bb8f41 SHA512 8687e2958583db9b18ab6ee9b6905b2ee571d96fed4e7de31b00e44eed75fdfe995a87aea2c09d195cbdfd5aaca1efe1a7b2d795b157992c538b678b0f036137 +DIST rust-1.92.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5fef628626696646cfda28da753336c8c6864c59a8aa20d2aecbe6c9e1009c2b49f877ceb434a4f18179ea44a68149a5bd7f82c134b05abcb18e47ecd13e1688 SHA512 d3bebb5aaaa440075c822e65fe5b5adef37180a48c39ac89dc95f97ff660ccb96928be34422535d2a24cb63ab8ff8a05f5388a696060b32a5df3ae5a8566f36a +DIST rust-1.92.0-powerpc64le-unknown-linux-musl.tar.xz 268016416 BLAKE2B 307cc8a271330dc45360b0f8cea85ad87ca2cd1523e8824a6766c6857e350c79e1ea7376fa042df1a0677fbccd9fdefa3d656aa752ec2abed72a6882af1141ae SHA512 a731bde7fac6d33575411cbdb14df72360855d014289bbc97fbf6d78cf41fec217bbf2e42733bedfcd234de7545fceb3d3d2ad9498747a6ea08367dd5dd439aa +DIST rust-1.92.0-powerpc64le-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 63eaf91d14e4664fda093f25e1b450e0c513476d4df612f4f97168719c3c697e0d3c057165eb7ce8f0d968fe39c242da31ba7df6526162b3cddb1d2f5e6bb0e4 SHA512 ade94bec00188aacd8490ca05a3c3e9099f31bba8ba4fec74c1d3790422d1dc165b62977eb8894b8e72ec65936470dc52f08a0ec8fa43fa6ddf3c30d0acf2603 +DIST rust-1.92.0-riscv64gc-unknown-linux-gnu.tar.xz 248195844 BLAKE2B e9b200abbd0e294019cd99bb3c6768615ce0bbb7609b3c723a0a57a0d697bdc438c691523f8487b14a9c9397eff0f56b02662b0eb78e057d03100d1ab8d888d6 SHA512 f032be2d3da472a989fdd47dc8ac0d2327139efc2a1b06d53e2c9a3d56eaeb82c3017f8b01ab5ef577278e51236783274db3e1dd728b079acb685bb227a68eec +DIST rust-1.92.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9be219123b6ac03badc12b9f0da92179944158c7e9f7c993e14018dfb8d1b1098845a12590b70108f264dde00d91063a2c18593e6726316e4d719952687b2eea SHA512 d42936ebfc388c03006307d897cbf938cddba4cffecbb2974afe27867207956ad6b4480d93a2f3a1272dd5bca6fde62dbc881764c85e62262e855586f5cad897 +DIST rust-1.92.0-s390x-unknown-linux-gnu.tar.xz 239174100 BLAKE2B 4067b615e0ccd321e11f475f3773336420006cc670787d9aa69185cce029961b04b53bc5f8059d2b6ebf029353b5f9af45c8873c3d63a686d00ffcb820dc2eff SHA512 d94f7e6311dd22cd169b6f60ead6b651d4b9cabf81b4bc56d9e3a306909fa21327526272231726ab57208682915089486d7055776340f05b5626e45006bccc90 +DIST rust-1.92.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3f9dbec921e6f5a2918a1f90983fd80a9fd67cb0630c66ee7cdf9dd02f9076cb3953653bd38037b31e2ad65f533d4794cc434dd503603601f239f66ce20c9445 SHA512 11be5cfd5dcf5cfee52fb7dbb7dd11eea4e4ffca534984d37b8b9aa4512917f39fcd2bc7fcbc71c8b6d406419721df39504b2af5ba551550b7d8de2105a6e3f4 +DIST rust-1.92.0-x86_64-unknown-linux-gnu.tar.xz 192171372 BLAKE2B a4d300f49db610ec30123c68f7b29ea72cf24e543e14f00d3ffafd7a41a25b699fef7b9d62be06a327d4aa08a191c3deca4b7472b7c0c99a0aefa16c7027a7de SHA512 cfef78f2a26fc5858120f5c56548bcbb720c0a25236ddba5470611e2b5c8e518e0a594b9f2a125e35e48def11c40a4f8116c21cc802a298c20e9b36773e7978e +DIST rust-1.92.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b5705cee0a257eb54836da4c351bc3e5367938cdf8dc317137c13b88a52b63361b647602c5a2f087fc145c1d490e40513ee74e232f0f5c304d71c55c4f55dc0 SHA512 15a54c497a450211e09701e7c4158dff3b4a32ed4bbc5dc36e6920de1d2a42563b7bca69180b3456b088e5079b9d07d2bd0656f1a9491e4445a4aa9eeb45140a +DIST rust-1.92.0-x86_64-unknown-linux-musl.tar.xz 295461400 BLAKE2B 9eb8a7ab9c3bbd4ab8f6bb1d6cec7c2f47461ec48144cb9bf3c6f71dc63e0db79d3fb9eddf5373626259e1bfc60a7c693d0dc7908ed651dea0478067985f9c32 SHA512 974e589f2f530b98cf378593a0b6a5fdcc39b6f163bb252ab8a7dec4270465830fd72b60b9d0bbcff44feb354a004fd2e2e2aef45dac51533a905a01e35a061a +DIST rust-1.92.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e23b48bf40fe709084f8792c563d47f1ede9e91e78d6e270b05dc58ac60ce71277ad8f72b2d67b81d7434c0f73df4d97f4eb5896c2d1864964344ab341b41125 SHA512 f427c992b45585b484fa6171d35bf56d47cdb05199ff8af35cee76e6ecb2138df31b383e3b4b786846cfdc38ebed370c4dec9573434d941c0a03ef16f9aa8945 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 DIST rust-src-1.76.0.tar.xz 2590884 BLAKE2B d1a6215dab34d7b10c3177d2b248f997d3a846388f3442567572880aa5c5bc51b56398f5d4dc32727cee7c9dbef494430d6534a76b66c4ae5ac4fed07266644d SHA512 39d2fe58fae8c8c5a6cb3fb1ef2a1c7548c018fef6ccea531659fdfecd68a4aa77125299d2cbe5b58e500337b4d074928318fa9ebce358af500d0ef27260e3ca @@ -721,3 +751,4 @@ DIST rust-src-1.88.0.tar.xz 3155272 BLAKE2B bca923d2264337366b8013c45f3a40cbdfc1 DIST rust-src-1.89.0.tar.xz 3461444 BLAKE2B b1e43def4cc0f47f0e776d383954b339a62b3efa77d5db71180b7b7620a67bd2d2714afe0b08ae26a06d7d8c785eed03f545d91813d074cbe6641e883a2d40dd SHA512 055c09854e47d1bdfc7f393ac6f2783d35cb8cf13100deb227598ad91020f1d91e4cec1658d8e71db3c266dc6e267ab4172dc1007428cb05105dc4aac57bf89d DIST rust-src-1.90.0.tar.xz 3473408 BLAKE2B 09e9d17af7acb38b99e33874cd4b14ad7e0e15b0580846cc32bc78657432b13091bcbf3fe95494c520bcdbabd5491b9445cb3ce3177fa149d0b89991b67b06e3 SHA512 88dd1a5f1a69ab9e4586fee4a31d7dea51a664ac32b501cab771739b8127eb4ac873d2353e819ef057734522c1bcd64d664bda3d1ff957b1448b4653be766638 DIST rust-src-1.91.0.tar.xz 3509292 BLAKE2B b1cf99db4cbd864fda34c2068a19e8b36c99f6bb5c2fa3c22ef7aa006d4c084bd706fff872a7f87a0ded3db3dead5927153183e4425ffd90e51af468a29db48e SHA512 8d7c5a3aa11b42d5b89b38d1167f6be64de49288738e0fd949d1fe9ac3312830301d578a13de2030b45a7c51179b5adb934deb52e1070afa76520944050baa2e +DIST rust-src-1.92.0.tar.xz 3530724 BLAKE2B 1385e8cc8062dffa69829e4ffeee7daaaeddc35c20c5e841e5183952d2eb8e3c33fe64deff46a7017057723ac3623f1b918d6a61ba2efadc6501bae36241c161 SHA512 be31d704b936d421dae7774dd7243d2a2668c54eac07f3e8d6c289a994c9e238a6e775be2735c4b609e710d8bbb1afe9bf028375e573e5d16def58a53ebc4ba7 diff --git a/dev-lang/rust-bin/rust-bin-1.92.0.ebuild b/dev-lang/rust-bin/rust-bin-1.92.0.ebuild new file mode 100644 index 000000000000..ca8b61dafbfc --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.92.0.ebuild @@ -0,0 +1,339 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 21 ) +LLVM_OPTIONAL="yes" + +inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature + +if [[ ${PV} == *9999* ]]; then + # We need to fetch a tarball in src_unpack + PROPERTIES+=" live" +elif [[ ${PV} == *beta* ]]; then + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ + SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) + " +else + # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" + SRC_URI="$(rust_all_arch_uris "rust-${PV}") + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-12-11/rust-src-${PV}.tar.xz ) + ppc64? ( elibc_musl? ( !big-endian? ( + $(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV}) + ) ) ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} != *9999* && ${PV} != *beta* ]] && false; then + # Keep this separate to allow easy commenting out if not yet built + SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) " + SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) + )" + SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz ) + )" + SRC_URI+=" ppc64? ( elibc_musl? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz ) + ) )" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +# net-misc/curl is needed for our own bootstrapped rustc, since cross-compiling bundled curl is not supported +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + net-misc/curl + sys-apps/lsb-release + || ( + llvm-runtimes/libgcc + sys-devel/gcc:* + ) + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" +[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" + +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/rust-bin-${SLOT}/bin/.* + opt/rust-bin-${SLOT}/lib/.*.so* + opt/rust-bin-${SLOT}/libexec/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* + opt/rust-bin-${SLOT}/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/${PN}-${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch + local rust_bin_url rustc_src_url + # Cut down on webrequests by fetching the nightly toml once + curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || + die "Failed to fetch nightly revision info" + rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + + if use rust-src; then + einfo "Using nightly Rust-src from: ${rustc_src_url}" + # We need to fetch the rust-src tarball + einfo "Fetching nightly rust-src tarball ..." + curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || + die "Failed to fetch nightly rust-src tarball." + # no verify-sig here, just unpack it + tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" + fi + + local v + for v in $(multilib_get_enabled_abi_pairs); do + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + rust_bin_url=$(grep "xz_url.*rust-nightly-${rust_target}" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + einfo "Using nightly Rust from ${rust_bin_url} for ${rust_target}" + + einfo "Fetching nightly Rust tarball for ${rust_target} ..." + curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball for ${rust_target}" + if use verify-sig; then + einfo "Fetching nightly signature for ${rust_target} ..." + curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature for ${rust_target}" + verify-sig_verify_detached "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" \ + "${WORKDIR}/rust-nightly-${rust_target}.tar.xz.asc" + fi + + tar -xf "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" || die "Failed to unpack nightly tarball for ${rust_target}" + done + else + # 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 + fi + + # We only want to do this for the native ABI. Non-native ABIs are + # handled differently in multilib_src_install. + case ${PV} in + *9999*) + mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die + ;; + *beta*) + mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die + ;; + *) + mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die + ;; + esac +} + +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 +} + +rust_native_abi_install() { + pushd "${S}" >/dev/null || die + local std="$(grep 'std' ./components || die "std not found in components")" + local components=( "rustc" "cargo" "${std}" ) + use doc && components+=( "rust-docs" ) + use clippy && components+=( "clippy-preview" ) + use rustfmt && components+=( "rustfmt-preview" ) + if use rust-analyzer; then + local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" + components+=( "rust-analyzer-preview" "${analysis}" ) + fi + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + case ${PV} in + *9999*) + mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die + ;; + *beta*) + mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die + ;; + *) + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + ;; + esac + echo rust-src >> ./components || die + components+=( "rust-src" ) + fi + edo ./install.sh \ + --components="$(IFS=,; echo "${components[*]}")" \ + --disable-verify \ + --prefix="${ED}/opt/rust-bin-${SLOT}" \ + --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ + --disable-ldconfig + + 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/rust-bin-${SLOT}/bin" + find "${ED}/opt/rust-bin-${SLOT}/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-${SLOT}" + ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die + dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" + $(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-${PN}-${SLOT}" + /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-${PN}-${SLOT}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi; then + rust_native_abi_install + else + local rust_target version + case ${PV} in + *9999*) + version=nightly + ;; + *beta*) + version=beta + ;; + *) + version=${PV} + ;; + esac + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${version}-${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 +} |
