From 9cd9b3788e41b28cb6194713166ec2f2ca1d7e73 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Fri, 27 Nov 2020 23:05:09 -0800 Subject: dev-lang/rust: drop 1.45.2 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev --- dev-lang/rust/Manifest | 15 -- dev-lang/rust/rust-1.45.2.ebuild | 551 --------------------------------------- 2 files changed, 566 deletions(-) delete mode 100644 dev-lang/rust/rust-1.45.2.ebuild (limited to 'dev-lang') diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 89bcd45b952e..baa93077e9d3 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -1,17 +1,3 @@ -DIST rust-1.44.1-aarch64-unknown-linux-gnu.tar.xz 101259004 BLAKE2B c00274660698c5e980a6fe28839f96783989bc5f102025a5e2b63466928f697afc3c70ff8efd00b525ea4b88823585e801690e6c05b246abf5600af80f911a07 SHA512 97a67addb5995f504d7326a500d1b40c52cc6e6e6f6e946adabcf825ce9b64272232a24bc30ce36e3ea63ccda4b980f3b7b61b0e88a8554f021b731ad79a35f1 -DIST rust-1.44.1-arm-unknown-linux-gnueabi.tar.xz 107474900 BLAKE2B 1b21f28b12507cba83ede592670b715365b1ca1fa311dc70108404bc7fa199914716cf7e5560a682ccf4f37bfaf91357f547456a032b4914e75543fdb7e8e84f SHA512 5bb406cc999317a15988b434c3de53d11e3823359fd3dd798de8195fc2e7e7b32830c7cceb1cb7089f47b333346c42fd4153ba1b441799d89fa27207383b7043 -DIST rust-1.44.1-arm-unknown-linux-gnueabihf.tar.xz 105267436 BLAKE2B 6e4c13028dc1751970b04b99db64be6e1ddbbc3b754318e3eabe03e7ae65031c4a5ed87582ec0ffa605a7ac69bee32c5fd48c6dcd84f298d73199a7f7d1c731f SHA512 fffadfc6d8317512ed50df97785a7d0094f59b9465ce5e762c45d6a3a484cdb3c04a72ac49c3d61abad898503378d841ed6abaa16a072aa6adc9069619e26a49 -DIST rust-1.44.1-armv7-unknown-linux-gnueabihf.tar.xz 109724880 BLAKE2B b53eb6441c18c98c12c6e181b499b7e482c9f4eb5e244f6a1fc694371800fe94ec15a9a60ee5e0695e488d3a9d925bc6ef946c23d084e01b43c2bc659874b713 SHA512 6a7bafba9c4d60bb13fac2a7683702352d3a04df24674f993952e9d872b9def47b5f8070925798343f5fd2f83775377ba2ddcf188b8500ec518fe44eb67483eb -DIST rust-1.44.1-i686-unknown-linux-gnu.tar.xz 124915068 BLAKE2B 5de966d60f8e58e435e29aa63b906e117e7d73897ccdcfa692d0e582cf096c200b8c4f9a6ba76397f6ad29cfafaa4841503cf22764ac9517860bf46172539605 SHA512 fc6259c7b55a1ee457e444885c9604d2bcbe937833bdca9bb70fbfb230032c1e497ea04aa5edd761eefe5b48d34928998c6935563e76c82eccb7a03b1d5aaa45 -DIST rust-1.44.1-mips-unknown-linux-gnu.tar.xz 94537064 BLAKE2B 39a829ad9cea0303599cf8de2654f5fc7291af0a41d03c72cc0f1472162347b7ebf4a2cb7b2ad6e64bbca3b7d39ac7d2843d16a9ad205b8b14be48139b84b34f SHA512 e2284a0cfe38b85e41e5c712ca89b2099617a8836695628c509075772d23314b234730bcbeae060c1fc664bf193286493dcd546f672a6053428304e099acd41d -DIST rust-1.44.1-mips64-unknown-linux-gnuabi64.tar.xz 102649752 BLAKE2B bc57e6a532c7806b6e302ab31f2dde7b88496bbadfec7185b8c389fa9cfd4a2baf18dccfe4c1b69d0914b7f481813dc4db72ad5944a9d67000493122228505bf SHA512 ef69913b8f448a41b3454bfda2e120ae58233349b215b9419e6f0bf6e41528521cd7904b02c97ed55fef029c7687d8cf9d3ce21fbd09ef771e961e24d3f2547f -DIST rust-1.44.1-mipsel-unknown-linux-gnu.tar.xz 100002200 BLAKE2B 5befcaab66a965dd9c2dcc5636050099a461270d70102a0a1c489c3a1b721c432d337dec514b685f2710ea4c9e4fe2b9250cd88c55034c82da9b970b8ebdedb6 SHA512 4fef660c68a265da12863b07bcaa1f0fc19d4e377e2404c504047ea1f407e9b47f29f8947f707cfb0fc75216fa44d123c86ed07e261db70d48017cf93b54dfdb -DIST rust-1.44.1-powerpc-unknown-linux-gnu.tar.xz 97722508 BLAKE2B 98a9ae4dc0c0df087bee8bd5c875e63a54b2ca71465386e19f425a9c35108abe9f04b222ef51f8cbeba3d781ae85f9fb4c612b86f263773ff868ae24866c7df7 SHA512 011dcbdfc8847f6a6004349665207ba89ec84a37d649c082588a1256ff992e374f4bad3d1930270a89d35c2386a16c18be301725b44e46dcc8501f0a98d761f5 -DIST rust-1.44.1-powerpc64-unknown-linux-gnu.tar.xz 107393564 BLAKE2B e3c2d6ae58585e020c4d1129ce26b19441b7f7e5df14d80290855f2931febdf4d2b4c30c4bcdc1747b61b4d1263194777ef7193bdc7c7dc4ce3eab91b137f0a0 SHA512 ff6b96b34b9b7dff362f6f2dcdf3b55fe7f2f349692434de5a11b8ca9956e06dbc6531c2457b4d43d5d19851ecbdbb0108e9f7eb449d9c965ed308ddbd0775a2 -DIST rust-1.44.1-powerpc64le-unknown-linux-gnu.tar.xz 112429740 BLAKE2B 10252623cd291c0e95238ac038544b989d94affd2edf173dce4f10847910aaabec99f8574f3141d4af4115ab6e9ed0536b87c8e8c6c899641e585efc9a3c516d SHA512 cf54b52581d393c2694fbefab90c62aa1f57ece8b200bfd656000950005554fda6fc0145af3aca0c526b8e43b100b8efe632929b6c0c1a4c4f4ce6dde4097283 -DIST rust-1.44.1-s390x-unknown-linux-gnu.tar.xz 119312728 BLAKE2B f5e3209990d3cc0181a200448e4bcbf1f6754847cfc36d7355e191fd49e239d3e0c002310743fd063241c5dec47da3a0776c361241facbcc4a1f1e9254eb805d SHA512 84c6ed736bb7d0c10aaceeb2c2c3c97f6188fd7d7f4466c8ef35ffc591d6bde3b273a0d62d50e60f184ccd81c96a31ed2e610e82fb9ed9efd574e4c5a5f25d26 -DIST rust-1.44.1-x86_64-unknown-linux-gnu.tar.xz 112133992 BLAKE2B c0af6bf1417bbb69be9f552f60805eb0a5f530b667ca2bbd04db9d567f1eb467a9e72912062a3c22d3922c29809258637dd7568c29e461dbeb5d17aa0699dd45 SHA512 540761fd5246f4a48a7606ac0220f0d61963473b57ef703696871dc23fda8154d45351b8e81018d15899c386b44e43b05028cc797d495e9dc46f127fbea7f093 -DIST rust-1.44.1-x86_64-unknown-linux-musl.tar.xz 117456616 BLAKE2B fd2752cf867e1ff701e624caf602fe7a29b47c64e633508e91da1a1b2321f5531441b84cc9f0ad159ef399d38628d60e59f8b7a99e5427df928abceb24f937f2 SHA512 05ca3e07001746511c5fcb5122f487205ffaee771805b0219db018b350d67945f5ab4b0b2cf98b7e7832b53365e3932fef37506a65ecaaf624d0bb8d43cf8427 DIST rust-1.45.1-aarch64-unknown-linux-gnu.tar.xz 110598096 BLAKE2B a3defd33d2c223012c9eb7b094c77f338ae9beb8661412966a62b4bc868175cf91489f4328a8dc7d0b84b892dad713d2c4f4d180c55dbcd2ffd58c3920585e84 SHA512 fd64aaa3d8137d62c838f0ef554ff159c84263a4734556c0e4ef911d3f87921f846d70d76983fe8ebe9679477915255ceea69c8a9769797893827d5d67e97b0b DIST rust-1.45.1-arm-unknown-linux-gnueabi.tar.xz 115140648 BLAKE2B 537fe3874c0b09b8cad304c09ca36824cd77916508e7527b9b53a3a8a37ddeab3e760bb1f40c185a91a1eeba7953d7d9d2687e1d341b0833e2a129994e4a9014 SHA512 a3c36dee2f7cda77dd307ad61065c7ce20a433689a3396d8c286b07f0f2aea666881dd4089e2332a0793a51a72189928919a477e72e7f44a64b41101c65cf9ed DIST rust-1.45.1-arm-unknown-linux-gnueabihf.tar.xz 113215036 BLAKE2B 36cabfcf77dd533b7f5f89dd5b94244d148cc4c6e19c76a9d677c01a4daffd8075f6842b98314f5ab37c66b223901cfe8a16e7637f3f805f5e75c705979fe8e4 SHA512 770fa7b73fc08979da63f83155cd424b0b7a543a5e6c47a2cb20aeb4f3470360622b70adc9d527a9316bc6b388a696d60c9de9119fe9be448d26cd48871b533d @@ -54,7 +40,6 @@ DIST rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz 141965604 BLAKE2B b4b7ce86 DIST rust-1.47.0-s390x-unknown-linux-gnu.tar.xz 146987276 BLAKE2B 1810e7bfbd235613563677449376167700c33960eb57b100e65058f6a00692316db518f2f4b79b39e414f3892c62bb1ec09b0866ff2221641c4a3056659a1668 SHA512 dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0 DIST rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz 150891572 BLAKE2B 45ff02465ba82ae96de25dd616fa08abb2396be21236d2f66f831effb349f39b047a380b38cb83254f27e56cecdbea8478f4de8ccc0aa23b11de2f11a28f501b SHA512 f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f DIST rust-1.47.0-x86_64-unknown-linux-musl.tar.xz 166456672 BLAKE2B d6ccfc574a81ae3e9e6a96805e6863009970b5c480f35ee0d582a204b782fe513b9c6c7094d1adea509de1a3097a8a0524ac00c2186b968f70f390615904eb5a SHA512 f71b162635955ecd8a6ec322818be69c788c18d4e923d84d901916648f2eb58573b1f97b460209294ee64198e76566b78e472f9cbca8665c59444adfc5ae603c -DIST rustc-1.45.2-src.tar.xz 98683036 BLAKE2B a4102a5d4744b7ccc9b076aba00c39d69532f777e7d39e0e4ce2033b663b43e27b55034fdb3a1e13379fae9a16bff9e7748865a84507f7388ef0ebf9d421eac7 SHA512 cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25 DIST rustc-1.46.0-src.tar.xz 101868452 BLAKE2B da9798596b124a10d79c236a871228f05e5f571d22c2259328e7026c91e088c85f5de9c0536a16531e0cb10477bfcd16d3ac11467979f5561cb6199442b877ef SHA512 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 DIST rustc-1.48.0-src.tar.xz 105951736 BLAKE2B 42468fc5ac5e80c4793cfe0913cbb8e43a8def28cc8cf5ed25ab989561e2bf33e155c83e180183362535cbc9008f341eb1273087a2364672b1a4032ac2d6ca45 SHA512 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 diff --git a/dev-lang/rust/rust-1.45.2.ebuild b/dev-lang/rust/rust-1.45.2.ebuild deleted file mode 100644 index 022e6bc56ca6..000000000000 --- a/dev-lang/rust/rust-1.45.2.ebuild +++ /dev/null @@ -1,551 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6..9} ) - -inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs - -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 x86" -fi - -RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1" - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" - -SRC_URI=" - https://static.rust-lang.org/dist/${SRC} - !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) ) -" - -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM 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 libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm 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: -# 1. List all the working slots (with min versions) in ||, newest first. -# 2. Update the := to specify *max* version, e.g. < 11. -# 3. Specify LLVM_MAX_SLOT, e.g. 10. -LLVM_DEPEND=" - || ( - sys-devel/llvm:10[${LLVM_TARGET_USEDEPS// /,}] - sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}] - ) - /dev/null) ) - rustc_version=${rustc_version[0]#rust-bin-} - rustc_version=${rustc_version#rust-} - - [[ -z "${rustc_version}" ]] && die "Failed to determine rustc version!" - - 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 - else - einfo "Using rust ${rustc_version} to build" - fi -} - -pre_build_checks() { - local M=6144 - M=$(( $(usex clippy 128 0) + ${M} )) - M=$(( $(usex miri 128 0) + ${M} )) - M=$(( $(usex rls 512 0) + ${M} )) - M=$(( $(usex rustfmt 256 0) + ${M} )) - M=$(( $(usex system-llvm 0 2048) + ${M} )) - M=$(( $(usex wasm 256 0) + ${M} )) - M=$(( $(usex debug 15 10) * ${M} / 10 )) - 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} -} - -pkg_pretend() { - pre_build_checks -} - -pkg_setup() { - pre_build_checks - python-any-r1_pkg_setup - use system-bootstrap && boostrap_rust_version_check - - # required to link agains system libs, otherwise - # crates use bundled sources and compile own static version - export LIBGIT2_SYS_USE_PKG_CONFIG=1 - export LIBSSH2_SYS_USE_PKG_CONFIG=1 - export PKG_CONFIG_ALLOW_CROSS=1 - - 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 \ - --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/' src/librustc_target/spec/wasm32_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 - rust_stage0_root="$(rustc --print sysroot)" - else - rust_stage0_root="${WORKDIR}"/rust-stage0 - fi - - rust_target="$(rust_abi)" - - cat <<- EOF > "${S}"/config.toml - [llvm] - 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 = "${rust_target}" - host = ["${rust_target}"] - target = [${rust_targets}] - cargo = "${rust_stage0_root}/bin/cargo" - rustc = "${rust_stage0_root}/bin/rustc" - docs = $(toml_usex doc) - compiler-docs = $(toml_usex doc) - 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" - libdir = "$(get_libdir)/${P}" - docdir = "share/doc/${PF}" - mandir = "share/${P}/man" - [rust] - optimize = true - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - debuginfo-level-rustc = 0 - backtrace = true - incremental = false - default-linker = "$(tc-getCC)" - parallel-compiler = $(toml_usex parallel-compiler) - channel = "$(usex nightly nightly stable)" - 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)) - backtrace-on-ice = true - jemalloc = false - [dist] - src-tarball = false - 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/ - - # extra targets defined as a bash array - # spec format: :: - # 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 :: - local cross_llvm_target="${cross_target_spec%%:*}" - # extracts toolchain triples, : - 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 - - # 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 settings:" - cat "${S}"/config.toml || die -} - -src_compile() { - env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ - "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die -} - -src_test() { - 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 \ - src/test/codegen \ - src/test/codegen-units \ - src/test/compile-fail \ - src/test/incremental \ - src/test/mir-opt \ - src/test/pretty \ - src/test/run-fail \ - src/test/run-make \ - src/test/run-make-fulldeps \ - src/test/ui \ - src/test/ui-fulldeps || die -} - -src_install() { - env $(cat "${S}"/config.env) DESTDIR="${D}" \ - "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die - - # bug #689562, #689160 - rm "${D}/etc/bash_completion.d/cargo" || die - rmdir "${D}"/etc{/bash_completion.d,} || die - dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo - - mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die - mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die - mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die - mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die - mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die - mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die - if use clippy; then - mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die - mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die - fi - if use miri; then - mv "${ED}/usr/bin/miri" "${ED}/usr/bin/miri-${PV}" || die - mv "${ED}/usr/bin/cargo-miri" "${ED}/usr/bin/cargo-miri-${PV}" || die - fi - if use rls; then - mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die - fi - if use rustfmt; then - mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die - mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die - fi - - # Copy shared library versions of standard libraries for all targets - # into the system's abi-dependent lib directories because the rust - # installer only does so for the native ABI. - - local abi_libdir rust_target - for v in $(multilib_get_enabled_abi_pairs); do - if [ ${v##*.} = ${DEFAULT_ABI} ]; then - continue - fi - abi_libdir=$(get_abi_LIBDIR ${v##*.}) - rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) - mkdir -p "${ED}/usr/${abi_libdir}/${P}" - cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \ - "${ED}/usr/${abi_libdir}/${P}" || die - done - - # versioned libdir/mandir support - newenvd - "50${P}" <<-_EOF_ - LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}" - MANPATH="${EPREFIX}/usr/share/${P}/man" - _EOF_ - - dodoc COPYRIGHT - rm -rf "${ED}/usr/$(get_libdir)/${P}"/*.old || die - rm "${ED}/usr/share/doc/${P}"/*.old || die - rm "${ED}/usr/share/doc/${P}/LICENSE-APACHE" || die - rm "${ED}/usr/share/doc/${P}/LICENSE-MIT" || 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 - 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 - - 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}." - - 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 - - if use elibc_musl; then - ewarn "${PN} on *-musl targets is configured with crt-static" - ewarn "" - ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf" - ewarn "to use it with portage, otherwise you may see failures like" - ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target " - ewarn "x86_64-unknown-linux-musl does not support these crate types" - fi -} - -pkg_postrm() { - eselect rust cleanup -} -- cgit v1.2.3-18-g5258