Gentoo Archives: gentoo-commits

From: Quentin Retornaz <gentoo@××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
Date: Sat, 24 Sep 2022 20:10:54
Message-Id: 1664050225.c8cabf61a531c0c993f4b66195421cf6755fcb34.quentin@gentoo
1 commit: c8cabf61a531c0c993f4b66195421cf6755fcb34
2 Author: orbea <orbea <AT> riseup <DOT> net>
3 AuthorDate: Sat Sep 24 15:56:31 2022 +0000
4 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
5 CommitDate: Sat Sep 24 20:10:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c8cabf61
7
8 dev-lang/rust: Add 1.64.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/metadata.xml | 1 +
15 dev-lang/rust/rust-1.64.0.ebuild | 753 +++++++++++++++++++++++++++++++++++++++
16 3 files changed, 788 insertions(+)
17
18 diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
19 index c74098e..c7502c3 100644
20 --- a/dev-lang/rust/Manifest
21 +++ b/dev-lang/rust/Manifest
22 @@ -158,6 +158,38 @@ DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607
23 DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
24 DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
25 DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
26 +DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
27 +DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
28 +DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
29 +DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B ccac24e85deb6089468b763bce6cd54ec1c5ce506d10c8e84d3e8b0c9ee21946ac575a4aab5205c5a2d8328488641806a7dc1b15bd8cc48f3701630f223580f4 SHA512 9d41f34e507271e26e6ff7ce03d6a215a99971df77b246fa64b3518d70c2ec82142e96c4d0cf9641405065ec672f663316a93fe0e9183bd1e8f5af4de1ef41f1
30 +DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz 203850320 BLAKE2B 2a0f4e195d6e7ca66119b2bd45d58127b6aa305c77349c06d8ee109066ede59288ce067e222fca12f1414224a74ec9f33e7de1a18bf7b1e91e216e852e574a90 SHA512 d55ee6201bc4c3cd698396f08d4247b7578778b3c82da8ef496512e0f8cb1758009af6286230a1b26849b5f27101a242d7e04851ae41a41f7547589103f5c0ce
31 +DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 26bdf2e38262d3e4b23c72f86325dd1275c08b5ccccd99c82b91a05cf800e3e6a2500bdc6d89a3582311292f6ba1ddd65b8a081b608c83adcb39faa708f8376d SHA512 0f1213cf05bbbf659103c7178f20780fa3ef807cd03417edcb901d6560411c3f96bfeeb0dcf555460675573cfb9d402fa3882d787015ecfbf83765ae9fc35325
32 +DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz 204273564 BLAKE2B 4a3730dc3d1cc08c8a0a687328e19e7a78265eb81cc1a3312cc547bd4823951c28ab57ac87919aab346994a6f96ce9803f7429c6b1831e4fdb3a7f7f086a2a87 SHA512 d53bc819c7ca2e5fc116fec5a731d280ac701f19fd9a8707ee5e69fdc41544d3dce17f8cd61f9ad0b59a89409c9859634e5d91444a0361add69c36c3f47a379d
33 +DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e71f5d6f404a408774f6246fe72596c59255ba1f1b52c4ef6fdef08da63178fefa46966370a1f4e04b95a68b119f166e01d2d2d347f9e4517908e87146a56d83 SHA512 c70a350de8d378ed8dcec42d697143e4cce18dfd176b4fbcea25e7c608ff3db51642ab1be3b13d277d7eeec5a0262aaf9c38527f7f14c02fc64f760d6438efb2
34 +DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz 209545116 BLAKE2B 2cb5610fc665f50505fa8b0d18b88cf79abca6a6b8503d46f76fc58b74e7d58e3b7aa1a790e7ba555b250d0f0bd48acd176ff1cf463eb7f37b34780b04b2c838 SHA512 e809ac29a9b24c82f7d950ebbad5d3c01dafba9554c55716a28e728b0218c6f8b3b7f1e31c277be3946da1a0e4228717d7a1a63db66716c19a79b2c5ac11fb92
35 +DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c6f1e717a7cb746dfe3d9b109d77bdf7cd918c2d60491d83b2d7cebf412140b9cae257df850587c16a7b1c8faa16ef029f628c6c2c7e5b6f1d088e1a03c33899 SHA512 c832521179dd7b7cda0e979bfbfe491d3a255cb47f03fe113ac1290540fdc7134ea08a2815c9ec422919579fff3db995aa0e7f72249e2d00d4790a58f1142680
36 +DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz 224058112 BLAKE2B 6a83fa3bd0fe2a7f0cdbf8b8c7a6662235f9690177c9ed06af7be969b08959d2c58a8689247cd61a9d9ff765e6946f2bb12b9d278a0701d4764bdf8d141dd4cf SHA512 8441267b1fb1cec3c9a2e226f6f6c5d66cdf9fa2026df272374432c501aefb515b8d21266ddee5297f8570de72c55fa5bf485c5a9790ad7687e5ad1811c72cad
37 +DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c2e92bdf15c1dbfdb2715fd4b1874a270e21bedad1c84967c4bf92a2818935dfdfc48673e3b52d991ae9557378a62a5905e8f3005f1bf12f6eb93415cc47b1c SHA512 f42f5e65f76c72f7dd6bfdbc730b3c4da50d1444df2b1282334a6a3e6cb0af175536b037c6a5f1fc4000640756e57a3176315e288fe23ba56abe8a6f4c763525
38 +DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz 161238712 BLAKE2B a60f7b8a190fb90e123c18fafde9fbfa6e27bedc849175351ec9871ea705c2a54eae59b5597e71e20d2e63c73065717ccb56eea59ed46d12c13ae4fe8125ae5e SHA512 dc7ec2f92bdcd52af83c71b07df0f31187b8f195e9900ba0ffa3688175cdd22e81c34ef45b5e84c2cb9b47adf990de20a2c9296b46c17cc06176c19e956923cb
39 +DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7803d7c07170d1a9af4e83add8f9b42caec19f5c8af4163dd541069f8b3f86087a09e4c3447c0faba19d1c2173c2411503856254b34d7c57320be250dd5b72ab SHA512 a9e80d1417353298656b99137a20478265458c95914c9d547bb57905ac9b654127fbf6e7a4292bfe74afd0aaae20730a126910383822d0c75b2da164bf60341e
40 +DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz 166872588 BLAKE2B 3a052d6f4196cbf55feb173e36c22cd3316abf6081d6a94dd6a7ab3a675f447471555b721e162ca15cbc485c4571b647a9257649a1d23b69b9a0ef262827b2d7 SHA512 db23d30021d6f8a5fbec50b6dac13264e3aac003ff0604185999318b47370b4476ce9e6034ab9ab5f4fba03b393898968b8c9a698f2b71bc1f58b452b030d1c4
41 +DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B f30125c52883076251a22bb8a90fdd642167ebd0688ceb8e349555491824cffbc0873526b0269419fbc6421c5976aab18f5c3bbf35b997b4afc5d48b1e080c03 SHA512 d86940292aa891f7f0fc10d14b5ee386f8481448b6ed26bd8aabf21a7341c0916b08eae0e26bcd1dcc0fad1fbc0d216a767d8eba3dcc2ed47c4bb0aab107ab80
42 +DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz 165974484 BLAKE2B 4dcbcb3e6255c9266c4476e62aa9a6d31c4ba48b9a830789d9cf245002b4fec762f86fb6713507dfac8227a4e9da32347e5ce9d029d53220f8b3037e2dcf47c5 SHA512 2fb7e3bdc925abfc8efc4ee30f19bf6eb5d5afc803332059cf855eee7ba7c6a85c578701798fd1b9f9b07a4a7b091283406ca02c797fdafc9e437b0ea85de8be
43 +DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c42a76a7902234490f33b520494d85c5000592cb781d97c9def132fce39f3e582cfbe6c868a7dc494ce550228ee0c4195500a17489323c22f9aecc74d4915135 SHA512 62fa9ace175d1359ae61229e6618972ff1db42b8e826113af247fccd67c4f49dd4ad4d93eefa3801a20a164332404f9fa5002c75ede2b81eb277e64d1a29396a
44 +DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz 184571616 BLAKE2B 452ee709ba25db4569e4ed20f88ea4a14c8b45c85803b065b5bc6e005473c02dc745ae531b8e0c7642dbe50880dd2f9d359520a3f0fc09628327613ed706dd38 SHA512 2dd3ab750044501e882442e54fc78fe73f36758458c6107df7afd55f8333c01a2e69bde181ca1bf3a1529a3a2bf616d4f69708081c494cc1781be5fd2a58df29
45 +DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 13796a48f4ae628c2242ce4632ebdf4106899aa0713b469e4ad4457f0bad23638626bdf6de6a2f6d1d84b8408872c5a4cc97ae4fa0409458d8bec6eb43adf9a5 SHA512 813601cbe547add62345d4a9ed1a31e364310724c2bddf9f76404095b9fa1ab3c33f9480953d22136635afc8d6f7d4a9df2839f2e3d9d5f74a6594ae3d7f9537
46 +DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz 192446060 BLAKE2B 28a6c8a94caab7d23d203e55ad1ad1b689f07ea9d4bdb0a618833b36378ea731ca85f906c8fe0de2727001471fef9b30b8f12a241d9cd257851b2b0a8a94f15b SHA512 42a39558352c1cbdf7c9e9fa1aecae160b43e1bf74ace0df844d95bd43743642be7107bbb60a574de7219da355cf64939509d4f028f32d555a90900e962df6e8
47 +DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ed2a82a7a04f1d831480f7aa32ef8f0524424aec50ae8f75d2c186937b1c3e3bd953306dafa026a492b1792043ccace535f26b4911691d58b27d799585d2f024 SHA512 c740ad1bd86074b27c233167e2a66b20a9e79d2505e6e00b38a1f8053f136218dc21618968c4d709c8c2936311449187ce15d16d078832b7107303b56ba9c55e
48 +DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz 202613736 BLAKE2B eb0fcc0c0a615dc1d48591e9d34bdfcdac5adbe2b5953faa8e11b0147a09a56fac3161e2c0f5c4c0d399a3a9431effdc84b938f00469f262c24f06d1c0489a08 SHA512 9c9927b9c22d8561a9b45b237e64d3afc1725cace695fa6623db65731e9ec2cd56e105949d866f5feb62c6ec717852461ef0153fc9d028fbc5323ef231eba69e
49 +DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B efdb321cae9af3c3ff8854b52281211c80833f30785004c70df79bb73b094a21fd63687372dd1cb192a2547fcb7d8bbc7c4ae27851695aecce71e085bad34396 SHA512 c876eedce00ef013d2af89218a6ab5108d9ab5e3a60d7afc5afacd39e5a017ab99ef12a0ff954e8861c42a3ff9bc9030077bd9801f575620e015590a82ea0f25
50 +DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz 195670272 BLAKE2B 487ce5fd3dfa59914264953792d8f44433d88d9ca29bb647effda24e170a55470cca35fe653f6706f78e6b0c70265d0735585b17d7108bd62b71cd84e7f1312a SHA512 b6da4a3651b205f819e002157d196b014e4ad9923f854271dd6b306d8c69dc3d619b9a3e51c56ea2d2402566fac775d42719a67952c8f3e93933594aadc67831
51 +DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 822415e792104724494f29dee1a9730fc0328e00ee613c163d3cc8298fd3f85465d5c31d2c94b479271dde0721690c78056ec3828e14087a5c5b82c0dee0d4b8 SHA512 9b2d8239708baefb075470aeb37d5b62fb934d4074c745d89467d4f9efb91c10b7c999b726c4edef720b58e95e525cc72fa20d4cfbe6d0ba1352f5fca5d1e195
52 +DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz 219060812 BLAKE2B 8087db6ae903fed440bddfe4a07fee35292b16fdb847155cf584dc1a7adbeb4a8f55bd17afeb015dba53c29a05bfbd3f5373b2e30018e4a56d400fdbd1cedc3f SHA512 11bed7ebd8bf977aa34ef9f9dabee8428baede670885b4f268335fe87b81e41b426e94ca60db218e82be2e6e73ec33123c77922bfee7ae9373bfd9227417214c
53 +DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3f656cd12927155b4debb68e821d9db3fa880ee49c557246c34390c44ab6e2c456d8b29b1c15c933de868d0884a83b2b419501af06d4244830d59032d5ce82a5 SHA512 521f95024624200c67d556c533d307468007c01a7de37cbd65d4af949275933cfee51334338838f5e4a9136a363b65bec47bcf399ebacff7f5558ae59c1d006c
54 +DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a214a7b1ad2f075b162f6f49056a96a3a1153df794025d9a1456083dd3e7ab9eb3c71982982701cc1f8a93405640f8b622fde60819ee022413446f SHA512 9e538980b6a42d14b7ec08bd1a3ddecfea24e5d3068226edf212486bb5a20bfcac22f1f917a06536f6f26dcffedd65c7049870bc3d70b9c972075bcbe58eb8d9
55 +DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
56 +DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 87887273 BLAKE2B 260bb89b8a72c063b3943c07e0720c8a910d73fdeee281d0711e1c7c378f76fbbe815ecad2e517efbd4ce664ed0e12b2e6bfccebf32b233c0fd1e5d9c930919c SHA512 da7a521eb335ffd655a25dc312ca7f1d5d1dea6846a651e7ae7086bd079323a3a7ff94e1c474b6b45e39f2e989b261d20dcdd8f906f7784739d97a4fa52ba97e
57 +DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
58 DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
59 DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
60 DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
61 @@ -170,3 +202,5 @@ DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b759
62 DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
63 DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
64 DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
65 +DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
66 +DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
67
68 diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
69 index 99bf905..f64700d 100644
70 --- a/dev-lang/rust/metadata.xml
71 +++ b/dev-lang/rust/metadata.xml
72 @@ -18,6 +18,7 @@
73 <flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
74 <flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
75 <flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
76 + <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (like rls)</flag>
77 <flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
78 <flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
79 <flag name="system-llvm">Use the system LLVM installation</flag>
80
81 diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
82 new file mode 100644
83 index 0000000..8592597
84 --- /dev/null
85 +++ b/dev-lang/rust/rust-1.64.0.ebuild
86 @@ -0,0 +1,753 @@
87 +# Copyright 1999-2022 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=8
91 +
92 +PYTHON_COMPAT=( python3_{8..11} )
93 +
94 +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
95 + multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
96 +
97 +if [[ ${PV} = *beta* ]]; then
98 + betaver=${PV//*beta}
99 + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
100 + MY_P="rustc-beta"
101 + SLOT="beta/${PV}"
102 + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
103 +else
104 + ABI_VER="$(ver_cut 1-2)"
105 + SLOT="stable/${ABI_VER}"
106 + MY_P="rustc-${PV}"
107 + SRC="${MY_P}-src.tar.xz"
108 + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
109 +fi
110 +
111 +RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
112 +
113 +DESCRIPTION="Systems programming language from Mozilla"
114 +HOMEPAGE="https://www.rust-lang.org/"
115 +
116 +SRC_URI="
117 + https://static.rust-lang.org/dist/${SRC}
118 + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
119 + !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
120 +"
121 +
122 +# keep in sync with llvm ebuild of the same version as bundled one.
123 +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
124 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
125 +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
126 +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
127 +
128 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
129 +
130 +IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
131 +
132 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
133 +# we need to *really* make sure we're not pulling more than one slot
134 +# simultaneously.
135 +
136 +# How to use it:
137 +# List all the working slots in LLVM_VALID_SLOTS, newest first.
138 +LLVM_VALID_SLOTS=( 14 )
139 +LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
140 +
141 +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
142 +# (-) usedep needed because we may build with older llvm without that target
143 +LLVM_DEPEND="|| ( "
144 +for _s in ${LLVM_VALID_SLOTS[@]}; do
145 + LLVM_DEPEND+=" ( "
146 + for _x in ${ALL_LLVM_TARGETS[@]}; do
147 + LLVM_DEPEND+="
148 + ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
149 + done
150 + LLVM_DEPEND+=" )"
151 +done
152 +unset _s _x
153 +LLVM_DEPEND+=" )
154 + <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
155 + wasm? ( sys-devel/lld )
156 +"
157 +
158 +# to bootstrap we need at least exactly previous version, or same.
159 +# most of the time previous versions fail to bootstrap with newer
160 +# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
161 +# but it fails to bootstrap with 1.48.x
162 +# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
163 +RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
164 +RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
165 +BOOTSTRAP_DEPEND="||
166 + (
167 + =dev-lang/rust-"${RUST_DEP_PREV}"
168 + =dev-lang/rust-bin-"${RUST_DEP_PREV}"
169 + =dev-lang/rust-"${RUST_DEP_CURR}"
170 + =dev-lang/rust-bin-"${RUST_DEP_CURR}"
171 + )
172 +"
173 +
174 +BDEPEND="${PYTHON_DEPS}
175 + app-eselect/eselect-rust
176 + || (
177 + >=sys-devel/gcc-4.7
178 + >=sys-devel/clang-3.5
179 + )
180 + system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
181 + !system-llvm? (
182 + >=dev-util/cmake-3.13.4
183 + dev-util/ninja
184 + )
185 + test? ( sys-devel/gdb )
186 + verify-sig? ( sec-keys/openpgp-keys-rust )
187 +"
188 +
189 +DEPEND="
190 + >=app-arch/xz-utils-5.2
191 + net-misc/curl:=[http2,ssl]
192 + sys-libs/zlib:=
193 + dev-libs/openssl:0=
194 + system-llvm? (
195 + ${LLVM_DEPEND}
196 + llvm-libunwind? ( sys-libs/llvm-libunwind:= )
197 + )
198 + !system-llvm? (
199 + !llvm-libunwind? (
200 + elibc_musl? ( sys-libs/libunwind:= )
201 + )
202 + )
203 +"
204 +
205 +RDEPEND="${DEPEND}
206 + app-eselect/eselect-rust
207 + sys-apps/lsb-release
208 +"
209 +
210 +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
211 + miri? ( nightly )
212 + parallel-compiler? ( nightly )
213 + rls? ( rust-src )
214 + test? ( ${ALL_LLVM_TARGETS[*]} )
215 + wasm? ( llvm_targets_WebAssembly )
216 + x86? ( cpu_flags_x86_sse2 )
217 +"
218 +
219 +# we don't use cmake.eclass, but can get a warning
220 +CMAKE_WARN_UNUSED_CLI=no
221 +
222 +QA_FLAGS_IGNORED="
223 + usr/lib/${PN}/${PV}/bin/.*
224 + usr/lib/${PN}/${PV}/libexec/.*
225 + usr/lib/${PN}/${PV}/lib/lib.*.so
226 + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
227 + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
228 +"
229 +
230 +QA_SONAME="
231 + usr/lib/${PN}/${PV}/lib/lib.*.so.*
232 + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
233 +"
234 +
235 +QA_PRESTRIPPED="
236 + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
237 +"
238 +
239 +# An rmeta file is custom binary format that contains the metadata for the crate.
240 +# rmeta files do not support linking, since they do not contain compiled object files.
241 +# so we can safely silence the warning for this QA check.
242 +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
243 +
244 +# causes double bootstrap
245 +RESTRICT="test"
246 +
247 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
248 +
249 +PATCHES=(
250 + "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
251 + "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
252 + "${FILESDIR}"/1.62.0-libressl.patch
253 +)
254 +
255 +S="${WORKDIR}/${MY_P}-src"
256 +
257 +toml_usex() {
258 + usex "${1}" true false
259 +}
260 +
261 +bootstrap_rust_version_check() {
262 + # never call from pkg_pretend. eselect-rust may be not installed yet.
263 + [[ ${MERGE_TYPE} == binary ]] && return
264 + local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
265 + local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
266 + local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
267 + rustc_version=${rustc_version[0]#rust-bin-}
268 + rustc_version=${rustc_version#rust-}
269 +
270 + [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
271 +
272 + if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
273 + eerror "Rust >=${rustc_wanted} is required"
274 + eerror "please run 'eselect rust' and set correct rust version"
275 + die "selected rust version is too old"
276 + elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
277 + eerror "Rust <${rustc_toonew} is required"
278 + eerror "please run 'eselect rust' and set correct rust version"
279 + die "selected rust version is too new"
280 + else
281 + einfo "Using rust ${rustc_version} to build"
282 + fi
283 +}
284 +
285 +pre_build_checks() {
286 + local M=8192
287 + # multiply requirements by 1.3 if we are doing x86-multilib
288 + if use amd64; then
289 + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
290 + fi
291 + M=$(( $(usex clippy 128 0) + ${M} ))
292 + M=$(( $(usex miri 128 0) + ${M} ))
293 + M=$(( $(usex rls 512 0) + ${M} ))
294 + M=$(( $(usex rustfmt 256 0) + ${M} ))
295 + # add 2G if we compile llvm and 256M per llvm_target
296 + if ! use system-llvm; then
297 + M=$(( 2048 + ${M} ))
298 + local ltarget
299 + for ltarget in ${ALL_LLVM_TARGETS[@]}; do
300 + M=$(( $(usex ${ltarget} 256 0) + ${M} ))
301 + done
302 + fi
303 + M=$(( $(usex wasm 256 0) + ${M} ))
304 + M=$(( $(usex debug 2 1) * ${M} ))
305 + eshopts_push -s extglob
306 + if is-flagq '-g?(gdb)?([1-9])'; then
307 + M=$(( 15 * ${M} / 10 ))
308 + fi
309 + eshopts_pop
310 + M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
311 + M=$(( $(usex doc 256 0) + ${M} ))
312 + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
313 +}
314 +
315 +llvm_check_deps() {
316 + has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
317 +}
318 +
319 +pkg_pretend() {
320 + pre_build_checks
321 +}
322 +
323 +pkg_setup() {
324 + pre_build_checks
325 + python-any-r1_pkg_setup
326 +
327 + export LIBGIT2_NO_PKG_CONFIG=1 #749381
328 +
329 + use system-bootstrap && bootstrap_rust_version_check
330 +
331 + if use system-llvm; then
332 + llvm_pkg_setup
333 +
334 + local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
335 + export LLVM_LINK_SHARED=1
336 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
337 + fi
338 +}
339 +
340 +esetup_unwind_hack() {
341 + # https://bugs.gentoo.org/870280
342 + # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
343 + # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
344 + # the whole idea is for stage0 to bootstrap with fake libgcc_s.
345 + # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
346 + local fakelib="${T}/fakelib"
347 + mkdir -p "${fakelib}" || die
348 + # we need both symlinks, one for cargo runtime, other for linker.
349 + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
350 + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
351 + export LD_LIBRARY_PATH="${fakelib}"
352 + export RUSTFLAGS+=" -L${fakelib}"
353 + # this is a literally magic variable that gets through cargo cache, without it some
354 + # crates ignore RUSTFLAGS.
355 + # this variable can not contain leading space.
356 + export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
357 +}
358 +
359 +src_prepare() {
360 + if ! use system-bootstrap; then
361 + has_version sys-devel/gcc || esetup_unwind_hack
362 + local rust_stage0_root="${WORKDIR}"/rust-stage0
363 + local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
364 +
365 + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
366 + --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
367 + fi
368 +
369 + default
370 +}
371 +
372 +src_configure() {
373 + use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
374 +
375 + local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
376 + local chost_target="$(get_abi_CHOST ${v##*.})"
377 +
378 + # Collect rust target names to compile standard libs for all ABIs.
379 + for v in $(multilib_get_enabled_abi_pairs); do
380 + rust_targets+=",\"$(rust_abi ${chost_target})\""
381 + done
382 + if use wasm; then
383 + rust_targets+=",\"wasm32-unknown-unknown\""
384 + if use system-llvm; then
385 + # un-hardcode rust-lld linker for this target
386 + # https://bugs.gentoo.org/715348
387 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
388 + fi
389 + fi
390 + rust_targets="${rust_targets#,}"
391 +
392 + local tools='"cargo"'
393 + use clippy && tools+=',"clippy"'
394 + use miri && tools+=',"miri"'
395 + use profiler && tools+=',"rust-demangler"'
396 + use rls && tools+=',"rls","analysis"'
397 + use rustfmt && tools+=',"rustfmt"'
398 + use rust-analyzer && tools+=',"rust-analyzer"'
399 + use rust-src && tools+=',"src"'
400 +
401 + local rust_stage0_root
402 + if use system-bootstrap; then
403 + local printsysroot
404 + printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
405 + rust_stage0_root="${printsysroot}"
406 + else
407 + rust_stage0_root="${WORKDIR}"/rust-stage0
408 + fi
409 + # in case of prefix it will be already prefixed, as --print sysroot returns full path
410 + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
411 +
412 + rust_target="$(rust_abi)"
413 +
414 + # https://bugs.gentoo.org/732632
415 + if tc-is-clang; then
416 + local clang_slot="$(clang-major-version)"
417 + if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
418 + use_libcxx="true"
419 + fi
420 + fi
421 +
422 + local cm_btype="$(usex debug DEBUG RELEASE)"
423 + cat <<- _EOF_ > "${S}"/config.toml
424 + changelog-seen = 2
425 + [llvm]
426 + download-ci-llvm = false
427 + optimize = $(toml_usex !debug)
428 + release-debuginfo = $(toml_usex debug)
429 + assertions = $(toml_usex debug)
430 + ninja = true
431 + targets = "${LLVM_TARGETS// /;}"
432 + experimental-targets = ""
433 + link-shared = $(toml_usex system-llvm)
434 + $(if [[ ${use_libcxx} == true ]]; then
435 + echo "use-libcxx = true"
436 + echo "static-libstdcpp = false"
437 + fi)
438 + $(case "${rust_target}" in
439 + i586-*-linux-*)
440 + # https://github.com/rust-lang/rust/issues/93059
441 + echo 'cflags = "-fcf-protection=none"'
442 + echo 'cxxflags = "-fcf-protection=none"'
443 + echo 'ldflags = "-fcf-protection=none"'
444 + ;;
445 + *)
446 + ;;
447 + esac)
448 + [llvm.build-config]
449 + CMAKE_VERBOSE_MAKEFILE = "ON"
450 + CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
451 + CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
452 + CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
453 + CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
454 + CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
455 + CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
456 + [build]
457 + build-stage = 2
458 + test-stage = 2
459 + doc-stage = 2
460 + build = "${rust_target}"
461 + host = ["${rust_target}"]
462 + target = [${rust_targets}]
463 + cargo = "${rust_stage0_root}/bin/cargo"
464 + rustc = "${rust_stage0_root}/bin/rustc"
465 + rustfmt = "${rust_stage0_root}/bin/rustfmt"
466 + docs = $(toml_usex doc)
467 + compiler-docs = false
468 + submodules = false
469 + python = "${EPYTHON}"
470 + locked-deps = true
471 + vendor = true
472 + extended = true
473 + tools = [${tools}]
474 + verbose = 2
475 + sanitizers = false
476 + profiler = $(toml_usex profiler)
477 + cargo-native-static = false
478 + [install]
479 + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
480 + sysconfdir = "etc"
481 + docdir = "share/doc/rust"
482 + bindir = "bin"
483 + libdir = "lib"
484 + mandir = "share/man"
485 + [rust]
486 + # https://github.com/rust-lang/rust/issues/54872
487 + codegen-units-std = 1
488 + optimize = true
489 + debug = $(toml_usex debug)
490 + debug-assertions = $(toml_usex debug)
491 + debug-assertions-std = $(toml_usex debug)
492 + debuginfo-level = $(usex debug 2 0)
493 + debuginfo-level-rustc = $(usex debug 2 0)
494 + debuginfo-level-std = $(usex debug 2 0)
495 + debuginfo-level-tools = $(usex debug 2 0)
496 + debuginfo-level-tests = 0
497 + backtrace = true
498 + incremental = false
499 + default-linker = "$(tc-getCC)"
500 + parallel-compiler = $(toml_usex parallel-compiler)
501 + channel = "$(usex nightly nightly stable)"
502 + description = "gentoo"
503 + rpath = false
504 + verbose-tests = true
505 + optimize-tests = $(toml_usex !debug)
506 + codegen-tests = true
507 + dist-src = false
508 + remap-debuginfo = true
509 + lld = $(usex system-llvm false $(toml_usex wasm))
510 + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
511 + # https://github.com/rust-lang/rust/issues/74976
512 + # https://github.com/rust-lang/rust/issues/76526
513 + deny-warnings = $(usex wasm $(usex doc false true) true)
514 + backtrace-on-ice = true
515 + jemalloc = false
516 + [dist]
517 + src-tarball = false
518 + compression-formats = ["xz"]
519 + _EOF_
520 +
521 + for v in $(multilib_get_enabled_abi_pairs); do
522 + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
523 + arch_cflags="$(get_abi_CFLAGS ${v##*.})"
524 +
525 + export CFLAGS_${rust_target//-/_}="${arch_cflags}"
526 +
527 + cat <<- _EOF_ >> "${S}"/config.toml
528 + [target.${rust_target}]
529 + ar = "$(tc-getAR)"
530 + cc = "$(tc-getCC)"
531 + cxx = "$(tc-getCXX)"
532 + linker = "$(tc-getCC)"
533 + ranlib = "$(tc-getRANLIB)"
534 + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
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 + # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
542 + # but we patch it and set to false here as well
543 + if use elibc_musl; then
544 + cat <<- _EOF_ >> "${S}"/config.toml
545 + crt-static = false
546 + _EOF_
547 + fi
548 + done
549 + if use wasm; then
550 + cat <<- _EOF_ >> "${S}"/config.toml
551 + [target.wasm32-unknown-unknown]
552 + linker = "$(usex system-llvm lld rust-lld)"
553 + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
554 + profiler = false
555 + _EOF_
556 + fi
557 +
558 + if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
559 + # experimental cross support
560 + # discussion: https://bugs.gentoo.org/679878
561 + # TODO: c*flags, clang, system-llvm, cargo.eclass target support
562 + # it would be much better if we could split out stdlib
563 + # complilation to separate ebuild and abuse CATEGORY to
564 + # just install to /usr/lib/rustlib/<target>
565 +
566 + # extra targets defined as a bash array
567 + # spec format: <LLVM target>:<rust-target>:<CTARGET>
568 + # best place would be /etc/portage/env/dev-lang/rust
569 + # Example:
570 + # RUST_CROSS_TARGETS=(
571 + # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
572 + # )
573 + # no extra hand holding is done, no target transformations, all
574 + # values are passed as-is with just basic checks, so it's up to user to supply correct values
575 + # valid rust targets can be obtained with
576 + # rustc --print target-list
577 + # matching cross toolchain has to be installed
578 + # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
579 + # only gcc toolchains installed with crossdev are checked for now.
580 +
581 + # BUG: we can't pass host flags to cross compiler, so just filter for now
582 + # BUG: this should be more fine-grained.
583 + filter-flags '-mcpu=*' '-march=*' '-mtune=*'
584 +
585 + local cross_target_spec
586 + for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
587 + # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
588 + local cross_llvm_target="${cross_target_spec%%:*}"
589 + # extracts toolchain triples, <rust-target>:<CTARGET>
590 + local cross_triples="${cross_target_spec#*:}"
591 + # extracts first element after before : separator
592 + local cross_rust_target="${cross_triples%%:*}"
593 + # extracts last element after : separator
594 + local cross_toolchain="${cross_triples##*:}"
595 + use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
596 + command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
597 +
598 + cat <<- _EOF_ >> "${S}"/config.toml
599 + [target.${cross_rust_target}]
600 + ar = "${cross_toolchain}-ar"
601 + cc = "${cross_toolchain}-gcc"
602 + cxx = "${cross_toolchain}-g++"
603 + linker = "${cross_toolchain}-gcc"
604 + ranlib = "${cross_toolchain}-ranlib"
605 + _EOF_
606 + if use system-llvm; then
607 + cat <<- _EOF_ >> "${S}"/config.toml
608 + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
609 + _EOF_
610 + fi
611 + if [[ "${cross_toolchain}" == *-musl* ]]; then
612 + cat <<- _EOF_ >> "${S}"/config.toml
613 + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
614 + _EOF_
615 + fi
616 +
617 + # append cross target to "normal" target list
618 + # example 'target = ["powerpc64le-unknown-linux-gnu"]'
619 + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
620 +
621 + rust_targets="${rust_targets},\"${cross_rust_target}\""
622 + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
623 +
624 + ewarn
625 + ewarn "Enabled ${cross_rust_target} rust target"
626 + ewarn "Using ${cross_toolchain} cross toolchain"
627 + ewarn
628 + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
629 + ewarn "'sys-devel/binutils[multitarget]' is not installed"
630 + ewarn "'strip' will be unable to strip cross libraries"
631 + ewarn "cross targets will be installed with full debug information"
632 + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
633 + ewarn
634 + ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
635 + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
636 + ewarn
637 + fi
638 + done
639 + fi # I_KNOW_WHAT_I_AM_DOING_CROSS
640 +
641 + einfo "Rust configured with the following flags:"
642 + echo
643 + echo RUSTFLAGS="\"${RUSTFLAGS}\""
644 + echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
645 + echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
646 + echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
647 + env | grep "CARGO_TARGET_.*_RUSTFLAGS="
648 + env | grep "CFLAGS_.*"
649 + echo
650 + einfo "config.toml contents:"
651 + cat "${S}"/config.toml || die
652 + echo
653 +}
654 +
655 +src_compile() {
656 + RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
657 +}
658 +
659 +src_test() {
660 + # https://rustc-dev-guide.rust-lang.org/tests/intro.html
661 +
662 + # those are basic and codegen tests.
663 + local tests=(
664 + codegen
665 + codegen-units
666 + compile-fail
667 + incremental
668 + mir-opt
669 + pretty
670 + run-make
671 + )
672 +
673 + # fails if llvm is not built with ALL targets.
674 + # and known to fail with system llvm sometimes.
675 + use system-llvm || tests+=( assembly )
676 +
677 + # fragile/expensive/less important tests
678 + # or tests that require extra builds
679 + # TODO: instead of skipping, just make some nonfatal.
680 + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
681 + tests+=(
682 + rustdoc
683 + rustdoc-js
684 + rustdoc-js-std
685 + rustdoc-ui
686 + run-make-fulldeps
687 + ui
688 + ui-fulldeps
689 + )
690 + fi
691 +
692 + local i failed=()
693 + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
694 + for i in "${tests[@]}"; do
695 + local t="src/test/${i}"
696 + einfo "rust_src_test: running ${t}"
697 + if ! (
698 + IFS=$'\n'
699 + env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
700 + "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
701 + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
702 + )
703 + then
704 + failed+=( "${t}" )
705 + eerror "rust_src_test: ${t} failed"
706 + fi
707 + done
708 +
709 + if [[ ${#failed[@]} -ne 0 ]]; then
710 + eerror "rust_src_test: failure summary: ${failed[@]}"
711 + die "aborting due to test failures"
712 + fi
713 +}
714 +
715 +src_install() {
716 + (
717 + IFS=$'\n'
718 + env $(cat "${S}"/config.env) DESTDIR="${D}" \
719 + "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
720 + )
721 +
722 + # bug #689562, #689160
723 + rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
724 + rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
725 + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
726 +
727 + local symlinks=(
728 + cargo
729 + rustc
730 + rustdoc
731 + rust-gdb
732 + rust-gdbgui
733 + rust-lldb
734 + )
735 +
736 + use clippy && symlinks+=( clippy-driver cargo-clippy )
737 + use miri && symlinks+=( miri cargo-miri )
738 + use profiler && symlinks+=( rust-demangler )
739 + use rls && symlinks+=( rls )
740 + use rustfmt && symlinks+=( rustfmt cargo-fmt )
741 + use rust-analyzer && symlinks+=( rust-analyzer )
742 +
743 + einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
744 + local i
745 + for i in "${symlinks[@]}"; do
746 + # we need realpath on /usr/bin/* symlink return version-appended binary path.
747 + # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
748 + # need to fix eselect-rust to remove this hack.
749 + local ver_i="${i}-${PV}"
750 + if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
751 + einfo "Installing ${i} symlink"
752 + ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
753 + else
754 + ewarn "${i} symlink requested, but source file not found"
755 + ewarn "please report this"
756 + fi
757 + dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
758 + done
759 +
760 + # symlinks to switch components to active rust in eselect
761 + dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
762 + dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
763 + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
764 + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
765 + dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
766 +
767 + newenvd - "50${P}" <<-_EOF_
768 + LDPATH="${EPREFIX}/usr/lib/rust/lib"
769 + MANPATH="${EPREFIX}/usr/lib/rust/man"
770 + _EOF_
771 +
772 + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
773 + rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
774 +
775 + # note: eselect-rust adds EROOT to all paths below
776 + cat <<-_EOF_ > "${T}/provider-${P}"
777 + /usr/bin/cargo
778 + /usr/bin/rustdoc
779 + /usr/bin/rust-gdb
780 + /usr/bin/rust-gdbgui
781 + /usr/bin/rust-lldb
782 + /usr/lib/rustlib
783 + /usr/lib/rust/lib
784 + /usr/lib/rust/libexec
785 + /usr/lib/rust/man
786 + /usr/share/doc/rust
787 + _EOF_
788 +
789 + if use clippy; then
790 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
791 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
792 + fi
793 + if use miri; then
794 + echo /usr/bin/miri >> "${T}/provider-${P}"
795 + echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
796 + fi
797 + if use profiler; then
798 + echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
799 + fi
800 + if use rls; then
801 + echo /usr/bin/rls >> "${T}/provider-${P}"
802 + fi
803 + if use rustfmt; then
804 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
805 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
806 + fi
807 + if use rust-analyzer; then
808 + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
809 + fi
810 +
811 + insinto /etc/env.d/rust
812 + doins "${T}/provider-${P}"
813 +
814 + if use dist; then
815 + insinto "/usr/lib/${PN}/${PV}/dist"
816 + doins -r "${S}/build/dist/."
817 + fi
818 +}
819 +
820 +pkg_postinst() {
821 + eselect rust update
822 +
823 + if has_version sys-devel/gdb || has_version dev-util/lldb; then
824 + elog "Rust installs a helper script for calling GDB and LLDB,"
825 + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
826 + fi
827 +
828 + if has_version app-editors/emacs; then
829 + elog "install app-emacs/rust-mode to get emacs support for rust."
830 + fi
831 +
832 + if has_version app-editors/gvim || has_version app-editors/vim; then
833 + elog "install app-vim/rust-vim to get vim support for rust."
834 + fi
835 +}
836 +
837 +pkg_postrm() {
838 + eselect rust cleanup
839 +}