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 F0C6B138359 for ; Tue, 13 Oct 2020 04:02:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4EFDCE081B; Tue, 13 Oct 2020 04:02:57 +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 23AFDE081B for ; Tue, 13 Oct 2020 04:02:57 +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 CF1D433BE18 for ; Tue, 13 Oct 2020 04:02:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D6F6396 for ; Tue, 13 Oct 2020 04:02:54 +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: <1602561671.14b3e1eb948eb57b80f4b76eb4ece22f450b84ad.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/rust-1.47.0-r1.ebuild dev-lang/rust/rust-1.47.0.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 14b3e1eb948eb57b80f4b76eb4ece22f450b84ad X-VCS-Branch: master Date: Tue, 13 Oct 2020 04:02:54 +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: b6b5facb-393f-406c-a093-19c63d7b2322 X-Archives-Hash: 7f6a430b535946859eb960544bb8369b commit: 14b3e1eb948eb57b80f4b76eb4ece22f450b84ad Author: Georgy Yakovlev gentoo org> AuthorDate: Tue Oct 13 02:58:34 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Tue Oct 13 04:01:11 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14b3e1eb dev-lang/rust: revbump 1.47.0, a lot of fixes we now completely switch all components for eselect-rust. it now includes: doc, man, lib, rustlib. previously there was no guarantee user gets those components from version eselected system-wide. now all the paths are handled. change src_compile target to 'dist' because of changes to x.py https://blog.rust-lang.org/inside-rust/2020/08/30/changes-to-x-py-defaults.html minor cleanup. Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev gentoo.org> .../{rust-1.47.0.ebuild => rust-1.47.0-r1.ebuild} | 60 +++++++++++++--------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/dev-lang/rust/rust-1.47.0.ebuild b/dev-lang/rust/rust-1.47.0-r1.ebuild similarity index 93% rename from dev-lang/rust/rust-1.47.0.ebuild rename to dev-lang/rust/rust-1.47.0-r1.ebuild index 258fc863bc0..d85939ce0ab 100644 --- a/dev-lang/rust/rust-1.47.0.ebuild +++ b/dev-lang/rust/rust-1.47.0-r1.ebuild @@ -247,7 +247,7 @@ src_configure() { rust_target="$(rust_abi)" - cat <<- EOF > "${S}"/config.toml + cat <<- _EOF_ > "${S}"/config.toml [llvm] optimize = $(toml_usex !debug) release-debuginfo = $(toml_usex debug) @@ -304,40 +304,40 @@ src_configure() { jemalloc = false [dist] src-tarball = false - EOF + _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 + cat <<- _EOF_ >> "${S}"/config.env CFLAGS_${rust_target}=${arch_cflags} - EOF + _EOF_ - cat <<- EOF >> "${S}"/config.toml + cat <<- _EOF_ >> "${S}"/config.toml [target.${rust_target}] cc = "$(tc-getBUILD_CC)" cxx = "$(tc-getBUILD_CXX)" linker = "$(tc-getCC)" ar = "$(tc-getAR)" - EOF + _EOF_ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; if use elibc_musl; then - cat <<- EOF >> "${S}"/config.toml + cat <<- _EOF_ >> "${S}"/config.toml crt-static = false - EOF + _EOF_ fi if use system-llvm; then - cat <<- EOF >> "${S}"/config.toml + cat <<- _EOF_ >> "${S}"/config.toml llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" - EOF + _EOF_ fi done if use wasm; then - cat <<- EOF >> "${S}"/config.toml + cat <<- _EOF_ >> "${S}"/config.toml [target.wasm32-unknown-unknown] linker = "$(usex system-llvm lld rust-lld)" - EOF + _EOF_ fi if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below @@ -380,17 +380,17 @@ src_configure() { 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 + 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 + _EOF_ if use system-llvm; then - cat <<- EOF >> "${S}"/config.toml + cat <<- _EOF_ >> "${S}"/config.toml llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" - EOF + _EOF_ fi # append cross target to "normal" target list @@ -426,7 +426,7 @@ src_compile() { ( IFS=$'\n' env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ - "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die ) } @@ -502,12 +502,12 @@ src_install() { dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo local symlinks=( + cargo rustc rustdoc rust-gdb rust-gdbgui rust-lldb - cargo ) use clippy && symlinks+=( clippy-driver cargo-clippy ) @@ -515,20 +515,26 @@ src_install() { 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 /usr/lib/rust//bin/rustc- # need to fix eselect-rust to remove this hack. - mv -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${i}-${PV}" || die - ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}-${PV}" "${ED}/usr/lib/${PN}/${PV}/bin/${i}" || die - dosym "../lib/${PN}/${PV}/bin/${i}-${PV}" "/usr/bin/${i}-${PV}" + local ver_i="${i}-${PV}" + mv -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die + ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" "${ED}/usr/lib/${PN}/${PV}/bin/${i}" || die + dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" done + + # symlinks to switch components to active rust in eselect dosym "../../lib/${PN}/${PV}/share/doc" "/usr/share/doc/${P}" + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" newenvd - "50${P}" <<-_EOF_ - LDPATH="${EPREFIX}/usr/lib/${PN}/${PV}/lib" - MANPATH="${EPREFIX}/usr/lib/${PN}/${PV}/share/man" + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" $(usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') _EOF_ @@ -536,14 +542,18 @@ src_install() { rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die # note: eselect-rust adds EROOT to all paths below - cat <<-EOF > "${T}/provider-${P}" + 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 + _EOF_ + if use clippy; then echo /usr/bin/clippy-driver >> "${T}/provider-${P}" echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"