1 |
commit: 4a6b4bc49d24bc5f7e27dc249557d42cf0873cdb |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 24 22:52:36 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 24 23:00:35 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6b4bc4 |
7 |
|
8 |
dev-lang/rust-bin: add rls useflag to 1.45.2 |
9 |
|
10 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
11 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
12 |
|
13 |
dev-lang/rust-bin/metadata.xml | 1 + |
14 |
dev-lang/rust-bin/rust-bin-1.45.2.ebuild | 15 +++++++++++++-- |
15 |
2 files changed, 14 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml |
18 |
index 01ce1ade6f0..7cdd68d01d1 100644 |
19 |
--- a/dev-lang/rust-bin/metadata.xml |
20 |
+++ b/dev-lang/rust-bin/metadata.xml |
21 |
@@ -7,6 +7,7 @@ |
22 |
</maintainer> |
23 |
<use> |
24 |
<flag name="clippy">Install clippy, Rust code linter</flag> |
25 |
+ <flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag> |
26 |
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag> |
27 |
</use> |
28 |
</pkgmetadata> |
29 |
|
30 |
diff --git a/dev-lang/rust-bin/rust-bin-1.45.2.ebuild b/dev-lang/rust-bin/rust-bin-1.45.2.ebuild |
31 |
index b36387480c9..3e4fa110440 100644 |
32 |
--- a/dev-lang/rust-bin/rust-bin-1.45.2.ebuild |
33 |
+++ b/dev-lang/rust-bin/rust-bin-1.45.2.ebuild |
34 |
@@ -14,7 +14,7 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" |
35 |
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
36 |
SLOT="stable" |
37 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
38 |
-IUSE="clippy cpu_flags_x86_sse2 doc rustfmt" |
39 |
+IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" |
40 |
|
41 |
DEPEND="" |
42 |
RDEPEND=">=app-eselect/eselect-rust-20190311" |
43 |
@@ -50,7 +50,8 @@ multilib_src_install() { |
44 |
local components="rustc,cargo,${std}" |
45 |
use doc && components="${components},rust-docs" |
46 |
use clippy && components="${components},clippy-preview" |
47 |
- use rustfmt && components="${components},rustfmt-preview" |
48 |
+ use rls && components="${components},rls-preview" |
49 |
+ use rustfmt && components="${components},rustfmt-preview,rust-analysis" |
50 |
./install.sh \ |
51 |
--components="${components}" \ |
52 |
--disable-verify \ |
53 |
@@ -98,6 +99,13 @@ multilib_src_install() { |
54 |
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}" |
55 |
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}" |
56 |
fi |
57 |
+ if use rls; then |
58 |
+ local rls=rls-bin-${PV} |
59 |
+ mv "${ED}/opt/${P}/bin/rls" "${ED}/opt/${P}/bin/${rls}" || die |
60 |
+ |
61 |
+ dosym "${rls}" "/opt/${P}/bin/rls" |
62 |
+ dosym "../../opt/${P}/bin/${rls}" "/usr/bin/${rls}" |
63 |
+ fi |
64 |
if use rustfmt; then |
65 |
local rustfmt=rustfmt-bin-${PV} |
66 |
local cargo_fmt=cargo-fmt-bin-${PV} |
67 |
@@ -127,6 +135,9 @@ multilib_src_install() { |
68 |
echo /usr/bin/clippy-driver >> "${T}/provider-${P}" |
69 |
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" |
70 |
fi |
71 |
+ if use rls; then |
72 |
+ echo /usr/bin/rls >> "${T}/provider-${P}" |
73 |
+ fi |
74 |
if use rustfmt; then |
75 |
echo /usr/bin/rustfmt >> "${T}/provider-${P}" |
76 |
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |