summaryrefslogtreecommitdiff
path: root/dev-lang/rust
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest35
-rw-r--r--dev-lang/rust/rust-1.54.0.ebuild678
2 files changed, 713 insertions, 0 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 2cefdd2c58bc..785b93d39278 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -67,10 +67,45 @@ DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz 143053436 BLAKE2B cdbbd529c5d82
DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ec204ee0968d4114023f40dfdd8654451149b5433dbb4eec192cc68135f45ed28ae7b06eabdab417401529162c11939ee101f7eddce304111fe93e9806347902 SHA512 4ae425def112d8c38e91ded53fdd73a6c7d2043eda22ce955aaa7303ff2cd6e7e8d0cfaa0d596b29195ba449811653f91b9b65c8c96b3cc8136d060609594828
DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz 239422556 BLAKE2B 8bef78b335b384e6bf7a5dd4a47511aa69ce0de6f9d1ab78146cd55f37e01b358a0cb82b95dcd27d25d4a114b707155b923415f9a91e6a75ab83bca9f5f7e0e3 SHA512 30a9f45f591c3beb34deee23611b5afe0f90b7a2a1b7b813498547b3264ecb98ef1d6bdfb77468bd5364f2942d927418037eb4ffe413db520c701fdf79c89bf2
DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2d69f81dd47ce7387311b576a7770f2b457beebba8cd1554e5eac501025b7b54e72078b69c7cf8a61bc295298d7f277f39a070ee8d83564942149a1b42089594 SHA512 688e3eaaf2a7e7995a9b36e6856b7922b4deada31fdab198df335b316672d20bc80e5e717cee4e2fc2f51ec8abaf97880dfa5424a7b122e46b02fb7f62836378
+DIST rust-1.53.0-aarch64-unknown-linux-gnu.tar.xz 216240932 BLAKE2B a63eacafe8c9194095cb3ee0856b22c66b210746c208ecbc6495800eca9b480d31d84ebde29ffbb7dc8464dcee164f4da96d7479f73facee6352a74488073c1a SHA512 aed515e60e5eb22478b864f7e9aa74b99b9843afe6d1fcc9d0ad78bfd48a39b0d9c8ee7b785f273c3bf5d3a173c169fd6dcd5c64fa67c49285803ff4598d9f59
+DIST rust-1.53.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 15822fc4762caa2086cb4b4300d1eff2c8401932fe5ca8d12926b7ccd8b950940d4aa43daf288765d55da8a19db781129e4e3f83ea5297fca28f814738826dab SHA512 49e4c27f498faf1e95c5061786771e5008043e4b030fb91b3c1cc406f424a541ddaac435c7065659e27ce379d46ca78cf4f10073c8dc2148be715b621b824981
+DIST rust-1.53.0-aarch64-unknown-linux-musl.tar.xz 213585000 BLAKE2B db26a6d09645b7feded883bdc81d233ff3319a10c42bcf1b4fbc82c499f0099ec83c2de8f175f141daf1d3ea15ac13b835c9e0bdd92edb25fc0e4d91642e96ab SHA512 fc72513ce66784b5f9aa5797bfd6ce35f50e9494d0515371599e94f72bd784fc40357a540d23ef29f08d1733be240ad1c11d68d21550d1ddd55642d2770b06ca
+DIST rust-1.53.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1468ff2faec1ea7e43371c5717d5db5eca6ab5376dbd3bd5a5785846ca473f14a90b2a7b978a56329a05111d509b860d834be3fe47263eac8de3ffdc57597a2f SHA512 dacce8e3f8b7c20accc2ae5073165ac86d4ab60cc3da772cf672afd080245dbb37ed4367379408cd359bad29d469eab138394ef87c32a39a075b0c0fb8a2e4ef
+DIST rust-1.53.0-arm-unknown-linux-gnueabi.tar.xz 195762312 BLAKE2B 44e8ab86b4970f7312b631d6733a3198756b28286d0e072294d75f59dcce15ebd470e92972d3133e901b6b14d35c6c3cd8afdb185435cc0c8e8c215676f3f8a4 SHA512 64976e51ca98bd57de4a9b17236ac815e5198ea57b018f8cf45a252abb9a681df4c1b11bd647145d5d9fe4570a36e01540cb7c145a11a414d4419611026f2227
+DIST rust-1.53.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B d01f42174bfd33e7c069c4aae68a71768ab33496f3764f3238e3a852e6ed11c02153f4dc40a5afc6f279d696c099093808d1887721c085a946dfab15caab6dc9 SHA512 73b86591c1790a98c59be4cce89472bd80171a0b80b509c0c345cc22de9faaa6d9e74fe50618bc1cf83d19ca8c7de9fdf35071a51ba6f4468001bbf6c72caf22
+DIST rust-1.53.0-arm-unknown-linux-gnueabihf.tar.xz 195620064 BLAKE2B 11e09a7cfecdac13911f47ac66eef6e4f419d83e1bf2cc7a01659219ca1255fb2987fbaee95e8dc5dca14616dcb59f69f4841f9f92250b22dd20be67ec9a2d0b SHA512 37749caf422fdc025101c938f39c0539ea33c4c8f17b76485c34a8ba9017e552bb64ab1d827c118e8047ecff4cc79da6a116df641ccc49d220079c0e6c5effd5
+DIST rust-1.53.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 2bdc454ee8bb482eedba513b86ed7a38d356761e0a8b48c18c3753668250db7bea9b32b7667dde46b7942282ed9ed3a911e478b0dd35ef22fc89e8625a009b6f SHA512 261831baa9a1d02c58677931c3db36b8ba0f9b1ecb533b993f8c62b5f5329ae7c9b366f346879f95c03b7b13e97b5bfad363815392ea0c55bb72b039c5f1e71b
+DIST rust-1.53.0-armv7-unknown-linux-gnueabihf.tar.xz 201618680 BLAKE2B eb2e7a7f2b32ed9667342df7881c9e411619fa31d0805e54d91a7a4cd9c2b7a4b603adb4f288f20b82e0d8257c3526b92d34586dd3c42e857f9f2c2c68608006 SHA512 a3c5f4f0d19a55e51b3a0fbc7dc9f168cc6eb0b9ccbca34e4e5a83f70e4e22149cfc4fa51bf878ec39e5b2988e198630fed32620bf151ad9359c70db2f9af28a
+DIST rust-1.53.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 91effad238727c142e4617f548101e6b50c49765203919908604e8ab8e4706a7a962561f34823ff3d04e59ba8345496d6c994270367e6c256f214e3e4f1e7879 SHA512 1cf21620aed1752d0e7bf83264b5afa799e5d86a1e1fa49944b956f8626b28afe8d465923ad6126ca4b5cb7e6cbc9e72469685f46001ded78113687001b120ac
+DIST rust-1.53.0-i686-unknown-linux-gnu.tar.xz 220103312 BLAKE2B 9678804edcc7bc5161d704bb28c385c9294496266f653ebc6bd3ed979969d843927593b5f05cfb87a4caf35601da42a7318be4aa9764a8024bc2576cafa8bffd SHA512 404969329b88ce3f3078837e7bd33de28babf0834e366f5663abab79bf810f2c0ddfeea304bb6289415862afc50289d897cb92fc3f0c0ee8a40bcfc8c23b567c
+DIST rust-1.53.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f03d9a9d3ec8e05be28f2d270ba94f7fe7572b3678d7c4ba28f03ea571dfb8a078866a5f3069b9c5086bd354fd870e8ebadaeb08e367d07d90a8fb0992700e0a SHA512 efc69883330307976582f65a2562ffc76e110af7a4eef10ff9234cdeaf50f8971154dccb36608d338259fc02e48825078e12d582d61609bb22026daa3a8d0f50
+DIST rust-1.53.0-mips-unknown-linux-gnu.tar.xz 157896460 BLAKE2B 8fe6a70ba1bb17cd92e58f2e8f6315eafb04870acf99b30cc4311387c5c3e021a7927ba1cd4a9081a833be9ca07032f4f6dc1f1464133b53c49a5719352a31dd SHA512 6b76a2f6a35366336410f8e293f9828ae3d9a23412c52abdf7bbb0055a50ba3a19c6becf7c8cd3a81b1d3c65dbe8c60b8bea6583013d207c49c89052111c373b
+DIST rust-1.53.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bcb1100430e98969def3de8cad66022c2c7442fbe8315c70dcc6a5f4d7990f11f127db51f5e60c86d0d45d36af2ad87f551146ecce50c81a56a46fa2b7a05823 SHA512 406c493fba40c706019c980777f43b9531112d5c99bd79f5726698d94308fd0121bc30272f2d12667179a32d7bdf9f23bbfe3f133fd99640bb378f0602361aaf
+DIST rust-1.53.0-mips64-unknown-linux-gnuabi64.tar.xz 165679184 BLAKE2B fe7f20759899a7dc3fd6db247fcf4a5360c64d7f03ee8a526b7a025e5dd5360a645da9cd0104e2156b1fbfbe1022d31f222fead7a4df65ff1d40e2dcbcdf32cd SHA512 f8c1fc4ca7a958ace63ca008f70d5b56d12862e1c3c00cc29d62a692c7a282de68c1969f996fb93cc7247c671f09e694dbade9b1f9464c95c809cfccca8fa6a2
+DIST rust-1.53.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 62f3809e249c8f8d47f1f5356d999b6e051f7c55b21b82bb6fc9403d55462648f348f7e4821d604fbf7d36761b876f2af673c0693134ff9ae2dd7fd574292a10 SHA512 ce00c5e7b8db9506c88edc1160a9c7a3114456873b3fd164f384cdf22b41dcf59c36095180a729d09760ae95e4a7cd7cd5926bd148f0acf03434fc914bb73bfd
+DIST rust-1.53.0-mipsel-unknown-linux-gnu.tar.xz 159577548 BLAKE2B 0742cdbecbe492186ed9ea15f3d8795354a6e63c131cf683f96b2a494c4cad11b2fefced9a7d8be2700677a8aa495bbae05c96fdc0fab0fe69a36e67d5440a94 SHA512 eda7b827b64baf325be7f42fd3fc5d4a487d243ba83d0573e7eb1861c8ed510e8c2fdbe499f6c46ee9aaaf3b0017e235d758222ae5d7f88f8abd76f5eed8bdaf
+DIST rust-1.53.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fa574a037814d6e15970a6588721d7626dd9fbd5da567770a62b31ff9fb7158cdf4b5bbce42c7be384a647138ce4d1bd8d08e148b429d58f284fb0e9a855aedd SHA512 5dc1097534ca36c9c8867f3c736b34f36006afa6add46a8c1a406414278abc2487f3778dcd162edd21534c0fee81b181caa3c633f3105b93ca759896c268f580
+DIST rust-1.53.0-powerpc-unknown-linux-gnu.tar.xz 173771788 BLAKE2B ac83aaab909151ab1cb3f8d9de696dc692356ad5696208b7879b3a8e2fd8a584b59c921c6259dc913f1faf06bcf073a2e27ee876e01e7d751cbfc39df26849dd SHA512 0fe291660b975f9051b2ef045033577785b0f1d513a351d94efb7f4406fa6a3c59b11c7c7208adc15e3840bca704c4c826c51a2f6f762eab2ee812767bdb4034
+DIST rust-1.53.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 097927a93b86187b8b5520c6d6f0de345956fd4b52ce823611bbbddb71608b032d4be593d42c433a6156296132f98fa23b4a32bbd0423a26806cfcc54f5b2799 SHA512 babd75f4f0850b8fa11171dfeca1185ace1f6ea5ed4a672b598771c28f2eb7568d9696824ae405ae468b58543262d22892c12eb8201b730d73a09ad68f702457
+DIST rust-1.53.0-powerpc64-unknown-linux-gnu.tar.xz 184849964 BLAKE2B ac498b1cdb7909c3812bce66359f4197cce3e7c4eee4c7702d251f896c09c1ff388f50fe16a0f6a671c04d9243eb8948e64dc84b1c96ab37dc7d67f9c3c63c16 SHA512 573815b4b93e2484108990814c8c63cc8c783b1909c24ff9c856b3920ec3553016aed66309e459bae5d16319ae925f470c6449aeae653791af4a90384ccb9be8
+DIST rust-1.53.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1f8cd752429865e448899ad6a7ed337f30a0fc52be0c2674c727b182bac25302f1ecf6e1db199c24ddfbbe62c05957a93999201753f1b8f6f9d54508e78f91c5 SHA512 5e41ce5e6be48b0148f57e686203520d1d7b70516d1a991035f0073a666f896bc964b26c710db7284d87de455a293b8c97d33bbfbca1a63077e8ed0dc197b4bb
+DIST rust-1.53.0-powerpc64le-unknown-linux-gnu.tar.xz 194345592 BLAKE2B e0758697ae3da0c00f60e93e5e665d8f0d6346c9b0e48d39eda4666d8bc01432263b39798f2e1b4f46267d572518289a6cf1313f7225ef25f38e9ecfbd39d813 SHA512 f418272864889635494553cd1f6216b0487c016c31603532920e45435da85154f6ec275bee6d2a32ef6755fb12f57151ce2d3c7c5d6d97c2eb3d81f7c2842c48
+DIST rust-1.53.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e577b834c6173bc90e671d28fac974eda672cb888c4ce6dcf012687edd3f21fa603e47c27c08c042079b239d1d63915f7db7e0e37dc97f171f4d9d141979c564 SHA512 df255926f1468658ada27e4f9d78af2d204142e205108724cb4ce740cdbb019a34e4b3f1a6c88c05c9b5c2da0b5fd92b46eee1f6fddf3ec3e80a2020a459e4bc
+DIST rust-1.53.0-riscv64gc-unknown-linux-gnu.tar.xz 181354760 BLAKE2B f99fcf4ae35163371e42e10cc61429c53874858311f55dfb480763bf818c64c05148a6487ec7cb5b150e902260f9afb48566ec2712d6fda058808ec1c2bfc517 SHA512 ef06941ff66f9d9a5723352ccb10c3958f4edfdc542f348145d65b4c5d123f750dd3c07b3146a359316c402a9ff032ddf7e48d28a75cbfb668df4d42d7c8aa6d
+DIST rust-1.53.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 03c3c367e79dd056e61cef642e373b62d4d66d54a70ff81e53f2d6c0819da1411563410b8ec0a28e6c310e291cea70edb1299038dd92691590046dc99ef52fe8 SHA512 bc337fca44914408f8a7c4c22b3f9d50887d44483c863560864d94614da235c8a53b272cfd297fd4643bfac5abebc0a84e3af3b81434eacddeca8aa920f2e727
+DIST rust-1.53.0-s390x-unknown-linux-gnu.tar.xz 193691664 BLAKE2B 627431518faafa7bc0ecd07ed1d315d9e73029c47773feaaa6e4f9c27c4e0c730fb51b8017d4f6966d8ccceda2af93592239dea99269a741b7f5ce54e93e29eb SHA512 ca142b436b1396ad978ba1d1a0993a4bba105d9e99bf89a9aea731b7406399a2132a531664fa6fec17af20f99ebd5c0a7ad329d2b143565fb878f4e7290aeb4c
+DIST rust-1.53.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c0e13c32eb4f8a4eb3dbae03853c38351a608ddee13a22475080d7afe7f1dfa12d894e6701786e3c9841e285266262b8143154ba4d130e6c3e5d7bdf5cd41075 SHA512 eca733edac17aa2d1de8f7f09835826ea31e1d1ec06d9c817370d6508f0bd444378ff530281dc5cab91df0db5ba53a45117baddb94d77a2c050c9f886860a040
+DIST rust-1.53.0-x86_64-unknown-linux-gnu.tar.xz 147158552 BLAKE2B 0e3037221da381ceee360ac005a98bf581dd143357835dcd5f5b39f7337e4de566666b21c62a794d1d20473b31004b8742cf84ca273cffc03b378853a4ebbb84 SHA512 3b1ee4a549917fc514de7dfb99392cfa058cb06fb93266e4864d4df3ff86372eeef9a9d2a459f93462eaab8f223d3eaff1e824d42be7b983c44d18ec1579c6fa
+DIST rust-1.53.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b40e46258e54771b814e07433318eb05e471c8bb65bfe016ad3830b94fe0be5234a1c9821c746cc452714719a78f24c5e0012f1d4c81569b36c6161c50ae034f SHA512 ecea8c4df0b72fa70d3a9a0c4b38812424006f21832c8805c9070ae4ee5255bfe6a7153eb44d453302162c7fc8a1a2dd6bb8574bedeb4e4f7a769d51de2cbde9
+DIST rust-1.53.0-x86_64-unknown-linux-musl.tar.xz 252250024 BLAKE2B e99c7a78d6d6a8b357ac17cdaa9540cc895d138480ddea25866d2f8235b48b6a1670ba7c9256355ddecfade28bed9eeec8b53e85f1c13af5c56c0ba7a12e2371 SHA512 33ee4d82cc1feeb4c478948a05eb44f7daa90f749191bd200a216dabe810420f47a3a258255c680302ddbc83020df4729d5b3ca9569003a89aa7768697e2fb64
+DIST rust-1.53.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 24283ac5457eb84de6a5588f69a22076a78c2ce9e5c3c245608bf963544a5c9f8fa8006e2ae216af65f5083cf5fe21f4d1c5286cf0b491ef4995be5ab8ac7c64 SHA512 fbd6b1477efbfc23da3f4f753c317f714a29495425a52d771d2527a42cfe7ad99b9973538da0978a6afa80f545823c9d0448d9cd29e6ef53559252e328d7deb8
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
DIST rustc-1.53.0-src.tar.xz.asc 801 BLAKE2B 75d3aa4122968f10a119f7a04df897f496588c7a1a2ddf1ea2222099c9efb0e320f5677a26c3271f86e7f500120664485f54c6025ae3c6df30d2b0fe758f5826 SHA512 e337579b9ab4febca4594c2c5d42c279b51cfc745c383be9a430204188311a25319c04c73fde34fdb2bb98a88bfd8daaddc67765834330e6c279a6e5a5648247
+DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4ddcace9f6bc8f242c890327ca4074626f129514f8bcae5c5556015745f718990cce490658076f5cd3526623439540416b SHA512 5162f85b43ca2c5af93fdbfb2597d75df8a838f7fcc025a5298499ce1043db50f1ea2fbba753e47ce5daad3d80d4b612acf6527ef902c34117763e687fdbbcfa
+DIST rustc-1.54.0-src.tar.xz.asc 801 BLAKE2B 5ee9166eaa00e4ffec10fb82b18946d403bc2030c6e04de6449311cbccc2ef1b017044f451a1c19be3a0a9640c4a9a9e4bd22d28e2115509f333ae38eb25e9d4 SHA512 5ad91f43515de14114964db0348cd28c08adc6dc935f110bf339053414b8eab8a40f1074ceffa44ed2df61254f8368d867479400618c44efaa0333642ab49d07
EBUILD rust-1.52.1.ebuild 20198 BLAKE2B ded64444104b75499de229c06c3d41b2651d3ee590f598f7b93965f9c70d22369a7b6f09d968a5618adb62ab8f8f423292f8766d33086be898d7b5960efa206d SHA512 9b54bcdae2b1584e73f005792d7382d264b057b70d3cdf3c8ac412ae66f8bc134ad0fa5e80d641fa101c8526bb3883a8043be64af611663ff1cb5e643f149373
EBUILD rust-1.53.0.ebuild 20481 BLAKE2B c3f1df43691caf6b23a6a4da6f6736952ffe6b8aee54c407356b77dec56b439f9c3d856a9d191f77134493f2c90635b9f199dca077218680669f3a1b9440a4ce SHA512 ddbc3e41c47aa4a9eb0f19802ab72d97da76e21271d1c558c2e8227c584e66ac14611e36f4d78fdd9fc302d96fe1457a696b163656fdf402f93112580073befe
+EBUILD rust-1.54.0.ebuild 20396 BLAKE2B fdf2ab084f27444681a3dc1e8a4004830f2bf4b4b71690bbf95d762b681cfeb9ff8fb20c021973d7a297b07785d00c877c8f7ce31dc84bb4726cb3067542094e SHA512 89e4001235a8e5b298ba9653ec81546c0b21d097de91bcec36bf58a812079edccd9a8c983ed9e2e865025a9fbcec3ef652d5cdb0671bd5fe624f4e6941464b3a
MISC metadata.xml 1083 BLAKE2B 7a7b093c22dcaef58bd67f9c2fd84a000696b234d2bc27315999bf6751cfd2a79441fd22efc284a542ecc84ce1a12ff9ca3495d249eaffa5bc1722b385c6109e SHA512 bfe8c140753e93db67244c92e9a7d193691ceb67de796c30a851966a1262bc5c897ead6e13d728775fa524215b6851609dcbee582022d9d75bb8d1e6fabc4ef4
diff --git a/dev-lang/rust/rust-1.54.0.ebuild b/dev-lang/rust/rust-1.54.0.ebuild
new file mode 100644
index 000000000000..8a51162e0f98
--- /dev/null
+++ b/dev-lang/rust/rust-1.54.0.ebuild
@@ -0,0 +1,678 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 12 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+ wasm? ( sys-devel/lld )
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( app-crypt/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warnings
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ doc-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["gz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="${RUSTFLAGS:-}"
+ echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
+ echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ cat "${S}"/config.env || die
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ )
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}