aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoro01eg <o01eg@yandex.ru>2020-09-10 08:48:49 +0300
committerMikhail Pukhlikov <cynede@gentoo.org>2020-09-10 14:15:04 +0400
commitec149d400e7f753bd06a1ba537ae4fc5361e823b (patch)
tree3bddde76df1bb270b36ae60ba3bc931bdd257e3c /dev-lang
parentUpdate dev-lang/rust-9999 and virtual/rust-9999 (diff)
downloadrust-ec149d400e7f753bd06a1ba537ae4fc5361e823b.tar.gz
rust-ec149d400e7f753bd06a1ba537ae4fc5361e823b.tar.bz2
rust-ec149d400e7f753bd06a1ba537ae4fc5361e823b.zip
Add rust-analyzer to rust
Fix rust-9999 compilation. Fix pijul license. Signed-off-by: Mikhail Pukhlikov <cynede@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/rust/rust-9999.ebuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/dev-lang/rust/rust-9999.ebuild b/dev-lang/rust/rust-9999.ebuild
index ab98c35..9f66170 100644
--- a/dev-lang/rust/rust-9999.ebuild
+++ b/dev-lang/rust/rust-9999.ebuild
@@ -30,7 +30,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 libressl miri parallel-compiler rls rustfmt system-llvm wasm sanitize ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri parallel-compiler rls rustfmt rust-analyzer system-llvm wasm sanitize ${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
@@ -118,6 +118,7 @@ pre_build_checks() {
M=$(( $(usex clippy 128 0) + ${M} ))
M=$(( $(usex miri 128 0) + ${M} ))
M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rust-analyzer 512 0) + ${M} ))
M=$(( $(usex rustfmt 256 0) + ${M} ))
M=$(( $(usex system-llvm 0 2048) + ${M} ))
M=$(( $(usex wasm 256 0) + ${M} ))
@@ -181,7 +182,7 @@ src_configure() {
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
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm32_base.rs || die
fi
fi
rust_targets="${rust_targets#,}"
@@ -194,11 +195,17 @@ src_configure() {
tools="\"miri\",$tools"
fi
if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
+ tools="\"rls\",$tools"
fi
if use rustfmt; then
tools="\"rustfmt\",$tools"
fi
+ if use rust-analyzer; then
+ tools="\"rust-analyzer\",$tools"
+ fi
+ if [ use rls -o use rust-analyzer ]; then
+ tools="\"analysis\",\"src\",$tools"
+ fi
rust_target="$(rust_abi)"
@@ -420,6 +427,9 @@ src_install() {
if use rls; then
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
fi
+ if use rust-analyzer; then
+ mv "${ED}/usr/bin/rust-analyzer" "${ED}/usr/bin/rust-analyzer-${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
@@ -472,6 +482,9 @@ src_install() {
if use rls; then
echo /usr/bin/rls >> "${T}/provider-${P}"
fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
if use rustfmt; then
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"