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