1 |
commit: 08f542e4b9841263737647f59cecf85b4ef2bbd2 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 6 22:40:51 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 6 22:41:46 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08f542e4 |
7 |
|
8 |
dev-lang/rust: add 1.57.0, unkeyworded for testing |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
dev-lang/rust/Manifest | 34 ++ |
13 |
dev-lang/rust/files/1.57.0-selfbootstrap.patch | 56 ++ |
14 |
dev-lang/rust/rust-1.57.0.ebuild | 687 +++++++++++++++++++++++++ |
15 |
3 files changed, 777 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest |
18 |
index b029d642ad79..ffac107479d8 100644 |
19 |
--- a/dev-lang/rust/Manifest |
20 |
+++ b/dev-lang/rust/Manifest |
21 |
@@ -158,6 +158,38 @@ DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz 139040728 BLAKE2B 1d7905411b556 |
22 |
DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d454086c93147737c7c144af288394512528e4ce759dc221d7371b62724857fe16e391949b5b4dac436bdcaef8bf817f577e8d951e1f4bae098d687b4a7bdbb5 SHA512 b175e3ddefd036fce29c80c65a86565583167f7859f0941dee6718fd71baa8596f1788a6bed5d992096959e1deda98dc9c10e8cbc896114b7938a05951c29f02 |
23 |
DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz 267291288 BLAKE2B b96e8fa1c8d2e55c07781db37ddd33ec7180cde29c84f5020f2ba0fbf6aa83f9db32723e191c15df765f965d1314a57d12d80e73d20deaab1333afca65bdfac7 SHA512 6fb700d5d17c084fa520b29f3012ac565eaf891705a27c7738a61bb9899bc952f679987ef3790875b5a7adae836c602b394c7e19103f30bbdf5ec82cf3e86567 |
24 |
DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5ccf03518eae6406ff66bff108b26988a6a859e5cf88ca44327f9826d880ea26d6e115fb3e63f6a40d1cb15adc25d6f1c056438466095b7223269fb0d74540fe SHA512 8d84a976d9922d28a5ddac0f47258759a4c7542df02fb9ffede4a3e98ceecc6415229f3eb676a22536ffff842c6e7ee35d50d1507f2d818301493ee3a7db9bb5 |
25 |
+DIST rust-1.56.0-aarch64-unknown-linux-gnu.tar.xz 223490136 BLAKE2B 29085e44fbc7337a11d396e452e53c43c0ea2ef53d2bfd6e294c837f890ce4400e9274705764ab40680226010ab502798131b1d717d7a4a1cc590313ec65f8d2 SHA512 858a28c6d74848bed5e731cd785995b095b78375d6b10834b2cca97778d571a9bed2bc2104a924d099297eebe91f9e829d7558acba0a46b31d7cfffad520bc44 |
26 |
+DIST rust-1.56.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7b6bd9c532801b1759524007ea1aa7037303a94cc0571cc3265f4be867d4f69d5a3c732598db01c43716ceaa19717c418ca7d5df6ca030ef014618b849cf72e4 SHA512 d8d05fc573f93a7063bbe54a6785305171b096b8348a44b0e72753a5500d97cd1b903394c0e8fea601e33892592cda6dc667285bb095e4d4fe0c4fff8cf12b46 |
27 |
+DIST rust-1.56.0-aarch64-unknown-linux-musl.tar.xz 219878296 BLAKE2B 5f7b0670820f2ecf8499c47d5731ec371234be923dad2abd261cbb4cb6da39d27a813d7ceaef22aa75f9ffce3067500e6f02c157a517951a0377073847919a6b SHA512 9a1445794558352005921c92d64a454b3270a1052dbd6dc1ff5e407057403b232dea5183920459fd2c9a6f22423c28af60b427c2edcd3f19565e036f918570fa |
28 |
+DIST rust-1.56.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B fbab4bc200ec56df82cceb8511d5e11c94a64cf2202eac7fd9eb32857ef4f7acd441482ebaea24fa04d4df6709f14852d937b6b62e500609f678044507f3ce68 SHA512 796365d5bbff1f39b46df8353a0ce282c368e649569a202c50e13e1bdf8e280630d38630a752f18dc8da545561675fd5112cefac207cd98adfaf556029514d5d |
29 |
+DIST rust-1.56.0-arm-unknown-linux-gnueabi.tar.xz 202166060 BLAKE2B 1e73ce9ad86bc9f4f7a920a822829ce12c991e763f09cfdf16d1118ca16ba8f8ef217232eae303fdcfa0eccf5b913b80f771d8236a2fc0bcefa9c9e30f5cb92e SHA512 31ba5c7a8aca7f42789b606775145ef776d03a5b06c46e4336aabdd38f92633e2bc206ad74c28676c52387dd979acf742f56ea49c3de8bab868c98f18242e8b9 |
30 |
+DIST rust-1.56.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B ee433953b9fc732f1e8606b4070d379dfe373b94b702316f10ae5d0802baa7bd6ed19d01c6a4eeb206066a6cfbab7329f76c175c7b76023adacef030ad666f80 SHA512 d64bc0635f9d87323cbce77dfa779a3d360df76ca161cd4b175e5aa63e2a4cfe1c8609b38d678d7ef8bccc011326bc4851dd81b55836223ff84fb85e29cc6364 |
31 |
+DIST rust-1.56.0-arm-unknown-linux-gnueabihf.tar.xz 198940944 BLAKE2B 651932afcf232292611b20ca43a034e2b54060a15b6c4bf0c37c40b2864e59d9ef3ad865cc6a0729b02de34abe23a09e758029860d3d196080fef43268fd2546 SHA512 6e5edb3df13fcd0b4501e78ae55d2b62bca2c696e938f3e913cd15dd1e3fa802bbc813fbe5696cf5bfecf1e9fed99e6c83b23be423a467b084f6f66cf08646cb |
32 |
+DIST rust-1.56.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 94363ce80bc31d867583484eab662c3a3012019c9e90205959b71df6a8893a92524673246e1c1831b3a228fc75233184bdcea13cb28ed1dafb3b8a0764fc8161 SHA512 2eff4a8d702c88a1e283139a9a435d845a1ba30fd2f2857f8c19c0d19fc94698ad6b6ac87be0b1d3ca4a78a6ad658bc57357c9c84e8983505dc29d080a4041f1 |
33 |
+DIST rust-1.56.0-armv7-unknown-linux-gnueabihf.tar.xz 204645860 BLAKE2B 4d1bcbb704954aa09fe89d0e2d15e886dc5e25c91c24a2239caeae228ebeb94fa40ccd7bacdf67a3b9ecb5aa0cb5b1d54306642d879591675380496142699acc SHA512 952edc69bd1747bcb711ea81c58c580b8b2128722edf851cb0a20e6b85674e9bba0e234e6eacd5e3052480a72d896f2792f1a281ed8e99b23dfe1c51b467e3dd |
34 |
+DIST rust-1.56.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B be71c4cc8ee6e64e8850cf4c95b6f34c115fc1bfb62890c7f1794a229656fc3be1b54321db1174e7804540ca307360c49d07e45e418bd0ce7e1b1db20bb83da8 SHA512 2e9b2d38beb4199062f87c40875622ea2d914023d0fae2cd631db5f04b423c868089084e8731c3260a180d2d5aed531714ddd3c383f06703cae720942c90ef6f |
35 |
+DIST rust-1.56.0-i686-unknown-linux-gnu.tar.xz 215611688 BLAKE2B 759781d0e5771cf058eb47ef6f5aa2cf5bc2c692d71ddad6bccf37af62a587cb38f70d23c7ba2ba0bdc07635b6516d2ed63a99497bdd03433bdab16a611e46aa SHA512 6e19d19ec3aa00262c90e66a7be46805b36601f8e13ff3b026479c589965c6006d045c92bc56a063fb284e830220af1124a80df1a2e7850bdfe1cc0fdd149f3b |
36 |
+DIST rust-1.56.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c416bfa472174a38631022988de8b6294585a797b764766a9547564e5099f9fe24d46f27d734eb81c82156ccd135fd60c97aa9e13f69dc2a84b9a8554407ebaa SHA512 04a040802634f42fd2d9ea62a26b89d10c44426eb7f00ea4532859903fa89c7dec6dbe37fc572b6986653fb862236ca0d48be87c6febc7983a670c452c145ac5 |
37 |
+DIST rust-1.56.0-mips-unknown-linux-gnu.tar.xz 160762656 BLAKE2B 74a98ca534020c1beea16ed0aae5d55087e52e80743ecb5d4e23861cfa3e39c9f3eb216c948095f76be25a5fe89c47f2e1c7354b5b4f56acdd3532ae3874ee49 SHA512 a6e33f557faa842f3c5fd49223216516c012d4af9b3c5efb3f53778a38f02138e1b522b98ec91bfe523f507ebc932f6966d329f23b36fad6a3d105d4020bce3b |
38 |
+DIST rust-1.56.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fd9cf1b07e64c4196e25c023dbd7b5dd9ecc346c3590f8dd4e5d3ed3b03b6b04da90a8549178eed0db0cee2acd5efa4be300da6907cdfa5424acc52ed047696b SHA512 a7278ed6ffa56025257c70e77f5dff3aabed699282e05b01f7f3eba8ca1a813f43f0ee07357518dde78df11fd3600cfd6dbc45757a20850694a0bdd2c079cd20 |
39 |
+DIST rust-1.56.0-mips64-unknown-linux-gnuabi64.tar.xz 165953860 BLAKE2B f02278555bbc3c8169bb4dff02383b8736fea8ca8dbf395aae5d62a10c0a9e25088d1d56b7d6b0fba6d4384f988f55d1d82153ec0038bbef0044fc8316cb7786 SHA512 fec707ddb8ee51700716ec6283f3ecdb910f7ddbd8ad4fef7882595afe5b55b1c8f862240172ed20cc8e07bc8db9682184fcc10ad58d2ef7e4eddb3e54a14dc3 |
40 |
+DIST rust-1.56.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B a1509f1799555bc84ba43eafff55c4e6e62821c3eef27280682210823cfafb627ec28d0b3faf1cf624f88c9bd2e83af1438b8659acdf3d33413d7e95a2271a53 SHA512 6a39541d53229f432090a1304797c1f2c2d203c72ee266a07e408907ed56a1dba15f644a074235dd56058f77bafeb27bde32087546db2a86b64a65bc7bbbd41d |
41 |
+DIST rust-1.56.0-mipsel-unknown-linux-gnu.tar.xz 164590680 BLAKE2B a5c7c7e1ecb0a6cb079677b1a72c17fb0b141588a6003ec5ad01c54ecfc2d5e1f928246f978e7606b166e8a60c2defa375287931e04fb28da341037cd226040c SHA512 3b05f8f0e624e75608f94cb51be5c032b7ad56c9ee99220cac73a7f8f6c40cc35c3b5f846c2c930398eabdff2622c1d447720063b831006615c1ec4d2c25e01a |
42 |
+DIST rust-1.56.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5ef21a9b209ec1b88df8cde1444bb5704656d3b435b1a4749ab65a13d0352392030c4ab4b59d71c2c03e554136c55fe44614b65d09fea644b7de572d357ccfdf SHA512 fd9efde43ae9d3427a56cab3128481733e0ee51d14365b8b5e65dbb5173bb11a564a4fdf68ad23ec443ab3371267399aba3ba704f3da41ded038a2d2ee898b46 |
43 |
+DIST rust-1.56.0-powerpc-unknown-linux-gnu.tar.xz 172592208 BLAKE2B 54016cd5f94e2fdba36329e5af7eb161de0485adc4f0e7b7933694bceffde8b101fc778880eb66156851f38cee66303b24095a6928f668d08bcba4277e2f6e92 SHA512 dd5e5a0f073c3de04a605cdfadb19538884ce1a715946e60fdc85408fa09a45d230eb3141ad999c5edb469a789151d5e6c7565743e162f7ce9add99021cb32ec |
44 |
+DIST rust-1.56.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 56f2c613dcf42d969da0734f7c5d6d544d1a2883b4435e941c0779f9406c9b02a9eb8eeb4d8393cf7abc389ba2df78f05b78dad56848c24df1023971101a9a92 SHA512 a5a933921e9670b3b55a9ffb01d8eb5b7520a7e73bec987a161a7f37d07f9024266566a7059b47592e66f6c1926934ef2306b1e7283e88329e68a124255f07d5 |
45 |
+DIST rust-1.56.0-powerpc64-unknown-linux-gnu.tar.xz 186235644 BLAKE2B 13754e77299dd432adba0773586910a215a8916399ea827a6b5ab5d8866b731ec0af2a0772a8ef83ad897c491add7c513c4f3f06c41c61bd600f2ff742610b3e SHA512 1ad3c1b7da0cb4a697c8bbe8a0580a3a8f01e1a8e415b75ab4798f5425098855ca9c95ec636a36e796d919464f3ed3ca651e8d3811f3adb9b040976422fecaab |
46 |
+DIST rust-1.56.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 62277bf7ee93ff6ad847cd9c69e89a2bd58f31efd235eafc7c4814c2e465ec24390c4a9fd99fc2c4c53fd994be159720b03ee169486f0c7af31da50b91cec2b0 SHA512 fab2896c285dd6641b5a7e6c8d1a9e96c084b65fe05cb519cc20abef7d5d42dfc0aaa2c61c137c89db26d0701fd4b32dee6453e98651f98b2d63ee34c8627dcd |
47 |
+DIST rust-1.56.0-powerpc64le-unknown-linux-gnu.tar.xz 195350800 BLAKE2B 2ceeb04ae5a5482ee3908f07dc50e306426fac09aaab154c6235392ca9e403ed36f492dbf23b3f6172e964d2ce7360fc0d19f345ea39cc28874d812e21e22b8f SHA512 bcddee74d0c7c52e7ec17b4b808b0caca764bd6f4ce6235cceed5c93983673c768981cd8403b2a7cb993eb5055625af2679c8635955d4765acd871643eabb6b4 |
48 |
+DIST rust-1.56.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e4085f8f853cfd50e44b0bb8ca70a73fe2cb14827261aef40c98fe399ed2aaee9d29acaabe2d85d51d77ec1ccf6eeb263aba1042c4e06c2b0ff7539ace11368c SHA512 6d21afed2e7eebc11d1713774feb662abaf84d1ad524edd506efb0910654b84828017db6c07248156514a37c176dde48088cf387aebccf6476ecdbdfc961c0dd |
49 |
+DIST rust-1.56.0-riscv64gc-unknown-linux-gnu.tar.xz 192792856 BLAKE2B 85af51b16ef1f749b1903cf98d4cb5d92d26bb17d5b5c2d493862feb8d21316a2d4aad73f3f9c8e2ef1436544a592d8a8378f3671c4c099b39e6e24f597bd4ba SHA512 ff9959be93e6d4049030d9e07fe6dc8be67fc635698ac37630b0cd8e1e446e6909879a4aaac4b0b08b93dcc2ce7650986d961ae1001fb683b235efc101b7e470 |
50 |
+DIST rust-1.56.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B da4e11a82df51283edc6066d5a54b1f2c5937e1f8a9e45ecc10d1509a7377c630a63c141b413123b01d6df67c0be6c63b0017bfae20b13c654d3a5de98981410 SHA512 2fa854448aa07f2c23bfc6145bab5973e73f0c444dbde8f0f823b6a843f2125773115fd91660906e7dbede25d44bee2ae3873d299ebf75a8123c618afd07fb4d |
51 |
+DIST rust-1.56.0-s390x-unknown-linux-gnu.tar.xz 194222748 BLAKE2B 4cc8ac554f85ccf0963da9935da46d51640f37346fec2486fea50afabdd881c331c54af6ea15ef76a53d850dc9cbd8cfab8f4125b4749045d985393ead77b1b9 SHA512 8b00ed11f12604c377cafe7c206f8db10980a4c73bfe4b4d1d628ca6fcbb3df0553decd89a9ef775c06e62f446b817d4d51ed7b55bba5f1826e9d384fca7a26d |
52 |
+DIST rust-1.56.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 443228e6dc0fcf1da9a33a89938710efef0881f835daa2af1b7593e32f90403992b752bcaa321d5241f233faee3773f205a9afa44f12b59978cc84c261b85ba6 SHA512 608a7062e93e7ada52fe9688f2efe1e3caa4d768f0e7be31cf47b8665a8dc550e9287d339da6712366cb68a14868e07e5b68c4a25b86c2bac1fe738f77815b3f |
53 |
+DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz 147894784 BLAKE2B 6cbdb8a82aba4715d07c41497443a90cbe2bbed32ca95b3a8ca4bfd048334f1158b30f221bdec10bbef2d07344e8a35d4320ba8b991006263a6b764932cdc7e4 SHA512 bfc3a7493c208b35b42f40867286a6b3d97bda1c45983379d4223df31291e046a1214df1f88df2cb6558cafd8912cb8f0bab99a45899321b128e729ad03b9493 |
54 |
+DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e0ed39db46b40631f69fa379a04ec37ba314587a4f081aa1f3251e01b7221ee8732b668cfcc4c24c1a3950f3f8dcfd542a1a73c603cea545b812d5d3a9527055 SHA512 3e9d0b159684a496e29c9e40af11f16f5ef5cadd8bc4852018a953310e77a4e29db6c14ffcc86198908aa4998550c83cfd3f2cc42e007122d56167d664776c44 |
55 |
+DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz 255010720 BLAKE2B 286e91cbf001de6f888bd82139e6711b32f03d45c599f26b01f60222d98c3521a1933b3b9b7f8c46fa79d481780dc8dc47e5e24985b721a6998d620b446c38b4 SHA512 fb5a914a25ef3cb39393207a75c40f1313740167062feb4cda4084e738f4e93a51624a8a9591acc18553cfd6e2e232984c8c84acc3dfd77fbe38b17085850881 |
56 |
+DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bb7cfc775c1c44569276e687028e9a7ffac31577310052d9c354179a541ee13b0ca00a025e994e03ab17086d0abe6dda6845ed1cb10879425439c7651bdc9269 SHA512 cb23d98cfb1b59fcccaec575145b6f38846f3f49b16a3be199b06d6198b1db13720157ca65a01f6ef76abf742507bba39776d130f0fd03aa228acf5917457f7d |
57 |
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c |
58 |
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3 |
59 |
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24 |
60 |
@@ -170,3 +202,5 @@ DIST rustc-1.56.0-src.tar.xz 121802340 BLAKE2B aa471fd0785d6ceb75d4b661d466a450c |
61 |
DIST rustc-1.56.0-src.tar.xz.asc 801 BLAKE2B 75bd829e457b6cefb2fcdfd04ef835487c295420d9d9c8fd7af800b405fe1113c14be01ad3540fea7ed7c743397e337ce1d3b0e757c73292d7f342f352e89791 SHA512 e81cf3d8b1c97803138d4487c32c1463526d53513112b4fa170a81ba947280613fb3260b43d0629a45c859519ea094e467ce0cc0def722577febc3cc34ce5ed8 |
62 |
DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f |
63 |
DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8 |
64 |
+DIST rustc-1.57.0-src.tar.xz 122681768 BLAKE2B 739fe2c34b01bb0c6beeb7717badeb2ba12f00b91831977bf0d8782d806071f8ed696e94bf51d53509ae6e5c5773544b2dcf4187e81682c2f765d0975c64ca7d SHA512 7903bcfc7c1db208da5d5991bd5b7f55dbe5917d4814274a8badf0d3b767211e81f8626c355ea93142f236abf116d5921c0b542ef309fbe84ece1ce84e5af30f |
65 |
+DIST rustc-1.57.0-src.tar.xz.asc 801 BLAKE2B e5c2e91999d8d2bcb5be36ddc8559a59fc53445f639bd179239489f9fd2a2f00f2191cdbb2000b73866fbb332b51be090e95e348a3573676dc24e00cdbb071fa SHA512 fcf1393a1be3c585447e08078b804e7ffcddcb47d87877c13526592e317b889b15ad1786baef5d6adf020631a6773a9dd31c04779f475a528b28871920a4641f |
66 |
|
67 |
diff --git a/dev-lang/rust/files/1.57.0-selfbootstrap.patch b/dev-lang/rust/files/1.57.0-selfbootstrap.patch |
68 |
new file mode 100644 |
69 |
index 000000000000..e30d0ee0e482 |
70 |
--- /dev/null |
71 |
+++ b/dev-lang/rust/files/1.57.0-selfbootstrap.patch |
72 |
@@ -0,0 +1,56 @@ |
73 |
+From aca8bcb48feca8c87b9af4e440835992d3f6d470 Mon Sep 17 00:00:00 2001 |
74 |
+From: Pietro Albini <pietro.albini@×××××××××××××××.com> |
75 |
+Date: Tue, 19 Oct 2021 09:29:19 +0200 |
76 |
+Subject: [PATCH] remove "field is never read" warning |
77 |
+ |
78 |
+--- |
79 |
+ src/bootstrap/lib.rs | 1 - |
80 |
+ src/bootstrap/metadata.rs | 3 +-- |
81 |
+ src/tools/bump-stage0/src/main.rs | 1 - |
82 |
+ 3 files changed, 1 insertion(+), 4 deletions(-) |
83 |
+ |
84 |
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs |
85 |
+index 2d4e152789724..3b3c8a9227d95 100644 |
86 |
+--- a/src/bootstrap/lib.rs |
87 |
++++ b/src/bootstrap/lib.rs |
88 |
+@@ -277,7 +277,6 @@ pub struct Build { |
89 |
+ struct Crate { |
90 |
+ name: Interned<String>, |
91 |
+ deps: HashSet<Interned<String>>, |
92 |
+- id: String, |
93 |
+ path: PathBuf, |
94 |
+ } |
95 |
+ |
96 |
+diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs |
97 |
+index a38391c7b88f2..65e229697dc87 100644 |
98 |
+--- a/src/bootstrap/metadata.rs |
99 |
++++ b/src/bootstrap/metadata.rs |
100 |
+@@ -14,7 +14,6 @@ struct Output { |
101 |
+ |
102 |
+ #[derive(Deserialize)] |
103 |
+ struct Package { |
104 |
+- id: String, |
105 |
+ name: String, |
106 |
+ source: Option<String>, |
107 |
+ manifest_path: String, |
108 |
+@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) { |
109 |
+ .filter(|dep| dep.source.is_none()) |
110 |
+ .map(|dep| INTERNER.intern_string(dep.name)) |
111 |
+ .collect(); |
112 |
+- build.crates.insert(name, Crate { name, id: package.id, deps, path }); |
113 |
++ build.crates.insert(name, Crate { name, deps, path }); |
114 |
+ } |
115 |
+ } |
116 |
+ } |
117 |
+diff --git a/src/tools/bump-stage0/src/main.rs b/src/tools/bump-stage0/src/main.rs |
118 |
+index 96d3c87384331..d6364e28fef97 100644 |
119 |
+--- a/src/tools/bump-stage0/src/main.rs |
120 |
++++ b/src/tools/bump-stage0/src/main.rs |
121 |
+@@ -196,7 +196,6 @@ struct ManifestPackage { |
122 |
+ |
123 |
+ #[derive(Debug, serde::Deserialize)] |
124 |
+ struct ManifestTargetPackage { |
125 |
+- available: bool, |
126 |
+ url: Option<String>, |
127 |
+ hash: Option<String>, |
128 |
+ xz_url: Option<String>, |
129 |
|
130 |
diff --git a/dev-lang/rust/rust-1.57.0.ebuild b/dev-lang/rust/rust-1.57.0.ebuild |
131 |
new file mode 100644 |
132 |
index 000000000000..26f160d3fd92 |
133 |
--- /dev/null |
134 |
+++ b/dev-lang/rust/rust-1.57.0.ebuild |
135 |
@@ -0,0 +1,687 @@ |
136 |
+# Copyright 1999-2021 Gentoo Authors |
137 |
+# Distributed under the terms of the GNU General Public License v2 |
138 |
+ |
139 |
+EAPI=7 |
140 |
+ |
141 |
+PYTHON_COMPAT=( python3_{7..10} ) |
142 |
+ |
143 |
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \ |
144 |
+ multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig |
145 |
+ |
146 |
+if [[ ${PV} = *beta* ]]; then |
147 |
+ betaver=${PV//*beta} |
148 |
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" |
149 |
+ MY_P="rustc-beta" |
150 |
+ SLOT="beta/${PV}" |
151 |
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" |
152 |
+else |
153 |
+ ABI_VER="$(ver_cut 1-2)" |
154 |
+ SLOT="stable/${ABI_VER}" |
155 |
+ MY_P="rustc-${PV}" |
156 |
+ SRC="${MY_P}-src.tar.xz" |
157 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
158 |
+fi |
159 |
+ |
160 |
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0" |
161 |
+ |
162 |
+DESCRIPTION="Systems programming language from Mozilla" |
163 |
+HOMEPAGE="https://www.rust-lang.org/" |
164 |
+ |
165 |
+SRC_URI=" |
166 |
+ https://static.rust-lang.org/dist/${SRC} |
167 |
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) |
168 |
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) ) |
169 |
+" |
170 |
+ |
171 |
+# keep in sync with llvm ebuild of the same version as bundled one. |
172 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 |
173 |
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) |
174 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
175 |
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} |
176 |
+ |
177 |
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
178 |
+ |
179 |
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" |
180 |
+ |
181 |
+# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
182 |
+# we need to *really* make sure we're not pulling more than one slot |
183 |
+# simultaneously. |
184 |
+ |
185 |
+# How to use it: |
186 |
+# List all the working slots in LLVM_VALID_SLOTS, newest first. |
187 |
+LLVM_VALID_SLOTS=( 13 ) |
188 |
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}" |
189 |
+ |
190 |
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation |
191 |
+# (-) usedep needed because we may build with older llvm without that target |
192 |
+LLVM_DEPEND="|| ( " |
193 |
+for _s in ${LLVM_VALID_SLOTS[@]}; do |
194 |
+ LLVM_DEPEND+=" ( " |
195 |
+ for _x in ${ALL_LLVM_TARGETS[@]}; do |
196 |
+ LLVM_DEPEND+=" |
197 |
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )" |
198 |
+ done |
199 |
+ LLVM_DEPEND+=" )" |
200 |
+done |
201 |
+unset _s _x |
202 |
+LLVM_DEPEND+=" ) |
203 |
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):= |
204 |
+ wasm? ( sys-devel/lld ) |
205 |
+" |
206 |
+ |
207 |
+# to bootstrap we need at least exactly previous version, or same. |
208 |
+# most of the time previous versions fail to bootstrap with newer |
209 |
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok, |
210 |
+# but it fails to bootstrap with 1.48.x |
211 |
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt |
212 |
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*" |
213 |
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*" |
214 |
+BOOTSTRAP_DEPEND="|| |
215 |
+ ( |
216 |
+ =dev-lang/rust-"${RUST_DEP_PREV}" |
217 |
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}" |
218 |
+ =dev-lang/rust-"${RUST_DEP_CURR}" |
219 |
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}" |
220 |
+ ) |
221 |
+" |
222 |
+ |
223 |
+BDEPEND="${PYTHON_DEPS} |
224 |
+ app-eselect/eselect-rust |
225 |
+ || ( |
226 |
+ >=sys-devel/gcc-4.7 |
227 |
+ >=sys-devel/clang-3.5 |
228 |
+ ) |
229 |
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} ) |
230 |
+ !system-llvm? ( |
231 |
+ >=dev-util/cmake-3.13.4 |
232 |
+ dev-util/ninja |
233 |
+ ) |
234 |
+ test? ( sys-devel/gdb ) |
235 |
+ verify-sig? ( app-crypt/openpgp-keys-rust ) |
236 |
+" |
237 |
+ |
238 |
+DEPEND=" |
239 |
+ >=app-arch/xz-utils-5.2 |
240 |
+ net-misc/curl:=[http2,ssl] |
241 |
+ sys-libs/zlib:= |
242 |
+ dev-libs/openssl:0= |
243 |
+ elibc_musl? ( sys-libs/libunwind:= ) |
244 |
+ system-llvm? ( ${LLVM_DEPEND} ) |
245 |
+" |
246 |
+ |
247 |
+# we need to block older versions due to layout changes. |
248 |
+RDEPEND="${DEPEND} |
249 |
+ app-eselect/eselect-rust |
250 |
+ !<dev-lang/rust-1.47.0-r1 |
251 |
+ !<dev-lang/rust-bin-1.47.0-r1 |
252 |
+" |
253 |
+ |
254 |
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) |
255 |
+ miri? ( nightly ) |
256 |
+ parallel-compiler? ( nightly ) |
257 |
+ rls? ( rust-src ) |
258 |
+ test? ( ${ALL_LLVM_TARGETS[*]} ) |
259 |
+ wasm? ( llvm_targets_WebAssembly ) |
260 |
+ x86? ( cpu_flags_x86_sse2 ) |
261 |
+" |
262 |
+ |
263 |
+# we don't use cmake.eclass, but can get a warnings |
264 |
+CMAKE_WARN_UNUSED_CLI=no |
265 |
+ |
266 |
+QA_FLAGS_IGNORED=" |
267 |
+ usr/lib/${PN}/${PV}/bin/.* |
268 |
+ usr/lib/${PN}/${PV}/libexec/.* |
269 |
+ usr/lib/${PN}/${PV}/lib/lib.*.so |
270 |
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.* |
271 |
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so |
272 |
+" |
273 |
+ |
274 |
+QA_SONAME=" |
275 |
+ usr/lib/${PN}/${PV}/lib/lib.*.so.* |
276 |
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so |
277 |
+" |
278 |
+ |
279 |
+# An rmeta file is custom binary format that contains the metadata for the crate. |
280 |
+# rmeta files do not support linking, since they do not contain compiled object files. |
281 |
+# so we can safely silence the warning for this QA check. |
282 |
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" |
283 |
+ |
284 |
+# causes double bootstrap |
285 |
+RESTRICT="test" |
286 |
+ |
287 |
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc |
288 |
+ |
289 |
+PATCHES=( |
290 |
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch |
291 |
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch |
292 |
+ "${FILESDIR}"/1.57.0-selfbootstrap.patch |
293 |
+) |
294 |
+ |
295 |
+S="${WORKDIR}/${MY_P}-src" |
296 |
+ |
297 |
+toml_usex() { |
298 |
+ usex "${1}" true false |
299 |
+} |
300 |
+ |
301 |
+bootstrap_rust_version_check() { |
302 |
+ # never call from pkg_pretend. eselect-rust may be not installed yet. |
303 |
+ [[ ${MERGE_TYPE} == binary ]] && return |
304 |
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))" |
305 |
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))" |
306 |
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) ) |
307 |
+ rustc_version=${rustc_version[0]#rust-bin-} |
308 |
+ rustc_version=${rustc_version#rust-} |
309 |
+ |
310 |
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" |
311 |
+ |
312 |
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then |
313 |
+ eerror "Rust >=${rustc_wanted} is required" |
314 |
+ eerror "please run 'eselect rust' and set correct rust version" |
315 |
+ die "selected rust version is too old" |
316 |
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then |
317 |
+ eerror "Rust <${rustc_toonew} is required" |
318 |
+ eerror "please run 'eselect rust' and set correct rust version" |
319 |
+ die "selected rust version is too new" |
320 |
+ else |
321 |
+ einfo "Using rust ${rustc_version} to build" |
322 |
+ fi |
323 |
+} |
324 |
+ |
325 |
+pre_build_checks() { |
326 |
+ local M=4096 |
327 |
+ # multiply requirements by 1.5 if we are doing x86-multilib |
328 |
+ if use amd64; then |
329 |
+ M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 )) |
330 |
+ fi |
331 |
+ M=$(( $(usex clippy 128 0) + ${M} )) |
332 |
+ M=$(( $(usex miri 128 0) + ${M} )) |
333 |
+ M=$(( $(usex rls 512 0) + ${M} )) |
334 |
+ M=$(( $(usex rustfmt 256 0) + ${M} )) |
335 |
+ # add 2G if we compile llvm and 256M per llvm_target |
336 |
+ if ! use system-llvm; then |
337 |
+ M=$(( 2048 + ${M} )) |
338 |
+ local ltarget |
339 |
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do |
340 |
+ M=$(( $(usex ${ltarget} 256 0) + ${M} )) |
341 |
+ done |
342 |
+ fi |
343 |
+ M=$(( $(usex wasm 256 0) + ${M} )) |
344 |
+ M=$(( $(usex debug 2 1) * ${M} )) |
345 |
+ eshopts_push -s extglob |
346 |
+ if is-flagq '-g?(gdb)?([1-9])'; then |
347 |
+ M=$(( 15 * ${M} / 10 )) |
348 |
+ fi |
349 |
+ eshopts_pop |
350 |
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} )) |
351 |
+ M=$(( $(usex doc 256 0) + ${M} )) |
352 |
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} |
353 |
+} |
354 |
+ |
355 |
+llvm_check_deps() { |
356 |
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" |
357 |
+} |
358 |
+ |
359 |
+pkg_pretend() { |
360 |
+ pre_build_checks |
361 |
+} |
362 |
+ |
363 |
+pkg_setup() { |
364 |
+ pre_build_checks |
365 |
+ python-any-r1_pkg_setup |
366 |
+ |
367 |
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381 |
368 |
+ |
369 |
+ use system-bootstrap && bootstrap_rust_version_check |
370 |
+ |
371 |
+ if use system-llvm; then |
372 |
+ llvm_pkg_setup |
373 |
+ |
374 |
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" |
375 |
+ export LLVM_LINK_SHARED=1 |
376 |
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" |
377 |
+ fi |
378 |
+} |
379 |
+ |
380 |
+src_prepare() { |
381 |
+ if ! use system-bootstrap; then |
382 |
+ local rust_stage0_root="${WORKDIR}"/rust-stage0 |
383 |
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)" |
384 |
+ |
385 |
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \ |
386 |
+ --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die |
387 |
+ fi |
388 |
+ |
389 |
+ default |
390 |
+} |
391 |
+ |
392 |
+src_configure() { |
393 |
+ local rust_target="" rust_targets="" arch_cflags |
394 |
+ |
395 |
+ # Collect rust target names to compile standard libs for all ABIs. |
396 |
+ for v in $(multilib_get_enabled_abi_pairs); do |
397 |
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" |
398 |
+ done |
399 |
+ if use wasm; then |
400 |
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" |
401 |
+ if use system-llvm; then |
402 |
+ # un-hardcode rust-lld linker for this target |
403 |
+ # https://bugs.gentoo.org/715348 |
404 |
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die |
405 |
+ fi |
406 |
+ fi |
407 |
+ rust_targets="${rust_targets#,}" |
408 |
+ |
409 |
+ local tools="\"cargo\"," |
410 |
+ if use clippy; then |
411 |
+ tools="\"clippy\",$tools" |
412 |
+ fi |
413 |
+ if use miri; then |
414 |
+ tools="\"miri\",$tools" |
415 |
+ fi |
416 |
+ if use rls; then |
417 |
+ tools="\"rls\",\"analysis\",$tools" |
418 |
+ fi |
419 |
+ if use rustfmt; then |
420 |
+ tools="\"rustfmt\",$tools" |
421 |
+ fi |
422 |
+ if use rust-src; then |
423 |
+ tools="\"src\",$tools" |
424 |
+ fi |
425 |
+ |
426 |
+ local rust_stage0_root |
427 |
+ if use system-bootstrap; then |
428 |
+ local printsysroot |
429 |
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")" |
430 |
+ rust_stage0_root="${printsysroot}" |
431 |
+ else |
432 |
+ rust_stage0_root="${WORKDIR}"/rust-stage0 |
433 |
+ fi |
434 |
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path |
435 |
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" |
436 |
+ |
437 |
+ rust_target="$(rust_abi)" |
438 |
+ |
439 |
+ cat <<- _EOF_ > "${S}"/config.toml |
440 |
+ changelog-seen = 2 |
441 |
+ [llvm] |
442 |
+ download-ci-llvm = false |
443 |
+ optimize = $(toml_usex !debug) |
444 |
+ release-debuginfo = $(toml_usex debug) |
445 |
+ assertions = $(toml_usex debug) |
446 |
+ ninja = true |
447 |
+ targets = "${LLVM_TARGETS// /;}" |
448 |
+ experimental-targets = "" |
449 |
+ link-shared = $(toml_usex system-llvm) |
450 |
+ [build] |
451 |
+ build-stage = 2 |
452 |
+ test-stage = 2 |
453 |
+ doc-stage = 2 |
454 |
+ build = "${rust_target}" |
455 |
+ host = ["${rust_target}"] |
456 |
+ target = [${rust_targets}] |
457 |
+ cargo = "${rust_stage0_root}/bin/cargo" |
458 |
+ rustc = "${rust_stage0_root}/bin/rustc" |
459 |
+ rustfmt = "${rust_stage0_root}/bin/rustfmt" |
460 |
+ docs = $(toml_usex doc) |
461 |
+ compiler-docs = false |
462 |
+ submodules = false |
463 |
+ python = "${EPYTHON}" |
464 |
+ locked-deps = true |
465 |
+ vendor = true |
466 |
+ extended = true |
467 |
+ tools = [${tools}] |
468 |
+ verbose = 2 |
469 |
+ sanitizers = false |
470 |
+ profiler = false |
471 |
+ cargo-native-static = false |
472 |
+ [install] |
473 |
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" |
474 |
+ sysconfdir = "etc" |
475 |
+ docdir = "share/doc/rust" |
476 |
+ bindir = "bin" |
477 |
+ libdir = "lib" |
478 |
+ mandir = "share/man" |
479 |
+ [rust] |
480 |
+ # https://github.com/rust-lang/rust/issues/54872 |
481 |
+ codegen-units-std = 1 |
482 |
+ optimize = true |
483 |
+ debug = $(toml_usex debug) |
484 |
+ debug-assertions = $(toml_usex debug) |
485 |
+ debug-assertions-std = $(toml_usex debug) |
486 |
+ debuginfo-level = $(usex debug 2 0) |
487 |
+ debuginfo-level-rustc = $(usex debug 2 0) |
488 |
+ debuginfo-level-std = $(usex debug 2 0) |
489 |
+ debuginfo-level-tools = $(usex debug 2 0) |
490 |
+ debuginfo-level-tests = 0 |
491 |
+ backtrace = true |
492 |
+ incremental = false |
493 |
+ default-linker = "$(tc-getCC)" |
494 |
+ parallel-compiler = $(toml_usex parallel-compiler) |
495 |
+ channel = "$(usex nightly nightly stable)" |
496 |
+ description = "gentoo" |
497 |
+ rpath = false |
498 |
+ verbose-tests = true |
499 |
+ optimize-tests = $(toml_usex !debug) |
500 |
+ codegen-tests = true |
501 |
+ dist-src = false |
502 |
+ remap-debuginfo = true |
503 |
+ lld = $(usex system-llvm false $(toml_usex wasm)) |
504 |
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it |
505 |
+ # https://github.com/rust-lang/rust/issues/74976 |
506 |
+ # https://github.com/rust-lang/rust/issues/76526 |
507 |
+ deny-warnings = $(usex wasm $(usex doc false true) true) |
508 |
+ backtrace-on-ice = true |
509 |
+ jemalloc = false |
510 |
+ [dist] |
511 |
+ src-tarball = false |
512 |
+ compression-formats = ["gz"] |
513 |
+ _EOF_ |
514 |
+ |
515 |
+ for v in $(multilib_get_enabled_abi_pairs); do |
516 |
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) |
517 |
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})" |
518 |
+ |
519 |
+ cat <<- _EOF_ >> "${S}"/config.env |
520 |
+ CFLAGS_${rust_target}=${arch_cflags} |
521 |
+ _EOF_ |
522 |
+ |
523 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
524 |
+ [target.${rust_target}] |
525 |
+ cc = "$(tc-getBUILD_CC)" |
526 |
+ cxx = "$(tc-getBUILD_CXX)" |
527 |
+ linker = "$(tc-getCC)" |
528 |
+ ar = "$(tc-getAR)" |
529 |
+ _EOF_ |
530 |
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; |
531 |
+ if use elibc_musl; then |
532 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
533 |
+ crt-static = false |
534 |
+ _EOF_ |
535 |
+ fi |
536 |
+ if use system-llvm; then |
537 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
538 |
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" |
539 |
+ _EOF_ |
540 |
+ fi |
541 |
+ done |
542 |
+ if use wasm; then |
543 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
544 |
+ [target.wasm32-unknown-unknown] |
545 |
+ linker = "$(usex system-llvm lld rust-lld)" |
546 |
+ _EOF_ |
547 |
+ fi |
548 |
+ |
549 |
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below |
550 |
+ # experimental cross support |
551 |
+ # discussion: https://bugs.gentoo.org/679878 |
552 |
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support |
553 |
+ # it would be much better if we could split out stdlib |
554 |
+ # complilation to separate ebuild and abuse CATEGORY to |
555 |
+ # just install to /usr/lib/rustlib/<target> |
556 |
+ |
557 |
+ # extra targets defined as a bash array |
558 |
+ # spec format: <LLVM target>:<rust-target>:<CTARGET> |
559 |
+ # best place would be /etc/portage/env/dev-lang/rust |
560 |
+ # Example: |
561 |
+ # RUST_CROSS_TARGETS=( |
562 |
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" |
563 |
+ # ) |
564 |
+ # no extra hand holding is done, no target transformations, all |
565 |
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values |
566 |
+ # valid rust targets can be obtained with |
567 |
+ # rustc --print target-list |
568 |
+ # matching cross toolchain has to be installed |
569 |
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) |
570 |
+ # only gcc toolchains installed with crossdev are checked for now. |
571 |
+ |
572 |
+ # BUG: we can't pass host flags to cross compiler, so just filter for now |
573 |
+ # BUG: this should be more fine-grained. |
574 |
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' |
575 |
+ |
576 |
+ local cross_target_spec |
577 |
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do |
578 |
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET> |
579 |
+ local cross_llvm_target="${cross_target_spec%%:*}" |
580 |
+ # extracts toolchain triples, <rust-target>:<CTARGET> |
581 |
+ local cross_triples="${cross_target_spec#*:}" |
582 |
+ # extracts first element after before : separator |
583 |
+ local cross_rust_target="${cross_triples%%:*}" |
584 |
+ # extracts last element after : separator |
585 |
+ local cross_toolchain="${cross_triples##*:}" |
586 |
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" |
587 |
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" |
588 |
+ |
589 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
590 |
+ [target.${cross_rust_target}] |
591 |
+ cc = "${cross_toolchain}-gcc" |
592 |
+ cxx = "${cross_toolchain}-g++" |
593 |
+ linker = "${cross_toolchain}-gcc" |
594 |
+ ar = "${cross_toolchain}-ar" |
595 |
+ _EOF_ |
596 |
+ if use system-llvm; then |
597 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
598 |
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" |
599 |
+ _EOF_ |
600 |
+ fi |
601 |
+ if [[ "${cross_toolchain}" == *-musl* ]]; then |
602 |
+ cat <<- _EOF_ >> "${S}"/config.toml |
603 |
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" |
604 |
+ _EOF_ |
605 |
+ fi |
606 |
+ |
607 |
+ # append cross target to "normal" target list |
608 |
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]' |
609 |
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' |
610 |
+ |
611 |
+ rust_targets="${rust_targets},\"${cross_rust_target}\"" |
612 |
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die |
613 |
+ |
614 |
+ ewarn |
615 |
+ ewarn "Enabled ${cross_rust_target} rust target" |
616 |
+ ewarn "Using ${cross_toolchain} cross toolchain" |
617 |
+ ewarn |
618 |
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then |
619 |
+ ewarn "'sys-devel/binutils[multitarget]' is not installed" |
620 |
+ ewarn "'strip' will be unable to strip cross libraries" |
621 |
+ ewarn "cross targets will be installed with full debug information" |
622 |
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" |
623 |
+ ewarn |
624 |
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target" |
625 |
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" |
626 |
+ ewarn |
627 |
+ fi |
628 |
+ done |
629 |
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS |
630 |
+ |
631 |
+ einfo "Rust configured with the following flags:" |
632 |
+ echo |
633 |
+ echo RUSTFLAGS="${RUSTFLAGS:-}" |
634 |
+ echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}" |
635 |
+ echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}" |
636 |
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS=" |
637 |
+ cat "${S}"/config.env || die |
638 |
+ echo |
639 |
+ einfo "config.toml contents:" |
640 |
+ cat "${S}"/config.toml || die |
641 |
+ echo |
642 |
+} |
643 |
+ |
644 |
+src_compile() { |
645 |
+ # we need \n IFS to have config.env with spaces loaded properly. #734018 |
646 |
+ ( |
647 |
+ IFS=$'\n' |
648 |
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ |
649 |
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die |
650 |
+ ) |
651 |
+} |
652 |
+ |
653 |
+src_test() { |
654 |
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html |
655 |
+ |
656 |
+ # those are basic and codegen tests. |
657 |
+ local tests=( |
658 |
+ codegen |
659 |
+ codegen-units |
660 |
+ compile-fail |
661 |
+ incremental |
662 |
+ mir-opt |
663 |
+ pretty |
664 |
+ run-make |
665 |
+ ) |
666 |
+ |
667 |
+ # fails if llvm is not built with ALL targets. |
668 |
+ # and known to fail with system llvm sometimes. |
669 |
+ use system-llvm || tests+=( assembly ) |
670 |
+ |
671 |
+ # fragile/expensive/less important tests |
672 |
+ # or tests that require extra builds |
673 |
+ # TODO: instead of skipping, just make some nonfatal. |
674 |
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then |
675 |
+ tests+=( |
676 |
+ rustdoc |
677 |
+ rustdoc-js |
678 |
+ rustdoc-js-std |
679 |
+ rustdoc-ui |
680 |
+ run-make-fulldeps |
681 |
+ ui |
682 |
+ ui-fulldeps |
683 |
+ ) |
684 |
+ fi |
685 |
+ |
686 |
+ local i failed=() |
687 |
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" |
688 |
+ for i in "${tests[@]}"; do |
689 |
+ local t="src/test/${i}" |
690 |
+ einfo "rust_src_test: running ${t}" |
691 |
+ if ! ( |
692 |
+ IFS=$'\n' |
693 |
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \ |
694 |
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ |
695 |
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" |
696 |
+ ) |
697 |
+ then |
698 |
+ failed+=( "${t}" ) |
699 |
+ eerror "rust_src_test: ${t} failed" |
700 |
+ fi |
701 |
+ done |
702 |
+ |
703 |
+ if [[ ${#failed[@]} -ne 0 ]]; then |
704 |
+ eerror "rust_src_test: failure summary: ${failed[@]}" |
705 |
+ die "aborting due to test failures" |
706 |
+ fi |
707 |
+} |
708 |
+ |
709 |
+src_install() { |
710 |
+ ( |
711 |
+ IFS=$'\n' |
712 |
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \ |
713 |
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die |
714 |
+ ) |
715 |
+ |
716 |
+ # bug #689562, #689160 |
717 |
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die |
718 |
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die |
719 |
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo |
720 |
+ |
721 |
+ local symlinks=( |
722 |
+ cargo |
723 |
+ rustc |
724 |
+ rustdoc |
725 |
+ rust-gdb |
726 |
+ rust-gdbgui |
727 |
+ rust-lldb |
728 |
+ ) |
729 |
+ |
730 |
+ use clippy && symlinks+=( clippy-driver cargo-clippy ) |
731 |
+ use miri && symlinks+=( miri cargo-miri ) |
732 |
+ use rls && symlinks+=( rls ) |
733 |
+ use rustfmt && symlinks+=( rustfmt cargo-fmt ) |
734 |
+ |
735 |
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" |
736 |
+ local i |
737 |
+ for i in "${symlinks[@]}"; do |
738 |
+ # we need realpath on /usr/bin/* symlink return version-appended binary path. |
739 |
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver> |
740 |
+ # need to fix eselect-rust to remove this hack. |
741 |
+ local ver_i="${i}-${PV}" |
742 |
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then |
743 |
+ einfo "Installing ${i} symlink" |
744 |
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die |
745 |
+ else |
746 |
+ ewarn "${i} symlink requested, but source file not found" |
747 |
+ ewarn "please report this" |
748 |
+ fi |
749 |
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" |
750 |
+ done |
751 |
+ |
752 |
+ # symlinks to switch components to active rust in eselect |
753 |
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}" |
754 |
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" |
755 |
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" |
756 |
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" |
757 |
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" |
758 |
+ |
759 |
+ newenvd - "50${P}" <<-_EOF_ |
760 |
+ LDPATH="${EPREFIX}/usr/lib/rust/lib" |
761 |
+ MANPATH="${EPREFIX}/usr/lib/rust/man" |
762 |
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') |
763 |
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') |
764 |
+ _EOF_ |
765 |
+ |
766 |
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die |
767 |
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die |
768 |
+ |
769 |
+ # note: eselect-rust adds EROOT to all paths below |
770 |
+ cat <<-_EOF_ > "${T}/provider-${P}" |
771 |
+ /usr/bin/cargo |
772 |
+ /usr/bin/rustdoc |
773 |
+ /usr/bin/rust-gdb |
774 |
+ /usr/bin/rust-gdbgui |
775 |
+ /usr/bin/rust-lldb |
776 |
+ /usr/lib/rustlib |
777 |
+ /usr/lib/rust/lib |
778 |
+ /usr/lib/rust/libexec |
779 |
+ /usr/lib/rust/man |
780 |
+ /usr/share/doc/rust |
781 |
+ _EOF_ |
782 |
+ |
783 |
+ if use clippy; then |
784 |
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}" |
785 |
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" |
786 |
+ fi |
787 |
+ if use miri; then |
788 |
+ echo /usr/bin/miri >> "${T}/provider-${P}" |
789 |
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}" |
790 |
+ fi |
791 |
+ if use rls; then |
792 |
+ echo /usr/bin/rls >> "${T}/provider-${P}" |
793 |
+ fi |
794 |
+ if use rustfmt; then |
795 |
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}" |
796 |
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |
797 |
+ fi |
798 |
+ |
799 |
+ insinto /etc/env.d/rust |
800 |
+ doins "${T}/provider-${P}" |
801 |
+} |
802 |
+ |
803 |
+pkg_postinst() { |
804 |
+ eselect rust update |
805 |
+ |
806 |
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then |
807 |
+ elog "Rust installs a helper script for calling GDB and LLDB," |
808 |
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." |
809 |
+ fi |
810 |
+ |
811 |
+ if has_version app-editors/emacs; then |
812 |
+ elog "install app-emacs/rust-mode to get emacs support for rust." |
813 |
+ fi |
814 |
+ |
815 |
+ if has_version app-editors/gvim || has_version app-editors/vim; then |
816 |
+ elog "install app-vim/rust-vim to get vim support for rust." |
817 |
+ fi |
818 |
+} |
819 |
+ |
820 |
+pkg_postrm() { |
821 |
+ eselect rust cleanup |
822 |
+} |