mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
Merge updates from master
This commit is contained in:
@@ -627,6 +627,64 @@ DIST rust-1.89.0-x86_64-unknown-linux-gnu.tar.xz 201436760 BLAKE2B f0b77a74c27a7
|
||||
DIST rust-1.89.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cd7e0e527601b36bcb133f0fa2786bc2720e0dc35cd340acc839220cd4b13c1f2622ace457ed3dbc7dda70bcd5199873cebdab36eec0569b0905524ae68a7cca SHA512 8e366e0e70ea78dd4a6a8414fa0349c2a178dc17a11809f350f08b700c3ff3cb1baff0ff363ce9dc3532dcb2d7b7518b5b2b30c07623e0f35f7162bffe59aad8
|
||||
DIST rust-1.89.0-x86_64-unknown-linux-musl.tar.xz 292022352 BLAKE2B d1f268d67011824ce6b9b27581518620e6ba51f4b49cdcf9a215fd649550a22b8fdc9c2e154a9c6e39986e52b46036813b4d3c0c115dbd55a1ce04fc0482feb0 SHA512 e9bb0e4a45a273fb6cf1e46264b879fd410465ea2f3cc396cc8a797a744cc71a0c95db8af9754462ca1c9ec1fdc699ee64262483cbd625dffaef50476462eb32
|
||||
DIST rust-1.89.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 54b4b8a887c7fe441d3ee33bc37f6ad8f7f1b99d01f54b660bfaae0cb29cecfe7208e27cce9360db68bb275ee7aa0f760539ec3ae37fb5a44edc2365c1f115cb SHA512 666d87fd3ab91375dc081fe9a6300b945db6ffc317c8ba7f5f01e58421793d3f1ff68dd0d72aac1add426834a0bd81ce48949683ee379e60afe820c1baf960f0
|
||||
DIST rust-1.90.0-aarch64-unknown-linux-gnu.tar.xz 169265824 BLAKE2B 4b34bcfee65330296b440590700a159a76d81fe3c43b941a407d8c772e863d8d164326acc23e3648a61813b5e76a2d1f0d7b8b88933da75f332fe285bff36e84 SHA512 d32bddecfb3f33946f99427dd69d7317a85f1b08290efde32f20fbfb9a4d09cc8ef292e5f50e9d383981d9fbc086b46cf096cfa689bd5019ac315eceea8f46de
|
||||
DIST rust-1.90.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ff68adfea558cd67dc7693da6f37902af64225e62b53a85c3c78c98ec8c810734a28ca9520c4f65805f982e9fd675919e7a8d569f0de18fecc22bf499fbc772d SHA512 8900e1538800cbfb4d14780264ace699f7c8bddefb2380d478bd6352d76bfac60710f5f2fb5803a4619fc4457cd94ef943747b34b2b8bbdda6c6da40cdc16804
|
||||
DIST rust-1.90.0-aarch64-unknown-linux-musl.tar.xz 245058996 BLAKE2B 43835ccec433d02e75d5714b529ebd5ea62bcd003bddb832ead8389be6465fefce46f786b9e367285622f5a3e56969861b5b2141cef49aac83117a176e50e96b SHA512 cbfb8f5a98fe0a2f092bd81d0dcdd6e95cc62a4bd7d70ac4f0afc48e777f5f45c723df1faf238541d1b2b87d0c8a15208d59959bfa9cb2c9a64abf39cb8648bc
|
||||
DIST rust-1.90.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 78b76283ef86050edf3174e2e5a32419d324e636df11e4218a80eed371a4f5dccdc5a0c4d37a12c1f7c089bddb83bb8e706baa27217f72601930362db873d897 SHA512 8c27ba73c26d87e40424b66ac9e7c46338237624513fc203c8467e3f1fd7d6adee6e3c34be8601f41f1b7cd3df35baaca7ed00bf4aa0676c8da71a2aafb82e91
|
||||
DIST rust-1.90.0-arm-unknown-linux-gnueabi.tar.xz 228671464 BLAKE2B bc2cdcec7f089e004b9e4843ab238d1f139ff7a613e8c8fb69c780d7104bdf9903e3d7ae64fd3d64f0702b9a9f4a54ed5a7d4a6faee8f0d650e650e879b81eea SHA512 607e59b213f409abd82784540c87d17629848c567595fb9592d08354e98b99ec8246cba2242f37751d5d9666c1d994fcc588915e7045720baad072931ba2c665
|
||||
DIST rust-1.90.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B c4733ef2f18c3b017399ab19c6374c644351d46573a099982a16671edeb38ef24e28e6cd7aa17d941e590e4066f3e9dd235651630016ecc97dfd814eb968d49f SHA512 23ab313e327569e7b72317ecb277330f5f7d3dc5cb9e7969947fe758ca0aa68807687cd6ba2caf4f0b36d42eb76842be7cf8facb1ed413b3c46a364ffdd6276f
|
||||
DIST rust-1.90.0-arm-unknown-linux-gnueabihf.tar.xz 230244472 BLAKE2B 6aab1a3872471a2e64522dc30335a2242222b20e9fe4300c4c1baa5b06e58e9087f83699b33a20979feec0e820cce03a469991d4a07368e503247a1571f25e0d SHA512 831d1d7fb6879a370e6d012152b06747740339d7166447d4e4a6af7943f57bf581500df0b810febb558921199ad66c384423ceaac1d640a26f950e0608026ee7
|
||||
DIST rust-1.90.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 5479b228a2f320e574a032a64d0a736badd8d192d60529e8996ca8278b60685fe1b9103c0dbc08f88f19c26b06cdc71df587b16e55f2526de206c0ea9c098ca4 SHA512 7ffe8ac52a808cee5953d525ef6886cfb487c6ae81bd332d1c560c9f19601b0e33876820cc1726ecd17e5991c33b6cd625e5cb9e3b05b6b82abf29beb0387d75
|
||||
DIST rust-1.90.0-armv7-unknown-linux-gnueabihf.tar.xz 235900672 BLAKE2B 7a51f042afa6fa04b8ac71ec41809ec33c75ce27d517f2ab0468f902a75cbc35f887d6967bf26c231a0e44350fdb4f702a1d428352cda3c637062ef3e9931de8 SHA512 483755b280bb89358388652399672ab7a5ce4c37c29751353cde9eb56ef9c2bcea8fd613b81bb22a91a3b3424cb6134ca112ce3906a566f17faf16554194e09b
|
||||
DIST rust-1.90.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 721cfcfc8017a00f7b2726d219d5adcbf4b3a0f4f17c2760bb70eb5dea7169c71d4aded9f70068b12025bca0a19b1afcdeb732bd5776396739339ca2764b9589 SHA512 44576bfc17c4e90369b4a08e4498796f792513ccd0b36215b2e484fc8740d7e4ea0c295405e0de6ff8d0a91feceea60640161be99496ed0d27afe020909c89a5
|
||||
DIST rust-1.90.0-i686-unknown-linux-gnu.tar.xz 264929384 BLAKE2B b0cf4dba2cc681e3fa7d49cb3810bda0fc84c372813be7b7d4f47d8c31a1668af124fd83c15fa0896ec9a1541328d074f0ab6a8eaaa3221443c1ac5e0b3bd641 SHA512 b43cefa30978419c071e7c0e095ffb23531dc898b9f1ab96ceeb8950aa9ba91db395a1e97b09d7bb331989296330a7ed886202ef0d0b747eeb1a06c08f7ea579
|
||||
DIST rust-1.90.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 20d99bcb2f58f68ab46b545ae4912f1ad1155c28fd4410fed0fae0fd1ca904cf6521ffc24cc71d1ed70345511cc21591aae7030c47deecd84a60dc431adee0ca SHA512 ff9c4f87c9fd4e1b7c0f982a5935257bbdc9d2cc3c14f0327d22f201afae74e49bbf72a527d2e8bfc557d81ef4357563c3235cb97815a68c089218ad062872e2
|
||||
DIST rust-1.90.0-loongarch64-unknown-linux-gnu.tar.xz 262294868 BLAKE2B 85fa352e24cd483655e0566f0b249c914b14ff8b622a7e5a1dd34809a980ec1702cb6a23944f53e517496e59648c5689f2c8ea60f22cf23294190a379f893af0 SHA512 0dc95620c82d7e4589c73579ffdc647aecc11d53dac2354a4388a7e05269758413c67ac3bd2cedc517e7d3a50a53cffd41240cb9b3f80d1dbc354f6cba3ff7ce
|
||||
DIST rust-1.90.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 72217e5378ccbf95990a1b4f3c9f703cc1dd23a5222cccbb692b8c080c581d12b0f37181b452c619e4eda80e7b8a6fa7c0453e37a2e755b0ea23fbe686bf594a SHA512 a562272949cd2958e80332ce75f1ff4f925fec311f09ccd299e767dd5b42fcda76a82bc666b274855c734729c339063719893980ca8d1bef35e719d712fe00c6
|
||||
DIST rust-1.90.0-powerpc-unknown-linux-gnu.tar.xz 256658904 BLAKE2B a4338f11483e53457bd2bbd3eaed9240c90c55f3f4db987a6d39e5bd2c90e7a02bf2307edb41e325d7fa6b74cde861aed52de70d231c404e8d99ebc310fac37d SHA512 baffec50e030234bdd00b1b2a8d5887a08c80f0e7ff91b7415e338ad0d1ed7be32055a77b116d8fea7625e56b35cced1f94d27cb802e6446bcde3977e32baf7c
|
||||
DIST rust-1.90.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e7c65582e52a4121470a926f4ac17d2d380785c98fdfef0b41cd46d6a85dc74dc950ed13dd0d7074e64370077bc6544dff768d484a27aa564cb98501bab9b3b9 SHA512 52102dfa3c203cd334fe58cb4a993bf37344f4064e7173d2191034816e052f75fc8b826abdb536571577e434cd19cf790488d01ae705050d31c617c7bcdecfa4
|
||||
DIST rust-1.90.0-powerpc64-unknown-linux-gnu.tar.xz 255330048 BLAKE2B 5d28eb5241da557d326e769601684a0ec54732c2f27232a111b1b2366620dbdb3e6c124182ba63858b4d2070cf710a7afdea1a0fd639178af53b075e01b42506 SHA512 590b8be30bac6cd4bd9c5a37e8b2a35590a3836eff765cfd9c297de97778584d0ea4a0052ded10176a4ff8ec92d636aa42bd329fea48d2407f1ecf3b93e8f983
|
||||
DIST rust-1.90.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3e2c32718432b7ba46375f8a35f94ffe09c97b448e91bb455cde5f63b576d070617fd58fbdb491ba3b232602daaf878f3cee71715a8f019b44d884030ef08b35 SHA512 07a128e2dc18421a45e3906ca9836ef66ac31132b764e5e0e938a75d80b3c35c9c3ccde5530a9f91f7a7638b12cbcf87259c37baa60a72d9316933ebb14d05bf
|
||||
DIST rust-1.90.0-powerpc64le-unknown-linux-gnu.tar.xz 278420964 BLAKE2B f5ddeb3e2df8747abd66e201217287ee316a79c23db3604bb86f67de0f21a92616122121d3b99042e409f7cc9afce61b29498023f52a3a9565db718a3d0fe380 SHA512 74df8a75e23f0f85f63121029d0fd1fcfa7869fcf20e17c8d5c118c521fd072c5d8a6fe56272a2326a1d3f2f5f888acad3a1af0f982c8ab3e9ba113a7b6c10a0
|
||||
DIST rust-1.90.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8b2aa1e7408fad0fa86c8c0370d5bc00d01c4384d25626295718c08592577ecfaf77a4e129d0fbb6538e77c01cdfd09f3a8e4e43f03ddf8b038c33de411e4245 SHA512 10f2e8a10fa2148a50f4132e8c009d767f49ce685e76add16dbebc5ce23c336d88ee5f3ae8e5671af4eb1d5148ab8eb860a4ab2def852ae1fa2dbb2bf30e625b
|
||||
DIST rust-1.90.0-powerpc64le-unknown-linux-musl.tar.xz 276592804 BLAKE2B 5bb63d56fbd3d15c7d89cec6464eba31bcf46a97c92b366c08147cde69abac96dc7c6dbc3626a7fe594744e502d65cef54e2613db503df6e8a1536a4e8caedb1 SHA512 065e29e053dbcb3007e4cb623d25e3b0bb7e13b3e0beed118ab55cc16a8abc087b7c4fd84d1a2d489e78549857a524e3d59355b3ad249475832b24cfae490e23
|
||||
DIST rust-1.90.0-powerpc64le-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1752c39212cd6c4777f3a42a3a5cd19c64621810955aa811d5bb19eca70728b6f8c0570669fa19285e911e3e0977a6293d03c53bfd8a7d6e680681d3f68df3e8 SHA512 5a847e6d989335dd3c95aa8ce2482636778b82ac73385627e24e39e0932a8743949462849af631a79635c3d0f050ac180baca6c5e5526f5e4eb9d1e612287dcc
|
||||
DIST rust-1.90.0-riscv64gc-unknown-linux-gnu.tar.xz 251333732 BLAKE2B b0f93df592f168fc84d7e7163b225824175fe027a4af31086af1aca83dd583fc0333042208120d3d93db972ac8d5abb099155bf0fc6bf33971b05e7f2bc8e169 SHA512 ae1298cb80297a954dade4543f3f31ddeeb31ee889a59c106bd6ac3dcb75a6ae2a8ac7f6086565c00a6d4a1d7f7b05f11b892285b7f27e5783003f21bddf03ca
|
||||
DIST rust-1.90.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ea18fe3ee6c2ac38e59be3196fc22f47917e2129ab62c38cf8b18b1970b1fe9f1e95076009475a67b421520b7266e8dad2b7a7379ef07e8963531e8e50ce585d SHA512 a17e9d45a537cf8e99eaab409e6e57ba52ef64c4d55a789e759af9934d7081d509c67af8332d5502785d2b1363d18bdd8ec691b032af7f5686c3f5f48eac66ae
|
||||
DIST rust-1.90.0-s390x-unknown-linux-gnu.tar.xz 239828172 BLAKE2B 6d2eb09ae026846602c6dcbf1a7c462bdbcfaafcb7f8e44ea9f0f10421fa39f1eac00152aa18e8790e8ba58f41ec7fdf9f1e837e968270ea442c3a6d3a3de39b SHA512 7bee7c0704bd8158bce9a35549271d3c161483c3a422a0f36c2cb71270268efa80dc77308380f584d92768d035898e9381b0dbc6e429d8e035dad365c4effb4c
|
||||
DIST rust-1.90.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f4ce2782c7a744dcd9ced9c62e824ad32768384d4cb3ad3041085222660da94f178c0831602d86d05607b9fe84e9d79b5ddb75c90b6428a424a0444781d8f878 SHA512 f764d51722fb11223b912abba403cab74e0f5d2cf3494cd752c9eccc5dabb6be26cf32bf4d6826e66d81492a8a1566392a51b9117a03800c246cd20e3522623a
|
||||
DIST rust-1.90.0-x86_64-unknown-linux-gnu.tar.xz 202999512 BLAKE2B 2aeaca36f521134282228ebe34e47555e30f015b72c12dfa9075fedf1f2769226b5a11d4c3662506bf941aac0cbf91f6decd367b7aa84034e97e5dfd8fc08eef SHA512 bc1e7181cfefc630074e7019bacdca0fd159932b3011accb12e97c17023b6832b865de26e7b3b106cb595fe78b518cff397b6e50c9e1a56f7ce0c47f1a6a7c25
|
||||
DIST rust-1.90.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c4dcbac0cf9f470eba5a4cc21d32a4ae8814d2e259138935c3abc783ba13a4017ef6eb9902bc5609e0a9bceb0ee880927de17c7e22ff870a79e9844482e3e4ea SHA512 4b030294eb39d7a89756988edc24e8777e10227e41159bb835a16fca9253b60fea20b29bd2c2fa6bd8f3e77164de6aacd589162cb4a240a64cfb38f39c644036
|
||||
DIST rust-1.90.0-x86_64-unknown-linux-musl.tar.xz 294424352 BLAKE2B e07514b7542b5a2ec20ae08c2e6e55ea1570bcc827b2851c86a3582bd73f69c0b70b18053030033f74a6d3c472fc4cae431a7404b594a7b12a17c01afe8b96a7 SHA512 fffdfd588b20aa518f361f6e4f6c32844d377356d520f8bd1b9f8a7e062be5c2db5e736a2b93619b2d0f182f49eeeaa22075e4692c7683c0ecb4a231522d4cbd
|
||||
DIST rust-1.90.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 85238bc602c31a435de5f336a0646589259973fbe6c2d737fd6423b4e5721b2448222b6be5f2bb4fe309a60162a8ed66dbdad6dbd338dbddcab12586461965da SHA512 729042345408572f3134702150984182716728cb42df76d8b1f1dc986b579b3bf911a3c64230a61638d3b8d064e28cce3aa0afcbbcd719b49e02b4f3009721b0
|
||||
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-gnu.tar.xz 172095376 BLAKE2B 9d328275e10cfadbacc495682b09339307693574af9bbfc2b206c55847b0ea9e1843118cae255caafc05d87d49b167f9c1483481b96a169b860ac08fe1debbae SHA512 1fd287fb305309def4e5df8a4e009f6d50cb423d47f4bb51c5ba63dfd91c9d235d4bade9b50a7a775b81c922fad092cdca62e342b9f2a97b8161b078dff1a83c
|
||||
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c647795becfce97eb628fa5f03d6ed7919c97bd4605043d192b46e32c8c33255db68433a2615d17e5f26205d0e5c986cd95b34cdd83826bf6916b64c4b8b1c1 SHA512 9aa0f5fe204801b1ee413209068d9702196ae119e1d8bfb57a3d5b458cba8be371e370a9e57a254d23cc4ef61d89db7fd5ff1721e69d31d06ddc4faf76d72326
|
||||
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-musl.tar.xz 253053588 BLAKE2B 08fa0f52fbbbdf8a658e5f86062c3590977424af505f0edd32cc1477b6acfad5aea516b434a7f0af240591575f9ea58908f331c9e80fc53eab9fc92566c944da SHA512 2e1dd7cd752caea77d65ea2a2532365d06b4f3dde4fb667ca99e95f65cd9a9dbb01334cb68b538f702c3fc275fe97ccbe6f0e8fe7d6b3b2595a2fe325e49ac19
|
||||
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 18b462a6b075c0dcd2b675554f677319c70e1467222cc336bf2b6e1c8d58269407943e20f7f28b9365b0d8f0a491f9938dea636af580aa63a85cf8b1a8d7ce5d SHA512 707dadd60adb97a95e944a4b645380750e63957892f310eb0037edd3e99f3c4359c5f0353b9da0cc807384fc2addb83a9cceffe859d9469ace964e0e465ef0bb
|
||||
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabi.tar.xz 236628464 BLAKE2B fc6ee14abf174c02bb23f954fe7486e9834bf3a9ddf043c044d9f4f7e9d26c171b906ab901be4b773e0e751294e6123cc563f03f1519fe4e7a3c6b6d339cb89b SHA512 31f5c8c2e7b82538d17f3d0db4d32ee46321d4ef5044146846740039d3bdfc8c72c5b4ae5df43daeb0fb89c7dc6317e9053fd83eacb4fb47600204a8a5c7d3fc
|
||||
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 94ab04b4da8615663658341183496321f9417b75fb3968a025a0add46ce15739821ebe41313d803622656bd9ce47012e11c18a1ac0aa6e50495a76f39d48a600 SHA512 ab5e7cf268f4df4ab77afbbc5624fd261bc5775a97d667fc93b7d3fdd976a43bc6d3d70653aae01ec44b2abcbcd14dc689cd99894f203696e1047bf1195b86aa
|
||||
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabihf.tar.xz 237170812 BLAKE2B d239947b16bf9330c3fec200db9dda8ae030842256bcb3d3ef95814c0786495e679cfc3a9eeda0a8d7be63fd3b38508773b42b8c35862e8738e01bdaff8c9815 SHA512 d77f57fc1e473977b5688c4a32ea8990a85d91a3ae06e98abed2cd940d974fc2b564e971f9e3c0e57ef97c4b8d25ceef560968a36f8b3d8759baa8b4fc038b30
|
||||
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7cad77cd70c514cc7c128eb0780be1cd16311fe3215c14850c679d9aa3fbbea067f6acf9eed4ff53822386c0e2876009de4805aa7a9e89afc43434e7b15970b3 SHA512 e54e2dd1a34091d8da89c38e254f0e7eb0ab6c22c1530637fe41c033a76e2dae52f3b1b82d373c467812c79dea63331f6175009025d1d78b57a9ab9dffdb1992
|
||||
DIST rust-1.91.0_beta20250928-armv7-unknown-linux-gnueabihf.tar.xz 244114520 BLAKE2B 4f04f4018d00fa9dddd4e903ef1fc5c2a93696bbcefc79e441e2a0839123424394b63c460d1a81e00194b451fde20f03753f0885af597e09674f02ffdc28d777 SHA512 5f72078cd7dcad95f0d1d5493217e094c7199a440a7cf1fd982be3b57b8a94f5d7b69caa32f00c4c5160f358843fd8e0cd2df774c5aa958dcff61b5e61f78cfe
|
||||
DIST rust-1.91.0_beta20250928-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B b856d0298b55498e1dd9122c690437cd5f2d6e618ebc96f7ee6ffa015e038bca54ee34165744f8f4b7c0aaf87db95e0ff1750796e53f072276eb69ca0f371229 SHA512 6091c3cfd481e34f1abc334c26c3fc7e6976a58749fc4218111ba4ec9b4dfd262fec1ccfd8edc294b9b9f5c485015d16f5c827525dedbff6e362a59c92ecad0e
|
||||
DIST rust-1.91.0_beta20250928-i686-unknown-linux-gnu.tar.xz 273860868 BLAKE2B 5be2d6233503271a032f2d7a2eb6dd8906317e18dea0b47a88caf08efdc0d1410cc728be5fd5b71fbc9d7498e7a765fd23d4f16f3b9f573bce820d60d610c2bc SHA512 f609dd8d425a4bd52d3b3251b26e298df7c2ef70237d13e64dcb8a76d8e58f3bc95722325b8a9673346a233369cb0342acc7070251d431f79850f33ab9b2db42
|
||||
DIST rust-1.91.0_beta20250928-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b4acda03e93a3e712fa57e7ab20fcc56f38cbf7e5eaf4da5e18091f7ab02a32cec8d03d30d002ad7bd12b03dde12c8368739891dd559be40fa0bf87f0045d492 SHA512 06cd861bbd1603cec784af313e2da2571b9918f8f234aeee8aa9a6e2276acb6c35fa15d8db0941fc501f799869dab49014ddc9b7a9c591b445001f160649ad3b
|
||||
DIST rust-1.91.0_beta20250928-loongarch64-unknown-linux-gnu.tar.xz 270049484 BLAKE2B 9499b1df9c2b7242a993a8d9090cb62304db0c34c5800e1deb3543dd5866821e58644e4ba074bfaea79c7dc06fcb08acf2858c47af61ec8d0b7bdea165a14e53 SHA512 fd785b373e4fdc8b43b47a0811fce7a84fc234f6669170bdcd2bc53f4dbfefbed532fb3af9681437698a5095bcb4207460610751f0c8d547e866ba1835a72d9b
|
||||
DIST rust-1.91.0_beta20250928-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 81608c9851e03a5018cfff678f68f139500728b3763443c26964e6d4c344d1be5c310991e2a432b9f3864370872f0b9c62ba37f2c37a12dbe11feb4dd2643012 SHA512 8604dd3a3a85f94a2529d54715b8b263a6abbc19b7a6f58090b02712fe79a5e409ae4f972acfbe70fd573e39da3fece160188a90efb9c60c14c144d6e2ad9017
|
||||
DIST rust-1.91.0_beta20250928-powerpc-unknown-linux-gnu.tar.xz 262935108 BLAKE2B e8de89b16da5b9aa52a22cb77d3785e9ebccaf521ac443b9ed9a2985dfc362505ed29117eff5a9a74571a2e8a9332900fd930183dda94a721068cf28a81e7d97 SHA512 805f8311a4acfbaac019a4e1fd59545e0c30c76a26049332ab77e4af10f363b0af8e92fbf0ec7bda325f93bdabe3291d54a9ec448454d67bac85ad4557a11f71
|
||||
DIST rust-1.91.0_beta20250928-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b399ba4e1013a8cafbf3dd91702ac33a8cc14ccc7a03cdab8e187f42646b4abf2fb88c5436619511bed12ef97a9584241e5f5d4425ddd74a7e0a00e8ea17507 SHA512 333edc84f2484b8185b126da68b4f883086e3842b56c9cc385ffa642e112262cb273d9c829c74a03f0649a41c806540971536cc92ce49fd5a3aedaf6ef2a268e
|
||||
DIST rust-1.91.0_beta20250928-powerpc64-unknown-linux-gnu.tar.xz 261871320 BLAKE2B 47cce41a6ba2a233ecf1abcdeda799507f8195b57cbc686cfb467539b62960d220135a36c5b185835515d3d64f332489b39f5c05c21c4265183dd8425026a3b7 SHA512 f7a03f9deea8996a25663073b6f7035d9c8ef60f7528c139994bc14a1055d4fbf8d2a900d80bfdea7e1be0bd281e39fca4a863fc45f27ed23918247f79d6d45a
|
||||
DIST rust-1.91.0_beta20250928-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10d1e3e88dfce122284992ba2d94f8dedd0e5b1979b0ec8ec90d09a615dcb2a05287e4069f8c13801c490ebc26de4f25d74cc63d91911ac6fd0b055952e3ef71 SHA512 e8eec3b36b6b1bec852786f5a4d7976461b81b093c63248dc4faa994e5c263f007cbabda59a898b9d097bd756856434f4e6afe0a94cf56281f4963f4ab781b57
|
||||
DIST rust-1.91.0_beta20250928-powerpc64le-unknown-linux-gnu.tar.xz 283662436 BLAKE2B 4990cc15f7085b1aa326004b2bb0e81c7501dfe99cc2816a1b1f051ac682dd3ae27c72f55da06062ec55a87a1cd13dac65dd27b438443fa22895359705d35e04 SHA512 4658cadfcc990088b0c42f85d9fe4051c7581c03b72e5d849558d74e1ae746e101e6243737f4b9686b3b501adf05da199b798323f163e9a6c3cb8b3f631706e3
|
||||
DIST rust-1.91.0_beta20250928-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e694b6bbea80e15f5989ac6f6e85699d2b6f285bc7c60d2172e8c554c9d414f1871c9d0446d4063e34a0e0d4f376dc5a74c373520cc3ecb847acdd1aad2c992d SHA512 853030df7476125cf4b33129266018a2a4006dc31cc5707805a569b019381c7bd735f83a3478b259181cc5d5da1568e95c836f4f2df715b2bf669116d700e536
|
||||
DIST rust-1.91.0_beta20250928-riscv64gc-unknown-linux-gnu.tar.xz 259277484 BLAKE2B 302863ba3bc95950b117c747a74cabc5791cbdeffdb23b8703c1e5a4cf68d0d5cc22212d7669c8af0b8459272f4105004b7b1cb785ff37557d856a6e2c17b763 SHA512 aa510f0494b0d9512493ceab1c1552ae2e2cbecf6155c2ebe0c6ab20fd7b8581b720d4a6c720431ac2a3ff0493d83fb55f1cb46b3256c112ced9b6ba5f31ac1b
|
||||
DIST rust-1.91.0_beta20250928-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b74230bc6956193e3b7016a1dd74c7263b1e3d271bdd6180ca87e5bb27ef1aa12149cff9666acd974f325cf630fb6b9a4faf4714e8424c6286e4987e508d4d01 SHA512 eafec3f4ddec5cb489a76a9c02ea2579885748e28807c5faddcd43411aef86475a3b53f998e64e2232800b25e004d27868de23c802499f7a0b50895f6c211486
|
||||
DIST rust-1.91.0_beta20250928-s390x-unknown-linux-gnu.tar.xz 247379756 BLAKE2B 4b62291f0645750b601c5b10f892d8c2ec30f223c9a9bbaf4f3d6498911da4c109e8020a9536c0a85b73afa80fe9eb40368d85ed453c3395fc64d0bafc1533c5 SHA512 078a94df9d2187af8635e73081387de551bcc2bad5d6b4449825b92b87a4a331822ee7029e5c27f7b5618fd839e920e6763c8bc267e49c7ff24bd73e1d5fe48d
|
||||
DIST rust-1.91.0_beta20250928-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c282c7f79c5396ae9e419468fd88bf094246c69678f2a6c6a65ff9cb73cb4c21190ed794dfb3ea0482c7986d515ba9f5d417354d5803e9fba473ca5b7837933 SHA512 37644c5cf4aad7430d048f36a8cac0a042f461757c89d59cda5f80a3eb84ff84eeab5efcbf806ca715036403299416dbf95f774642ef57888e95159db73cfbfb
|
||||
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-gnu.tar.xz 207672796 BLAKE2B 3a1530ecb26dd8b278fdf3541ae43ceeda5ab8f64d2df5a057c4d487c1d9886bea1798db74d8da6a3d4b5908b593173ba0a7c80ab66b685c98da634f587e54da SHA512 0650169048f5e2ba845b5fde0a061244dcc78bd3f50688429c096bb13b746199baea6428335fb352f2eb94206cfe288b0f47864b35e8b173ac24d0815e3d8d7e
|
||||
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0cca15af7dd687338b4bf1c3466d3361516a9a3a75d0101a4b2668f3b9b3b7ab495138c6b93160f10f1362d4ef8392c05d0a32c793f817686abc6db9f3de07ed SHA512 7bfca67933a63fc2802c9b000a4d986d0b87d3f075fc5fa7ab71f3cc9994e0d8625c8d88c95c8a7ed328c4cdfb9fb959955d4988c097163e7abb336b4ce3d6c6
|
||||
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-musl.tar.xz 303415480 BLAKE2B a8bad917244cf6641d5ede5e41cefc262e7edb8cf6cb2498c63d2af1b93b08286c86cc0e39928c9061d6ae21e344d91a2f569f61a7464981929883f2ac21ee17 SHA512 676ad4f6ed23dc5152a0d19f522d36d65d70d6d43adf5ef6a622f77f69c2fd6074988a3b58405eafc06d6004eb56cf49638a23ac10db53adc18fd20ea3f3c3e0
|
||||
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b54b7007ae859d6a096c9bb927d4cfef976874a426b74ece4f147a6914484fd21beb30cef71736ca38260d0d551cd00a45e936cce27fddf191b958770ac91f31 SHA512 3c796d3e4e0c13fafca3693e9a0c6ab3dc76fcb464b6157147ef5af05152c9d8620d89be5ca7a0a2815d74633fd40ff496ef602b4deb0d38d85bd07d8a497207
|
||||
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
|
||||
@@ -645,3 +703,5 @@ DIST rust-src-1.86.0.tar.xz 3053544 BLAKE2B 2d1d8a4be4f9dc9355ce9a2d1599e0a57c5d
|
||||
DIST rust-src-1.87.0.tar.xz 3119800 BLAKE2B 6429eb419f17109537a2a5463b0c68f504b3cb0f55766e18f73cf053883b06eedc934ab4598756790cec147ff41c4eb30a807d2ce0b7e6af33310710fdc5a8c1 SHA512 9747c60268d772b7c6e7694260c0808d2b8a42028f5606499c81595d76f5bc32c9acf6b4b9aad168235f8fd77d980c56bc4afc3d40f5d0374b23d3e66e3de390
|
||||
DIST rust-src-1.88.0.tar.xz 3155272 BLAKE2B bca923d2264337366b8013c45f3a40cbdfc1e1b746775161eaa66a1db653aa4ccb2a55980368ecf9808d6f4885194e2dfbf1f678d0500a43f7b2fcc0f79d27c8 SHA512 6dfe1fc3565927a9ac2ff9821ef3222cca170ff538833e1969ebe662af2cad5257c1ab3d82f5ca10aeaab40f54916a25dd96fd16449cd59e4d104b631911931b
|
||||
DIST rust-src-1.89.0.tar.xz 3461444 BLAKE2B b1e43def4cc0f47f0e776d383954b339a62b3efa77d5db71180b7b7620a67bd2d2714afe0b08ae26a06d7d8c785eed03f545d91813d074cbe6641e883a2d40dd SHA512 055c09854e47d1bdfc7f393ac6f2783d35cb8cf13100deb227598ad91020f1d91e4cec1658d8e71db3c266dc6e267ab4172dc1007428cb05105dc4aac57bf89d
|
||||
DIST rust-src-1.90.0.tar.xz 309 BLAKE2B c8de4eee314538dbe6c5d5c2057efe9b3f11303f33efd113276675c261fc8e777f0b6ed169d1ba3a071bf0f9c811a1268cc91dedcf257cb9005ecc84448a1379 SHA512 2b053a8416ce4d0e69838023cb3293a18d77e1b8be30d77992baa46f9f0eb9abbfc2c1b44cea48cc6aeed2ebed4bd2f40b325abc8d82f8cad10ab33f08700189
|
||||
DIST rust-src-1.91.0_beta20250928.tar.xz 3509016 BLAKE2B 81417db8497947d67288b1980601127cc9f737b8159e7817626fca7cb7d07fd4287fee14f0b4043c596a67d1d63b1ab9e273b6e1976f27049c86612395ee9255 SHA512 3ddd9987fac3d465b843cc05385ad482e9c18ff2c15dc2dc864fbb4988c2775766db5bec6fc35ed750ce5389d77dd9a56eafbbcb0ecdee293f5defd7e7a5ce45
|
||||
|
||||
320
dev-lang/rust-bin/rust-bin-1.90.0.ebuild
Normal file
320
dev-lang/rust-bin/rust-bin-1.90.0.ebuild
Normal file
@@ -0,0 +1,320 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
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-09-18/rust-src-${PV}.tar.xz )
|
||||
ppc64? ( elibc_musl? ( !big-endian? (
|
||||
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
|
||||
) ) )
|
||||
"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~s390 ~x86" # ~ppc64 ~riscv ~sparc ~mips
|
||||
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 false; then #[[ ${PV} != *9999* && ${PV} != *beta* ]]; 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)
|
||||
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
|
||||
einfo "Using nightly Rust from: ${rust_bin_url}"
|
||||
|
||||
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
|
||||
|
||||
einfo "Fetching nightly Rust tarball ..."
|
||||
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
|
||||
if use verify-sig; then
|
||||
einfo "Fetching nightly signature ..."
|
||||
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
|
||||
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
|
||||
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
|
||||
fi
|
||||
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
|
||||
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
|
||||
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
|
||||
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
|
||||
}
|
||||
320
dev-lang/rust-bin/rust-bin-1.91.0_beta20250928.ebuild
Normal file
320
dev-lang/rust-bin/rust-bin-1.91.0_beta20250928.ebuild
Normal file
@@ -0,0 +1,320 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
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-09-18/rust-src-${PV}.tar.xz )
|
||||
ppc64? ( elibc_musl? ( !big-endian? (
|
||||
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
|
||||
) ) )
|
||||
"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~s390 ~x86" # ~ppc64 ~riscv ~sparc ~mips
|
||||
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 false; then #[[ ${PV} != *9999* && ${PV} != *beta* ]]; 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)
|
||||
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
|
||||
einfo "Using nightly Rust from: ${rust_bin_url}"
|
||||
|
||||
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
|
||||
|
||||
einfo "Fetching nightly Rust tarball ..."
|
||||
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
|
||||
if use verify-sig; then
|
||||
einfo "Fetching nightly signature ..."
|
||||
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
|
||||
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
|
||||
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
|
||||
fi
|
||||
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
|
||||
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
|
||||
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
|
||||
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
|
||||
}
|
||||
@@ -16,3 +16,7 @@ DIST rustc-1.88.0-src.tar.xz 283294344 BLAKE2B fc17efbc8b2e54f2da61384097dcb3b8f
|
||||
DIST rustc-1.88.0-src.tar.xz.asc 801 BLAKE2B 858e987ad1fc49c1e1cbc5ea709f835c60fce907e89205e431c843bfad97dc0ccbcf399fc7d87319b8455561cbc24020bd88cb572cbe932cb8b80a8adec39687 SHA512 64ab398dc602fed3ad7bf232249e80cc0a9831aa90c7eb37658f7dc5b2af04ee391f9633aae7a1d90f743d019cec531318384f71384ecbe4f6169e6e88b7ba0e
|
||||
DIST rustc-1.89.0-src.tar.xz 267487572 BLAKE2B 9f6e3c595f843c239b57f14e26685e9856cffa10189b75627fee4dc82970a9b5f2c6f42e145d1c1042d934bd4db0334014c046450f7594d621b378d951546d5d SHA512 3ac0f02baaff12c67fe35cef4d56b315134d0a043bb6103a248a2842456c74733c6e3039f079bacfb8b8ab9b7487f92d678987e588bd41276abf9bf7c2f7870b
|
||||
DIST rustc-1.89.0-src.tar.xz.asc 801 BLAKE2B cd94da916d3646048d8f90c6de658de2981d0c815a1f8da01fe58ab6ec133e47180c8b506a41e22c68b3cb77aff5bd3bfc966a71ae2b73849918096d68764386 SHA512 006b91bf41fbedf91c39b8a6e483b089f69af7e78026f2903928fed64e44ee6aa53e46fd19bae31b1576b53a80dab66bf3e53a3bf79f820066d36285d706b90c
|
||||
DIST rustc-1.90.0-src.tar.xz 272348992 BLAKE2B 82dbbe3b5fe79f623c74fb81a4c4372b14e7d765f0e9af3d76a6c4bde9899007c85c8af70dfd9facc06c37a9c8d03a4597ec87b2d053585ccbc2287332b27e70 SHA512 fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a
|
||||
DIST rustc-1.90.0-src.tar.xz.asc 801 BLAKE2B 1e84c6134c4fedbbd52610c259c1bdacb45bc97e8cce7a6b5a8c92827a072c88fcf8984893a5e6aa28c2d5d82bd849bb9d38390c783cfaa503a18c99bcaabcde SHA512 fc8f6dfbb4b50777ae8e499883f95b64861db0ca37119b34b3670b4adf51dd248b0b33daafee90e0f22f66b1d8bd8ae6a6107106e95e73f5c2c5a8dc29532e2e
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz 284030160 BLAKE2B f5df2137e3a08b51f034543d1bcd0793f7d29264e81926458f6071c6f2de4093170ec5d257e56a9940b10494642eab9e57bffd24d61e8682ff052bd62517543b SHA512 e2ea6676f01b35cbd632c7a36d53b8d6d1e02a74fa460243575036b99406781416629300fef58ae04dffa8ed40f5448ca167654fb14db6676d57fc6cc2b31481
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz.asc 801 BLAKE2B 70c58b0eb97b735835c37060e2e1ed13ed3531355cf36006c33ba5dbed2f252bda6900e4846693146fd8a093dd3b523a653166588ed1335fb22736e2e5a46567 SHA512 07eed611a38290582329512667d88cfb22d30119d9947169337844534bdbe9113f048080fbfa4dce95e3132319053919c6b11254c6e259cdaed788fa5ac777df
|
||||
|
||||
73
dev-lang/rust-common/rust-common-1.90.0.ebuild
Normal file
73
dev-lang/rust-common/rust-common-1.90.0.ebuild
Normal file
@@ -0,0 +1,73 @@
|
||||
# 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 shell-completion verify-sig
|
||||
|
||||
DESCRIPTION="Common files shared between multiple slots of Rust"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
# In case cargo is not in sync we'll fetch it as a submodule
|
||||
# Nightly users will probably already have the repo cloned and up-to-date anyway.
|
||||
EGIT_REPO_URI="https://github.com/rust-lang/rust.git"
|
||||
EGIT_SUBMODULES=( "-*" "src/tools/cargo" )
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
MY_PV=beta
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||
else
|
||||
MY_PV=${PV}
|
||||
SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
||||
SLOT="0"
|
||||
|
||||
# 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 [[ ${PV} == *9999* ]]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
if use verify-sig ; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz "${DISTDIR}"/rustc-${PV}-src.tar.xz.asc
|
||||
fi
|
||||
|
||||
# Avoid unpacking the whole tarball which would need check-reqs
|
||||
tar -xf "${DISTDIR}"/rustc-${PV}-src.tar.xz \
|
||||
"rustc-${MY_PV}-src/src/tools/cargo/src/etc/"{_cargo,cargo.bashcomp.sh} || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
|
||||
dozshcomp src/tools/cargo/src/etc/_cargo
|
||||
}
|
||||
73
dev-lang/rust-common/rust-common-1.91.0_beta20250928.ebuild
Normal file
73
dev-lang/rust-common/rust-common-1.91.0_beta20250928.ebuild
Normal file
@@ -0,0 +1,73 @@
|
||||
# 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 shell-completion verify-sig
|
||||
|
||||
DESCRIPTION="Common files shared between multiple slots of Rust"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
# In case cargo is not in sync we'll fetch it as a submodule
|
||||
# Nightly users will probably already have the repo cloned and up-to-date anyway.
|
||||
EGIT_REPO_URI="https://github.com/rust-lang/rust.git"
|
||||
EGIT_SUBMODULES=( "-*" "src/tools/cargo" )
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
MY_PV=beta
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||
else
|
||||
MY_PV=${PV}
|
||||
SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/rustc-${MY_PV}-src"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
|
||||
SLOT="0"
|
||||
|
||||
# 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 [[ ${PV} == *9999* ]]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
if use verify-sig ; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz "${DISTDIR}"/rustc-${PV}-src.tar.xz.asc
|
||||
fi
|
||||
|
||||
# Avoid unpacking the whole tarball which would need check-reqs
|
||||
tar -xf "${DISTDIR}"/rustc-${PV}-src.tar.xz \
|
||||
"rustc-${MY_PV}-src/src/tools/cargo/src/etc/"{_cargo,cargo.bashcomp.sh} || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
|
||||
dozshcomp src/tools/cargo/src/etc/_cargo
|
||||
}
|
||||
@@ -16,6 +16,8 @@ DIST rust-patches-1.86.0-r2-1.tar.bz2 6308 BLAKE2B eca644026942bd729a748df57dd67
|
||||
DIST rust-patches-1.87.0-r1-1.tar.bz2 5116 BLAKE2B 783ad21464a7e393d0aee506119be12b0137a7d360402b74f36b6fde154c2804cc0779da63875977d09f7e9f2d273ff41dd189bbe4eb239a314fea27bbaa704c SHA512 8c67e4e43bf2afb226f70bb2a03aad0abfd525cd484c8c9ff663da06d63b471f4f1b48169d952a6a6c14258c0029dedea14aadaaca2ee75389df65b806188363
|
||||
DIST rust-patches-1.88.0.tar.bz2 4062 BLAKE2B 64168ffa608f2edf2e0b3d079152c3b5dd59d0cea29078894f286bf91488e2e7769c55ede2d43769368d2147b46699d1bf981190d6800dc3d41c736289122eaf SHA512 b565acfb4d1146e52b1fb66b4a242927407cc34f1b38c2a100135cbbde24c8374af1997bc22069cca25f33cc8d747e56391f3d98a2d4e13dc0abcec0d6f88b0b
|
||||
DIST rust-patches-1.89.0.tar.bz2 4091 BLAKE2B 0fea3488a39d2b00627084f6b192dfbd7ed49bdceabbb1141d1a849ba053f786e31115e00365679b1b6fb5b0ccdf5dc0dc0803057cbffbcf0ae3d75ae9830d94 SHA512 de6c9b693bdd719d06605b5da730ee5d9cf9a1d88d58194a0ba48bd378a951c66723f561e39181222d28abb38e974a2921e14ea1f40156caf7b903778cf65790
|
||||
DIST rust-patches-1.90.0.tar.bz2 4183 BLAKE2B e6cc7516bd386c020be208e9931221edb301a94b6b5cf8140d68ddd5e13b1ddaaa53b52b4b7b039faf2a7caf44107f170afb01e15ac7487c6fe5146feff3789b SHA512 0cbf6dd9fc8b68e265dd146423c82c72bccf1ef7f81c5bab87c5d53dda1ecce80ffad361f2c276ab713616847126c277af7b1e48327d433f6202361e25cf5201
|
||||
DIST rust-patches-1.91.0_beta20250928.tar.bz2 4214 BLAKE2B aad78f10a875ead5dc3570c7c276a219a8897cbc649cc593fc37d1a99cccdd6fdcba962887fca0417e40fdda6b1918ecec88795619b1df66e96926779e84b2c8 SHA512 366ad9eb680d122295e711a43049ea5fe7328d6f9f2a7d43eda92897deb35297305ef10a1f4a323d15548ce6264c1ac25d5021f5718cf73208ffec93126d02b3
|
||||
DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
|
||||
DIST rustc-1.74.1-src.tar.xz.asc 801 BLAKE2B ddf73175b164233babf31ca3a381b03e20c0f36d017c1d5f85d6ab11f0986d861ab23b11c061e6b2444ced70c3d6a494cc3de4ec86f0deb221a805491bd75420 SHA512 9a96ff9ba9a4e2af4e267b2ec126fc0675c78d0eb767703daa2f28491c3d85c2ab00fbd8584390bf658812ec6c4ab6c57e43b386db59fd505bd3134a8873a09e
|
||||
DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495 SHA512 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606
|
||||
@@ -52,3 +54,7 @@ DIST rustc-1.88.0-src.tar.xz 283294344 BLAKE2B fc17efbc8b2e54f2da61384097dcb3b8f
|
||||
DIST rustc-1.88.0-src.tar.xz.asc 801 BLAKE2B 858e987ad1fc49c1e1cbc5ea709f835c60fce907e89205e431c843bfad97dc0ccbcf399fc7d87319b8455561cbc24020bd88cb572cbe932cb8b80a8adec39687 SHA512 64ab398dc602fed3ad7bf232249e80cc0a9831aa90c7eb37658f7dc5b2af04ee391f9633aae7a1d90f743d019cec531318384f71384ecbe4f6169e6e88b7ba0e
|
||||
DIST rustc-1.89.0-src.tar.xz 267487572 BLAKE2B 9f6e3c595f843c239b57f14e26685e9856cffa10189b75627fee4dc82970a9b5f2c6f42e145d1c1042d934bd4db0334014c046450f7594d621b378d951546d5d SHA512 3ac0f02baaff12c67fe35cef4d56b315134d0a043bb6103a248a2842456c74733c6e3039f079bacfb8b8ab9b7487f92d678987e588bd41276abf9bf7c2f7870b
|
||||
DIST rustc-1.89.0-src.tar.xz.asc 801 BLAKE2B cd94da916d3646048d8f90c6de658de2981d0c815a1f8da01fe58ab6ec133e47180c8b506a41e22c68b3cb77aff5bd3bfc966a71ae2b73849918096d68764386 SHA512 006b91bf41fbedf91c39b8a6e483b089f69af7e78026f2903928fed64e44ee6aa53e46fd19bae31b1576b53a80dab66bf3e53a3bf79f820066d36285d706b90c
|
||||
DIST rustc-1.90.0-src.tar.xz 272348992 BLAKE2B 82dbbe3b5fe79f623c74fb81a4c4372b14e7d765f0e9af3d76a6c4bde9899007c85c8af70dfd9facc06c37a9c8d03a4597ec87b2d053585ccbc2287332b27e70 SHA512 fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a
|
||||
DIST rustc-1.90.0-src.tar.xz.asc 801 BLAKE2B 1e84c6134c4fedbbd52610c259c1bdacb45bc97e8cce7a6b5a8c92827a072c88fcf8984893a5e6aa28c2d5d82bd849bb9d38390c783cfaa503a18c99bcaabcde SHA512 fc8f6dfbb4b50777ae8e499883f95b64861db0ca37119b34b3670b4adf51dd248b0b33daafee90e0f22f66b1d8bd8ae6a6107106e95e73f5c2c5a8dc29532e2e
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz 284030160 BLAKE2B f5df2137e3a08b51f034543d1bcd0793f7d29264e81926458f6071c6f2de4093170ec5d257e56a9940b10494642eab9e57bffd24d61e8682ff052bd62517543b SHA512 e2ea6676f01b35cbd632c7a36d53b8d6d1e02a74fa460243575036b99406781416629300fef58ae04dffa8ed40f5448ca167654fb14db6676d57fc6cc2b31481
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz.asc 801 BLAKE2B 70c58b0eb97b735835c37060e2e1ed13ed3531355cf36006c33ba5dbed2f252bda6900e4846693146fd8a093dd3b523a653166588ed1335fb22736e2e5a46567 SHA512 07eed611a38290582329512667d88cfb22d30119d9947169337844534bdbe9113f048080fbfa4dce95e3132319053919c6b11254c6e259cdaed788fa5ac777df
|
||||
|
||||
837
dev-lang/rust/rust-1.90.0.ebuild
Normal file
837
dev-lang/rust/rust-1.90.0.ebuild
Normal file
@@ -0,0 +1,837 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
RUST_PATCH_VER=${PVR}
|
||||
|
||||
RUST_MAX_VER=${PV%%_*}
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
RUST_MIN_VER="1.88.0" # Update this as new `beta` releases come out.
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
RUST_MAX_VER="$(ver_cut 1).$(ver_cut 2).0"
|
||||
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
|
||||
else
|
||||
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
|
||||
fi
|
||||
|
||||
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} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
else
|
||||
MY_P="rustc-${PV}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
|
||||
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Systems programming language originally developed by Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
# 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[@]/%/(-)?}
|
||||
|
||||
# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt
|
||||
_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
|
||||
declare -A ALL_RUST_EXPERIMENTAL_TARGETS
|
||||
for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
|
||||
ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0
|
||||
done
|
||||
|
||||
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 debug dist doc llvm-libunwind lto rustfmt rust-analyzer rust-src +system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
# These USE flags require nightly rust
|
||||
IUSE+=" miri"
|
||||
fi
|
||||
|
||||
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}=]") )" )
|
||||
if [[ -v ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"] ]] ; then
|
||||
ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"]=1
|
||||
fi
|
||||
done
|
||||
LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" )
|
||||
LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" )
|
||||
|
||||
# dev-libs/oniguruma is used for documentation
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
app-eselect/eselect-rust
|
||||
dev-libs/oniguruma
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7[cxx]
|
||||
>=llvm-core/clang-3.5
|
||||
)
|
||||
lto? ( system-llvm? (
|
||||
|| (
|
||||
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||
sys-devel/mold
|
||||
)
|
||||
) )
|
||||
!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[*]} )
|
||||
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}/${SLOT}/bin/.*
|
||||
usr/lib/${PN}/${SLOT}/libexec/.*
|
||||
usr/lib/${PN}/${SLOT}/lib/lib.*.so
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/.*
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_SONAME="
|
||||
usr/lib/${PN}/${SLOT}/lib/lib.*.so.*
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/rust-llvm-dwp
|
||||
usr/lib/${PN}/${SLOT}/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}/${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta"
|
||||
|
||||
# causes double bootstrap
|
||||
RESTRICT="test"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
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} ))
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
M=$(( $(usex miri 128 0) + ${M} ))
|
||||
fi
|
||||
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
|
||||
}
|
||||
|
||||
rust_live_get_sources() {
|
||||
EGIT_REPO_URI="
|
||||
https://anongit.gentoo.org/git/proj/rust-patches.git
|
||||
"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/rust-patches-${RUST_PATCH_VER}"
|
||||
git-r3_src_unpack
|
||||
|
||||
EGIT_REPO_URI="
|
||||
https://github.com/rust-lang/rust.git
|
||||
"
|
||||
EGIT_SUBMODULES=(
|
||||
"*"
|
||||
"-src/gcc"
|
||||
)
|
||||
S="${WORKDIR}/rust"
|
||||
EGIT_CHECKOUT_DIR="${S}"
|
||||
git-r3_src_unpack
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999* ]] ; then
|
||||
rust_live_get_sources
|
||||
|
||||
# Vendor dependencies
|
||||
mkdir "${S}/.cargo" || die # The vendor script has a check for .cargo/config{,.toml}
|
||||
touch "${S}/.cargo/bootstrap.toml" || die
|
||||
local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
|
||||
# Configure vendor to use the portage-provided toolchain. This prevents it from
|
||||
# attempting to fetch a `beta` toolchain from the internet.
|
||||
cat <<- _EOF_ > "${T}/vendor-bootstrap.toml"
|
||||
# Suppresses a warning about tracking changes which we don't care about.
|
||||
change-id = "ignore"
|
||||
[build]
|
||||
build = "$(rust_abi "${CBUILD}")"
|
||||
host = ["$(rust_abi "${CHOST}")"]
|
||||
target = ["$(rust_abi "${CHOST}")"]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
rustfmt = "${rust_stage0_root}/bin/rustfmt"
|
||||
_EOF_
|
||||
# We're using git sources so we need to run the Vendor script
|
||||
# to ensure that all dependencies are present and up-to-date
|
||||
mkdir "${S}/vendor" || die
|
||||
# This also compiles the 'build helper', there's no way to avoid this.
|
||||
${EPYTHON} "${S}"/x.py vendor -v --config="${T}"/vendor-bootstrap.toml -j$(makeopts_jobs) ||
|
||||
die "Failed to vendor dependencies"
|
||||
# TODO: This has to be generated somehow, this is from a 1.84.x tarball I had lying around.
|
||||
cat <<- _EOF_ > "${S}/.cargo/config.toml"
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/rust-lang/team"]
|
||||
git = "https://github.com/rust-lang/team"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
_EOF_
|
||||
elif use verify-sig ; then
|
||||
# Patch tarballs are not signed (but we trust Gentoo infra)
|
||||
verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz{,.asc}
|
||||
default
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
# We need to update / generate lockfiles for the workspace
|
||||
${CARGO} generate-lockfile --offline || die "Failed to generate lockfiles"
|
||||
fi
|
||||
|
||||
# Commit patches to the appropriate branch in proj/rust-patches.git
|
||||
# then cut a new tag / tarball. Don't add patches to ${FILESDIR}
|
||||
PATCHES=(
|
||||
"${WORKDIR}/rust-patches-${RUST_PATCH_VER}/"
|
||||
)
|
||||
|
||||
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||
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
|
||||
|
||||
# Avoid bundled copies of libraries
|
||||
export RUSTONIG_SYSTEM_LIBONIG=1
|
||||
# Need to check if these can be optional
|
||||
#export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
|
||||
#export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
|
||||
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 rustfmt && tools+=',"rustfmt"'
|
||||
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
|
||||
use rust-src && tools+=',"src"'
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
use miri && tools+=',"miri"'
|
||||
fi
|
||||
|
||||
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}")"
|
||||
|
||||
RUST_EXPERIMENTAL_TARGETS=()
|
||||
for _x in "${!ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
|
||||
if [[ ${ALL_RUST_EXPERIMENTAL_TARGETS[${_x}]} == 1 ]] && use ${_x} ; then
|
||||
RUST_EXPERIMENTAL_TARGETS+=( ${_x#llvm_targets_} )
|
||||
fi
|
||||
done
|
||||
RUST_EXPERIMENTAL_TARGETS=${RUST_EXPERIMENTAL_TARGETS[@]}
|
||||
|
||||
local cm_btype="$(usex debug DEBUG RELEASE)"
|
||||
local build_channel
|
||||
local build_miri="false"
|
||||
case "${PV}" in
|
||||
*9999*)
|
||||
build_channel="nightly"
|
||||
;;
|
||||
*beta*)
|
||||
build_channel="beta"
|
||||
;;
|
||||
*)
|
||||
build_channel="stable"
|
||||
;;
|
||||
esac
|
||||
cat <<- _EOF_ > "${S}"/bootstrap.toml
|
||||
# Suppresses a warning about tracking changes which we don't care about.
|
||||
change-id = "ignore"
|
||||
# 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 = "${RUST_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"
|
||||
description = "gentoo"
|
||||
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}/${SLOT}"
|
||||
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 = \"${CHOST}-cc\""
|
||||
fi)
|
||||
channel = "${build_channel}"
|
||||
rpath = true
|
||||
verbose-tests = true
|
||||
optimize-tests = $(toml_usex !debug)
|
||||
codegen-tests = true
|
||||
omit-git-hash = false
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||
echo "use-lld = true"
|
||||
fi)
|
||||
# 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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.toml
|
||||
llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
|
||||
_EOF_
|
||||
fi
|
||||
if [[ "${cross_toolchain}" == *-musl* ]]; then
|
||||
cat <<- _EOF_ >> "${S}"/bootstrap.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}\]#" bootstrap.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 "bootstrap.toml contents:"
|
||||
cat "${S}"/bootstrap.toml || die
|
||||
echo
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# -v will show invocations, -vv "very verbose" is overkill, -vvv "very very verbose" is insane
|
||||
RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -v --config="${S}"/bootstrap.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}"/bootstrap.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 -v --config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
|
||||
|
||||
docompress /usr/lib/${PN}/${SLOT}/share/man/
|
||||
|
||||
# bug #689562, #689160
|
||||
rm -v "${ED}/usr/lib/${PN}/${SLOT}/etc/bash_completion.d/cargo" || die
|
||||
rmdir -v "${ED}/usr/lib/${PN}/${SLOT}"/etc{/bash_completion.d,} || die
|
||||
|
||||
local symlinks=(
|
||||
cargo
|
||||
rustc
|
||||
rustdoc
|
||||
rust-gdb
|
||||
rust-gdbgui
|
||||
rust-lldb
|
||||
)
|
||||
|
||||
use clippy && symlinks+=( clippy-driver cargo-clippy )
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
use miri && symlinks+=( miri cargo-miri )
|
||||
fi
|
||||
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}/${SLOT}/bin/${i}" ]]; then
|
||||
einfo "Installing ${i} symlink"
|
||||
ln -v "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" "${ED}/usr/lib/${PN}/${SLOT}/bin/${ver_i}" || die
|
||||
else
|
||||
ewarn "${i} symlink requested, but source file not found"
|
||||
ewarn "please report this"
|
||||
fi
|
||||
dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}"
|
||||
done
|
||||
|
||||
# symlinks to switch components to active rust in eselect
|
||||
dosym "${SLOT}/lib" "/usr/lib/${PN}/lib-${SLOT}"
|
||||
use rust-analyzer && dosym "${SLOT}/libexec" "/usr/lib/${PN}/libexec-${SLOT}"
|
||||
dosym "${SLOT}/share/man" "/usr/lib/${PN}/man-${SLOT}"
|
||||
dosym "rust/${SLOT}/lib/rustlib" "/usr/lib/rustlib-${SLOT}"
|
||||
dosym "../../lib/${PN}/${SLOT}/share/doc/rust" "/usr/share/doc/${P}"
|
||||
|
||||
newenvd - "50${P}" <<-_EOF_
|
||||
MANPATH="${EPREFIX}/usr/lib/rust/man-${SLOT}"
|
||||
_EOF_
|
||||
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}"/*.old || die
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}/bin"/*.old || die
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}/doc"/*.old || die
|
||||
|
||||
# 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-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if [[ ${SLOT} == *9999* ]] && 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-${PN}-${SLOT}"
|
||||
|
||||
if use dist; then
|
||||
"${EPYTHON}" ./x.py dist -v --config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
|
||||
insinto "/usr/lib/${PN}/${SLOT}/dist"
|
||||
doins -r "${S}/build/dist/."
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
837
dev-lang/rust/rust-1.91.0_beta20250928.ebuild
Normal file
837
dev-lang/rust/rust-1.91.0_beta20250928.ebuild
Normal file
@@ -0,0 +1,837 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 21 )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
RUST_PATCH_VER=${PVR}
|
||||
|
||||
RUST_MAX_VER=${PV%%_*}
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
RUST_MIN_VER="1.88.0" # Update this as new `beta` releases come out.
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
RUST_MAX_VER="$(ver_cut 1).$(ver_cut 2).0"
|
||||
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
|
||||
else
|
||||
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
|
||||
fi
|
||||
|
||||
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} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
else
|
||||
MY_P="rustc-${PV}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
|
||||
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Systems programming language originally developed by Mozilla"
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
|
||||
# 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[@]/%/(-)?}
|
||||
|
||||
# https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt
|
||||
_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
|
||||
declare -A ALL_RUST_EXPERIMENTAL_TARGETS
|
||||
for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
|
||||
ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0
|
||||
done
|
||||
|
||||
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 debug dist doc llvm-libunwind lto rustfmt rust-analyzer rust-src +system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
# These USE flags require nightly rust
|
||||
IUSE+=" miri"
|
||||
fi
|
||||
|
||||
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}=]") )" )
|
||||
if [[ -v ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"] ]] ; then
|
||||
ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"]=1
|
||||
fi
|
||||
done
|
||||
LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" )
|
||||
LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" )
|
||||
|
||||
# dev-libs/oniguruma is used for documentation
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
app-eselect/eselect-rust
|
||||
dev-libs/oniguruma
|
||||
|| (
|
||||
>=sys-devel/gcc-4.7[cxx]
|
||||
>=llvm-core/clang-3.5
|
||||
)
|
||||
lto? ( system-llvm? (
|
||||
|| (
|
||||
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
||||
sys-devel/mold
|
||||
)
|
||||
) )
|
||||
!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[*]} )
|
||||
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}/${SLOT}/bin/.*
|
||||
usr/lib/${PN}/${SLOT}/libexec/.*
|
||||
usr/lib/${PN}/${SLOT}/lib/lib.*.so
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/.*
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_SONAME="
|
||||
usr/lib/${PN}/${SLOT}/lib/lib.*.so.*
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/rust-llvm-dwp
|
||||
usr/lib/${PN}/${SLOT}/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}/${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta"
|
||||
|
||||
# causes double bootstrap
|
||||
RESTRICT="test"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
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} ))
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
M=$(( $(usex miri 128 0) + ${M} ))
|
||||
fi
|
||||
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
|
||||
}
|
||||
|
||||
rust_live_get_sources() {
|
||||
EGIT_REPO_URI="
|
||||
https://anongit.gentoo.org/git/proj/rust-patches.git
|
||||
"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/rust-patches-${RUST_PATCH_VER}"
|
||||
git-r3_src_unpack
|
||||
|
||||
EGIT_REPO_URI="
|
||||
https://github.com/rust-lang/rust.git
|
||||
"
|
||||
EGIT_SUBMODULES=(
|
||||
"*"
|
||||
"-src/gcc"
|
||||
)
|
||||
S="${WORKDIR}/rust"
|
||||
EGIT_CHECKOUT_DIR="${S}"
|
||||
git-r3_src_unpack
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999* ]] ; then
|
||||
rust_live_get_sources
|
||||
|
||||
# Vendor dependencies
|
||||
mkdir "${S}/.cargo" || die # The vendor script has a check for .cargo/config{,.toml}
|
||||
touch "${S}/.cargo/bootstrap.toml" || die
|
||||
local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
|
||||
# Configure vendor to use the portage-provided toolchain. This prevents it from
|
||||
# attempting to fetch a `beta` toolchain from the internet.
|
||||
cat <<- _EOF_ > "${T}/vendor-bootstrap.toml"
|
||||
# Suppresses a warning about tracking changes which we don't care about.
|
||||
change-id = "ignore"
|
||||
[build]
|
||||
build = "$(rust_abi "${CBUILD}")"
|
||||
host = ["$(rust_abi "${CHOST}")"]
|
||||
target = ["$(rust_abi "${CHOST}")"]
|
||||
cargo = "${rust_stage0_root}/bin/cargo"
|
||||
rustc = "${rust_stage0_root}/bin/rustc"
|
||||
rustfmt = "${rust_stage0_root}/bin/rustfmt"
|
||||
_EOF_
|
||||
# We're using git sources so we need to run the Vendor script
|
||||
# to ensure that all dependencies are present and up-to-date
|
||||
mkdir "${S}/vendor" || die
|
||||
# This also compiles the 'build helper', there's no way to avoid this.
|
||||
${EPYTHON} "${S}"/x.py vendor -v --config="${T}"/vendor-bootstrap.toml -j$(makeopts_jobs) ||
|
||||
die "Failed to vendor dependencies"
|
||||
# TODO: This has to be generated somehow, this is from a 1.84.x tarball I had lying around.
|
||||
cat <<- _EOF_ > "${S}/.cargo/config.toml"
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/rust-lang/team"]
|
||||
git = "https://github.com/rust-lang/team"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
_EOF_
|
||||
elif use verify-sig ; then
|
||||
# Patch tarballs are not signed (but we trust Gentoo infra)
|
||||
verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz{,.asc}
|
||||
default
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
# We need to update / generate lockfiles for the workspace
|
||||
${CARGO} generate-lockfile --offline || die "Failed to generate lockfiles"
|
||||
fi
|
||||
|
||||
# Commit patches to the appropriate branch in proj/rust-patches.git
|
||||
# then cut a new tag / tarball. Don't add patches to ${FILESDIR}
|
||||
PATCHES=(
|
||||
"${WORKDIR}/rust-patches-${RUST_PATCH_VER}/"
|
||||
)
|
||||
|
||||
if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
|
||||
export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
|
||||
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
|
||||
|
||||
# Avoid bundled copies of libraries
|
||||
export RUSTONIG_SYSTEM_LIBONIG=1
|
||||
# Need to check if these can be optional
|
||||
#export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
|
||||
#export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
|
||||
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 rustfmt && tools+=',"rustfmt"'
|
||||
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
|
||||
use rust-src && tools+=',"src"'
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
use miri && tools+=',"miri"'
|
||||
fi
|
||||
|
||||
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}")"
|
||||
|
||||
RUST_EXPERIMENTAL_TARGETS=()
|
||||
for _x in "${!ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
|
||||
if [[ ${ALL_RUST_EXPERIMENTAL_TARGETS[${_x}]} == 1 ]] && use ${_x} ; then
|
||||
RUST_EXPERIMENTAL_TARGETS+=( ${_x#llvm_targets_} )
|
||||
fi
|
||||
done
|
||||
RUST_EXPERIMENTAL_TARGETS=${RUST_EXPERIMENTAL_TARGETS[@]}
|
||||
|
||||
local cm_btype="$(usex debug DEBUG RELEASE)"
|
||||
local build_channel
|
||||
local build_miri="false"
|
||||
case "${PV}" in
|
||||
*9999*)
|
||||
build_channel="nightly"
|
||||
;;
|
||||
*beta*)
|
||||
build_channel="beta"
|
||||
;;
|
||||
*)
|
||||
build_channel="stable"
|
||||
;;
|
||||
esac
|
||||
cat <<- _EOF_ > "${S}"/bootstrap.toml
|
||||
# Suppresses a warning about tracking changes which we don't care about.
|
||||
change-id = "ignore"
|
||||
# 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 = "${RUST_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"
|
||||
description = "gentoo"
|
||||
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}/${SLOT}"
|
||||
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 = \"${CHOST}-cc\""
|
||||
fi)
|
||||
channel = "${build_channel}"
|
||||
rpath = true
|
||||
verbose-tests = true
|
||||
optimize-tests = $(toml_usex !debug)
|
||||
codegen-tests = true
|
||||
omit-git-hash = false
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
lld = $(usex system-llvm false $(toml_usex wasm))
|
||||
$(if use lto && tc-is-clang && ! tc-ld-is-mold; then
|
||||
echo "use-lld = true"
|
||||
fi)
|
||||
# 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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.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}"/bootstrap.toml
|
||||
llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
|
||||
_EOF_
|
||||
fi
|
||||
if [[ "${cross_toolchain}" == *-musl* ]]; then
|
||||
cat <<- _EOF_ >> "${S}"/bootstrap.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}\]#" bootstrap.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 "bootstrap.toml contents:"
|
||||
cat "${S}"/bootstrap.toml || die
|
||||
echo
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# -v will show invocations, -vv "very verbose" is overkill, -vvv "very very verbose" is insane
|
||||
RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -v --config="${S}"/bootstrap.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}"/bootstrap.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 -v --config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
|
||||
|
||||
docompress /usr/lib/${PN}/${SLOT}/share/man/
|
||||
|
||||
# bug #689562, #689160
|
||||
rm -v "${ED}/usr/lib/${PN}/${SLOT}/etc/bash_completion.d/cargo" || die
|
||||
rmdir -v "${ED}/usr/lib/${PN}/${SLOT}"/etc/bash_completion.d || die
|
||||
|
||||
local symlinks=(
|
||||
cargo
|
||||
rustc
|
||||
rustdoc
|
||||
rust-gdb
|
||||
rust-gdbgui
|
||||
rust-lldb
|
||||
)
|
||||
|
||||
use clippy && symlinks+=( clippy-driver cargo-clippy )
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
use miri && symlinks+=( miri cargo-miri )
|
||||
fi
|
||||
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}/${SLOT}/bin/${i}" ]]; then
|
||||
einfo "Installing ${i} symlink"
|
||||
ln -v "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" "${ED}/usr/lib/${PN}/${SLOT}/bin/${ver_i}" || die
|
||||
else
|
||||
ewarn "${i} symlink requested, but source file not found"
|
||||
ewarn "please report this"
|
||||
fi
|
||||
dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}"
|
||||
done
|
||||
|
||||
# symlinks to switch components to active rust in eselect
|
||||
dosym "${SLOT}/lib" "/usr/lib/${PN}/lib-${SLOT}"
|
||||
use rust-analyzer && dosym "${SLOT}/libexec" "/usr/lib/${PN}/libexec-${SLOT}"
|
||||
dosym "${SLOT}/share/man" "/usr/lib/${PN}/man-${SLOT}"
|
||||
dosym "rust/${SLOT}/lib/rustlib" "/usr/lib/rustlib-${SLOT}"
|
||||
dosym "../../lib/${PN}/${SLOT}/share/doc/rust" "/usr/share/doc/${P}"
|
||||
|
||||
newenvd - "50${P}" <<-_EOF_
|
||||
MANPATH="${EPREFIX}/usr/lib/rust/man-${SLOT}"
|
||||
_EOF_
|
||||
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}"/*.old || die
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}/bin"/*.old || die
|
||||
rm -rf "${ED}/usr/lib/${PN}/${SLOT}/doc"/*.old || die
|
||||
|
||||
# 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-${P}"
|
||||
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
|
||||
fi
|
||||
if [[ ${SLOT} == *9999* ]] && 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-${PN}-${SLOT}"
|
||||
|
||||
if use dist; then
|
||||
"${EPYTHON}" ./x.py dist -v --config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
|
||||
insinto "/usr/lib/${PN}/${SLOT}/dist"
|
||||
doins -r "${S}/build/dist/."
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
LLVM_COMPAT=( 21 )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
RUST_PATCH_VER=${PVR}
|
||||
|
||||
RUST_MAX_VER=${PV%%_*}
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
RUST_MIN_VER="1.89.0" # Update this as new `beta` releases come out.
|
||||
RUST_MIN_VER="1.91.0" # Update this as new `beta` releases come out.
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
RUST_MAX_VER="$(ver_cut 1).$(ver_cut 2).0"
|
||||
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
|
||||
|
||||
@@ -67,7 +67,9 @@ fi
|
||||
# @DESCRIPTION:
|
||||
# Definitive list of Rust slots and the associated LLVM slot, newest first.
|
||||
declare -A -g -r _RUST_LLVM_MAP=(
|
||||
["9999"]=20
|
||||
["9999"]=21
|
||||
["1.91.0"]=21
|
||||
["1.90.0"]=20
|
||||
["1.89.0"]=20
|
||||
["1.88.0"]=20
|
||||
["1.87.0"]=20
|
||||
@@ -96,6 +98,7 @@ declare -A -g -r _RUST_LLVM_MAP=(
|
||||
# this array is used to store the Rust slots in a more convenient order for iteration.
|
||||
declare -a -g -r _RUST_SLOTS_ORDERED=(
|
||||
"9999"
|
||||
"1.90.0"
|
||||
"1.89.0"
|
||||
"1.88.0"
|
||||
"1.87.0"
|
||||
|
||||
@@ -16,3 +16,7 @@ DIST rustc-1.88.0-src.tar.xz 283294344 BLAKE2B fc17efbc8b2e54f2da61384097dcb3b8f
|
||||
DIST rustc-1.88.0-src.tar.xz.asc 801 BLAKE2B 858e987ad1fc49c1e1cbc5ea709f835c60fce907e89205e431c843bfad97dc0ccbcf399fc7d87319b8455561cbc24020bd88cb572cbe932cb8b80a8adec39687 SHA512 64ab398dc602fed3ad7bf232249e80cc0a9831aa90c7eb37658f7dc5b2af04ee391f9633aae7a1d90f743d019cec531318384f71384ecbe4f6169e6e88b7ba0e
|
||||
DIST rustc-1.89.0-src.tar.xz 267487572 BLAKE2B 9f6e3c595f843c239b57f14e26685e9856cffa10189b75627fee4dc82970a9b5f2c6f42e145d1c1042d934bd4db0334014c046450f7594d621b378d951546d5d SHA512 3ac0f02baaff12c67fe35cef4d56b315134d0a043bb6103a248a2842456c74733c6e3039f079bacfb8b8ab9b7487f92d678987e588bd41276abf9bf7c2f7870b
|
||||
DIST rustc-1.89.0-src.tar.xz.asc 801 BLAKE2B cd94da916d3646048d8f90c6de658de2981d0c815a1f8da01fe58ab6ec133e47180c8b506a41e22c68b3cb77aff5bd3bfc966a71ae2b73849918096d68764386 SHA512 006b91bf41fbedf91c39b8a6e483b089f69af7e78026f2903928fed64e44ee6aa53e46fd19bae31b1576b53a80dab66bf3e53a3bf79f820066d36285d706b90c
|
||||
DIST rustc-1.90.0-src.tar.xz 272348992 BLAKE2B 82dbbe3b5fe79f623c74fb81a4c4372b14e7d765f0e9af3d76a6c4bde9899007c85c8af70dfd9facc06c37a9c8d03a4597ec87b2d053585ccbc2287332b27e70 SHA512 fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a
|
||||
DIST rustc-1.90.0-src.tar.xz.asc 801 BLAKE2B 1e84c6134c4fedbbd52610c259c1bdacb45bc97e8cce7a6b5a8c92827a072c88fcf8984893a5e6aa28c2d5d82bd849bb9d38390c783cfaa503a18c99bcaabcde SHA512 fc8f6dfbb4b50777ae8e499883f95b64861db0ca37119b34b3670b4adf51dd248b0b33daafee90e0f22f66b1d8bd8ae6a6107106e95e73f5c2c5a8dc29532e2e
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz 284030160 BLAKE2B f5df2137e3a08b51f034543d1bcd0793f7d29264e81926458f6071c6f2de4093170ec5d257e56a9940b10494642eab9e57bffd24d61e8682ff052bd62517543b SHA512 e2ea6676f01b35cbd632c7a36d53b8d6d1e02a74fa460243575036b99406781416629300fef58ae04dffa8ed40f5448ca167654fb14db6676d57fc6cc2b31481
|
||||
DIST rustc-1.91.0_beta20250928-src.tar.xz.asc 801 BLAKE2B 70c58b0eb97b735835c37060e2e1ed13ed3531355cf36006c33ba5dbed2f252bda6900e4846693146fd8a093dd3b523a653166588ed1335fb22736e2e5a46567 SHA512 07eed611a38290582329512667d88cfb22d30119d9947169337844534bdbe9113f048080fbfa4dce95e3132319053919c6b11254c6e259cdaed788fa5ac777df
|
||||
|
||||
182
sys-devel/rust-std/rust-std-1.90.0.ebuild
Normal file
182
sys-devel/rust-std/rust-std-1.90.0.ebuild
Normal file
@@ -0,0 +1,182 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
|
||||
inherit edo flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="Rust standard library, standalone (for crossdev)"
|
||||
HOMEPAGE="https://www.rust-lang.org"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/rust-lang/rust.git"
|
||||
EGIT_SUBMODULES=(
|
||||
"*"
|
||||
"-src/gcc"
|
||||
)
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
else
|
||||
MY_P="rustc-${PV}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
|
||||
SLOT="stable/$(ver_cut 1-2)"
|
||||
# please do not keyword
|
||||
#KEYWORDS="" #nowarn
|
||||
IUSE="debug"
|
||||
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
~dev-lang/rust-${PV}:=
|
||||
verify-sig? ( sec-keys/openpgp-keys-rust )
|
||||
"
|
||||
DEPEND="||
|
||||
(
|
||||
>="${CATEGORY}"/gcc-4.7:*
|
||||
>="${CATEGORY/sys-devel/llvm-core}"/clang-3.5:*
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# need full compiler to run tests
|
||||
RESTRICT="test"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.89.0-enable-stage-0-build.patch # remove for >=1.91.0
|
||||
)
|
||||
#
|
||||
# The cross magic
|
||||
#
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} == ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY} == cross-* ]] ; then
|
||||
export CTARGET=${CATEGORY#cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
is_cross() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
is_cross || die "${PN} should only be used for cross"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# do the great cleanup
|
||||
strip-flags
|
||||
filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
|
||||
strip-unsupported-flags
|
||||
|
||||
local rust_root x
|
||||
rust_root="$(rustc --print sysroot)"
|
||||
rtarget="$(rust_abi ${CTARGET})"
|
||||
rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
|
||||
rbuild="$(rust_abi ${CBUILD})"
|
||||
rhost="$(rust_abi ${CHOST})"
|
||||
|
||||
echo
|
||||
for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
|
||||
einfo "$(printf '%10s' ${x^^}:) ${!x}"
|
||||
done
|
||||
|
||||
cat <<- EOF > "${S}"/bootstrap.toml
|
||||
[build]
|
||||
build = "${rbuild}"
|
||||
host = ["${rhost}"]
|
||||
target = ["${rtarget}"]
|
||||
cargo = "${rust_root}/bin/cargo"
|
||||
rustc = "${rust_root}/bin/rustc"
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = true
|
||||
verbose = 2
|
||||
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)
|
||||
debuginfo-level-rustc = 0
|
||||
backtrace = true
|
||||
incremental = false
|
||||
default-linker = "$(tc-getCC)"
|
||||
rpath = false
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
jemalloc = false
|
||||
[dist]
|
||||
src-tarball = false
|
||||
[target.${rtarget}]
|
||||
ar = "$(tc-getAR ${CTARGET})"
|
||||
cc = "$(tc-getCC ${CTARGET})"
|
||||
cxx = "$(tc-getCXX ${CTARGET})"
|
||||
linker = "$(tc-getCC ${CTARGET})"
|
||||
ranlib = "$(tc-getRANLIB ${CTARGET})"
|
||||
$(usev elibc_musl 'crt-static = false')
|
||||
EOF
|
||||
|
||||
einfo "${PN^} configured with the following settings:"
|
||||
cat "${S}"/bootstrap.toml || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
edo env RUST_BACKTRACE=1 \
|
||||
"${EPYTHON}" ./x.py build -vv --config="${S}"/bootstrap.toml -j$(makeopts_jobs) \
|
||||
library/std --stage 0
|
||||
}
|
||||
|
||||
src_test() {
|
||||
ewarn "${PN} can't run tests"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local rustlib="lib/rust/${PV}/lib/rustlib"
|
||||
dodir "/usr/${rustlib}"
|
||||
pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
|
||||
cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
|
||||
popd > /dev/null || die
|
||||
}
|
||||
182
sys-devel/rust-std/rust-std-1.91.0_beta20250928.ebuild
Normal file
182
sys-devel/rust-std/rust-std-1.91.0_beta20250928.ebuild
Normal file
@@ -0,0 +1,182 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
|
||||
inherit edo flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="Rust standard library, standalone (for crossdev)"
|
||||
HOMEPAGE="https://www.rust-lang.org"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/rust-lang/rust.git"
|
||||
EGIT_SUBMODULES=(
|
||||
"*"
|
||||
"-src/gcc"
|
||||
)
|
||||
elif [[ ${PV} == *beta* ]]; then
|
||||
# Identify the snapshot date of the beta release:
|
||||
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz
|
||||
betaver=${PV//*beta}
|
||||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
|
||||
MY_P="rustc-beta"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
|
||||
-> rustc-${PV}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
else
|
||||
MY_P="rustc-${PV}"
|
||||
SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
|
||||
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}-src"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
|
||||
SLOT="stable/$(ver_cut 1-2)"
|
||||
# please do not keyword
|
||||
#KEYWORDS="" #nowarn
|
||||
IUSE="debug"
|
||||
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
~dev-lang/rust-${PV}:=
|
||||
verify-sig? ( sec-keys/openpgp-keys-rust )
|
||||
"
|
||||
DEPEND="||
|
||||
(
|
||||
>="${CATEGORY}"/gcc-4.7:*
|
||||
>="${CATEGORY/sys-devel/llvm-core}"/clang-3.5:*
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# need full compiler to run tests
|
||||
RESTRICT="test"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
|
||||
|
||||
QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/1.89.0-enable-stage-0-build.patch # remove for >=1.91.0
|
||||
)
|
||||
#
|
||||
# The cross magic
|
||||
#
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} == ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY} == cross-* ]] ; then
|
||||
export CTARGET=${CATEGORY#cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
is_cross() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
toml_usex() {
|
||||
usex "$1" true false
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
is_cross || die "${PN} should only be used for cross"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# do the great cleanup
|
||||
strip-flags
|
||||
filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
|
||||
strip-unsupported-flags
|
||||
|
||||
local rust_root x
|
||||
rust_root="$(rustc --print sysroot)"
|
||||
rtarget="$(rust_abi ${CTARGET})"
|
||||
rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
|
||||
rbuild="$(rust_abi ${CBUILD})"
|
||||
rhost="$(rust_abi ${CHOST})"
|
||||
|
||||
echo
|
||||
for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
|
||||
einfo "$(printf '%10s' ${x^^}:) ${!x}"
|
||||
done
|
||||
|
||||
cat <<- EOF > "${S}"/bootstrap.toml
|
||||
[build]
|
||||
build = "${rbuild}"
|
||||
host = ["${rhost}"]
|
||||
target = ["${rtarget}"]
|
||||
cargo = "${rust_root}/bin/cargo"
|
||||
rustc = "${rust_root}/bin/rustc"
|
||||
submodules = false
|
||||
python = "${EPYTHON}"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
extended = true
|
||||
verbose = 2
|
||||
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)
|
||||
debuginfo-level-rustc = 0
|
||||
backtrace = true
|
||||
incremental = false
|
||||
default-linker = "$(tc-getCC)"
|
||||
rpath = false
|
||||
dist-src = false
|
||||
remap-debuginfo = true
|
||||
jemalloc = false
|
||||
[dist]
|
||||
src-tarball = false
|
||||
[target.${rtarget}]
|
||||
ar = "$(tc-getAR ${CTARGET})"
|
||||
cc = "$(tc-getCC ${CTARGET})"
|
||||
cxx = "$(tc-getCXX ${CTARGET})"
|
||||
linker = "$(tc-getCC ${CTARGET})"
|
||||
ranlib = "$(tc-getRANLIB ${CTARGET})"
|
||||
$(usev elibc_musl 'crt-static = false')
|
||||
EOF
|
||||
|
||||
einfo "${PN^} configured with the following settings:"
|
||||
cat "${S}"/bootstrap.toml || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
edo env RUST_BACKTRACE=1 \
|
||||
"${EPYTHON}" ./x.py build -vv --config="${S}"/bootstrap.toml -j$(makeopts_jobs) \
|
||||
library/std --stage 0
|
||||
}
|
||||
|
||||
src_test() {
|
||||
ewarn "${PN} can't run tests"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local rustlib="lib/rust/${PV}/lib/rustlib"
|
||||
dodir "/usr/${rustlib}"
|
||||
pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
|
||||
cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
|
||||
popd > /dev/null || die
|
||||
}
|
||||
@@ -16,6 +16,8 @@ DIST bcachefs-tools-1.25.2.tar.sign 833 BLAKE2B c7fe1d01600beb6e4037de745ae052d1
|
||||
DIST bcachefs-tools-1.25.2.tar.zst 1188546 BLAKE2B 998308b989ea66439262b7cb3c4e0d55198c55836068b842bf6e9d64db0679c7204f941148ae2ec5de5aab8c55bd1be3d2d6676dd53a5255c48aa7f87c00e723 SHA512 4b49d29be56ffde577d753a5eca195a5ef4a17b8a85b1f99c39a00737e9d8d1d06525dafd337a256628b8ab71a26e00b5d5625bd19caed8c8b3ba82609fbb1ab
|
||||
DIST bcachefs-tools-1.25.3.tar.sign 833 BLAKE2B a315bc55d2a84e8fcc9a2ccb5289353b60ea19a8603cd54d387f0c10ebcca285eb0a8e4a7ab39cd9622831427cadefcbc63b5a4e00e47bd6faea2adf08ed2f5a SHA512 7c29f334e50fff2545fc9e4b9623b967b1e4c36d2d6ab8ed080d6c714f8e8c62f8df3ab64dd02733e2c907f5199839676900f65b3c296b3f669204101b898478
|
||||
DIST bcachefs-tools-1.25.3.tar.zst 1299950 BLAKE2B a9be39e2dbadc3e470546bee7a4e6b7a41252910356bb3a16eb09fa793e6c27fd709a47e630c3a3af45156953ee0673de21b3afcdbb49bbfd532a60e1b1c5788 SHA512 698dcacd01ef9fa41bdd712dacc5c06bd735bd9b728fe3ee1e290cfdd1f7f2e568341a516f4d3a4ef2e5a39396ff614ba66f2b2b7a6d92e95164d44271bae9fe
|
||||
DIST bcachefs-tools-1.31.5.tar.sign 833 BLAKE2B 05d00a24c934e9196350c0080fd00e2226eec412c27da930194c6b4080209a7cafacd671ffb08192b992a82a35295cb5a253bac6ba7d924b06a2ffd3ffd49249 SHA512 8e99bfffa1ed24f861ba64137f20aeb3d4ad553641c558ab16460c304525462062cd995bdc7528867820f8079efd913f295ad2956adcae17b0b90f20835d6ff7
|
||||
DIST bcachefs-tools-1.31.5.tar.zst 1333803 BLAKE2B 106e611f37889976cd24926f5f3f59582f0c79e22013569c12f5851eeae6089ef9d06c5f48b5414dc270bcfe55d36c20d650ce8ec9112be9d360f2f0b09a6245 SHA512 d53679ccfcc44975aab2d6cda82b82c64300f28a1d3a48ab4d6165118222a8db97b53531743aa4f0d78d380261279515118bba8b7ecfd4f963e74f217302107c
|
||||
DIST bindgen-0.69.5.crate 221128 BLAKE2B b89edbf883e1bc11a074c2f37f84bb966749823a6408b9765d6a61ee1179451d67dadde41d27838e8ddc6172dee9c342429f42fbe6959ff9fd7dcbc73d7506ea SHA512 b232b906af7535f8b87198f0a4037a0f09af367e0c913575f3d16453a2c272e7d76033cb3fd12d4223ebda4a0f8130629e67c5883e026a2422db3e0659ed3c3f
|
||||
DIST bitfield-0.14.0.crate 16776 BLAKE2B abca546581d912133e7344f049d93b8d793de323eba7780fab162c53a244b845582ec2bd14b529b9491c363c2da6228b7de58407afc554cc718a9df8370f5535 SHA512 703d534f0684b19af68a18048ecff37367ccbe5a52a3e8d987f2420b980e4a20da9640019ca610b1a73841cbe45dbf4d6a1cfb10cf0e7d09f53199b1fcd141fe
|
||||
DIST bitflags-1.3.2.crate 23021 BLAKE2B eb990bb27b2bdeb66fd7212ce582cb36e1c616debbac85df642d0c82b25439e6bf9b1e811fac76b59e58ea3c1bbea6170d03a61e8f9a395e4334a0e2e2987eda SHA512 3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62
|
||||
|
||||
@@ -102,7 +102,7 @@ else
|
||||
SRC_URI="https://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.zst
|
||||
${CARGO_CRATE_URIS}
|
||||
https://github.com/koverstreet/bcachefs-tools/commit/67c9b378c7e7820b91033004b032e236a8069b4a.patch
|
||||
-> bcachefs-tools-1.20.0-fix-fuse-build.patch
|
||||
-> ${P}-fix-fuse-build.patch
|
||||
"
|
||||
SRC_URI+=" verify-sig? ( https://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.sign )"
|
||||
S="${WORKDIR}/${P}"
|
||||
|
||||
236
sys-fs/bcachefs-tools/bcachefs-tools-1.31.5.ebuild
Normal file
236
sys-fs/bcachefs-tools/bcachefs-tools-1.31.5.ebuild
Normal file
@@ -0,0 +1,236 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
aho-corasick@1.1.3
|
||||
anstream@0.6.15
|
||||
anstyle-parse@0.2.5
|
||||
anstyle-query@1.1.1
|
||||
anstyle-wincon@3.0.4
|
||||
anstyle@1.0.8
|
||||
anyhow@1.0.89
|
||||
bindgen@0.69.5
|
||||
bitfield@0.14.0
|
||||
bitflags@1.3.2
|
||||
bitflags@2.6.0
|
||||
cc@1.1.28
|
||||
cexpr@0.6.0
|
||||
cfg-if@1.0.0
|
||||
clang-sys@1.8.1
|
||||
clap@4.5.20
|
||||
clap_builder@4.5.20
|
||||
clap_complete@4.5.33
|
||||
clap_derive@4.5.18
|
||||
clap_lex@0.7.2
|
||||
colorchoice@1.0.2
|
||||
either@1.13.0
|
||||
env_logger@0.10.2
|
||||
errno-dragonfly@0.1.2
|
||||
errno@0.2.8
|
||||
errno@0.3.9
|
||||
glob@0.3.1
|
||||
heck@0.5.0
|
||||
home@0.5.9
|
||||
is_terminal_polyfill@1.70.1
|
||||
itertools@0.12.1
|
||||
lazy_static@1.5.0
|
||||
lazycell@1.3.0
|
||||
libc@0.2.159
|
||||
libloading@0.8.5
|
||||
libudev-sys@0.1.4
|
||||
linux-raw-sys@0.4.14
|
||||
log@0.4.22
|
||||
memchr@2.7.4
|
||||
minimal-lexical@0.2.1
|
||||
nom@7.1.3
|
||||
once_cell@1.20.2
|
||||
owo-colors@4.1.0
|
||||
paste@1.0.15
|
||||
pkg-config@0.3.31
|
||||
prettyplease@0.2.22
|
||||
proc-macro2@1.0.87
|
||||
quote@1.0.37
|
||||
regex-automata@0.4.8
|
||||
regex-syntax@0.8.5
|
||||
regex@1.11.0
|
||||
rustc-hash@1.1.0
|
||||
rustix@0.38.37
|
||||
rustversion@1.0.17
|
||||
shlex@1.3.0
|
||||
strsim@0.11.1
|
||||
strum@0.26.3
|
||||
strum_macros@0.26.4
|
||||
syn@2.0.79
|
||||
terminal_size@0.4.0
|
||||
udev@0.7.0
|
||||
unicode-ident@1.0.13
|
||||
utf8parse@0.2.2
|
||||
uuid@1.10.0
|
||||
which@4.4.2
|
||||
winapi-i686-pc-windows-gnu@0.4.0
|
||||
winapi-x86_64-pc-windows-gnu@0.4.0
|
||||
winapi@0.3.9
|
||||
windows-sys@0.52.0
|
||||
windows-sys@0.59.0
|
||||
windows-targets@0.52.6
|
||||
windows_aarch64_gnullvm@0.52.6
|
||||
windows_aarch64_msvc@0.52.6
|
||||
windows_i686_gnu@0.52.6
|
||||
windows_i686_gnullvm@0.52.6
|
||||
windows_i686_msvc@0.52.6
|
||||
windows_x86_64_gnu@0.52.6
|
||||
windows_x86_64_gnullvm@0.52.6
|
||||
windows_x86_64_msvc@0.52.6
|
||||
zeroize@1.8.1
|
||||
zeroize_derive@1.4.2
|
||||
"
|
||||
|
||||
LLVM_COMPAT=( {17..21} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
RUST_MIN_VER="1.77.0"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kentoverstreet.asc
|
||||
|
||||
inherit cargo flag-o-matic llvm-r1 python-any-r1 shell-completion toolchain-funcs unpacker verify-sig
|
||||
|
||||
DESCRIPTION="Tools for bcachefs"
|
||||
HOMEPAGE="https://bcachefs.org/"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://evilpiepirate.org/git/bcachefs-tools.git"
|
||||
else
|
||||
SRC_URI="https://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.zst
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
SRC_URI+=" verify-sig? ( https://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.sign )"
|
||||
S="${WORKDIR}/${P}"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
# Dependent crate licenses
|
||||
LICENSE+=" Apache-2.0 BSD ISC MIT Unicode-DFS-2016"
|
||||
SLOT="0"
|
||||
IUSE="fuse verify-sig"
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
app-arch/lz4:=
|
||||
app-arch/zstd:=
|
||||
dev-libs/libaio
|
||||
dev-libs/libsodium:=
|
||||
dev-libs/userspace-rcu:=
|
||||
sys-apps/keyutils:=
|
||||
sys-apps/util-linux
|
||||
sys-libs/zlib
|
||||
virtual/udev
|
||||
fuse? ( >=sys-fs/fuse-3.7.0 )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# Clang is required for bindgen
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
')
|
||||
$(unpacker_src_uri_depends)
|
||||
$(llvm_gen_dep '
|
||||
llvm-core/clang:${LLVM_SLOT}
|
||||
')
|
||||
elibc_musl? ( >=sys-libs/musl-1.2.5 )
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kentoverstreet-20241012 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="/sbin/bcachefs"
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
rust_pkg_setup
|
||||
llvm-r1_pkg_setup
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Upstream signs the uncompressed tarball
|
||||
if use verify-sig; then
|
||||
einfo "Unpacking ${P}.tar.zst ..."
|
||||
verify-sig_verify_detached - "${DISTDIR}"/${P}.tar.sign \
|
||||
< <(zstd -fdc "${DISTDIR}"/${P}.tar.zst | tee >(tar -xf -))
|
||||
assert "Unpack failed"
|
||||
fi
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_src_unpack
|
||||
S="${S}/rust-src" cargo_live_src_unpack
|
||||
else
|
||||
unpacker ${P}.tar.zst
|
||||
cargo_src_unpack
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
tc-export CC
|
||||
|
||||
sed -i s/^VERSION=.*$/VERSION=${PV}/ Makefile || die
|
||||
sed \
|
||||
-e '/^CFLAGS/s:-O2::' \
|
||||
-e '/^CFLAGS/s:-g::' \
|
||||
-i Makefile || die
|
||||
append-lfs-flags
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use fuse && export BCACHEFS_FUSE=1
|
||||
export BUILD_VERBOSE=1
|
||||
export VERSION=${PV}
|
||||
|
||||
default
|
||||
|
||||
# This version mangles the symbolic link,
|
||||
# please check if this can be removed before bumping
|
||||
rm "${S}"/bcachefs
|
||||
ln -s "${S}"/target/release/bcachefs bcachefs
|
||||
|
||||
local shell
|
||||
for shell in bash fish zsh; do
|
||||
./bcachefs completions ${shell} > ${shell}.completion || die
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
into /
|
||||
dosbin bcachefs
|
||||
|
||||
dosym bcachefs /sbin/fsck.bcachefs
|
||||
dosym bcachefs /sbin/mkfs.bcachefs
|
||||
dosym bcachefs /sbin/mount.bcachefs
|
||||
|
||||
if use fuse; then
|
||||
dosym bcachefs /sbin/fsck.fuse.bcachefs
|
||||
dosym bcachefs /sbin/mkfs.fuse.bcachefs
|
||||
dosym bcachefs /sbin/mount.fuse.bcachefs
|
||||
fi
|
||||
|
||||
newbashcomp bash.completion bcachefs
|
||||
newfishcomp fish.completion bcachefs.fish
|
||||
newzshcomp zsh.completion _bcachefs
|
||||
|
||||
doman bcachefs.8
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use fuse; then
|
||||
ewarn "FUSE support is experimental."
|
||||
ewarn "Please only use it for development purposes at the risk of losing your data."
|
||||
ewarn "You have been warned."
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user