summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Barlow <randy@electronsweatshop.com>2024-03-21 13:27:40 -0400
committerSam James <sam@gentoo.org>2024-04-04 02:05:35 +0100
commitffd47bbdc2026b5743435aca2ba5171dcca0aa22 (patch)
treeb69b8169ca1059bf948cae38dd85f041192d6e62 /dev-lang/rust-bin
parentnet-analyzer/nagios-plugins-linux-madrisan: add 33 (diff)
downloadgentoo-ffd47bbdc2026b5743435aca2ba5171dcca0aa22.tar.gz
gentoo-ffd47bbdc2026b5743435aca2ba5171dcca0aa22.tar.bz2
gentoo-ffd47bbdc2026b5743435aca2ba5171dcca0aa22.zip
dev-lang/rust-bin: Add 1.77.1
Signed-off-by: Randy Barlow <randy@electronsweatshop.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/rust-bin')
-rw-r--r--dev-lang/rust-bin/Manifest29
-rw-r--r--dev-lang/rust-bin/rust-bin-1.77.1.ebuild245
2 files changed, 274 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 37ededf482b7..7a47626f99f7 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -187,9 +187,38 @@ DIST rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz 159385660 BLAKE2B 0846999358aba
DIST rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 88e6b124812b409372ee05e2872cb4dfacbc638f8e3b4fb0d5fa4ea63f4594333a9788732502f8bd41e34b5cbc404d7ac08e7690d095a6c37c80b0043dd2be88 SHA512 f7ddca81da468d5617f48240b6d3e8d7d09336ac58f515acd3a20f2d315468ba1d53508dd3264a088ffc0141cb3fbcd8d3c17379f9628270d39c7d44f7727291
DIST rust-1.76.0-x86_64-unknown-linux-musl.tar.xz 237333892 BLAKE2B e95b92c68e3c2df49fa0d5d84e35f6575fb80571db290b5969441cc09b6c07dee6b2b887f41a2b1ff1e3c099cda2ce2a4a8c05afbcf9f4dc8acbaed5245b69e4 SHA512 04bbbb9a6891c3bb7a20845010029e6ca979548ff70324c08d3162ebc1fa3a84e8c7e2d453495edd34aba19b7a685f048d5047993103bbf221c88ea36350370c
DIST rust-1.76.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B cd4334fecc17cf03b7333659393004fed4bb895f9b75f93520d1c3e3ee0ce4fcd17d75d748c4a35d31984215c7aec8904ebe3a4ad8bafcd625aef30688a473f7 SHA512 a458372b41c2833bdbd3d6678c35fc23397817b406c409d1ba5e19b4c6246072afff3f938f111382de56f7ff57e660c3eaf3fea0e54871d9af50b52a54f39e41
+DIST rust-1.77.1-aarch64-unknown-linux-gnu.tar.xz 214607592 BLAKE2B 6ebeef47a62eea181808cb2df8d4d01bf1804189bc67e95f1e2091b4c95a7a6d26c4f4c822c312c9e5686e9a15b425f74e345f26e962045b7844b90154a56f53 SHA512 8a3114dbe43744bfec68e24f0f302704e887587b4ff8d22bfc59067f5e952f7ff1984b8f4a663ed8f89001629b82d620fa6b79bc316a6778c968767a12dda592
+DIST rust-1.77.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0d0878a65ac1d2bf84cb614d56ad45e6d18a12ea6ec009839711074e64f9a42825163996ab370456d62005457441b6270c0cf995a0b7f7d32adf718442bff72e SHA512 70f2912c72af705a71d3402e755a8fd2fa8d3a21c2577b8e804a5f35ded57b93520a8c155542acf27022325e2cd7357c0dcf465627934fb23e731c961ca28123
+DIST rust-1.77.1-aarch64-unknown-linux-musl.tar.xz 195295732 BLAKE2B 9a1f0a9de62102dcfe17140cc181f960bfd80f4f84aa6b6f33fe7ec53db20f3819fe27381dbf2cd173db04111a6bee1c062edcfb186ecdddafe4692b5a3e5e63 SHA512 50ebc645127bc3503b97a74343f588bc70c8d24faa553390bd4849570be45dea7f113bbf28da70520bc33ef0be987d4390e6c5eb0955578530cda94c8334cb59
+DIST rust-1.77.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 6ad11b9ffbfef668fcc5a3e7536965412e89c1f3051a0410145838813380ebfb475d60d4079ff3acce497e497f4c923fe43d6814473833a6365778860f8318cc SHA512 9cd1617e9f416a70ede723d6809ad6a6afefda5f1cdebfcf62f80b4757c4fe0a90f1977828f707e7d77d0b581d7f170a304cd0a4fa062b5ca78e3a32da03c30c
+DIST rust-1.77.1-arm-unknown-linux-gnueabi.tar.xz 179516112 BLAKE2B b7bf27ee951924461e0d6f98a8d41a2e2ebcbbdfaec5f2c3dd096854c375d68a11eab3fdc1a23a5755138fced76d3d8e2ca53b97e376d93b780bf6e2f21743ac SHA512 5501efe3f2c6bbe5c5955b589244e3a3b12e9537290d8970abedd23336b7ec528e006a4c0951ca80eff83a2da5bdf4238138c72ff421e098a90fb9a473e379e8
+DIST rust-1.77.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B e039e3fe7562ef30e45c7402bc356c7a335db6c27f94acf5051ed56fa552edb0e44399988cad183670ba4a5e561a0c5e5fddc5856f0641ce9d685d441ea31958 SHA512 b1250d89e28c5c7abee8f35b733a760decd5e1de910f26d4147eb7472df6d870fe214536560bb58103403b014f3a9402a0095f23bd0529f2ef409bc6f711c8d2
+DIST rust-1.77.1-arm-unknown-linux-gnueabihf.tar.xz 179417532 BLAKE2B 8efd8342a96fb4a284cf65a6f834f7d03f15d4c3ff9fcb80bc12f510bf8a423b723a574086b2e6752aaaf15e15e256530cf560b4f9fd437b3d101b2cacb7c77e SHA512 8fc8703ec59aded64f3dc687686d94749133fb80a8a53b77ffa961826d86cc13e2d18ed34f61dd9f92b9027f8b52882f386e397b6f344ec1f0c3bbbaa01b2818
+DIST rust-1.77.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B b7beddcc42687bd1f39cc45c9737ae9403143fdad39d9b9a4cd3594842cdd435547607d24e3ea8f574595d8228974f75772d8d1fabffc22097d3fd1ea0b69bca SHA512 b367086c7a97d672d537e88e185e8af53f11888f674af04dc43eb71d77d482d97b2fe2dda006bc1ed073bfc58a5b8fee19e471b0239c0f41f683c46d6d675b15
+DIST rust-1.77.1-armv7-unknown-linux-gnueabihf.tar.xz 182039096 BLAKE2B cfd58b2abe077e74320742526331c4375aaaf631fd821a461fec9933a163eb8f51132bbbaa872b88efa3ca43355e4d439dcd643d01afb1e5dfa888f2cc6f80fe SHA512 6149118714f8cbd95c55f6e70a9112ec44e73bc51b9d5a0cd646abe04bdd005c901d7a0bd79a79ac2a03fafcd5cdf05fe5f32a297462a434cc33dd24995c2a66
+DIST rust-1.77.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e396676162b17b94a06bf8258662689979f202fefe9ae49d34c33fb58e7b64cfc8034489c05a242193f78c416dabbc134489696e283f75af3592445648b56de5 SHA512 e5570b86cc3c028354cfdda656286471df1b8df244d08549835880706c46b6703c61dafbc761a1e58580b72b215d6d0fde32fbe3c5d001aa5688a6394bf0466c
+DIST rust-1.77.1-i686-unknown-linux-gnu.tar.xz 209041164 BLAKE2B 43f3857319ca1aecee7630358966f8ec96c9806015639190813fe95083a9e49bca0ffea86ba55577b80a72a0e12fd5ddf654f62ed2a8daf7154f753d07d9355d SHA512 807520c014c1923198a2386f4b547cc7718f3b048132462b739c062a19bd7f4cf989bd6245de901fa15bcf71dd7fd0d82c9e25a8f27b244a6ec8cb20f92120d2
+DIST rust-1.77.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 42e9770b586134523f377283dc29289786b33b499232110e827f9f091f633f066bc68d3cd56468971766538a4a677b8f8b4c72b0d9e61526047d6d2b0a018a32 SHA512 c2062713dc0f6326d48bfc725aafa596eed7350f1d1ff6ef371394ed10f4e2fa8aae92a3ff3f8e1f3b93a5d36c9d4104c1af19d9923e09ddff74135625217837
+DIST rust-1.77.1-loongarch64-unknown-linux-gnu.tar.xz 161096296 BLAKE2B e7b6d7a4dd579754f0b894d52b579a2dcba9a50cc6107d24abff67c97fdd3b12125a6743f243009b1ce411a4cd8c51bcc68afebad3765e90343695fdd13146f1 SHA512 bbe1a250c475ea7a27ac28c3ba7b75890c1598cf4dc780d32f4363172d1547e3a1d9f8a32c3d0d480c8bd585b663b259a825ea9b9c83910f6889bda497ae4fa6
+DIST rust-1.77.1-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cc17b68e9361996d1ea57f090aad8e522faa1ce3037353957e46e8d96378c4b049e209928e4585355368e2396dd82923b3942ec719e616c33146f09a3bc27d87 SHA512 aafdce196d69feb10126edb145c45ee27e913ff289d4b72d78b007dac923bb187d3cc65cfe84025982fef438232677f8b7cf26137a00bae6b5accb7afedfc912
+DIST rust-1.77.1-powerpc-unknown-linux-gnu.tar.xz 176227252 BLAKE2B 98a7d31aae91114dea653181a708024a7d0ebd2f2baedffb7539d2415da2eeb745f777ae3fc2977d9416444a41b9b676dcb5fb6dfeed894dc512e37c42b612cd SHA512 a509b7ea39d760d5ab7ed5d7f73774e5df40a8d8dda169939c81573ec01ad9c03743e28064797cf2a730718d800d5189b4c9c3af1660794fd0dd48221b24ac5b
+DIST rust-1.77.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c1f2709f17791f5da597df027d5f4104624a002f196b544f1e0fa679e78a019342e74fb13a013439390d0e768a53dba9ce84cfc3753e42c9dddf8f9fe18a8006 SHA512 554080d462a9d414f6d469b861679280abd267217c8e2c08f1b8f774d88cb06129c5aa6308be0cedda0974dd2e5d1204c2285fb097e8a0e1231c2af420e4f6a8
+DIST rust-1.77.1-powerpc64-unknown-linux-gnu.tar.xz 176465264 BLAKE2B 351c7c27e442caef9d71ed2b05d128750ddc179eadb45cb647482215f1573c0903710e5f9930bd916134a9f499c907c087eb784c619f35b0fe2ffd7c8ca5524a SHA512 78370d4cf9a6990da9ac1482439c2b44b7e45704d739fd46bd3623524014fb734d2798bc5903a501dad0de1945f926099e22473db8823ca25d47dd6e7ef3b9be
+DIST rust-1.77.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B dd1a1de2274b1f17ff1758df380e26dfb3a8df1fde67a058bb738219e4f33894fde19878e9d230c041016f40a0f2d5d9fd0042dd02e95e7d05cd581b5083f31a SHA512 aaae0135f2a09e9065c27978f26b15f9506c6441fa76ccff50d75f55d5d40f06858f2f1bfb18c3a85fc8dd74659f66b65c60bd0aa23f1f572ca2448d747eec91
+DIST rust-1.77.1-powerpc64le-unknown-linux-gnu.tar.xz 186319612 BLAKE2B def73f2313e3e220b11de9c864512766b5d6cb30f7966307d7671f4ba871515bd6572dc86d8840a9071adae3a28b062ad23e7cff2cfd172800e4c126d9f49f5f SHA512 1b608054eba33ad1d2aad7b17899365b57781e50c7a5283786edad434fa2c36e41ed886cd6ef8926f53cd1b843391fc86d1400a75df924948ce0a8e62eaf8378
+DIST rust-1.77.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 092e491e900b0b06dbda931ebf34ceec088b89f9a4663c3d0f2c5d9838cd266deb7d714ca835785db0c2435e7a5572424495e2e9e165c67d83d9b3612924c3bd SHA512 5631fb073ab69bfd7576637417bf2d1cb316407d53dc58228cf1bcfe5111e5db83f6851c07c109aad0c408bc6b00579f6a8f1eb56304055b1faea7fb7b73acfc
+DIST rust-1.77.1-riscv64gc-unknown-linux-gnu.tar.xz 182255808 BLAKE2B 5d23ca6bdb745d991987145d123e206ed21695f3999f78a8bf1d41710a772ab4059ce280a10c275b9c3c6e01729befc2cc3ef977e1a55d1ca356d2c01e0ffd3e SHA512 cdaf9e9d23be2106fb5bc41ce5bf2ad224cb80a1a1377cd580147ffe39f8bd59699af5bbccdf3e4ba174458047f6c62b168c8d5d2375537cde8d02b1fc856920
+DIST rust-1.77.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5326f241da004b358001258ca8a791610fc30a149d053788ff2513a1e470a074b2cf65974391b3f5983ca1a13c08cb5ba3be18ff39c6607d4a71dfbf7d29b044 SHA512 7ba8c061b30d99b535f1e581aa25784ebc97c25491d3648546eb8557b2ad29193e9eb86ed2f0a36b032951b98d7d4a2c7cb39cbb086b28b84038c63bf48fbb3c
+DIST rust-1.77.1-s390x-unknown-linux-gnu.tar.xz 198879112 BLAKE2B 793aef5f0f9b9bda3f928e9eb333334b4e052cfdb1e63f8da31068d79ac7d2244732381198a737fb681dab9e4baa3f03287f7a8835fd069a188bebab68dab3d5 SHA512 20801402fcbad781e0e8adc7871bb21fbc9b2a8e6424616c8a12f70ddc1241b260a7f369fc52b8cb3bd2cda55c6394fd0fbfe5ef377e40e595da854bdeb5be41
+DIST rust-1.77.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 058d22ae20cfe466db1c0f684bd16059123d2a440c9c48fae88d2aef34a6996a8025d7a92b1af033f3503cf0de8fbfe20840f544118172117a4ad08bb31ec3e9 SHA512 c55dd529ab66181eecc50efe04a74337a90c50f2c6c27e62cff23d0b874d7cc02e92fa5399145e308e749733b91ebc1a938e576ff9e3d4827473def9b976e17c
+DIST rust-1.77.1-x86_64-unknown-linux-gnu.tar.xz 159040536 BLAKE2B ccfc6a96f1a40efc905d9f8ed59f2d5283be404d433e5242876c62102786c36988a5337b909f288f2289f89e2034643dc88f22f1d895107aceb3b32ef89c8b1d SHA512 60c941aa6f48404409deef014993ea42bc0c3ceb7636cbd84a390f6dbb31ae12c6766324ee3f96739f54b9677bc1e77c20da9d5adb87120236254d3b5898fbd0
+DIST rust-1.77.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1adeaa22c0a80e6b9132fe290272c7713fe03902649fd6a41ccf46fbaa4d6a986540defa7bf34b2b0456bd8eab28a088a30fa23abb82a2cf110d1338aa6a623c SHA512 1d4ad50a386c3f03214439bc8067f2a721c30b9d4aa47a4494f0db32e242293dbf19ae1c5388315eccf377cfa947b2b40084bcba48fbc55a55be673b74074d5d
+DIST rust-1.77.1-x86_64-unknown-linux-musl.tar.xz 234990960 BLAKE2B badccc8785af974d02b63998ff7b4f4b9235cb181cfa44ec35ad682a5c741d3621f4306ad874f11ac14301079558c162088da85414f335b67760f22475d67c2c SHA512 addb62f012787b391403bb25297c0b620c6beb431bd8ef3287a547ba7c31b4e3ccb29decddddf8a34ae849433f64334309b574dcd8743bf8da0efa38feda771f
+DIST rust-1.77.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B f1e69cba4d762b98e615b6ddee831193ee915b8a797c48395bff7af3abe13a791267f2fb3b1e1b7df06e6e89497606064dc2fa60ec417bcb67ccc4de7cf5900b SHA512 1aa346a14b8a357b7f747a56d2e718fc15ef3a5095ec6dcaf3381b2d57b170e8b0b604d885d54cd39fad4602928612ddb8754010b4e27060123c67a23def4bd3
DIST rust-src-1.71.0.tar.xz 2460128 BLAKE2B 3ab6c6cb76a7e18eb0ba085c45f8b1a8bba16e2569962c27187bb415c54d3c5c1032ce4552c52f93bd4ec2512634d8899fd35fbf1a035298a9b621b5af125971 SHA512 fd59a1ced7e950fa14fd7ec9c978043b99e678bda54338f60faaacced36110630385a2bb62af19670ef27db1144810ff60b03dde542273557473b9bb521bcf49
DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d
DIST rust-src-1.73.0.tar.xz 2512888 BLAKE2B 367b68ec0775f49844408d602164634a0bd526dfe1e469b1c8ba9ae5604cbbff2566eb770b7bfb81b2dae892ed1ae16b7441e438726198610ce181c98540955e SHA512 49f493ffd119a0b8b9f7b7f7e049543787eaf96d9beb272d46f2758a35fd648f6523c2edb28864a33fc66337aa07e80a6464ec806307da441a899be4f71bb554
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
DIST rust-src-1.76.0.tar.xz 2590884 BLAKE2B d1a6215dab34d7b10c3177d2b248f997d3a846388f3442567572880aa5c5bc51b56398f5d4dc32727cee7c9dbef494430d6534a76b66c4ae5ac4fed07266644d SHA512 39d2fe58fae8c8c5a6cb3fb1ef2a1c7548c018fef6ccea531659fdfecd68a4aa77125299d2cbe5b58e500337b4d074928318fa9ebce358af500d0ef27260e3ca
+DIST rust-src-1.77.1.tar.xz 2618128 BLAKE2B d36f74d3b826a071de8e8a92cfab65348bf1ed7f5fbcabf1994b5e2c99d1fd6d2a936e49aaabb59c44e664a4559cc3c062291cbb381462b9c516fa7ed9d6107d SHA512 a719435636a52b4436afd6dafad7b8112c94b097e2c632fde536155b9977bbffffa8fcb90c6c53675c4d793225917087e5637d36fe250c539e3d7463d90ce28a
diff --git a/dev-lang/rust-bin/rust-bin-1.77.1.ebuild b/dev-lang/rust-bin/rust-bin-1.77.1.ebuild
new file mode 100644
index 000000000000..c5288dc6f6e3
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.77.1.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal
+
+MY_P="rust-${PV}"
+# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src"
+MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2024-03-28/rust-src-${PV}.tar.xz"
+GENTOO_BIN_BASEURI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}" # omit leading slash
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="$(rust_all_arch_uris ${MY_P})
+ rust-src? ( ${MY_SRC_URI} )
+"
+# Keep this separate to allow easy commenting out if not yet built
+#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) "
+#SRC_URI+=" mips? (
+# abi_mips_o32? (
+# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz )
+# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz )
+# )
+# abi_mips_n64? (
+# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz )
+# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz )
+# )
+#)"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="stable"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86"
+IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix profiler rust-analyzer rust-src rustfmt"
+
+DEPEND=""
+
+RDEPEND="
+ >=app-eselect/eselect-rust-20190311
+ dev-libs/openssl
+ sys-apps/lsb-release
+ sys-devel/gcc:*
+"
+
+BDEPEND="
+ prefix? ( dev-util/patchelf )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+# stripping rust may break it (at least on x86_64)
+# https://github.com/rust-lang/rust/issues/112286
+RESTRICT="strip"
+
+QA_PREBUILT="
+ opt/${P}/bin/.*
+ opt/${P}/lib/.*.so
+ opt/${P}/libexec/.*
+ opt/${P}/lib/rustlib/.*/bin/.*
+ opt/${P}/lib/rustlib/.*/lib/.*
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+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() {
+ # sadly rust-src tarball does not have corresponding .asc file
+ # so do partial verification
+ if use verify-sig; then
+ for f in ${A}; do
+ if [[ -f ${DISTDIR}/${f}.asc ]]; then
+ verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
+ fi
+ done
+ fi
+
+ default_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 profiler && components="${components},rust-demangler-preview"
+ use rustfmt && components="${components},rustfmt-preview"
+ use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}"
+ # Rust component 'rust-src' is extracted from separate archive
+ if use rust-src; then
+ einfo "Combining rust and rust-src installers"
+ mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die
+ echo rust-src >> ./components || die
+ components="${components},rust-src"
+ fi
+ ./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 profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ 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-<ver>/bin/rustc-<ver>
+ local ver_i="${i}-bin-${PV}"
+ ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die
+ 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}"
+
+ # make all capital underscored variable
+ local CARGO_TRIPLET="$(rust_abi)"
+ CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
+ CARGO_TRIPLET="${CARGO_TRIPLET^^}"
+ cat <<-_EOF_ > "${T}/50${P}"
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_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 profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${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
+}