diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2022-12-19 22:33:31 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2022-12-19 23:07:59 -0800 |
commit | 1800d92a326773710d625a6493a354de9baa4c06 (patch) | |
tree | 2011ce1289e01a01e52f9f8e72c79c11fd079f37 /dev-lang/rust-bin | |
parent | dev-games/godot: add 4.0_beta9 (diff) | |
download | gentoo-1800d92a326773710d625a6493a354de9baa4c06.tar.gz gentoo-1800d92a326773710d625a6493a354de9baa4c06.tar.bz2 gentoo-1800d92a326773710d625a6493a354de9baa4c06.zip |
dev-lang/rust-bin: add 1.66.0
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lang/rust-bin')
-rw-r--r-- | dev-lang/rust-bin/Manifest | 33 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.66.0.ebuild | 224 |
2 files changed, 257 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 57b797cbed52..482cb1a6ee41 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -64,5 +64,38 @@ DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz 162028064 BLAKE2B 8c572cc304c16 DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7a9287b6125eab2c14a026d6b4d8a3e980b9fedac0436b75b1bf314b093b5e39de0d70045e183a2e823d729d24f43f6251a2fc28b072e3caa1950fbbddf149e6 SHA512 16abed6d7a17b9e5f3e399865ed5fee01272c8e6696ea2e784a6fb149df16da2c4123572dfb56c3c44d407d388033e52b552cd164600629cf61b33c011e4e415 DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz 266683288 BLAKE2B 4312a53bca3e33f6633fd5eed1b17754813e54d688185ff4cca6c5d6b24713994fb5fc424113ab08c121319cc79da3d7d89518d18dbb1b491bc8ba2ec831c12e SHA512 6c7ddc98da3227b23dd681615bb8f8ea883f3bdd9547e35733cf6acaf2a625301c53449b1a3ddf88dad9a5c940f8324c3e1bb31d871092fc848b863256c85935 DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 054f1b773518a9640f3d9226510cb0b00a7f8dc4a9046c325b82d038a50c699a8bd84f71ed62790e9b96b4d65ad12ea631f6a8bc18b3bafd66db3d21137cd378 SHA512 39aa000c2a1359cfd7d2eda2b22a9b10c0fe4aa024862b7ea67bd488e06fdee6f5cc4e98db7486b84ce53f1c299bbd5391f63e25df0358184533a5fdced4ce61 +DIST rust-1.66.0-aarch64-unknown-linux-gnu.tar.xz 250306224 BLAKE2B 205998bfbddd3783253e83ee405017e48d8ca9910ed354682cecdb5f01db6a770b1ec74d1f205c9d44285c689ef7e7dcd659e76c07f636a48556672ee6369db1 SHA512 1457357d66cf6324ff40b83a5c3a5fa65ad4a09ee29865f8199b7b1048d54f6a5eea5dda22dff7a68327cd43cc79b23d7d37f18652fd5037cb98e7f6309a29f7 +DIST rust-1.66.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B eddada436122349cf3c2d95f722c4737d2ccd913f240552eb614b61f3d1d0c79112d8b02abf18a0669b556f244c7cf23d1ace142fea6a18fdfde8d00788e92d9 SHA512 0d6cc9c4d320b2b1237d4efeab44b47ed5a299040fc0ff872b1fae691117add5b5269fe36e964808644a4da3e43160e88c25f2d45ba28b793dc17873c4f7cf6b +DIST rust-1.66.0-aarch64-unknown-linux-musl.tar.xz 227790456 BLAKE2B 2fca4abf3d1d515d740b1903eae6eb5d5430c324f0764afeb599658767703ddba7260484bddf352b11624e2a42d47369ea57c3f94a1755e9b14511f837d2401a SHA512 357513686ce65b6f374b348b110e8bd390b854d7474227f9a0a7606915f7d72207e80a79eafc94e9f168e4f7641fdbbcc664968654c29f128ce5d0b9c9f8c0c8 +DIST rust-1.66.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5cc0d92045f3025eab53e6d9c07d25863edc7d1ad43417d7265a7bc61d3a9533ffdf8a93b2155deea8a5ed93389fdfe70fdc42b48df23b1000d8930778800226 SHA512 767de3ab4720a8213aa119fa58b8886552eafa1d44f533236a95069cc02b64a112859f0458560cec85ca67e5857dd43d605d1b097a947935e9ebf7d042e13414 +DIST rust-1.66.0-arm-unknown-linux-gnueabi.tar.xz 206684752 BLAKE2B 5366b741fb75127aa19b742847f46d3e289eb515958a0574840cef5407596da6ba6e480adabe392ef93dacde4a6b58e016849926403f559c6d70dc5c9e188864 SHA512 93e0d9014e84f52b995f5177d1ada0233b00309a5e32e11c8df2d90787051262911cd0a533809feb8b0b26f5fe6345334a11afc40d64cc62a9ccbbf62951a17e +DIST rust-1.66.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 2d73b120e8c923ff5132c1eda16d6cbcbbb1ceb6545ab1ce0f11ecdd382752e830115ddd8ff69a5d8d8d9cf6b4fdc3744556bf68ad9ca3c2e6af88985daeb52f SHA512 ec06451225c4a3eeadb250975c371c15b6d84a3ec03ff055932cfb8eb8340de63bde5ff82be895af469b9150b681d543dfd1ad69987cc8a2b21c88a2c880683f +DIST rust-1.66.0-arm-unknown-linux-gnueabihf.tar.xz 207933932 BLAKE2B effb357539d17ab41b6820f25897c3c0e402e196aca7d7f360952f98a8586b58de6726b94e3a678d4004bbd9781991dc120e5c976f9d829ae171a1d9ef39283b SHA512 e69837015254865aeb44fa2884d5df3b6022823780ebe67d25ff8691bd5ce4221c2b8c06f7dcc7c4151233f5cf69f36b7349c339dfd39621c753ec38f7ff47ee +DIST rust-1.66.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 96c61bf79503201d63906cdf7f30775cab4574f677a2edbcf29335318b67cddba5aa176febaaadf073938e93dbce402b1622fd82319cf571186d43387dad8f49 SHA512 97219548f6cd3144f89eb436c4c3d6b11ca921cce1837cfcfd7cf61389921eeedf18db6aceb63092ea8b70dae07c01b1e4a91c9c8cffac465607ea8bac950a65 +DIST rust-1.66.0-armv7-unknown-linux-gnueabihf.tar.xz 213498964 BLAKE2B 2d8f3eb28daf2acb2ebd9adffe793840606e02e47fd1771b5d5f09382fb99b16d30695ecde3be1ad0207c22e216a51d4d55a83759793950ecd40398b8877eef3 SHA512 d04ac6b8cec1122eab78a6041700c59b00b14a953d3c32752af3d5dfee41b8adc720b27d77d846ffc96191d1cb97aa783606017402e41a235c26507cc2f3f5ae +DIST rust-1.66.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 694ddd2d37d3317e31165804e11789d8311a6a0c7a5eea76d10597aa3909eb373aa1a2412f6e47d76fa947034aec5206c6cad1ec42b3149fdb961b1a0edbfc96 SHA512 c3974eee82b23c7aa12b7d4b4ffafea7346dd763d06488bc8d3ebb5434e1e5dcfcba8a7895b91bf9483f85e1c033a36c64930edacf875e961c2113685231232e +DIST rust-1.66.0-i686-unknown-linux-gnu.tar.xz 235321612 BLAKE2B 3b969184a6a2d50eefbee80418d27bc3066c36828e81aee4972f6b8a4fb1c15832d89595ee4e5e710bf929b1582e1be4ca8b042813f5ec18a855335d5a627648 SHA512 9b2dd00a0148fd21420a710b7385e47a5a005986960692a379db8d9d1ea6b362c32c5df784e800b4eb0d93470aad169f33525bb05fed14468e9f020b1df5372e +DIST rust-1.66.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5f4280de5b0fe9bf33009b014031aadcd3a440caef238c193e2ee1f97bbd9b4ee6fa81be9ed47ee6ea7b93c54904fea9c002beae4e48cc548acce81d1a14087a SHA512 de5c8b8b3e58dd0bf1e2650f0ad596a20688d1f1cfa91180d04d2c3d8bbecad03efe914ecb3acd1b052e3f4083e1340784b83b585fd32d599125be5bc076d561 +DIST rust-1.66.0-mips-unknown-linux-gnu.tar.xz 187239428 BLAKE2B f58a7fe638de637d98cd4bfd4404fed77196a63ab3dc566f1c4b7357a7055e913c19f31146b919274d63e4c057784e10bab7a77cc28b054862c23ca841ec6992 SHA512 1f886fb49cf539d3cd176462b1b61936f675a43794b94c93a7b0f044724b42539c2dc1affbafabbfea739e57a32bf7a212d4fc6a62aaac59f0bf9cfd33aae70a +DIST rust-1.66.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 82fe584254200b093ad6f857daabe7a17e77da0f2fd5e616107caa0020cd84a28bf95d8d74c28a9d40d9f072de9df129e3b504e691675c48a81c79f486e39544 SHA512 d414b87276e27fa577ddf4647b1a0c361fd98cd51ddd8ef5cda06e5935dfc7e0aaed21307a121a80fbc64fad8bb8e33a4161101bb7aba40516b607064315ba27 +DIST rust-1.66.0-mips64-unknown-linux-gnuabi64.tar.xz 185301272 BLAKE2B 578478e19b11719a433170e3c7784fbee16aac12fdc219bbcd9adffc89496d03e845037bff6b4ad39ab8d70b3a191cf83ca4ea8fe2962b9b6e16831b0d704932 SHA512 030ddaf736b60d0b7b0ac151531ed200a12614f794f50d5e392205364a1781f0f3026443c1e346e35d81437551c3ef913c12d76e3ce2fbb4718d157466d3ad3e +DIST rust-1.66.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B ecfcc2d792cf3d24689f3dd6916e6aefa2b2f366dba810587b632f1536d1c9304bf7faf483c64c389b3d37d14a2007bbfbb4e9fa54a2c1f5bdff3064fd128fe0 SHA512 dc6ba8509cbb74c93290a94da67a6057655bd6b879cd955e6decb5b30b20babedf66ce445ebdd486bdf6f1940fa19d0af435460b7e7ede4a98acaad150cadc85 +DIST rust-1.66.0-mipsel-unknown-linux-gnu.tar.xz 190443604 BLAKE2B 439e5b81dc7776b47113229d9f1c0049dfaaaac8d8db8e9d77f0329c20352d5a1284aba2e666a5fb5119629bbcadc4de3289c4942cb3594df6ee82b169717949 SHA512 1e921dafbd757116a19893070949edd42af81e2b164be97d4db2eb7f446ad63088b7f251392ab8a3dc827034d336c42325f4be1c8e56c6910372c526b031f926 +DIST rust-1.66.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B df2999713a1d39d4bd40d4c942f4a446f6089162cd32eeea533af6b32caee6d6d3b94ba6bc9334948819800304522edfaf7ffe06b2645ce2012524c103df5160 SHA512 a8eedbe60a02de62a43122355a93b63a63cf41027b7bec6b11a69d1f6f75eb18dca614b749bc1098a9a9e7102030834a926352c5015a95c16a1576b357c95d17 +DIST rust-1.66.0-powerpc-unknown-linux-gnu.tar.xz 209788340 BLAKE2B be962079fadf12c4a2125531c296bdc34ae5d84b7054331c6eb81881eae700929151837be537964e588def58ba0977ece65f93579414475de064664f0bf11048 SHA512 4842c0f8a83e29341fc5b18c8e3faa1085a37a2c18de6939c71b15763e3279941f0960a3143ed3b59f56bc8219433fcefa02e11d96fc003ce5d1f91c81536d48 +DIST rust-1.66.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4a3657202716613c40c793c2f59e0c38e29fd5dfedd33ac21a2406cd72e8b0df1231fd5ee064cde81065c07994ac0503df7dbf0cb22b27727c4866ae3977d436 SHA512 0436e22910abe2f8676ff4069672af64e2af9a0a274b811b23a0cb0623012e1b921c2a79618a6d89d704cbbd7e3d46c8637ad8cd35014187826908ffe37cd86e +DIST rust-1.66.0-powerpc64-unknown-linux-gnu.tar.xz 209992020 BLAKE2B ae25f7fa7096af8a8e7085f303902c7bd5a953fff334cb05fa87a2ff8d49abf5e06381629d8e5fe5093c97b6dd3d1273000605e29b3f683986211f68cf72bf9e SHA512 f43c3f85ff25a03245614305f7a7c86e2bfe63c6bbfb52198a4dfc75e8a1707864bc444a2d9fe2d4e22b566b48f2bdebe25a3bb7bef042d3c5715f9f4fb9204d +DIST rust-1.66.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a5a8636105f6520c2cc8b2fc900a6803c2e23cfd80c62876d7e089e1228c11671ff3794142e968a84acd1ec9e53128375b00c1b6d2dbbbf05fc5cea92c248823 SHA512 2a8c90b3fca12ba263bc0b5aa44a7a86b4be0c91b14fdb9f9fc09dabbf07ad4b02d47409a45d92a503d8fc25072dc4cfecd86c9dda2f5e6307d6d7beb109727a +DIST rust-1.66.0-powerpc64le-unknown-linux-gnu.tar.xz 222462340 BLAKE2B efa36b10ae76925fccca25974af6907a898a14a197c853f9b19c25ef1081ca3877d2bd176913c75d20825a15387f34d74b3eb142bbb738bfb257de961e9b1048 SHA512 9322adaeb4d3acc9c1f422d4171730bc43fbbe272ab982f849264b65f28656662dc622b01a0ee609a512417bebc184d79beef60ca8f755df79678dca511cb9fc +DIST rust-1.66.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d20cb20ac58a0107fe901088f36c95054523b0773d3fa61794b75c4116a5f7d72c277bfce4c39930fe7d51f148860911547b95f133f78b43d0bedfc55fdd2386 SHA512 8f52e04b83ebeaac0f4afcfe7e678d4fe938973c26833f091fbf6922536886bce1351afc9ee6f29f5be7e7587b2c25c4b25c00381603a25dfa6713fad2cfddfb +DIST rust-1.66.0-riscv64gc-unknown-linux-gnu.tar.xz 189347880 BLAKE2B fe0c10ad8e21712779b765c2d1c5346541ae75024e7afda830e9859b0c82c595de85403169b9a10b56b64f833ad53014a4c711c71c61a1cc6cdfc0428e8a3191 SHA512 64f4ca1720c4fa045920795b8643d1c6979a31362148d4586e50663697567cc6a80aceb1f7f432bee61ae48125e7630a2ccfdaed0d68af00820842cfedacfa4d +DIST rust-1.66.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0e0203f92aa9fd488df0301f0a53e64326ee5fb40caa36fcec438325f7eb09fe7667ebc646961a5066e7a9b2470aa126ab5c758e6cb630354e89883dd62e1a97 SHA512 12f6269648ee9cc2e58eff706e36dac5c22f77a23742e5f3b993b46832216d838dfa66dd0011c766be4a949f67edb0b8e3b8e5e383dd7539c2f81d2d645a4322 +DIST rust-1.66.0-s390x-unknown-linux-gnu.tar.xz 226686692 BLAKE2B e5f67e79bc2e2e8ad4c235d9fdabddb66fd184f78704d9cac4ec1b74164f70c6a4f8d39405ba5213cc785f2b899109371c94fad12c4f422c651fab902680ae27 SHA512 aeb5d80985eba6615e5c7ccd2e2645fee0090fc9f5811dc5fa8a17a6439f9f4e9e24595ff95367972f58d3c109e96becb819448bbb14412a55a40302a0290bdb +DIST rust-1.66.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c3e71e63d7c4621553f6281bf1d3116608bcc9e6b322f34d2e70d5cebb0be740d962b201755a1de87c3cec46faf8d3d9ca4ece0654c9726d2604b094097d0140 SHA512 10df7ee6235f21fc2013ce976ea089205854cd82c14d856e2097ee870f90aaaff26a06d978ac70a07e5381d59cfc84c5ce61e9039c5990a64e04b780d606b3ce +DIST rust-1.66.0-x86_64-unknown-linux-gnu.tar.xz 187045868 BLAKE2B 69044ba6dd1968fa72bbdef5d30c4d9e3fdc31784154f8f298dc5848d80c7c265ee794ac0b2e399583d89a3f92e3621216efa820dd6b13f3a3821e509bfb7152 SHA512 016ddbc4a96282ce24ce54c088fb0d0304d8b75530a98d05616cae4b7c3766d1795a5cfb03e323a9be2bd8c8cce82a437deae27e304fd066a4e02ae8b5a39a8e +DIST rust-1.66.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2c525f102b34cd041f9b77e66bd07e0a2f82e5802e55dbb396cd774a9f0c123e26b519ac94268102c0aee7e39914f168f102fc9f19b8d6f7191e5ec8df6ba4af SHA512 00248dc2fb19bb7c27c9ea365315e5edaa41a47f37adbac6bc2ff4a4f800f240dac225c2f46e792fb66493e06899ec0549510bb7eaa8410f9775b7d54e54dfb1 +DIST rust-1.66.0-x86_64-unknown-linux-musl.tar.xz 270575908 BLAKE2B e842a4ec715e274e787c7082105bc75e110c1d3c9d2142d9712f61cac3be1ac70fcde1107f71ef66d4f4ee3c7c8ad743ecf1d663f392631a1f30a85a66ea6017 SHA512 3fb4b75cdd449f02248147cc7ffba8c7b5d80fbcc5bcf101d6bb6816388cd26383abe7889f42f4e1dc38ef1f006f3fc7fc3f5d80060259863ad7b5a3628f7c90 +DIST rust-1.66.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b3ac84b16a7188d1842baf8a52f80404fd95d47e0e77d1014f2bd955458ad04c5c47804d6f6275c410f2887f87c2cf0323e428905847141795ffd51dfaa3692a SHA512 2e61d09ad53afdc1849f9bd88a8a506fdfaaa3c5b8322fc92d0acd8e78ec51e48e94d049d1f469105c95d986aeaf370cfaa023a788781a77f9d6417edf06224a DIST rust-src-1.64.0.tar.xz 2437612 BLAKE2B 9bd5cb64c4ac98ffe60f15bf62517f3ba214ec788d939a27135bca4b770a7a760299ffa43090846e9a83c734a6b2d97102e51f9760f655cb596bda91214012a0 SHA512 a1867ea7a36f669fcde149578dceb8bc7503435d9c740594cd6181e0ea0e4be9d3c8b79f755c0f457bdbc3200149cd94eba17922d00610c5ff6be5fe1f8bd862 DIST rust-src-1.65.0.tar.xz 2488012 BLAKE2B d48f5591e72e14084f2fb0d66c1365f1648060d514af23c0498e02adfd7223b1a79bd1f512859b058f9cabc4b88b9230d15960df7c30762a5263d1785b877a68 SHA512 247f822a9c2f16d1de29d1cf6fa7ff393b7c7fe01da66a7c0b4add6259d72403922b8b1bd1b511ed8a9cc0b2c12ff574945aa7fc76c731fba620b466bcdc2eac +DIST rust-src-1.66.0.tar.xz 2512544 BLAKE2B f5f116669083a941bfd8611e10dd6b3e010221567c2a6395634e3c1e327b46979d190a32b61be27db1c3ec5518e9b9aa028ba275a68170b4ed08971bb520bd59 SHA512 c635cf97ddc43eb98a54377f6336fdaf3765022a81422acd5c9c7b64d9def5dc1b44f5b7b645ffe875a926bae5f7832e26f8c50188418476a84378c206ea5488 diff --git a/dev-lang/rust-bin/rust-bin-1.66.0.ebuild b/dev-lang/rust-bin/rust-bin-1.66.0.ebuild new file mode 100644 index 000000000000..70c7cb0f2c4f --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.66.0.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2022 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%/}/2022-12-15/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 ) " + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +DEPEND="" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + sys-apps/lsb-release +" + +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/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/.* +" + +# 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="${BROOT}/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 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 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 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 +} |