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-vcs/pijul/, dev-lang/rust/
Date: Thu, 10 Sep 2020 10:15:31
Message-Id: 1599732904.ec149d400e7f753bd06a1ba537ae4fc5361e823b.cynede@gentoo
1 commit: ec149d400e7f753bd06a1ba537ae4fc5361e823b
2 Author: o01eg <o01eg <AT> yandex <DOT> ru>
3 AuthorDate: Thu Sep 10 05:48:49 2020 +0000
4 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 10 10:15:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=ec149d40
7
8 Add rust-analyzer to rust
9
10 Fix rust-9999 compilation.
11 Fix pijul license.
12
13 Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org>
14
15 dev-lang/rust/rust-9999.ebuild | 19 ++++++++++++++++---
16 dev-vcs/pijul/pijul-0.12.2.ebuild | 2 +-
17 2 files changed, 17 insertions(+), 4 deletions(-)
18
19 diff --git a/dev-lang/rust/rust-9999.ebuild b/dev-lang/rust/rust-9999.ebuild
20 index ab98c35..9f66170 100644
21 --- a/dev-lang/rust/rust-9999.ebuild
22 +++ b/dev-lang/rust/rust-9999.ebuild
23 @@ -30,7 +30,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
24
25 LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
26
27 -IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri parallel-compiler rls rustfmt system-llvm wasm sanitize ${ALL_LLVM_TARGETS[*]}"
28 +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri parallel-compiler rls rustfmt rust-analyzer system-llvm wasm sanitize ${ALL_LLVM_TARGETS[*]}"
29
30 # Please keep the LLVM dependency block separate. Since LLVM is slotted,
31 # we need to *really* make sure we're not pulling more than one slot
32 @@ -118,6 +118,7 @@ pre_build_checks() {
33 M=$(( $(usex clippy 128 0) + ${M} ))
34 M=$(( $(usex miri 128 0) + ${M} ))
35 M=$(( $(usex rls 512 0) + ${M} ))
36 + M=$(( $(usex rust-analyzer 512 0) + ${M} ))
37 M=$(( $(usex rustfmt 256 0) + ${M} ))
38 M=$(( $(usex system-llvm 0 2048) + ${M} ))
39 M=$(( $(usex wasm 256 0) + ${M} ))
40 @@ -181,7 +182,7 @@ src_configure() {
41 if use system-llvm; then
42 # un-hardcode rust-lld linker for this target
43 # https://bugs.gentoo.org/715348
44 - sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die
45 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm32_base.rs || die
46 fi
47 fi
48 rust_targets="${rust_targets#,}"
49 @@ -194,11 +195,17 @@ src_configure() {
50 tools="\"miri\",$tools"
51 fi
52 if use rls; then
53 - tools="\"rls\",\"analysis\",\"src\",$tools"
54 + tools="\"rls\",$tools"
55 fi
56 if use rustfmt; then
57 tools="\"rustfmt\",$tools"
58 fi
59 + if use rust-analyzer; then
60 + tools="\"rust-analyzer\",$tools"
61 + fi
62 + if [ use rls -o use rust-analyzer ]; then
63 + tools="\"analysis\",\"src\",$tools"
64 + fi
65
66 rust_target="$(rust_abi)"
67
68 @@ -420,6 +427,9 @@ src_install() {
69 if use rls; then
70 mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
71 fi
72 + if use rust-analyzer; then
73 + mv "${ED}/usr/bin/rust-analyzer" "${ED}/usr/bin/rust-analyzer-${PV}" || die
74 + fi
75 if use rustfmt; then
76 mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
77 mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
78 @@ -472,6 +482,9 @@ src_install() {
79 if use rls; then
80 echo /usr/bin/rls >> "${T}/provider-${P}"
81 fi
82 + if use rust-analyzer; then
83 + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
84 + fi
85 if use rustfmt; then
86 echo /usr/bin/rustfmt >> "${T}/provider-${P}"
87 echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
88
89 diff --git a/dev-vcs/pijul/pijul-0.12.2.ebuild b/dev-vcs/pijul/pijul-0.12.2.ebuild
90 index 32eb3be..37116d1 100644
91 --- a/dev-vcs/pijul/pijul-0.12.2.ebuild
92 +++ b/dev-vcs/pijul/pijul-0.12.2.ebuild
93 @@ -294,7 +294,7 @@ SRC_URI="$(cargo_crate_uris ${CRATES})"
94 RESTRICT="mirror"
95 # License set may be more restrictive as OR is not respected
96 # use cargo-license for a more accurate license picture
97 -LICENSE="Apache-2.0 Apache-2.0 WITH LLVM-exception BSD-2-Clause BSD-3-Clause BSL-1.0 CC0-1.0 GPL-2.0 GPL-2.0+ GPL-3.0 ISC LGPL-3.0 MIT Unlicense Zlib"
98 +LICENSE="Apache-2.0 MIT"
99 SLOT="0"
100 KEYWORDS="~amd64 ~x86"
101 IUSE=""