From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 93EC513835B for ; Mon, 10 May 2021 15:58:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CCA5E07AE; Mon, 10 May 2021 15:58:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52DBFE07AE for ; Mon, 10 May 2021 15:58:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CD12F340FE4 for ; Mon, 10 May 2021 15:58:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 09478750 for ; Mon, 10 May 2021 15:58:11 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1620662151.ee306895f030a746dfe039911476885ae4e56bb9.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust-bin/Manifest dev-lang/rust-bin/rust-bin-1.52.1.ebuild X-VCS-Directories: dev-lang/rust-bin/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: ee306895f030a746dfe039911476885ae4e56bb9 X-VCS-Branch: master Date: Mon, 10 May 2021 15:58:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fd350425-2a09-4fe1-b74b-1b87462189b8 X-Archives-Hash: 974dd3f1821e672133dbe75290fcc8e7 commit: ee306895f030a746dfe039911476885ae4e56bb9 Author: Georgy Yakovlev gentoo org> AuthorDate: Mon May 10 15:33:38 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Mon May 10 15:55:51 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee306895 dev-lang/rust-bin: bump to 1.52.1 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust-bin/Manifest | 30 +++++ dev-lang/rust-bin/rust-bin-1.52.1.ebuild | 187 +++++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 2c0af0ed1d8..f7f3f8939d8 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -58,3 +58,33 @@ 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.52.1-aarch64-unknown-linux-gnu.tar.xz 216242676 BLAKE2B b3cf721872b615a62b0f3bdcc71227d8c861993fac6b65ddf9743dac70fde1794a20722919b1ed4dcd423ffc09e7727afa69e2731a74058e062024d1c6c764b2 SHA512 8af898b98ceb211e75b0d55d6f7c0b99bff26878d4f252604f9417e3e2e73ba84cb94f6aad331bbb13731c852b30eb82e3864e474dad7a74112086987418dbfe +DIST rust-1.52.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 90fec815c774dfbbb5c83a7aad8359645e4b1b0b0ab26b58252986f17e6f97b82cb7523e8037bd69a82e0121cc4ab03454c822f56d073905341a4a8bdbf2bbb1 SHA512 139632e6d57310e8db71be37637ec61a69133da697a0513d5a82520a83dcb589d0c406d67ac7fc43e7a28311577750183089fcdce5d71eb5b320e6137fbfa570 +DIST rust-1.52.1-aarch64-unknown-linux-musl.tar.xz 212054292 BLAKE2B 3e4e52a6d5d81fb06c1f06928aad422d75a4510db6d391346a788193c84cd5ac1beac50dc97a0e8b4640fb68c074336b38af9e751541b38de64df2683e8b9515 SHA512 2ad652286e22c06a8befa86d7aad30369d1146b8e3dcc42fbae55103db12b6b4ac7f135ed237400a2a3841b17a58398d810abe36a412b891a3662371bd736d6e +DIST rust-1.52.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1d1a1ca2aab9966997d40309465c5e00814bb6ef3542d8454133464ff6b7381d70aab2028dc184bd80049ed9e51498189095157488a802c7e345f67d7aa7888b SHA512 6bc36f111ce80c39c5da50ae2edb4d9ddb4924c2079a1513a207bc7148e52cddf8d1c8f663ffc45dfae36a984f8c66e6da5a5787d5c6eb2a0eae47255847fe07 +DIST rust-1.52.1-arm-unknown-linux-gnueabi.tar.xz 194953624 BLAKE2B 99428362cd1c92335e285d12e66c68c834f0fd3edd6e7cfbd2c050e03cd9b6a25c793d3b42898c2332acbea6a9fd1b15d02f839430a7f9bf412bf0a55222f08d SHA512 5d878609b40b67df94b6cf3d748e7964f8e33b77ac46397bc1414fd49da013c7b67c2b6424cebc8006b0f478f3467256b41f75eb1eb978535e50ef153188f448 +DIST rust-1.52.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 89f60f2e73ebc48070a433eb136bfdb7cb6a9d2d2e6dcaf9b40418e38d5097f067afb382d9c07e31160924cdf7850fcae97a9b80a2f789eafc8b0cb130f91dc1 SHA512 cc365dbc08ac3263649209a94eb096ea3036784cf1c651da82face84ee893e653208818166fe1a52fb699484bfd613b7acf94a653e0de3fc4bb5a30623597848 +DIST rust-1.52.1-arm-unknown-linux-gnueabihf.tar.xz 198712624 BLAKE2B f02f3c38c66315870d7c77e5deb9c0fc96261dd3ac4e10e03cdf46c423372e0f0c9604d2fb450e237b8bdb4495407546cb9a7973c90bf11b44dba600cdafa63d SHA512 23d47c0df503e8a12bad2dffd7da80f8194f27d9f52fc52af996f75d97a8925f7f7f9e267f9c05a0e7f4538b83a446e206a35a943530c29f1c7917c471537026 +DIST rust-1.52.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 0cad42498556a1320b1698628f01efb7bec50df97e50e8028e570ad3b0db4af9796b240caaaad9ec7b8a8cb1e151b52023ba3c8987ffda837dd52ff6afe52e6a SHA512 ecbd3665dcd26b38249d5e4363962f96201ca8038bc3341d35f84f47f6e448f0637ee81ff03d1c5d3d1d576e031fb9c983f20fa4b58900dd12870f423353650b +DIST rust-1.52.1-armv7-unknown-linux-gnueabihf.tar.xz 199226972 BLAKE2B 02bd33e9d9dd5c4e2b63258505ccda5971d27d381fab18569c69df72a4d418090a35522cbcd51d74acdb106db56cbff846cd90e2d6c3e029e7aa43c17b4799f4 SHA512 a03653a09f23b00339d6bce0198a9e82174223598337c9319463f15fb000eb8d2cb5aa0b95d496da2e1f63a7898e38b2f4bddf56e0bd9abafc05ce1c17f25836 +DIST rust-1.52.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6fbdb413f47e4cf703af26b53e393c8d1ee93d695c61f074e6b09c622e7e51b52ff13eeac1b8b6c67972e8f3b9be355a2b25b6e89f5b5174946f89df87d6b6f4 SHA512 50bc989ee940c98c59751e67400c62c97a25b8a330b1007014eddca6c585df9aa47a13ec652c6da4b546f805612981e136aae6dc40e6404ae7943f007c8bf2d3 +DIST rust-1.52.1-i686-unknown-linux-gnu.tar.xz 217842204 BLAKE2B f18452249927168fc5097781936db5d62cda8d9ea83bf2f411c59e56bd7a178ffd4709d877ad87f80e7947048d9919a8cefb964bcdf7b78a22aee9703ec72d6c SHA512 4e5b75744290add5152a8f6edfea18552f3947bb7d7900e5dc222b7f54231bd2e72b5e20360de92e384eff05baaea1c883d8ff0686533b84c26c633ebad42705 +DIST rust-1.52.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5a58cf12f8ad6b82ea8eb54b55d3f37b0164a57bf184740c09093978f03045fe355ac9c7b7b194ec61bb41f4d8ab5312792cb859979506d076c57bb2ce21090b SHA512 854a111a62e28f7a4b6bca1beb6b708ce8f20de0ea920d7a1b1ccb26d6c5b394e21d178d585902ea25cb64a2ff492780a8cd25d3e738b5a65ffe2ac076c243a2 +DIST rust-1.52.1-mips-unknown-linux-gnu.tar.xz 157633640 BLAKE2B 7d62d79d6c3b374a53f5336652a035364bc807a50776d3b41aac52ec2c946fc149b713e19d1618c22ad4fd8ad6d6240014f1d7cb4521a702d191d6c49cc67104 SHA512 67ab50013640f857aabc9ca4a8ed714aa5c1c1063bc5d1e78fe15f7c00952c7acf651a95461fb3005c457d0e47118e569d257e9378de54835ef92e7a707b9cac +DIST rust-1.52.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ebf80e7afa84da6bf11fe00aff4b1830efb1f7a05f488fae742dad0449418218adc5c3d94325719faa369a4a039cb6c1562b7c2689e5deb2bbfd44a702093f50 SHA512 4c41299bae38ba7cb8f96c1fe582e9512ceecaa173f11172d4006564750a6104abf9ec2fddc0b863bdf462c864522c2965bc7215218420c368c866776d5a4afe +DIST rust-1.52.1-mips64-unknown-linux-gnuabi64.tar.xz 165017648 BLAKE2B b175623b20c6bed98bd4140735339fc678c879e191c7f8ff49038092344ba544ff628d0bf9fa02185a326a8754344cfa5cc6c75cda96d13805eb3c92dc2f0812 SHA512 97834c53a3dde19976244a0d9d8d356762a5a7e171f43c336bf3103fb3ad2048bbd687ae8fb15a85188962ad37deee0e04b115a71a86bfa3581b218907e5f859 +DIST rust-1.52.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 23bdfcdf4c9700c015417fc44286c059dae5dfe11b21f181f63613c15fec31c50de7f41806dceda85f084f573d97fb69bee9eddc29df312e120c3a7e2dbb1723 SHA512 cc2fbf18cd7b2b7bc35f0d4d68672a8dc61d54fd58c0b583697bd221e5470ff2d044a71c6d9117367a4e1993181df21ee6fea199175eac0dc354df2421afdb84 +DIST rust-1.52.1-mipsel-unknown-linux-gnu.tar.xz 158493160 BLAKE2B 07ad000debdde4eccce21d21cc55c10eba0dbfa880207a0da4d449a7a44d30e228e1d2d3217bd1dbf0639d7248dad71dfd7cc63db4c4da5285bd430fbcf42741 SHA512 1011cb0f9e46826ef4f13fce1e5304af94fd9ea442c9eb84db140a93920407e2b835aa2223181f10f777fc1a39a64a682dc3c8f9c6e2f1d0f782f6f316a29fff +DIST rust-1.52.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e0f00997d25fa6c92b8e41a78ccfb57d15d12dfc5188c8f2afdec2e713e02eb4eb7a0ef257296e795afca66ad94b75d93f1dcdfe0d3971d546078d64e1cc7be4 SHA512 1937f9250c0076797daf77931f837a3527486279f20643cac6573cf6fc4dace9518a6dac8305a909e160632142b732b02bfcb43592bb71a71f2068bfded270af +DIST rust-1.52.1-powerpc-unknown-linux-gnu.tar.xz 170807776 BLAKE2B fd06f6932146fe813e57ea30b898c98675def8323e59cf6d275ce95818977b7c5e4e86361a6a4718681974cf84c8983fad3cb71015b3f7971aabb6f00ff6dfbf SHA512 26343fed8c4f33bb68bbc40385945f3ae40a21d084d193e4fd3e7884bf68a342f4d9e0c76fcf4c664963f6055972f6b43c1838abbdbabb1b9c6ef592679d0afb +DIST rust-1.52.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 84b80b50e809f30409f14372449f9c67771f367a7098c259bd97761a5adf06d0a89119529b74340d224bb51c65fe12a353129a01ff19b3e2bb6f5db1637b23fa SHA512 ec6e49ae70476a89631cd721436e57af412e35e09f1eb45e0968f42ede7587b8923d72c90d8b8c0ba0438edfa9a8fa76eba60d13e17433c99ef1c894616ae9a5 +DIST rust-1.52.1-powerpc64-unknown-linux-gnu.tar.xz 185066924 BLAKE2B 990b9fb32b72c68c659ac767dfaec4a67c40f7cce3e100b04becb7817917f1e0fb36f7bfb06dc255022c7a94cd1e56fb6ca4712ed411ec0e1afcffa63f591306 SHA512 5da5d06b05e65d5ae12f378e225f880e723182fc8a58c490d17336be841bfd91759143a97f82cd743db1b9331f0bf7bc0234bde22689b6ff33024cf3dd63da26 +DIST rust-1.52.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9a051228baaaef85826d958944e597a9dd5750b4d418bbcedf86b4617036c2d90c27bb67e95cb388b8b80e2e74baf9c1fa98fee88fdc8a3b63810d556bb23b0 SHA512 9b9a1161a9c88d9b3c9035906f4be66a2fe6b2fa51f89cb740bcfca14e1956ce218435b9b99caa6cd65407db5cdb8eb9427ce1dcb485e6164c85d41fb1429b40 +DIST rust-1.52.1-powerpc64le-unknown-linux-gnu.tar.xz 194463736 BLAKE2B 509179480571e918c08048b5d54120f090458f4f5ef8e376589943c7c13f23b054381f2b85fc75dc8c068ead73b1d38aba14b5125156ea92d2c5cbec4a8a849d SHA512 04bb5310fd78bd1cdd40e778d5a590111f405d6508c41fbf7ebd23549b90eef69b52fb07d204879747f10c2a7a5a55b4bd8cf48bb82ef3624c5b880fd2b923eb +DIST rust-1.52.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 130f0731128afba6c0ac5b98251bc7d1f7378b667031d6cf8c2c92e48ff120f1f2a1d621bbe558adf65ec921c2309c4eb12b0fe239b3098005ca5f186606564c SHA512 a86c119e384a23d7319182c752cc85811dd12d292310a1d76e5d2e053293fa09d05810314f401113578d26ec8f4149ca3cdb1690cc72981892de6aafee99a3a6 +DIST rust-1.52.1-s390x-unknown-linux-gnu.tar.xz 194805300 BLAKE2B 64305850ed1f362ac8d80ff3bd1f084ac84f2b8788f89c0fb67ff5c4835ba630e6f760608b4867d501eb8fa1de8f11da3fc5b44dd17e80da755990dc53e074bc SHA512 13405aaf093f6b09cb964d8af241095f252323cb6fe9479243e75945483daac5e7a853c815fa6f4e2bd8f8819ee2a9eb8ba6f5245ada0515d3107d5a441c67fe +DIST rust-1.52.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e27a24d02d2d42d394a29177a99f8149d45075a537eeb3551fdcb811086ba97c0ec64e776549b0310587357be2e420715988261ae686832630f0496b224721f0 SHA512 1f31c0e0c74ff4010c529775f1c527b5ef14a4676eb67930939dc199e6d029d235af8931a06cdadd5a3fd266c302eb7645002d85cf634f76e439d8de66d746c6 +DIST rust-1.52.1-x86_64-unknown-linux-gnu.tar.xz 142761092 BLAKE2B 1edd915373f09d32cf32311650636c73e934257aeeaea806fe9a9084f4d954989db909ca2a85c4c19209b8667fb16681c476b53e45564ca3b6d5ac378d772e6f SHA512 9ba98a509bf8820f0900d31821ddab02f85eb1df927c171258b39140e846c195b4b23ac733f0a9738ef068d0c1c5832efa0f8915c9fae57a561711c0878aea0f +DIST rust-1.52.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e013c0fdfb4f9d90997763e9842dddfa4d707818a2a606893be9bcb199c54aba191e34a37decb7d15edaa1bfe14a228eb9ce8acc27f3d1f701676ec97a65ee33 SHA512 cc7956699f102de534ea69b3a620f2d937f1824424742722d5fad0e7f3009626edb95ed4036a8de44e41b429d584bed0f57baebde72970bd42e45e865194507a +DIST rust-1.52.1-x86_64-unknown-linux-musl.tar.xz 239386548 BLAKE2B 404e8afe160b8d3e03ab31d04439f1b19a106864882398d2a2fbe31287db7ef60869e5d91d80591e7eeaced24a5d04b552e0fee1ddce37c09fe8679945d83dfd SHA512 3bf62ff12da190b0025c4ddc906d1212bf82db6936d724f81d3f289b005126c83c365226a94928db2bc8e878e974b4ecdd0f173b1873f4a55ac4d5087407b141 +DIST rust-1.52.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B a9c7e7ae792f05a4078d97bb165d6a2a12c39386ac5ee5cbdd005eae8f6b7d9e7da3dd13d495f5370d86cfa917f090c7d426c7ac3ca479750665bf4f89322e04 SHA512 343727431af8ad88e961997bf15b31eac65b8235befdd0f841a1ce98b8dc89a70d517f4ef499a7b366630ea2374810635334694b51ca05da370456875d718191 diff --git a/dev-lang/rust-bin/rust-bin-1.52.1.ebuild b/dev-lang/rust-bin/rust-bin-1.52.1.ebuild new file mode 100644 index 00000000000..2b18190563a --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.52.1.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal + +MY_P="rust-${PV}" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" +SRC_URI="$(rust_all_arch_uris ${MY_P})" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" + +DEPEND="" +RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( app-crypt/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +QA_PREBUILT=" + opt/${P}/bin/.* + opt/${P}/lib/.*.so + opt/${P}/libexec/.* + opt/${P}/lib/rustlib/.*/bin/.* + opt/${P}/lib/rustlib/.*/lib/.* +" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then + die "${CHOST} is not supported by upstream Rust. You must use a hard float version." + fi +} + +src_unpack() { + verify-sig_src_unpack + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die +} + +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + + # start native abi install + pushd "${S}" >/dev/null || die + local analysis std + analysis="$(grep 'analysis' ./components)" + std="$(grep 'std' ./components)" + local components="rustc,cargo,${std}" + use doc && components="${components},rust-docs" + use clippy && components="${components},clippy-preview" + use rls && components="${components},rls-preview,${analysis}" + use rustfmt && components="${components},rustfmt-preview" + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${ED}/opt/${P}" \ + --mandir="${ED}/opt/${P}/man" \ + --disable-ldconfig \ + || die + + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rls && symlinks+=( rls ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + + einfo "installing eselect-rust symlinks and paths" + 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 /opt/rust-bin-/bin/rustc- + local ver_i="${i}-bin-${PV}" + ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" + dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" + dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" + dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" + dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" + + # musl logic can be improved a bit, but fine as is for now + cat <<-_EOF_ > "${T}/50${P}" + 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_ + doenvd "${T}/50${P}" + + # 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/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 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}" + popd >/dev/null || die + #end native abi install + + else + local rust_target + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + elog "Rust installs a helper script for calling GDB now," + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." + + 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 +}