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