Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 08 Jan 2019 23:40:59
Message-Id: 1546990823.3a324245485e1430f779c316315ce367886cb594.gyakovlev@gentoo
1 commit: 3a324245485e1430f779c316315ce367886cb594
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 7 03:34:14 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 8 23:40:23 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a324245
7
8 cargo.eclass: allow passing additional arguments to cargo
9
10 for example:
11
12 src_compile() {
13 cargo_src_compile --features pcre2
14 }
15
16 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
17
18 eclass/cargo.eclass | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21 diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
22 index 50f7830c51b..06c85ce9de8 100644
23 --- a/eclass/cargo.eclass
24 +++ b/eclass/cargo.eclass
25 @@ -1,4 +1,4 @@
26 -# Copyright 1999-2018 Gentoo Authors
27 +# Copyright 1999-2019 Gentoo Authors
28 # Distributed under the terms of the GNU General Public License v2
29
30 # @ECLASS: cargo.eclass
31 @@ -122,7 +122,7 @@ cargo_src_compile() {
32
33 export CARGO_HOME="${ECARGO_HOME}"
34
35 - cargo build -j $(makeopts_jobs) $(usex debug "" --release) \
36 + cargo build -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
37 || die "cargo build failed"
38 }
39
40 @@ -132,7 +132,7 @@ cargo_src_compile() {
41 cargo_src_install() {
42 debug-print-function ${FUNCNAME} "$@"
43
44 - cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") \
45 + cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") "$@" \
46 || die "cargo install failed"
47 rm -f "${D}/usr/.crates.toml"