Gentoo Archives: gentoo-commits

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