commit:     3dc888ba0530fb3b1279308bd97be83dfa277a57
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 29 01:37:11 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Apr  1 23:33:24 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dc888ba

dev-lang/rust-bin: add 1.86.0_beta20250323

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 dev-lang/rust-bin/Manifest                         |  29 ++
 .../rust-bin/rust-bin-1.86.0_beta20250323.ebuild   | 317 +++++++++++++++++++++
 2 files changed, 346 insertions(+)

diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 2e29370cd6b9..a76ff1b00423 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -572,6 +572,34 @@ DIST 
rust-1.86.0_beta20250225-x86_64-unknown-linux-gnu.tar.xz 192552128 BLAKE2B
 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-1.86.0_beta20250323-aarch64-unknown-linux-gnu.tar.xz 161335248 
BLAKE2B 
4cc5245b96abe734d04b330258dfd39c25f2f18a8410d85c6f0b2bafd93f1bc4dac02418ced0f2c88cd7ff1f8926c4cdf2465df8ac30e97944390f8c60f0ca57
 SHA512 
0baaca918e6553fa06897c471d942fb7ddbb2af44f428a213dc5a7ab6929560c5243a54f370da067ddc9647cfa260b13137ae807a31f3650d7e7add8d2fc24fa
+DIST rust-1.86.0_beta20250323-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
c6214992524d91629aac72420b50f5ea7dadf258c697398c8ced1d27963c522fe0f5d19809cd342f3870ebb9ee57e0124e79d45b3c681e5ee3d5b07aecd75aa1
 SHA512 
70faefa0975a2d9579ea8be5cb16c689f87aa12c5728e9d01592142bc04fd9b72e22194f448707df8087eb0293c34f212d7d5d91bc8824814f37b1af73b159ce
+DIST rust-1.86.0_beta20250323-aarch64-unknown-linux-musl.tar.xz 234497012 
BLAKE2B 
eb7e212f39fac80cd7bd744d1e50143aa1ae13d59758c1cdafb52b7852843d3428a2f1a83725f04f578bb94ff5045ee7b88218b9537eca887b21b4c5b9b52781
 SHA512 
aee1cf39bce41643a912280bb0c110c4c53a26ee10db4aa12e33f3e96a54bca31d72254256ca64c1ed6302b463c6d4699181b20b9b8848015ac7a0d9261f49d4
+DIST rust-1.86.0_beta20250323-aarch64-unknown-linux-musl.tar.xz.asc 801 
BLAKE2B 
8823dd5f4b4e06a61b993e75b006fe77786a4a4d6d4ac972f01a6ccd76524a12f6927e1132661761fdc1d21a09746d177bff3f5b76260a0a03ad178b1c2bf991
 SHA512 
930ce227360ddd379ddbae1ad1a0c24c1fd23ec30aae2304ba6b19b528fbce95469d0b45d73956f1f61fc0d69201a8cea2ba7427325ac70c3e70f21f2055340c
+DIST rust-1.86.0_beta20250323-arm-unknown-linux-gnueabi.tar.xz 219267460 
BLAKE2B 
d81789b90bdd41a4bf34a59af8077dfffa22b4cf9de056a89d3ef393a31cd602a2756b2a58f2692ef71fa81938353aa5585f2520e4eea60edf2a7c0c26a6509b
 SHA512 
dc8bc66ac5a531c1c7975544d59d48356f8faaf5ab19b2c83d12d4052287e82cda4b44971bcb0b52306a3cd34c177e8bf42d7e1d9509d41f6dac4480db183337
+DIST rust-1.86.0_beta20250323-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 
77bb1bcb52c173fff43f3a40ba993eee11a4d6cc5d2ad6794d46a92a1ff877f6b4f8b6d0ccb833796108e9a2ef316b5cdf1da486679c7a47860487491f13c632
 SHA512 
f192f62af246eef353f0519c66b66787521e2eb10f676a722094474c24c59bc691c4e8cef234df362c0c540932c0649c7f560234fefbdd8cdd34ec68faaaad60
+DIST rust-1.86.0_beta20250323-arm-unknown-linux-gnueabihf.tar.xz 220543472 
BLAKE2B 
b93b94843f9126e8620cb6ccf0fe1174246add08b249fdcc24fbfb1fe5323ed95c03c6bb85899101f996dacf1d8d7216d8d2b707cce0d59f66dc3f57e47208cb
 SHA512 
af78eac51ffbdb7d0179c47877abf339e82cae44fd3b2e2a9bb2222f4eed205f9c019e4e31bf332cf57c0169f0313dd084e2cac6f0321e7e07737a795afec558
+DIST rust-1.86.0_beta20250323-arm-unknown-linux-gnueabihf.tar.xz.asc 801 
BLAKE2B 
b788a0ae7c44dbdeca326c73e7ac293731c67e6aa5f800fac97a0a13e07f9730e0ed466bafd6495afb727ae6d6d0acb5391c1e42dcbd8762efcc7833b89174f6
 SHA512 
849c540c65d68aaa092add91915fb855f8b404e4a29f5be4cb84a4cf29817371272608a15a6b294303490c0c140306beb249ef96fa30610968ba6d25e5e59d45
+DIST rust-1.86.0_beta20250323-armv7-unknown-linux-gnueabihf.tar.xz 225359312 
BLAKE2B 
001864c7ba864e22e628f0868f446be36ff7161357c23006318e8ac54c1931e3d9128f48c9133a25ba04749fa6d9fd4216352ad15ad19d1dfabe443ac21cc149
 SHA512 
200933edf1f8a9536137d64fbdca1ba42f9dffe0a531b3f4519d837077a18244d4ccf5b9db3a7fa3d99780eb7e35bdbabd1559b45e834e7a0f6186d32be2b139
+DIST rust-1.86.0_beta20250323-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 
BLAKE2B 
a8bf78978b20c534ce2d3f2f36eea0ce179efbeca8b55d6ed8fbab596270c3174caff3c7e931f79dc9c681b203bfab86f9a186289428f411f1ac0338b0d10ea4
 SHA512 
6b7eee810048347e51eea05197ef41fbc795e67b0f2ac1055012bb40b2f7d2bc296d709b8b54eed0585b30d746163c9ca61ce0466f9431ffcb408074432e5e9d
+DIST rust-1.86.0_beta20250323-i686-unknown-linux-gnu.tar.xz 254656168 BLAKE2B 
235ff206f15b476be0e8865763e162015e739aba38c2a4374e47299ab8b0db199731fd8cfe249540b0b11db483af0d56663d1a6abbda6da559ef773d1f85b709
 SHA512 
265c48f298ac1ddcaeb99b26bd4504fc8f2946a0dafb0ddafc60158576594249a23f2c684c28c826e0ee5f8d30fcca5325e646a85a68f60dadb4d9da3b9a9319
+DIST rust-1.86.0_beta20250323-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
ffb4523822deb0971e85baa2bbc9beeb980638f2aa7cc600c6d28543ba8dbfd751cb3aeb13fb18cb3e110672645d8fc0ed897f6ae48669f39c8992ea9a0b996c
 SHA512 
147172ad29e05989d68e3ce41a88c392db8755fd4eb4ce0421121b462d40980fb21ff7ab2c79d4977ab65695e81919baf1be7a4eb3a112adaf2c154736226e52
+DIST rust-1.86.0_beta20250323-loongarch64-unknown-linux-gnu.tar.xz 251448532 
BLAKE2B 
c92800a1dfc31c5b699208735f3b2f7817e5225dcf518e30761ed4079dd32b6d04f0c8ef0145e73941687a99630dc4c4e6edc8cba12e84ed26c03995688a5cb2
 SHA512 
a2eebe4fe79c5ab15c4eb31285499f1043916111239f28f50a363857e85baf6455db7a8ec2d22be11fd85232559971192c47090380739b27dd3654672720187f
+DIST rust-1.86.0_beta20250323-loongarch64-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
5a14eff55345256a866bf19a27f4f91f4b9fbf0051184ebe090bcc9eff2ce16ca9e34244d5d73e8489cfb77a2afc268e1f9e1ce03b5bd4d7670b5294912ff0bf
 SHA512 
f1108fd470a6d999835667f7681ee9aa278ace8d12773735d8a522d713bd96e348d7bf851d18fd72d2a4ab408fd7b076e3ced8fd77cde7b72ddc2ba8c5cebb78
+DIST rust-1.86.0_beta20250323-powerpc-unknown-linux-gnu.tar.xz 244504464 
BLAKE2B 
c9c03ba679eb3acb4d1623bd4db74ed0a645812d10c0babec4ddd50a136e994f4323d52d8e8cb524a4f9994d248fe18588f2c4f8f1ee3303309ef2c61735af9f
 SHA512 
19db20cc2702d85e6a52c29c8183604b4f32277d14ed8a6c72c6b58cf5e7d56f2887b0b8c9314e1db5a64c42b224891521eab40e8b02e5a6cb4ef12018f3427e
+DIST rust-1.86.0_beta20250323-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
3deb1379eb5df5c9778e7c9ea4fc730dae0659dbf3c4aa67b194036255fca620ba20d90aa6d21772ec472c6841ab6eb8080c62f85e957c3b80dff87fb602f96a
 SHA512 
07178440d42ad585b5714efd6a54029070891d90afea8dd4c6c49c8170e76cf0eb88fef31ec01f4e863fd955f0b33b24eab946a953d5e09d131ab3d0134ad39b
+DIST rust-1.86.0_beta20250323-powerpc64-unknown-linux-gnu.tar.xz 240759852 
BLAKE2B 
0abaa43fbeb502cd1d7e8661b409ff9fc81a90fe839db269585ddaa1c7eb4cbb21c188e764f8a2ec7cb2bdbbf684d67d2415014305f6d89c0a0ba20d366b2da8
 SHA512 
ea1540af6788bc42e376bbfa49ed997d4fb3008e128cdead33af4bae007e51252fd83401f131e62d25a0d3c7b4914473ea89ffcff02bc59cef06dfbf60cb76f6
+DIST rust-1.86.0_beta20250323-powerpc64-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
cc3ee0b826cdbe09d6ddb3866d716b8a1019036c8dcb7010f8e052a97bb024668ca1a4c8fe57560feb60dc7e5636f648a26a075200642afda1900fc6aa881d8d
 SHA512 
2c85f3159e6b717265170d30b11f5e55ecc74d9060350971ba8a83f71f6d1303ccb5c43e37b349bc4e153ad6829f6fdf7c2023c571592ad80b6193f7cc7c0d2c
+DIST rust-1.86.0_beta20250323-powerpc64le-unknown-linux-gnu.tar.xz 253891476 
BLAKE2B 
81ea84725711fc5773340913ec3925d1116fa8604ccf8f6246457e1bbb403db037e6addbdae33cef9e6a09d85d56009aa97e7effc77e4397248ccf5ce899426c
 SHA512 
448b37dc22793b6db69b19f5b15da27a039e7db5db5859c85156720e44439504a00aed9340bf7c5229584e34fa36ac617beb38d53c0ae7cf681db0471981b146
+DIST rust-1.86.0_beta20250323-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
3a56380f8a8bc5dad57f0178a21d7430def1419c3ccb01d31f6adafa0a89c18fc681823e68dadcd6e312356884e0460803a8d983d0060c5bca369a793f3e0b3a
 SHA512 
c1a79062a59f4764bb80a89faa9c8725c772ad1cd8bc285e7f51e53e7a7990aa9335753ff9d0404f5330ad8ddcc0ee494d9808d0d6e613a164a0a6cb09f6e94b
+DIST rust-1.86.0_beta20250323-riscv64gc-unknown-linux-gnu.tar.xz 238642188 
BLAKE2B 
d8f73ba74b704e1b0c058b6ab573961e98612eba324d4a1308b376dc327b437fb77715f16ed5b4dede8989bf771689981421dd80dff1680dca8546f0776f5371
 SHA512 
918d440df6f7995bfcc857ed01635693e1fe92c41f4102bcfcbcb5d25f0b9144ff3b27c37ef196f30695f2a3a45cceb567744c3d6d1a03b5e04c5d3ca8603b3c
+DIST rust-1.86.0_beta20250323-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
f7a3a10cd524b163d2c10e673d64dd9568e982c8bfa0d93d69e8ed37ee035975cc35a58c4b4993480f63ff30744e63a9882b6afe45fdb0845a92d6250dababda
 SHA512 
9553d8888a95e361d969a1e95d216437ba2d2c1ab42c9d328baf62c9becc3f71491e8693799d89df393f91e4607060e27803fb622c085911ff039ac27f44a857
+DIST rust-1.86.0_beta20250323-s390x-unknown-linux-gnu.tar.xz 241139428 BLAKE2B 
75d434bf40e48d807e88338a9d30bf18d8b5c1433a2fd4fa4b6ea74034ce59a0d4445a29f63488ccc4aaad412e80257f221b25c60273e6f6e8393875a0845b6c
 SHA512 
c7a4c0a9227a02b73a0256e5cfff9d9daa7ddb590ecec849119b916c4f0bae84f212541eef145471b2e8fef874a194d07ccdaf5674f6e30650ff9ea4841f52e2
+DIST rust-1.86.0_beta20250323-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
9c16fc150945109a4b40f63f0b7a01944970f30331dabe626a5cbadf3789d7a215e669b372aa29d05b988128daf66a47eccccc33302b5cc08a73fa097e574360
 SHA512 
de475ad0c5781111b9b1ca8078531107693ccb3ea88e95c0631f1ea2aeb2cf93ecf96de0214812e34d9c5651c2c640ac8b12bcaa7b6e7f6bd4d9635f0d63ac75
+DIST rust-1.86.0_beta20250323-x86_64-unknown-linux-gnu.tar.xz 192269184 
BLAKE2B 
6334e8a2248bac18da9a943425e7d0519b47296f9256999110523f3b4c31a42e92ee76dd2cf9a29d906aea66158241fcec2bdf31b5640a910996ad4083ab0650
 SHA512 
bf08b9588545f20f2447fca3f3f04addf7b335727a0ade00414e4e50ca3933f4eeaeddec716473fd3033355b7e9cae76c6cfac83ec78cc1d7fec005512d28f19
+DIST rust-1.86.0_beta20250323-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
bbf3c48b2ac4602bd43e90a117ae651dbd5e834ede39f7858c82b7e707f024d9c17fae692a35358bea259ea2231735e7b884320b7862defaa373a4f2cbb71073
 SHA512 
33542eeb9f426b53e45228d3046cdbb007bad8769c326b1e2703487e9a8d1b0e12ec9a69d7227d2c2f49b5a0fc1d1c2079fbde46c06265401ceece10cafcc96f
+DIST rust-1.86.0_beta20250323-x86_64-unknown-linux-musl.tar.xz 282510500 
BLAKE2B 
9a0ad90bc97d501658aefe1d8694240a8d64b5ba4273479e44b8b6f2b1e28bf005b33db360467727a2aee084090656e767ce6fa6561eee81979ea26ef74dfa55
 SHA512 
664166dfec17b3e7066670bd9c478d35d7aaa7146d853355055c28ee8dbd909682615352b75e5295c193dc86ff4f81dcbb101e4adddeb2f3bb4b604854e5990b
+DIST rust-1.86.0_beta20250323-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
aa91374317ae52cde3272d968fc33a1f3afcf879fcea40346e8df8483731c3f6f64a944780a113fe6d58515b18195031ef78757f314acfb2a1384e7f082a8c3b
 SHA512 
b56cdafadfc4873f16380d1b47de43d15185ca55ee22c5fd66d4a3f35d9c5a6313a4126c6fb39bdd6d9241c58788b79632eb42af08cd1059bda7983ac74f1a9a
 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
@@ -589,3 +617,4 @@ DIST rust-src-1.85.0.tar.xz 3036988 BLAKE2B 
b7281b23eef60cf052e1641a29915c02c590
 DIST rust-src-1.85.1.tar.xz 3036412 BLAKE2B 
f137ffcebd2d231d8b3dc5c9072f6afe39a071bc9608ac468bca364fafaa9c277b91e40da870a083c802cc13b9b876a548d7fa8ae67ad9552321a7412b7d8cd8
 SHA512 
d230cbb1daae3e2f5168abef94c5b99fb118c34a980f018d5df3e43f6ead4e0a17d6ea29bcfbcd0fb745e215f7a4d0282a99a714dba77b98a16254bb27c2d2ad
 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
+DIST rust-src-1.86.0_beta20250323.tar.xz 3053816 BLAKE2B 
e8f2b6ec82d9a414c2076969f1a40621bcf1b482787b2103c8e23543a1993123dce5c61e7b7cf96d1a9699d02382cf3f89d097a7aba1cea3aa5d91e148346dfa
 SHA512 
62ad389bed89424dbd13673f4c905c7c70ed9cf48a68f1bb6ff05c50611483ce88b949d54263a6317a10db01a1d28a4642010a3a5a99e784e490b33847d86808

diff --git a/dev-lang/rust-bin/rust-bin-1.86.0_beta20250323.ebuild 
b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250323.ebuild
new file mode 100644
index 000000000000..97bd2bca573d
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250323.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
+}

Reply via email to