summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-08-24 15:52:36 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-08-24 16:00:35 -0700
commit4a6b4bc49d24bc5f7e27dc249557d42cf0873cdb (patch)
treede3e3ff6e8bfed0c4ae8e366d606123a066ffe58 /dev-lang/rust-bin
parentdev-lang/rust: fix whitespace (diff)
downloadgentoo-4a6b4bc49d24bc5f7e27dc249557d42cf0873cdb.tar.gz
gentoo-4a6b4bc49d24bc5f7e27dc249557d42cf0873cdb.tar.bz2
gentoo-4a6b4bc49d24bc5f7e27dc249557d42cf0873cdb.zip
dev-lang/rust-bin: add rls useflag to 1.45.2
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lang/rust-bin')
-rw-r--r--dev-lang/rust-bin/metadata.xml1
-rw-r--r--dev-lang/rust-bin/rust-bin-1.45.2.ebuild15
2 files changed, 14 insertions, 2 deletions
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
index 01ce1ade6f08..7cdd68d01d19 100644
--- a/dev-lang/rust-bin/metadata.xml
+++ b/dev-lang/rust-bin/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="clippy">Install clippy, Rust code linter</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>
</use>
</pkgmetadata>
diff --git a/dev-lang/rust-bin/rust-bin-1.45.2.ebuild b/dev-lang/rust-bin/rust-bin-1.45.2.ebuild
index b36387480c97..3e4fa1104406 100644
--- a/dev-lang/rust-bin/rust-bin-1.45.2.ebuild
+++ b/dev-lang/rust-bin/rust-bin-1.45.2.ebuild
@@ -14,7 +14,7 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})"
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
SLOT="stable"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
-IUSE="clippy cpu_flags_x86_sse2 doc rustfmt"
+IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt"
DEPEND=""
RDEPEND=">=app-eselect/eselect-rust-20190311"
@@ -50,7 +50,8 @@ multilib_src_install() {
local components="rustc,cargo,${std}"
use doc && components="${components},rust-docs"
use clippy && components="${components},clippy-preview"
- use rustfmt && components="${components},rustfmt-preview"
+ use rls && components="${components},rls-preview"
+ use rustfmt && components="${components},rustfmt-preview,rust-analysis"
./install.sh \
--components="${components}" \
--disable-verify \
@@ -98,6 +99,13 @@ multilib_src_install() {
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
fi
+ if use rls; then
+ local rls=rls-bin-${PV}
+ mv "${ED}/opt/${P}/bin/rls" "${ED}/opt/${P}/bin/${rls}" || die
+
+ dosym "${rls}" "/opt/${P}/bin/rls"
+ dosym "../../opt/${P}/bin/${rls}" "/usr/bin/${rls}"
+ fi
if use rustfmt; then
local rustfmt=rustfmt-bin-${PV}
local cargo_fmt=cargo-fmt-bin-${PV}
@@ -127,6 +135,9 @@ multilib_src_install() {
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}"