Gentoo Archives: gentoo-commits

From: Mikhail Pukhlikov <cynede@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/rust:master commit in: dev-lang/rust-bin/
Date: Mon, 03 Aug 2020 06:26:19
Message-Id: 1596435959.2260083a38d1f0ba59ad649446ddf14974c6a6cb.cynede@gentoo
1 commit: 2260083a38d1f0ba59ad649446ddf14974c6a6cb
2 Author: gentoo90 <gentoo90 <AT> gmail <DOT> com>
3 AuthorDate: Tue Jul 28 20:54:45 2020 +0000
4 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 3 06:25:59 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=2260083a
7
8 dev-lang/rust-bin-9999: add "rust-analyzer" useflag
9
10 RLS - old and busted.
11 rust-analyzer - new hotness.
12
13 Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org>
14
15 dev-lang/rust-bin/rust-bin-9999.ebuild | 17 +++++++++++++++--
16 1 file changed, 15 insertions(+), 2 deletions(-)
17
18 diff --git a/dev-lang/rust-bin/rust-bin-9999.ebuild b/dev-lang/rust-bin/rust-bin-9999.ebuild
19 index 66bddf0..c17cd9f 100644
20 --- a/dev-lang/rust-bin/rust-bin-9999.ebuild
21 +++ b/dev-lang/rust-bin/rust-bin-9999.ebuild
22 @@ -27,7 +27,7 @@ SLOT="nightly"
23 KEYWORDS=""
24 RESTRICT="network-sandbox"
25
26 -IUSE="clippy cpu_flags_x86_sse2 doc libressl rls rustfmt source ${ALL_RUSTLIB_TARGETS[*]}"
27 +IUSE="clippy cpu_flags_x86_sse2 doc libressl rls rust-analyzer rustfmt source ${ALL_RUSTLIB_TARGETS[*]}"
28
29 CDEPEND="
30 >=app-eselect/eselect-rust-0.3_pre20150425
31 @@ -46,7 +46,8 @@ RDEPEND="${CDEPEND}
32 !dev-util/cargo
33 "
34 REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )
35 - rls? ( source )"
36 + rls? ( source )
37 + rust-analyzer? ( source )"
38
39 QA_PREBUILT="
40 opt/${P}/bin/*-${PV}
41 @@ -96,6 +97,10 @@ src_install() {
42 local analysis=$(grep 'analysis' ./components)
43 components="${components},rls-preview,${analysis}"
44 fi
45 + if use rust-analyzer; then
46 + local analysis=$(grep 'analysis' ./components)
47 + components="${components},rust-analyzer-preview,${analysis}"
48 + fi
49 use rustfmt && components="${components},rustfmt-preview"
50
51 elog "installing components: ${components}"
52 @@ -140,6 +145,11 @@ src_install() {
53 mv "${D}/opt/${P}/bin/rls" "${D}/opt/${P}/bin/${rls}" || die
54 dosym "../../opt/${P}/bin/${rls}" "/usr/bin/${rls}"
55 fi
56 + if use rust-analyzer; then
57 + local rust_analyzer=rust-analyzer-bin-${PV}
58 + mv "${D}/opt/${P}/bin/rust-analyzer" "${D}/opt/${P}/bin/${rust_analyzer}" || die
59 + dosym "../../opt/${P}/bin/${rust_analyzer}" "/usr/bin/${rust_analyzer}"
60 + fi
61 if use rustfmt; then
62 local rustfmt=rustfmt-bin-${PV}
63 local cargo_fmt=cargo-fmt-bin-${PV}
64 @@ -170,6 +180,9 @@ src_install() {
65 if use rls; then
66 echo /usr/bin/rls >> "${T}/provider-${P}"
67 fi
68 + if use rust-analyzer; then
69 + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
70 + fi
71 if use rustfmt; then
72 echo /usr/bin/rustfmt >> "${T}/provider-${P}"
73 echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"