commit:     2d3b2011a56265065db36e9d9a5caee85c6bf93a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 03:28:24 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 03:28:24 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d3b2011

dev-lang/rust-bin: add 1.91.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/rust-bin/Manifest               |  31 +++
 dev-lang/rust-bin/rust-bin-1.91.0.ebuild | 339 +++++++++++++++++++++++++++++++
 2 files changed, 370 insertions(+)

diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 8718e831e497..9a356386b21d 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -664,6 +664,36 @@ DIST rust-1.90.0-x86_64-unknown-linux-gnu.tar.xz 202999512 
BLAKE2B 2aeaca36f5211
 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-aarch64-unknown-linux-gnu.tar.xz 169421368 BLAKE2B 
5cf9486f169703e11c1460ea5ab09b90499917a60f18fcf914d4cbe727a9f253431d1e56ce7240205c422d79a51b19d9a22ca246ffd932a2e653e68be169ce9b
 SHA512 
45a34f4211683fa72f04e7f96a611298b757ef05cfef81869900a9698fdddea2995e71dff4159a08d8c412e9a4bd05c5836d60149887be45faf2ac485f73da13
+DIST rust-1.91.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
53adaa7ef5349ea28d6456b12f1bdf0332346f7724b37ad08b1fdc7c3bf487688f6e5287f25e1c6765fab7071c5ec74cf445aa43a0efaf2816fa7b4fc4b06c58
 SHA512 
c01e8150209c753921ae27cb32da1cc34e43a845a8e4b9d3a08ba6f5825b351c1c1121bd8cbfa84306981f24b65f3417c25f204f47946c7cb3f1d98553f80620
+DIST rust-1.91.0-aarch64-unknown-linux-musl.tar.xz 245102896 BLAKE2B 
b9973583093d5d92abbbc006c03bae3dbbf99051f3ab9115887db90bf3efdaa824a22a2018d38096758164257a5c1d9040946981f6dfd3d8ab1e5b7b950b3af0
 SHA512 
1a082c46f633e12e07f214249c6bbbcebe10d19bf3908f78fc1c66106e1025b2a55b85e0e396163976cbe831761f08507523273d5734cf67e44356a5a482c884
+DIST rust-1.91.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
edabb990bc2962f1a078db415b574a099eb56c6097df61af644b3ed3659f77b4a9c21dee68259cd0452bceb0e95382f0ad4e2c12ac8d5620b196bcf19a71b480
 SHA512 
4074e1d778b9b4684727ca659f27c63134815d8467ebcbf122670e0ffbc68f297c3d25f8795520a32e41c6e09d0c7d6a4878cae47c2909bf537fe3beb1f813cc
+DIST rust-1.91.0-arm-unknown-linux-gnueabi.tar.xz 225139772 BLAKE2B 
182ee75b1154bf50bd170d2332c59055882c1ca39455596eb190c36f7ccce1c257ed0a314e50b8c5cc074b50f39d686a0a22889cc6bb2b1597875fce7bcdc1a2
 SHA512 
f350cf523ef418554a3f6e21024380853b91d5ec372f5c2c625817ebc691341e5d46008994c15c28fc8dfb07cc0d55d861f26365c1d2e6de66cbe53df33c9620
+DIST rust-1.91.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 
70dd6ed821a5590063f9b029b4e0c0a41dc1281accaf6f85525805671bc06e16dea49ac6f1f063e8ad1900133c9f4d3c7753e32119097f44db22d00982f39296
 SHA512 
b3356c39fd2613db72976a78147affa4f40c6ed4fb016158a4065e15810a6179ac739c20167ced23fbaa23751c92d86d81126f9229c581bbd21ee53af9383956
+DIST rust-1.91.0-arm-unknown-linux-gnueabihf.tar.xz 227087716 BLAKE2B 
a16832f706a27c452389546a680276cbe8b0395dc9e90b077d34fe061bd360dbdefc47e2fcda43c6b372668f7d39ecf8348d99253d908db9c8ef27ef405acc76
 SHA512 
36171c141ff22fd486b4c472cebac67faa560b0ae28e3b5361aaf76024566808d3f1221c946ed28d14a79c39c024765118d36034b4fe0bf577e0275a4a61ab2c
+DIST rust-1.91.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 
428a33adc68c03a11ed9d742960744e24b53ec7fde434751034080548777c1d25302d6fab12cd203602abc8fa1e47a49bd474c6b37c2c81fc9fb268ff24de94d
 SHA512 
0bd7797b2a70bc219a0927c4869fc10bfc014ce0e86a3b01b46c1e4125bf223dfacefd81ec4d401fb1e7f4b14e427e200b698642ef6933b493e1fca37b30ec17
+DIST rust-1.91.0-armv7-unknown-linux-gnueabihf.tar.xz 229097816 BLAKE2B 
3fce2cf704e8cbe438bbd986a2dfc4e9c452c936342782e7911c9879ed98d031fb7cd630069eb8bad50b679911bb76a38c40f045ea724b4a6decca8db8d1e348
 SHA512 
4c1c0537cad743584bfb5d8dcd5ce688cc9845511d532665d6ce6377da3888e9c432e251fffbf2d3f63202c4b15e8f2bee3953a7d1c38af1ffd31bc5f23c2d06
+DIST rust-1.91.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 
7206ec7368787a3113f7ebd6eae81b43e3301954b24ef9053348616572cca5d7d6eb07b74fecb27d783e774df99fd3a64a86a2819761e320da86b59b7a0eacdd
 SHA512 
883260c231a3eabdc388aae19a0c984df287409d901593bac110671392853aae8c0e882a8b42c0625404a08469649befeae507f43fc84982a1582cd4eab8c972
+DIST rust-1.91.0-i686-unknown-linux-gnu.tar.xz 266687428 BLAKE2B 
d9622c73ec519cd59e7603b6ed782f0de2b7b16c646463fd413c2666617995f74367257cb2c099f2c55dcb98c30489a66a944b00e44758b2f92b7481329f3165
 SHA512 
c4930c16ddc62afe9420df3e018b587ffb291e81ae5c8f519616480022131e1ff61fb181bd4723d492bbea5e901d41eee0befd58df6ef2113c08078412829e51
+DIST rust-1.91.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
0c6ad121c54a969f3cede18323937cc6fb3474fbd3ea62414a318aac4c2ea556091c3cf82fa763c6e80e9378d63f8894fe8f00a6af667f095bcc7d60b855c5fa
 SHA512 
62a4b3509f797c0930773013d536755d45c74c9f5edd4cf518579135f6948eeb6910ee373f0ad90a0733fb3eea07157e4a15703bd51a289690c6330c7b4913bb
+DIST rust-1.91.0-loongarch64-unknown-linux-gnu.tar.xz 258895980 BLAKE2B 
7f2db5cd33513d66c3a282aca95b578a4622bc5b8f63c5f2800ec0ff75796fb6a1d102acba03fdf425dfcc2143eff81d08d9b09d835005b117f5300287110177
 SHA512 
0df9cc174510675a0f988a19d68173c43aa0a5521833210c6f30a231be53515e55dac997a5e807199471035f37c1a7412dd36a7e8e475d5a66d5095375758d7a
+DIST rust-1.91.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
b76e7ec4eebbc4172cd3ee8c200f30f769435fc1a864dec249d88d57717947fa8f4fba18c9ae1dd9cee13775f66453f79d068ff72fb275fc56af7f6617fa1321
 SHA512 
93849841dc68eee8b9d87564bdcff1b293979bf1152478fa00598596d4af32af58f8a45e768db30dc15f3184f8e0d14fef8b43d9609a004045c9e60dcd900341
+DIST rust-1.91.0-powerpc-unknown-linux-gnu.tar.xz 248732612 BLAKE2B 
281b858e79eb569611537dda8b5264f2207765fd75e057277c4ff513496822874dfc3e29f106d94a0288a944b1b781a538b8a1aab0906d5a46ca299ad4b06d95
 SHA512 
ba23d658e5b0fb0cd9c91526ca9c87957b8a2365537bd191ca4cb636c059a2d1eba91c5a2d1a82c4884d93417e945cbfc899ed5bda253434b9095a767877b21b
+DIST rust-1.91.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
999ea23ca7fa0bef0f8231685e9a7d841584680a488b9e6c56ac3046f44907212be434c14f4559b8b0a15b420f701dad819f45608033bc4e68ef44c4b4d1e38d
 SHA512 
451cb1f49a5cc00d24829f6e1d23c41e5ea648c6f321cee6c4c80e203f645beb5dd825324e345b39f73436d123d094d0026fc3a414fcbd40fa91159727281c23
+DIST rust-1.91.0-powerpc64-unknown-linux-gnu.tar.xz 250058172 BLAKE2B 
0186cd91380b0799e72c530a1285a92acc2d9ebec4966d32c8a0bb97185f6dd6d56bed45e77ed0586bec32e1ab135a097c30a08dc5982c4961bd26ef8acfa45d
 SHA512 
1867c7ae4aa4b515281c7b8e547846651f5e05430d8a280510c516f15258a3db6d0579e55c0da8a8895056cb57304c75fcc558c23b761bcf9a81970d57f0ec66
+DIST rust-1.91.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
e9fdf55b00a04956c1c77e23f3cd436b336454052d7330464dac32625f4dcefb564c4187afcf0e909666d121c811086944c918aa8b32f5af8cea8ef34f680416
 SHA512 
77600956d2174953bc9df9d7e2125a737544f6d65dc177df823273e1618ea2bea76cd1710cd41442a33660ac29561ec6a922ddf54ccaee2d0c068a18a6d9be9d
+DIST rust-1.91.0-powerpc64le-unknown-linux-gnu.tar.xz 270389192 BLAKE2B 
022c98947c31f36007c018f5f457b454179fb338bf32e78113ab3b00458adaad3136a8a5c0e2e9f2125262a31f53af2bff64e808e936738679b827d9dcbf5149
 SHA512 
5809477ea041fcb3e961ba8a0ebf9c71312740e1c979903313f11d182712db2b9742ad7f34e5103cce6c24bbda183d6c49b2615e7e05cdb2412fe4d0ef2762a8
+DIST rust-1.91.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
7717513fb55569d2700a96bbd62c0ecd49e9880254b5dfafe6194827fe3dda1351593cf4f1423876270d30dc13ad122a6235b3e75a4f688344cb96e3fcd70eb2
 SHA512 
316a8396da39dbce37701bfacb7c0e122f56911d0cae258b8f60d6f769721314617a1657faf2a9b01f3efcdd4b1d16a776c183df87e1df644fff1a104da4be12
+DIST rust-1.91.0-powerpc64le-unknown-linux-musl.tar.xz 268006080 BLAKE2B 
c83d0bafa2eff817fd25984a80ec64c128c3426324755d93d0add01b14a78845d45dca1c9d39b127dfa11405ad6c4f9368b91da3933cc7d26c9227f565dba990
 SHA512 
f4ed26d5ea585c686195dbb0d911948816db4ba92ce26eb4bc1112b1649561aa9995b934ec4c7602c7d9b43e1fed62b014e7f6c95eb1d9a0a950cdb5e3ccde92
+DIST rust-1.91.0-powerpc64le-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
f558974aa6a20e053bb8d53c59ae763e986a6f0bd4bfe8a431f51a108f28e0dc33a9d2e2cecc2c2453f8d3911a832429dab11117923af3e39b82768f11092e10
 SHA512 
472b83efe99d71ad5b19e754671c4ff7fba5f99ef883402a31308fe0e495921389a4395b2cb33f3492bb3b29defeff1708b41a80480a784907abf1c64087dd2d
+DIST rust-1.91.0-riscv64gc-unknown-linux-gnu.tar.xz 248610144 BLAKE2B 
7819f3d284eb66e957286418e4bd3eda1de45560534f48195f9b9e436a5651964347b2b78d59cd119a4b61dd1199fffdced8fc32a1ddc9342ad90c1257dfc530
 SHA512 
bd49412f2e54bdbad0c5e601c11adbe1ba0dd1f594e412a6438352447984e0f17a5e09473d95291a6a173285d7b1e90723027326d4c54890ae46a120a1815c3d
+DIST rust-1.91.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
844d4b7ec84e42af98a1fa113bef79d9c7b490e9e8b6f966c799908bf8915a5572c7e418632a2772bb4f90059e3e3005a2e02ee1d07a0041224056ac080cedf4
 SHA512 
a4033535a497129059c74c77e5bd624024d73ecda0096b094c4f162a215882e4051da3ecc1f7f859ddb763cdead4f1da0d7a6d3733dd7b73c55b7983cfa13ff4
+DIST rust-1.91.0-s390x-unknown-linux-gnu.tar.xz 237862320 BLAKE2B 
8bd1ef16afad51389d06130d0ee956f0bbb444882cb729d1ce739f3ef5e6f0ad9823a6cf5520bc6bb1f3e568819d553a74fdb5afb47c670d00efdf602ab2b537
 SHA512 
bf1d379c4c3447ae590b372ae3af4a33756ff55129fa08e71bf1e4d6b1ef4056ac71d8129232aa32acc6a11473889e46faef5e21babb27a66de22344396a4634
+DIST rust-1.91.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
479675614690dc64d9b1481c8a7e60055b6df52a2af41c8cc39c3152af9e5f227f35856831d5b44c68322e3161a34ef8f269ac59747490f3fa8c93906abc1fff
 SHA512 
6b1610a1e0b4badf8b2eb88b33101eba9a4b93c565ec1ae797e2380886917c5a7e6d6f962fe4020904149662578ae855ab4867d6e6474076ce43b40416e08748
+DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz 192170744 BLAKE2B 
a06c63e3c534e7456f155ff1c371525e06a3e679192163cea7f070d8602e146deafe93de430b40a9a9c1f05af841756412ec38dbec6b7a3bb13b2949a04dad15
 SHA512 
ba305a1b3d9d093a26cb8f19a60fe0a83c77f6739d5f1bd4801da3b12d3df5b3a6cfb19c61e3cfa971d8ea880f70e0209123063bc41115bc5c2285af1615cff8
+DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
4bfa68287897a1b5916c04a56909aaeaa305cbdc4a9bef377295429221e48451a6f4670929c9d35e80a0d40478352702673bdae4958a924d4124c26e888ff561
 SHA512 
35e678a3d164b5f198e5aac2ed1c1a6af8fde83b84c84be6e3ce51a7099ae0a3e7d25510b45a1b2d6bb99599cda0f18ceec46883982bdca6ece94eb1e381ed0b
+DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz 295368056 BLAKE2B 
3057d8cc29bc789bd1c4d9d0779a0b2ef4b26c2278373960558a316061db72a77edf37e330eefe5c3ec66b69cf184fb46a14641162ba6ecf96f909d3ac7db100
 SHA512 
98a03725e216687be237358b1a6598470e98322af6cf51fc51d7ede23ae58b0107872a7f8ee2e4e69e9531b821be7145a975c86899a97728e809260b35ab7f23
+DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
a8fb18793e536aec99626bf3d85890cbbbd8c2ee5e2a2917999543bd3153b026db1072419ad464e35ecc508e3e3fcb9cae450b4f590359589545fe9adbbcc26d
 SHA512 
0c3bce48b1ddc7d97946ad5e27f8dde91dd14743577fe60056f7c6558139bab7d8aec4ce76901abd2633a61eb122bc30595779cea047ff7a714e83fda2921cb9
 DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-gnu.tar.xz 169413468 
BLAKE2B 
5f15fb75cc40be2389da96f77c78d59f61ec966c5b5747b4363bb638661d88f8944e6adc42f64e42a1f56f9022a32fbdeb446bf6fcc92bd455c72c256ba9ce5f
 SHA512 
cb96e3760da1138e67d11023d0bd45c3d8e9f6fcf6097244e0e3dffe8ffc606dc907000799db590c4686a62341a71ae5f144602e558378d1cd7db18b0ab5a85b
 DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
467955d95c435bdf02c38a087431abcf3fd2a7ae53d452f7f8f47c0a62206fbdf60ad6ebb674d4a33ccc82dca179ef0156ad66fe6e7229df0ad0b742105f2a49
 SHA512 
fff55a39cc3c9a0d3e8f59004163d27ea74d4a80ebc2f26851c73ad2bc67f97153258be79a5b7e613d1aecca8064de9c58ab56dbb29372d327af48c162f39fb3
 DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-musl.tar.xz 244357468 
BLAKE2B 
5218537948b4ab12005382058ff2d506190bec936a08db7ae74ca7aa525cbbff863dc468ab13037b6839abb82306593825a4aad0517fa5302a36adfdfe04aa1e
 SHA512 
54fbefb26bfaf891b1181abde38f350b48b19b984467e9cdbc4096451b51145953675fdda1fff0749498dddd19583cb1525f38148707d02d6daccb2af4433244
@@ -711,4 +741,5 @@ DIST rust-src-1.87.0.tar.xz 3119800 BLAKE2B 
6429eb419f17109537a2a5463b0c68f504b3
 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 3473408 BLAKE2B 
09e9d17af7acb38b99e33874cd4b14ad7e0e15b0580846cc32bc78657432b13091bcbf3fe95494c520bcdbabd5491b9445cb3ce3177fa149d0b89991b67b06e3
 SHA512 
88dd1a5f1a69ab9e4586fee4a31d7dea51a664ac32b501cab771739b8127eb4ac873d2353e819ef057734522c1bcd64d664bda3d1ff957b1448b4653be766638
+DIST rust-src-1.91.0.tar.xz 3509292 BLAKE2B 
b1cf99db4cbd864fda34c2068a19e8b36c99f6bb5c2fa3c22ef7aa006d4c084bd706fff872a7f87a0ded3db3dead5927153183e4425ffd90e51af468a29db48e
 SHA512 
8d7c5a3aa11b42d5b89b38d1167f6be64de49288738e0fd949d1fe9ac3312830301d578a13de2030b45a7c51179b5adb934deb52e1070afa76520944050baa2e
 DIST rust-src-1.91.0_beta20251009.tar.xz 3508592 BLAKE2B 
3f629ef1d2da676bb502172ad73313f66effc4d2173ba9591fdbb86e9bfbb2efe35a043fd5c965aa0cfa805906f53678961cb51c7f61573d53201db7caf791f3
 SHA512 
dacb62bbc2c6ed002ca79fe5ebd6342ae71732e94f0df20b36b77f0d361310bbefbf749c4b8fd25ecf54b4592bc5d63cea730b927278f13978553ae823cff5aa

diff --git a/dev-lang/rust-bin/rust-bin-1.91.0.ebuild 
b/dev-lang/rust-bin/rust-bin-1.91.0.ebuild
new file mode 100644
index 000000000000..57df2b081448
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.91.0.ebuild
@@ -0,0 +1,339 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 21 )
+LLVM_OPTIONAL="yes"
+
+inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal 
optfeature
+
+if [[ ${PV} == *9999* ]]; then
+       # We need to fetch a tarball in src_unpack
+       PROPERTIES+=" live"
+elif [[ ${PV} == *beta* ]]; then
+       # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep 
"xz_url.*rust-src"
+       betaver=${PV//*beta}
+       BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+       
RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/
+       SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV})
+               rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> 
rust-src-${PV}.tar.xz )
+       "
+else
+       # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep 
"xz_url.*rust-src"
+       SRC_URI="$(rust_all_arch_uris "rust-${PV}")
+               rust-src? ( 
${RUST_TOOLCHAIN_BASEURL%/}/2025-10-30/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)
+
+               if use rust-src; then
+                       einfo "Using nightly Rust-src from: ${rustc_src_url}"
+                       # We need to fetch the rust-src tarball
+                       einfo "Fetching nightly rust-src tarball ..."
+                       curl --progress-bar -L "${rustc_src_url}" -o 
"${WORKDIR}/rust-src-${PV}.tar.xz" ||
+                               die "Failed to fetch nightly rust-src tarball."
+                       # no verify-sig here, just unpack it
+                       tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die 
"Failed to unpack nightly rust-src tarball"
+               fi
+
+               local v
+               for v in $(multilib_get_enabled_abi_pairs); do
+                       rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+                       rust_bin_url=$(grep 
"xz_url.*rust-nightly-${rust_target}" "${WORKDIR}/channel-rust-nightly.toml" | 
cut -d '"' -f 2)
+                       einfo "Using nightly Rust from ${rust_bin_url} for 
${rust_target}"
+
+                       einfo "Fetching nightly Rust tarball for ${rust_target} 
..."
+                       curl --progress-bar -L "${rust_bin_url}" -O || die 
"Failed to fetch nightly tarball for ${rust_target}"
+                       if use verify-sig; then
+                               einfo "Fetching nightly signature for 
${rust_target} ..."
+                               curl --progress-bar -L "${rust_bin_url}.asc" -O 
|| die "Failed to fetch nightly signature for ${rust_target}"
+                               verify-sig_verify_detached 
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz" \
+                                       
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz.asc"
+                       fi
+
+                       tar -xf "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" 
|| die "Failed to unpack nightly tarball for ${rust_target}"
+               done
+       else
+               # sadly rust-src tarball does not have corresponding .asc file
+               # so do partial verification
+               if use verify-sig; then
+                       for f in ${A}; do
+                               if [[ -f ${DISTDIR}/${f}.asc ]]; then
+                                       verify-sig_verify_detached 
"${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
+                               fi
+                       done
+               fi
+
+               default_src_unpack
+       fi
+
+       # We only want to do this for the native ABI. Non-native ABIs are
+       # handled differently in multilib_src_install.
+       case ${PV} in
+               *9999*)
+                       mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
+                       ;;
+               *beta*)
+                       mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die
+                       ;;
+               *)
+                       mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die
+                       ;;
+       esac
+}
+
+patchelf_for_bin() {
+       local filetype=$(file -b ${1})
+       if [[ ${filetype} == *ELF*interpreter* ]]; then
+               einfo "${1}'s interpreter changed"
+               patchelf ${1} --set-interpreter ${2} || die
+       elif [[ ${filetype} == *script* ]]; then
+               hprefixify ${1}
+       fi
+}
+
+rust_native_abi_install() {
+       pushd "${S}" >/dev/null || die
+       local std="$(grep 'std' ./components || die "std not found in 
components")"
+       local components=( "rustc" "cargo" "${std}" )
+       use doc && components+=( "rust-docs" )
+       use clippy && components+=( "clippy-preview" )
+       use rustfmt && components+=( "rustfmt-preview" )
+       if use rust-analyzer; then
+               local analysis="$(grep 'analysis' ./components || die "analysis 
not found in components")"
+               components+=( "rust-analyzer-preview" "${analysis}" )
+       fi
+       # Rust component 'rust-src' is extracted from separate archive
+       if use rust-src; then
+               einfo "Combining rust and rust-src installers"
+               case ${PV} in
+                       *9999*)
+                               mv -v "${WORKDIR}/rust-src-nightly/rust-src" 
"${S}" || die
+                               ;;
+                       *beta*)
+                               mv -v "${WORKDIR}/rust-src-beta/rust-src" 
"${S}" || die
+                               ;;
+                       *)
+                               mv -v "${WORKDIR}/rust-src-${PV}/rust-src" 
"${S}" || die
+                               ;;
+               esac
+               echo rust-src >> ./components || die
+               components+=( "rust-src" )
+       fi
+       edo ./install.sh \
+               --components="$(IFS=,; echo "${components[*]}")" \
+               --disable-verify \
+               --prefix="${ED}/opt/rust-bin-${SLOT}" \
+               --mandir="${ED}/opt/rust-bin-${SLOT}/man" \
+               --disable-ldconfig
+
+       docompress /opt/${P}/man/
+
+       if use prefix; then
+               local interpreter=$(patchelf --print-interpreter 
"${EPREFIX}"/bin/bash)
+               ebegin "Changing interpreter to ${interpreter} for Gentoo 
prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
+               find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
+                       while IFS=  read -r -d '' filename; do
+                               patchelf_for_bin ${filename} ${interpreter} \; 
|| die
+                       done
+               eend $?
+       fi
+
+       local symlinks=(
+               cargo
+               rustc
+               rustdoc
+               rust-gdb
+               rust-gdbgui
+               rust-lldb
+       )
+
+       use clippy && symlinks+=( clippy-driver cargo-clippy )
+       use rustfmt && symlinks+=( rustfmt cargo-fmt )
+       use rust-analyzer && symlinks+=( rust-analyzer )
+
+       einfo "installing eselect-rust symlinks and paths"
+       local i
+       for i in "${symlinks[@]}"; do
+               # we need realpath on /usr/bin/* symlink return 
version-appended binary path.
+               # so /usr/bin/rustc should point to 
/opt/rust-bin-<ver>/bin/rustc-<ver>
+               local ver_i="${i}-bin-${SLOT}"
+               ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" 
"${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die
+               dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" 
"/usr/bin/${ver_i}"
+       done
+
+       # symlinks to switch components to active rust in eselect
+       dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" 
"/usr/lib/rustlib-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" 
"/usr/share/doc/rust-bin-${SLOT}"
+
+       # make all capital underscored variable
+       local CARGO_TRIPLET="$(rust_abi)"
+       CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
+       CARGO_TRIPLET="${CARGO_TRIPLET^^}"
+       cat <<-_EOF_ > "${T}/50${P}"
+               MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}"
+       $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C 
target-feature=-crt-static\"")
+       _EOF_
+       doenvd "${T}/50${P}"
+
+       # note: eselect-rust adds EROOT to all paths below
+       cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}"
+       /usr/bin/cargo
+       /usr/bin/rustdoc
+       /usr/bin/rust-gdb
+       /usr/bin/rust-gdbgui
+       /usr/bin/rust-lldb
+       /usr/lib/rustlib
+       /usr/lib/rust/lib
+       /usr/lib/rust/man
+       /usr/share/doc/rust
+       _EOF_
+
+       if use clippy; then
+               echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}"
+               echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}"
+       fi
+       if use rustfmt; then
+               echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}"
+               echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}"
+       fi
+       if use rust-analyzer; then
+               echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}"
+       fi
+
+       insinto /etc/env.d/rust
+       doins "${T}/provider-${PN}-${SLOT}"
+       popd >/dev/null || die
+}
+
+multilib_src_install() {
+       if multilib_is_native_abi; then
+               rust_native_abi_install
+       else
+               local rust_target version
+               case ${PV} in
+                       *9999*)
+                               version=nightly
+                               ;;
+                       *beta*)
+                               version=beta
+                               ;;
+                       *)
+                               version=${PV}
+                               ;;
+               esac
+               rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+               dodir "/opt/${P}/lib/rustlib"
+               cp -vr 
"${WORKDIR}/rust-${version}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
+                       "${ED}/opt/${P}/lib/rustlib" || die
+       fi
+
+       # BUG: installs x86_64 binary on other arches
+       rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
+}
+
+pkg_postinst() {
+       eselect rust update
+
+       if has_version dev-debug/gdb || has_version llvm-core/lldb; then
+               elog "Rust installs helper scripts for calling GDB and LLDB,"
+               elog "for convenience they are installed under 
/usr/bin/rust-{gdb,lldb}-${PV}."
+       fi
+
+       if has_version app-editors/emacs; then
+               optfeature "emacs support for rust" app-emacs/rust-mode
+       fi
+
+       if has_version app-editors/gvim || has_version app-editors/vim; then
+               optfeature "vim support for rust" app-vim/rust-vim
+       fi
+}
+
+pkg_postrm() {
+       eselect rust cleanup
+}

Reply via email to