1 |
commit: 66fdc8ef3df3d34944929a7cc2555f260caed7ad |
2 |
Author: gentoo90 <gentoo90 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jul 31 19:03:13 2020 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 3 06:26:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=66fdc8ef |
7 |
|
8 |
dev-lang/rust-bin-9999: add "miri" useflag |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo-rust/pull/495 |
11 |
Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org> |
12 |
|
13 |
dev-lang/rust-bin/rust-bin-9999.ebuild | 15 ++++++++++++++- |
14 |
1 file changed, 14 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-lang/rust-bin/rust-bin-9999.ebuild b/dev-lang/rust-bin/rust-bin-9999.ebuild |
17 |
index c17cd9f..ffd2d0a 100644 |
18 |
--- a/dev-lang/rust-bin/rust-bin-9999.ebuild |
19 |
+++ b/dev-lang/rust-bin/rust-bin-9999.ebuild |
20 |
@@ -27,7 +27,7 @@ SLOT="nightly" |
21 |
KEYWORDS="" |
22 |
RESTRICT="network-sandbox" |
23 |
|
24 |
-IUSE="clippy cpu_flags_x86_sse2 doc libressl rls rust-analyzer rustfmt source ${ALL_RUSTLIB_TARGETS[*]}" |
25 |
+IUSE="clippy cpu_flags_x86_sse2 doc libressl miri rls rust-analyzer rustfmt source ${ALL_RUSTLIB_TARGETS[*]}" |
26 |
|
27 |
CDEPEND=" |
28 |
>=app-eselect/eselect-rust-0.3_pre20150425 |
29 |
@@ -93,6 +93,7 @@ src_install() { |
30 |
use doc && components="${components},rust-docs" |
31 |
use source && components="${components},rust-src" |
32 |
use clippy && components="${components},clippy-preview" |
33 |
+ use miri && components="${components},miri-preview" |
34 |
if use rls; then |
35 |
local analysis=$(grep 'analysis' ./components) |
36 |
components="${components},rls-preview,${analysis}" |
37 |
@@ -140,6 +141,14 @@ src_install() { |
38 |
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}" |
39 |
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}" |
40 |
fi |
41 |
+ if use miri; then |
42 |
+ local miri=miri-bin-${PV} |
43 |
+ local cargo_miri=cargo-miri-bin-${PV} |
44 |
+ mv "${D}/opt/${P}/bin/miri" "${D}/opt/${P}/bin/${miri}" || die |
45 |
+ mv "${D}/opt/${P}/bin/cargo-miri" "${D}/opt/${P}/bin/${cargo_miri}" || die |
46 |
+ dosym "../../opt/${P}/bin/${miri}" "/usr/bin/${miri}" |
47 |
+ dosym "../../opt/${P}/bin/${cargo_miri}" "/usr/bin/${cargo_miri}" |
48 |
+ fi |
49 |
if use rls; then |
50 |
local rls=rls-bin-${PV} |
51 |
mv "${D}/opt/${P}/bin/rls" "${D}/opt/${P}/bin/${rls}" || die |
52 |
@@ -177,6 +186,10 @@ src_install() { |
53 |
echo /usr/bin/clippy-driver >> "${T}/provider-${P}" |
54 |
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" |
55 |
fi |
56 |
+ if use miri; then |
57 |
+ echo /usr/bin/miri >> "${T}/provider-${P}" |
58 |
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}" |
59 |
+ fi |
60 |
if use rls; then |
61 |
echo /usr/bin/rls >> "${T}/provider-${P}" |
62 |
fi |