commit: 96855b9cb4c64a876a95857337b14f263c03666d
Author: Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 26 07:13:46 2025 +0000
Commit: Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 21:13:08 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96855b9c
dev-lang/rust-bin: add 1.86.0_beta20250225
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>
dev-lang/rust-bin/Manifest | 29 ++
.../rust-bin/rust-bin-1.86.0_beta20250225.ebuild | 317 +++++++++++++++++++++
2 files changed, 346 insertions(+)
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index b64ba91b5942..b3b2b83316a0 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -471,6 +471,34 @@ DIST
rust-1.86.0_beta20250218-x86_64-unknown-linux-gnu.tar.xz 182371436 BLAKE2B
DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
56f1e00d3e7ca2092ab7a5cc3e8465af4037ba99100e0773c4a65867428fc8adbeb0a571cae36ac1dd182c24eb5e5b89e306f476ae357ab387f6d5ff4d6a6bcf
SHA512
bf17821fe53a0de5bb58ab03e87a9cd326bc4c97941a306909375285014bcd1126e5e32d62dac4a522f7a72b892c8371dfa3111f25d661a5d4e1a2ea802d3cee
DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-musl.tar.xz 262699948
BLAKE2B
2197f33e5ccbc2e31925457c3af92ffe90dc258e66e9788a7520ab7a9ff3571214f099b14f4db80dff38e519a6f57784e85f335765816c7f44ae2edd96ea04a7
SHA512
a074b931d940bbc0cefb2d56fb9437afa1d002cc599a1779422d0f215eb9382b5b0322e31e0c92408d958ee561dcc9eabe237a6f8c7158986cd10ae550f4d9f6
DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B
2b0c359da43e5b3645632f88bf6f776763571ef7d08d043ee806dc4991fc84b9d0c0b87b10cf12cf354c3a026d0665e17baf1316d00b10f3fdb1f47d834dbf6a
SHA512
30013c2d6ebb6d63a49f0a54be584e7dbfe24ae4065313e70cae138c8533bc0afc2c46f05862828f1a97d3c398be91e140380b1d3d83c0a54976dfe3b5314efb
+DIST rust-1.86.0_beta20250225-aarch64-unknown-linux-gnu.tar.xz 162271496
BLAKE2B
22059cb1174fd4fd4b603e10049e76fd2054c45352275abdf4a4183a38d4cefc7092d04d8f14329f60e9e4df0cd61cd1cd3cb46e148220a93e0484c55e7bffcd
SHA512
aaa94fb98888c59da5dc59cab31d028248e15ce458b6589383a3ff54833783906580f40d2fe62e119cd7a22e1cd443724d61b4be4e81d30cb233a76afcadebbe
+DIST rust-1.86.0_beta20250225-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
0697cf3f3bf9e1d56ac12dd223d47ca9311569a6f2579892628217567994ea29f5e3bb13479a0cf0ca6ef52864bbeb8f59349d0de08bc56e4afe1171e87011c5
SHA512
1c179f33aaa106d4a3f28c552ca298ebe2e9015faa63d40e97f0ceea45bde9408bb3a6c5a599c5a43ab71e6fa2fea1c4f066d0b951ed08377bc8c4121c9392c9
+DIST rust-1.86.0_beta20250225-aarch64-unknown-linux-musl.tar.xz 235432052
BLAKE2B
72bd9899a4c2cc68557e4513c164dde533fe74e1f34ab4579ad3cc595b8df5a6d93fe42d36b50e2ffc20b6bb5dcb92c6512cca63899c64b9f7664495adc4d68d
SHA512
d1024147ce447b039b3a9bf09b258ee0cc4e4bc9a3e033c118e00859377766d832c2f5642116eb8a5e7f18814f7e1d459de7c30d13f284ab5e6919644a1cb248
+DIST rust-1.86.0_beta20250225-aarch64-unknown-linux-musl.tar.xz.asc 801
BLAKE2B
b281059472df1c4d8667303a30a1dbc5ca3664606c44ff257015c29685f321cb0085cd89778458f510775f18cda00408ee113eec8117ee111f3f92218ebd620a
SHA512
c7b5de9c70562da1e5a4c306983b7e4ce89942c46cfeae68ee622b098b389d41a0196566e16d218f5f4a3c1019c96ce04ab574a56e0ff750ee5b69b9c4ffc26f
+DIST rust-1.86.0_beta20250225-arm-unknown-linux-gnueabi.tar.xz 219585140
BLAKE2B
c61538b9a86311691cee13e4113416e62801b9d1e845df73e5769e14b5c400607c797e0f37bf211811d21f31af297a69800af409180ae5eb908dfc2814033ce0
SHA512
54c569ced50acc9895029eccfda0767f980e0a23066142d4b3675408b023105ccd6f706b3726bd35bb49cec4c9510adb7cd7c353e7be1cf6d1f69db4548499a5
+DIST rust-1.86.0_beta20250225-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B
d969bc52bc28db30754e180e3427cbb39c376c6ac1eebbaa7cc00d2016726f0adac2d39ba348f5b1ff79e2a1c728cad3eb9c4cc1c972b399ecbf15fde0486a0c
SHA512
586fb0eceaf36ec9017da40365ba8fc87eaa21a5533dc30d92c62d63bb02a2b80a8e712d0b449e06ee374ff797a1c9b0902491bebc94c179d938c6cd9351eda8
+DIST rust-1.86.0_beta20250225-arm-unknown-linux-gnueabihf.tar.xz 220847580
BLAKE2B
227afc76a06443fa9fe0d6295c6758760fc541f586b76378a23c88ec3bcd8bf65aed2ec4c17d448202635fc75473f907888c657392eff470b76db745f9bc5f39
SHA512
7d2a15c3dbc741240302dd08219df6171d0f7d1132e68695ab1c6a080790cff413c8824c5bddf8ffb82173f0516f47f6d0c805cbcc8565379cae7e8bbced1874
+DIST rust-1.86.0_beta20250225-arm-unknown-linux-gnueabihf.tar.xz.asc 801
BLAKE2B
3c63b838061849ba629dd0a59b96105f2745f47066d8e61f1b201841022c3da628f325776a3f56c6cfc0bff90e7a49b008eef4d8299f05e0b2cdb4b3c1e5434b
SHA512
e28d8fcd075cb3b681262cd68797b0d25d241a81b6f2617ddba4b56bfc97a1122f20874c20f3e20ac5102db8cc561d0cec6790e4ebce206b919bff96118a8911
+DIST rust-1.86.0_beta20250225-armv7-unknown-linux-gnueabihf.tar.xz 225818148
BLAKE2B
0f256ffe120a1c1b658a32b1fb00698786e36efa831cb31d8229eb48aa942ec68188e0a5065d8d6f8480081d09848d81aea1699fea4804edcf4fb14ae02bfed7
SHA512
ee275b10a1dc24d27e1215a21b633e8c8df21dbf441bae2bb8ae0e03a86e03403ddf0cf53d721e0f3af9faab4bf68d0f126fb08e1409d8e287b41231dce84efa
+DIST rust-1.86.0_beta20250225-armv7-unknown-linux-gnueabihf.tar.xz.asc 801
BLAKE2B
dbec13daecf280cc954f8b696c258da43f8ac17ab5c2a5e33b58e38206bcc547ec07ef3ba751cde3d7e55fb78bd3894707d144749578888e42b2ab5435f94640
SHA512
458c6428dcccd6de45745c1350a9f6cb3ce13e974a5d2b8473be863cd0fed1eb504dc771b243ee19fac056b4113ea81c030a032281f5cee8372aa0c82cd5488f
+DIST rust-1.86.0_beta20250225-i686-unknown-linux-gnu.tar.xz 255115448 BLAKE2B
112a9fc6c4c6dbc022536e561b35dc89051f26eb458cf38633c7f7d2911d448d8a55a135efa0b3cead6267a9018bdc6218abffc967624f95193fe5d6dbac10ca
SHA512
a60c5e3f55d30967314ec9b312a439b1302d5cd18d0dd8ca3666f3344cd9512b7cf7bccce8002af1d7eb4db082ec7ce3b3b59b9abee23a803175e6780659e89b
+DIST rust-1.86.0_beta20250225-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
3b68d39f4780ac9fa2fbbf6b0c73e8d6ec91bd37951fa33564bd654ebb51c26d0726108f9ffdb39c570b73d736eeb922b17a76bfca0cd8386dde87d902d8e111
SHA512
ccf36b6f2fbdd5ad48de463164b6b5f9e53c70a7b9146295d482dc1e89c4eef79bc26306c49a73ad22c42840023cb72f520bb5a8e1c496f5025646b1530d5a59
+DIST rust-1.86.0_beta20250225-loongarch64-unknown-linux-gnu.tar.xz 251914240
BLAKE2B
99744c8f40dc90e17471995aa1d4087b40603d20f9114972cd860b00ec546c6828c364d5b7a86ace8d7f87cdc829e0711f758e495a7e188b0e264a0ef705cc44
SHA512
25cbe1f3167b560d31b7b41635343f4819b90bd83ae76dfcafe61169b7d0a37e5f68784ea3a7a659a05aa649b040f9b62864cff6139190a3e009be1f589b0d55
+DIST rust-1.86.0_beta20250225-loongarch64-unknown-linux-gnu.tar.xz.asc 801
BLAKE2B
c49018b1dab4948842839424b62f6339253d6dd89ca3aca52bb83a337327329341824bfa7b0aed5f8450c694cf90a2ae39381ed6bda3a2ba98a0ea5021da10b1
SHA512
c2bdc1386c905ab7c0bc5cfa0eaf9aa5f45500b8889a872131ed44182839cfb447719fc6fc2f5ed6fb9aff2ba732dd640448f848e282dd532b52568641e1add8
+DIST rust-1.86.0_beta20250225-powerpc-unknown-linux-gnu.tar.xz 243643276
BLAKE2B
31291d0ee4fd5aad13d6fa05226ad5cf189627aa0abea3e1a2f540bf77ce5fc6167ffbec96a64e515baad7288559bd40e7f464fed2ced361d201df0d11880ded
SHA512
110b2d9138024cdc5cc0a6e6f34961e4b3eb16409816d72d0bda63b5cc4044e7f6a4fab10c69737ad362900bac36d4721a9579e176989a9f9442eafca02219c9
+DIST rust-1.86.0_beta20250225-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
eaf72f9496626ce42a3006d31856e5da84da35573b825531c9969aeb05f6c4bddec6d771252056376c7c511ffdd0b56b95f4e5c87b29dbdfc338cf89d1976fc5
SHA512
f669a60884700029bd38602163c310854091b6658681afecb73c4b209ff91c11b79836e01758c384cd52dccf8919b37874865e7292d1f0b029c455073ae0319f
+DIST rust-1.86.0_beta20250225-powerpc64-unknown-linux-gnu.tar.xz 239855984
BLAKE2B
758f1e7b7c34cdcdd5d901616200eacedaccbfdc86de066b4b14d4e8106c4850e732ef29c530018bd6da27d1e6f3105abdd1d887a4231a35e77bc4c240c52b43
SHA512
43a77d18a640dfb6ec0bc04b67eb85b7ca40fbc27c4b165db1ff53b1caf9a024bb4a4441be3944ab1b2b4eee56c2001d076ae4c48a5aac3ee01d5df87a0ea95a
+DIST rust-1.86.0_beta20250225-powerpc64-unknown-linux-gnu.tar.xz.asc 801
BLAKE2B
24a8e9c459fdffe21f85af6106b691beb60a8536e33422eb3f9cba9c428cd8045f82c58766ee59860e3044e1240f1f576da5456da3df01c29fdc318b3eb2c7dd
SHA512
d6b8b731057529396fb6e00891a77e27ccebf70454e3557fb56051a62feceff6d7c42564eb82772b30f5159ba736ef03173a7723bfe31222164ccc48fbc40110
+DIST rust-1.86.0_beta20250225-powerpc64le-unknown-linux-gnu.tar.xz 254298220
BLAKE2B
07d6e7fde5a6ed8191003bd52e1968fce10bc05c18a2d17d771358f329523b4edaff6773ec8c0d1182bea6f4e5644caf72305765ae2aef8a9adf0ee5ba689885
SHA512
040a81b3fb1a8f5ef9cea89a43395dd616a9671eadf1ceb7a47fdb0733bf7e26f10afae6a4000f9f2271dd8a683d508ef7c82440758dea91ac4672ccc5344012
+DIST rust-1.86.0_beta20250225-powerpc64le-unknown-linux-gnu.tar.xz.asc 801
BLAKE2B
6e1b092134967544131c707cf5d7c58a456ab5da3ac67834ec6b5cb96a9229d83c34e0fff5557c7790357e47d3d85d230362f5af786dd6c0e6e5c44e16c29799
SHA512
58e303ff074c58365b208e75107c4d5b42a4c9c9ba3546db1f792cee361b05428e5dfaac39c3a74d65b09822269e596ff97684cb43dccbee1ea47ae21c460370
+DIST rust-1.86.0_beta20250225-riscv64gc-unknown-linux-gnu.tar.xz 239076740
BLAKE2B
cb669a3fdeffb8e7258beed158ecf651dde434b8efb58cbc2b3f495674e579ac9be906bc609d3274dcf8652a9277f599884ef4c06271f41a7f781bdb1faecf1b
SHA512
0cb72f0ad90624e841b12553fca2244714bdfc10c3c936a85cf89660b14f9ba37fe6b067f1c9189ace57215a7e2e6fe438b8e35bc255ab9374bdf05f748997a6
+DIST rust-1.86.0_beta20250225-riscv64gc-unknown-linux-gnu.tar.xz.asc 801
BLAKE2B
eb2cf05cbf16ff7c80fdbdef9a8f29100bccd672583e862bba97f004480664831d6f0edebf409c22fa4dba56dc9d62f3f4c2a15f1351b0b28866bf88ec702f9e
SHA512
a680ad3394d3b9bccbf4024c527dee201b7c915062e891c414317575da78edb46be9c392efb94edab8a305103c806140e9dce0cc25ab9a6a3a4c8336f026d12f
+DIST rust-1.86.0_beta20250225-s390x-unknown-linux-gnu.tar.xz 241511808 BLAKE2B
aae89cf0a53b5763632eca6f4b033e6254f19d0a2ca88351dea14347b52d7ebb406a899fa788cd0d402172e8af754d0a2b67ca077f93495e2f6030118f36a0f6
SHA512
92661da8e796e6a29809fd000a2353de29a4442ace6a4c42f338149066dad85e30759f7c13438a7dbbc4104639d4114a6b135143ed54f12d4a0ef2fb07357603
+DIST rust-1.86.0_beta20250225-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
a0dbaee450c0e8b9fbe4348cad60ca9bf5955f2f9c22b2580f9b43af5dcde3317647e4396266ec7e7dc8ceda4c05e0fa1cbc786e4673038ac664cc9909d5e66e
SHA512
4ade36c52247a40973766b8428714f2d8d6ad2314f45f550dfdd90ce24d7445ced977723f55aec2d4d5fb162d4ad5371c25012dae64d835b6637df851d831dbb
+DIST rust-1.86.0_beta20250225-x86_64-unknown-linux-gnu.tar.xz 192552128
BLAKE2B
da3d4634b7a57a5b438b6ed8e1e37f155b7c9c141ead0e6861b173938c9e1fda3e1e6da0fc966e089645dd93d32354ae29b8b1f1f5b04a05548004692c4fc379
SHA512
0580762b898ef905739e7fcf097408737e3bd3afebc6b3bcf2db54d98eae0b0cc38121c2f22bb28524ed0b29e4c2446eafdd895283f7ff479df14a1760e979b3
+DIST rust-1.86.0_beta20250225-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
615efe0198fd03883301d6e205577a05fda902d47ffbf9ef90fbb96c8275548b490c5ec2c530bd6dfdf18e1596b6c427f00724a3adc3860e107df03c864ea7ee
SHA512
d10f522df9bfdb515f725acd018298fecb90a70171956f5c48e62522f596d34496d76ace0e05606cf9077c6e797e17ea4d086f6d4c055f53fa8d12aac1e93ced
+DIST rust-1.86.0_beta20250225-x86_64-unknown-linux-musl.tar.xz 283004932
BLAKE2B
e0639e06159347d160d0d90f9ecc0739cfa7da07895250d8b9debbfcfbc689e5ddbd0d8a4c1d08d61f8b5ab05b9b2f50613798ce78d57b4fa274b4a3c28d60a5
SHA512
03515dddb9820b3c159d358388a78def71879aa4e02735fc69aed6a6eddeec457f4b231b9d6ae3daac7310e6370bdb368b65749f869182640319ac983c7b7dc4
+DIST rust-1.86.0_beta20250225-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B
89ce6eb6a52f7bcdcf5d5001c823c2d596e1e186d7a91c834b893b7be0af1ef442dd588398b05f60eb9f94777395b59bd72e0943a2e2c3c4a1d27147a62f18fb
SHA512
f58230280ed4743a8b298fe45d36fbc44742f1e0e7867b95d47d3fcfcf723de5302a489a150a011864b5cbc7707ae0d340e45d9f013a0224e8c2fcfc57f4d5bb
DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B
e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1
SHA512
659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B
d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268
SHA512
11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B
9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909
SHA512
e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
@@ -485,3 +513,4 @@ DIST rust-src-1.83.0.tar.xz 2998424 BLAKE2B
de758c5bfb29865a3ab7ab02d17b0282272f
DIST rust-src-1.84.1.tar.xz 3016012 BLAKE2B
c9edeaf0797a22e384c54b3fe3e7c833464c09f8828474e05400a561a369d836626387caa495689e4b14fad691a85d6859098c84347211a6f79e2ef2c8d9d6f2
SHA512
564c440a05b67fd3a5dcb4dea21800d32ae65ca12230b804b5efa4bd468fe1b185bd7ed89041782018f70f60afd7554d7755edbe20e9cdc930a9fad390deb317
DIST rust-src-1.85.0.tar.xz 3036988 BLAKE2B
b7281b23eef60cf052e1641a29915c02c590166a73e5ae75890072ce80f95a2ab71cead3e3da7adf757ec0352d1dcc87ba4c3070282a27657b34420fe24a0c16
SHA512
613cfa603dc457cee34b154acef9573d766ce5757c9e8342b13d362f2e62b4cee47071a59df9fd5fa42ecade1a9efdada5784402aaf7254d5996558533bff8db
DIST rust-src-1.86.0_beta20250218.tar.xz 3035860 BLAKE2B
506df30188382d43798c6661a8b730c10a74a230bf5ceb7c04f2892f14a45630182ee174f79b564dc5a6dd8e3bc84963b8391fc9641efc57d0ed90e69b89d545
SHA512
4c7cc4d1860f7d97f615ff5dc030754a7fb72d1eb47b27a2e25dbb5a9b0326b8a1b82b6b60a784da910c4730d3b728bb27e1d27f30dabdb7e455143550f0c424
+DIST rust-src-1.86.0_beta20250225.tar.xz 3053616 BLAKE2B
19abffb74a9926c73fd112589be340b2955e3117d4344f4185de08899be5a5ac9835395e601224f21e63fa0f91053fb39ca02e98a6442570dd54c6b0a39f85a9
SHA512
57b8eb0fa06e5ee37d89ee486375b7022d2085fcd88061a20c3e8406c312fa912bc0b52c9259bb3682bbba1e2ea4b044eab9f9ae66262a67c19657033fe918e1
diff --git a/dev-lang/rust-bin/rust-bin-1.86.0_beta20250225.ebuild
b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250225.ebuild
new file mode 100644
index 000000000000..97bd2bca573d
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250225.ebuild
@@ -0,0 +1,317 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 19 )
+LLVM_OPTIONAL="yes"
+
+inherit edo llvm-r1 multilib prefix rust-toolchain toolchain-funcs 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 "${PV}")
+ rust-src? (
${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz )
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390
~sparc ~x86"
+fi
+
+GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}"
# omit trailing slash
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; 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 )
+ !big-endian? (
${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-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"
+
+RDEPEND="
+ >=app-eselect/eselect-rust-20190311
+ dev-libs/openssl
+ sys-apps/lsb-release
+ sys-devel/gcc:*
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+BDEPEND="
+ prefix? ( dev-util/patchelf )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+[[ ${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/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
+
+pkg_pretend() {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a
hard float version."
+ fi
+}
+
+src_unpack() {
+ 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 analysis="$(grep 'analysis' ./components || die "analysis not
found in components")"
+ 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" )
+ use rust-analyzer && components+=( "rust-analyzer-preview"
"${analysis}" )
+ # Rust component 'rust-src' is extracted from separate archive
+ if use rust-src; then
+ einfo "Combining rust and rust-src installers"
+ 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/${SLOT}/bin"
+ find "${ED}/opt/${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
+}