public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Dirkjan Ochtman" <djc@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Thu, 18 Oct 2018 09:05:28 +0000 (UTC)	[thread overview]
Message-ID: <1539853513.aca73a89121af25876703d0ddcc5f08ddf277933.djc@gentoo> (raw)

commit:     aca73a89121af25876703d0ddcc5f08ddf277933
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 09:02:33 2018 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 09:05:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca73a89

dev-lang/rust: version bump to 1.29.2 with fixes

Fixes: https://bugs.gentoo.org/667286
Fixes: https://bugs.gentoo.org/667966
Bug: https://bugs.gentoo.org/609654
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-lang/rust/Manifest                          |  14 ++
 dev-lang/rust/files/1.29.2-clippy-sysroot.patch |  62 +++++
 dev-lang/rust/rust-1.29.2.ebuild                | 289 ++++++++++++++++++++++++
 3 files changed, 365 insertions(+)

diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 2cb3a292859..782386dff1b 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,4 +1,18 @@
+DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.gz 157164971 BLAKE2B 04b6e5d19762aac8137fc2cd4649721808302293a3171750a301a50cc0d51239d589138708ef836674cbc26fb08e5dc1f95a9b914078bfca1fbe3c31482865e6 SHA512 b5ee4eaf18d3c06e73440d2b74012e936f3c6e518f70d40735bf487436d81b4bceecfca08cd9d46e689fa73bc17bea27f6bfac257ff8e943a71fd3bf3f0550fc
 DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c
+DIST rust-1.28.0-arm-unknown-linux-gnueabi.tar.gz 162495940 BLAKE2B 98f8a03326cdf006509fea62aa892033117c7f22d6b6e5961afb7229574e7193237d9e0f010bd2c47a88cd0a3cbbc698432fbe2f3d94354a2f783df858ff913e SHA512 f52f78933d4da8252676f480b298ece7bec788106abde4b2075070f3a74fd3a53f6497685e6f481f623a911d4b81dee727b085cddf466e394577bca22e907dd8
+DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.gz 162818424 BLAKE2B 41769724609e6847ed6bea7fc246063eec418e36b939cd5aab7cb84aea214baf15cc208211aa432a937c3b263bfe3412e3076c565f85cf1d0e92164c15dfa87d SHA512 c779f168be3c69e612fe4bc597cb95889e43e6100be304e4157cf35ed5651601a8e5e6470671642566979a7c2c9cfbd0c6446e428a4606f7869d3c5f698c0a7b
+DIST rust-1.28.0-armv7-unknown-linux-gnueabihf.tar.gz 160016618 BLAKE2B 687d019803af7f6b891fe381eeea45d7cb009c78ae0e45b34ca6fdb91c03e27802de1578f0c0142aa17fbbe7bbf99c1a0a3b4ff32e39aaa3050f4e75019dd83f SHA512 1d26b31499462b5521f2ee798cfb6072516569077e5f9bcac21f9f0de06d1c9df0eec9735c5539048c0f8cb26b1a498eff8f3eed66f8e66bb937cc0e6e6c5c76
+DIST rust-1.28.0-i686-unknown-linux-gnu.tar.gz 223358542 BLAKE2B fa7b691bcfae4cd939848b5994d81efda99bc7482141faa4a557354d341dfbf0257e43d49e894de896947097987dba3df22c6783cd75f6c99d72f76c3226a899 SHA512 40fc0c6e347f60ab3809e95edabafd88e9160f8adaa217562a9c52fea42f540ca142eddd827ba16960bef8faa9401b37a963d29baa235aa84eb760c2a78a2c4f
 DIST rust-1.28.0-i686-unknown-linux-gnu.tar.xz 136925948 BLAKE2B 85d9239533920c3f16d7c61bada0caeabceceade29032b70bb4562bfd04fa0158cdd85b8a0a1119506416fa5916ade8a0466bf6c10da457299a6319aa25f9dd6 SHA512 ffdfab46db14f07354b553e02fdb9dc6602c2c52b78d8f17c499f4ddb1e257aa53479df836eb3f06a2548d34296b0277cdb6b4c6f3cec57265823df22752c135
+DIST rust-1.28.0-mips-unknown-linux-gnu.tar.gz 165489073 BLAKE2B 14d5f01a02fdc87b508dd214271b5b1f0fde2cbf360faa65cac51f8d3658acb4f1388c894a1451c0a9626e3abffedef0b663caab845ed95573b5567244fd8ed7 SHA512 9663fae3c05e5a393002261a213f08d1efc1426ef06849343475abfef4fcf427ea987b69dee6bc8edb92313c7e31cff79a526948f0934fdbd8ced219cdfe8b25
+DIST rust-1.28.0-mips64-unknown-linux-gnuabi64.tar.gz 164335544 BLAKE2B da043943d2c9429c1626ff233728afacdc360c3705ac4bcafa94d145aef5ca91cdf7763c078cf63439bf6d0d126eabed4f107520a510c9f4cc58445b5b24d47e SHA512 863678828f59d14d83d68555d86ae2c765d227524cd2d0c3b38948cf6da78db3590c4a05c426c19eacdb041aec9d55b12469a0e2bd6a3b0eab6bec5fe12dbbf9
+DIST rust-1.28.0-mipsel-unknown-linux-gnu.tar.gz 163172396 BLAKE2B 3a8f4568d66d82709199b1bb40b53c345628897b4b272f9f86086309a87513ffdd11be3a18698790c1efd0fc879f6a6dffbcc618952f355b38d6d4d1d4ae6aa5 SHA512 cbb05bb0b5024d0d7d4ec7b3f2db8004bb84213fc2bd0be8d820a3224fcbbd4a8245906927353e56c9cc9f09f36d1b1baf026cba2caa22a5873f20dceae6feaf
+DIST rust-1.28.0-powerpc-unknown-linux-gnu.tar.gz 166220569 BLAKE2B 516340a78d3e7e52b0997b72d1767bb6481eb443c6ba9f7f52339a66b6b96c473e4023d66b104a147a8a580e54992b3aff81784314e03cc5a150a056b6504413 SHA512 71c10b5cab4b3a60d88c1d9a3463478379d5b5ff86c4c8a3f48da92354fc55490636128781ef71dbf5156f4f558077ffc161616ace614c32f8a43014435dd37f
+DIST rust-1.28.0-powerpc64-unknown-linux-gnu.tar.gz 172115039 BLAKE2B d4f808101fd0db3096b7dd69fd77d91111e69965b36cac7c23b7503ec6851f8868f3f00635b2a38a844e28b5e4a6490be50a29836db86d994933688e2ca8c8b7 SHA512 0c48cfefe93258641a5d0f33355719356095b7fc680edc768d7ce1b22cb437f80e99e302356ef00e6e39cd1fe9b042a0f8d60c9814458f9629a36822fea7faa6
+DIST rust-1.28.0-powerpc64le-unknown-linux-gnu.tar.gz 170244391 BLAKE2B 10c54895a9ce9077f2489d9a24f734deeb132227871d6ddf610557629892053b9473146319ca979e9ceb3d861a352dc1fa2e0f529c5675586ed2bb80aad9d0f8 SHA512 ec5e0e85a8a6124f5804e72293fde86e0dae0cd4d044831182610b185f1048cf0bec9b12cf3063a6fba3bac3fca273727364e86a3e5eb8ba0224b29ce2145d6b
+DIST rust-1.28.0-s390x-unknown-linux-gnu.tar.gz 159758899 BLAKE2B a692e77fb2538d539f403f7d39898d46160b56a389cee459861a743b4acde96cb48b6776a820c046b27a28ef9997c33d07154f36d70de7473d877ea2680b6ea4 SHA512 a9f0a84d6c80ee3d66a10214a0a229112d4594d849cf51081a722b2c66e5742a199c59215d258f86a7ab362659936a2dd8b6228c18f3065fd43d2edd7d7d6363
+DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.gz 220419012 BLAKE2B 9db1923cd9f82fe7e13684ff86af30592af2acb348358a27c956ec01e0391b2fae7cf89537a4b23159beb7202ec5349e701b2255e0d188b3894bd985bd1b24a2 SHA512 6bdcb8828e14069e099764b79671579bd24c90a102266fa5ebd9a5da3da7186b3e1d64b53c6c065d2d1a4d71b6c613513fddb38cd21c3d37a4a112b0393542a2
 DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f
 DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
+DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38

diff --git a/dev-lang/rust/files/1.29.2-clippy-sysroot.patch b/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
new file mode 100644
index 00000000000..6a527e5a020
--- /dev/null
+++ b/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
@@ -0,0 +1,62 @@
+--- a/src/tools/clippy/src/driver.rs	2018-10-04 16:30:42.438486058 +0300
++++ b/src/tools/clippy/src/driver.rs	2018-10-04 16:31:45.044484028 +0300
+@@ -20,54 +20,22 @@
+         return;
+     }
+ 
+-    let sys_root = option_env!("SYSROOT")
+-        .map(String::from)
+-        .or_else(|| std::env::var("SYSROOT").ok())
+-        .or_else(|| {
+-            let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
+-            let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
+-            home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
+-        })
+-        .or_else(|| {
+-            Command::new("rustc")
+-                .arg("--print")
+-                .arg("sysroot")
+-                .output()
+-                .ok()
+-                .and_then(|out| String::from_utf8(out.stdout).ok())
+-                .map(|s| s.trim().to_owned())
+-        })
+-        .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
+-
+     // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
+     // We're invoking the compiler programmatically, so we ignore this/
+-    let mut orig_args: Vec<String> = env::args().collect();
+-    if orig_args.len() <= 1 {
++    let mut args: Vec<String> = env::args().collect();
++    if args.len() <= 1 {
+         std::process::exit(1);
+     }
+-    if orig_args[1] == "rustc" {
++    if args[1] == "rustc" {
+         // we still want to be able to invoke it normally though
+-        orig_args.remove(1);
++        args.remove(1);
+     }
+-    // this conditional check for the --sysroot flag is there so users can call
+-    // `clippy_driver` directly
+-    // without having to pass --sysroot or anything
+-    let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
+-        orig_args.clone()
+-    } else {
+-        orig_args
+-            .clone()
+-            .into_iter()
+-            .chain(Some("--sysroot".to_owned()))
+-            .chain(Some(sys_root))
+-            .collect()
+-    };
+ 
+     // this check ensures that dependencies are built but not linted and the final
+     // crate is
+     // linted but not built
+     let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
+-        || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
++        || args.iter().any(|s| s == "--emit=dep-info,metadata");
+ 
+     if clippy_enabled {
+         args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);

diff --git a/dev-lang/rust/rust-1.29.2.ebuild b/dev-lang/rust/rust-1.29.2.ebuild
new file mode 100644
index 00000000000..b1d1b8dd282
--- /dev/null
+++ b/dev-lang/rust/rust-1.29.2.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit eapi7-ver 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"
+else
+	ABI_VER="$(ver_cut 1-2)"
+	SLOT="stable/${ABI_VER}"
+	MY_P="rustc-${PV}"
+	SRC="${MY_P}-src.tar.xz"
+	KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+		$(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+	NVPTX PowerPC Sparc SystemZ 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="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+		jemalloc? ( dev-libs/jemalloc )
+		cargo? (
+			sys-libs/zlib
+			!libressl? ( dev-libs/openssl:0= )
+			libressl? ( dev-libs/libressl:0= )
+			net-libs/libssh2
+			net-libs/http-parser:=
+			net-misc/curl[ssl]
+		)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	|| (
+		>=sys-devel/gcc-4.7
+		>=sys-devel/clang-3.5
+	)
+	cargo? ( !dev-util/cargo )
+	rustfmt? ( !dev-util/rustfmt )
+	dev-util/cmake
+"
+PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+				x86? ( cpu_flags_x86_sse2 )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
+
+toml_usex() {
+	usex "$1" true false
+}
+
+src_prepare() {
+	local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+	local rust_stage0_name="RUST_STAGE0_${ARCH}"
+	local rust_stage0="${!rust_stage0_name}"
+
+	"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+	default
+}
+
+src_configure() {
+	local rust_target="" rust_targets="" rust_target_name arch_cflags
+
+	# Collect rust target names to compile standard libs for all ABIs.
+	for v in $(multilib_get_enabled_abi_pairs); do
+		rust_target_name="CHOST_${v##*.}"
+		rust_targets="${rust_targets},\"${!rust_target_name}\""
+	done
+	if use wasm; then
+		rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+	fi
+	rust_targets="${rust_targets#,}"
+
+	local extended="false" tools=""
+	if use cargo; then
+		extended="true"
+		tools="\"cargo\","
+	fi
+	if use clippy; then
+		extended="true"
+		tools="\"clippy\",$tools"
+	fi
+	if use rls; then
+		extended="true"
+		tools="\"rls\",\"analysis\",\"src\",$tools"
+	fi
+	if use rustfmt; then
+		extended="true"
+		tools="\"rustfmt\",$tools"
+	fi
+
+	local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+	rust_target_name="CHOST_${ARCH}"
+	rust_target="$(rust_abi)"
+
+	cat <<- EOF > "${S}"/config.toml
+		[llvm]
+		optimize = $(toml_usex !debug)
+		release-debuginfo = $(toml_usex debug)
+		assertions = $(toml_usex debug)
+		targets = "${LLVM_TARGETS// /;}"
+		[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)
+		submodules = false
+		python = "${EPYTHON}"
+		locked-deps = true
+		vendor = true
+		extended = ${extended}
+		tools = [${tools}]
+		[install]
+		prefix = "${EPREFIX}/usr"
+		libdir = "$(get_libdir)/${P}"
+		docdir = "share/doc/${P}"
+		mandir = "share/${P}/man"
+		[rust]
+		optimize = $(toml_usex !debug)
+		debuginfo = $(toml_usex debug)
+		debug-assertions = $(toml_usex debug)
+		use-jemalloc = $(toml_usex jemalloc)
+		default-linker = "$(tc-getCC)"
+		channel = "stable"
+		rpath = false
+		lld = $(toml_usex wasm)
+	EOF
+
+	for v in $(multilib_get_enabled_abi_pairs); do
+		rust_target=$(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
+	done
+
+	if use wasm; then
+		cat <<- EOF >> "${S}"/config.toml
+			[target.wasm32-unknown-unknown]
+			linker = "rust-lld"
+		EOF
+	fi
+}
+
+src_compile() {
+	env $(cat "${S}"/config.env)\
+		"${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
+		--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+	local rust_target abi_libdir
+
+	env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
+
+	mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+	mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+	mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+	mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+	if use cargo; then
+		mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
+	fi
+	if use clippy; then
+		mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
+		mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
+	fi
+	if use rls; then
+		mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
+	fi
+	if use rustfmt; then
+		mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
+		mv "${D}/usr/bin/cargo-fmt" "${D}/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.
+	for v in $(multilib_get_enabled_abi_pairs); do
+		if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+			continue
+		fi
+		abi_libdir=$(get_abi_LIBDIR ${v##*.})
+		rust_target=$(get_abi_CHOST ${v##*.})
+		mkdir -p "${D}/usr/${abi_libdir}"
+		cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+		   "${D}/usr/${abi_libdir}" || die
+	done
+
+	dodoc COPYRIGHT
+
+	# FIXME:
+	# Really not sure if that env is needed, specailly LDPATH
+	cat <<-EOF > "${T}"/50${P}
+		LDPATH="/usr/$(get_libdir)/${P}"
+		MANPATH="/usr/share/${P}/man"
+	EOF
+	doenvd "${T}"/50${P}
+
+	cat <<-EOF > "${T}/provider-${P}"
+		/usr/bin/rustdoc
+		/usr/bin/rust-gdb
+		/usr/bin/rust-lldb
+	EOF
+	if use cargo; then
+		echo /usr/bin/cargo >> "${T}/provider-${P}"
+	fi
+	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
+	dodir /etc/env.d/rust
+	insinto /etc/env.d/rust
+	doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+	eselect rust update --if-unset
+
+	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 || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
+		elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+	fi
+}
+
+pkg_postrm() {
+	eselect rust unset --if-invalid
+}


             reply	other threads:[~2018-10-18  9:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  9:05 Dirkjan Ochtman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-12  4:04 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Sam James
2024-02-11  6:01 Sam James
2023-10-02  8:13 WANG Xuerui
2023-08-04 12:30 WANG Xuerui
2023-07-20 18:48 Ionen Wolkens
2023-02-09 20:36 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-10-13 17:41 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-09-16  1:46 Georgy Yakovlev
2022-09-15  3:15 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-06-18  9:16 Georgy Yakovlev
2021-06-18  7:46 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-04-18  1:24 Georgy Yakovlev
2021-04-05  4:27 Georgy Yakovlev
2020-11-24  0:41 Georgy Yakovlev
2020-10-28  1:42 Georgy Yakovlev
2020-06-05  8:53 Stefan Strogin
2020-04-10 11:28 Stefan Strogin
2020-03-28 19:08 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2019-06-19  0:35 Georgy Yakovlev
2019-05-26  6:27 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-04-14  8:03 Georgy Yakovlev
2019-03-07  4:40 Georgy Yakovlev
2019-01-26  3:50 Georgy Yakovlev
2016-10-24  5:27 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539853513.aca73a89121af25876703d0ddcc5f08ddf277933.djc@gentoo \
    --to=djc@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox