summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-12 11:56:17 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-12 12:01:35 -0800
commitd2e9fc2c57ca98303914d5632c20edce74f846a6 (patch)
tree8d0d0f9e6acf4b7a936344237e40cdee9604bc49
parentmedia-sound/mpd: drop 'tidal' USE flag (diff)
downloadgentoo-d2e9fc2c57ca98303914d5632c20edce74f846a6.tar.gz
gentoo-d2e9fc2c57ca98303914d5632c20edce74f846a6.tar.bz2
gentoo-d2e9fc2c57ca98303914d5632c20edce74f846a6.zip
dev-lang/rust: add rust-src useflag
previously 'src' component was installed by 'rls' useflag. let's split it out for people who want 'src' but don't need rls. Bug: https://bugs.gentoo.org/800785 Bug: https://bugs.gentoo.org/819786 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r--dev-lang/rust/metadata.xml1
-rw-r--r--dev-lang/rust/rust-1.56.1.ebuild8
2 files changed, 7 insertions, 2 deletions
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 4ecf03a3d4ea..a51257c9ae1d 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -16,6 +16,7 @@
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
<flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
+ <flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
<flag name="system-llvm">Use the system LLVM install</flag>
<flag name="wasm">Build support for the wasm32-unknown-unknown target</flag>
diff --git a/dev-lang/rust/rust-1.56.1.ebuild b/dev-lang/rust/rust-1.56.1.ebuild
index b0dc62b63efd..ebe0f6c80373 100644
--- a/dev-lang/rust/rust-1.56.1.ebuild
+++ b/dev-lang/rust/rust-1.56.1.ebuild
@@ -41,7 +41,7 @@ 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 miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test 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
@@ -119,6 +119,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rls? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
@@ -277,11 +278,14 @@ src_configure() {
tools="\"miri\",$tools"
fi
if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
+ tools="\"rls\",\"analysis\",$tools"
fi
if use rustfmt; then
tools="\"rustfmt\",$tools"
fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
local rust_stage0_root
if use system-bootstrap; then