public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Georgy Yakovlev <gyakovlev@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Georgy Yakovlev <gyakovlev@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/2] cargo.eclass: allow passing additional arguments to cargo
Date: Mon,  7 Jan 2019 12:33:50 -0800	[thread overview]
Message-ID: <20190107203351.5406-1-gyakovlev@gentoo.org> (raw)
In-Reply-To: <w6gtvil0vxe.fsf@kph.uni-mainz.de>

for example:

src_compile() {
	cargo_src_compile $(usex pcre "--features pcre2" "")"
}

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 eclass/cargo.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 50f7830c51b..06c85ce9de8 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: cargo.eclass
@@ -122,7 +122,7 @@ cargo_src_compile() {
 
 	export CARGO_HOME="${ECARGO_HOME}"
 
-	cargo build -j $(makeopts_jobs) $(usex debug "" --release) \
+	cargo build -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
 		|| die "cargo build failed"
 }
 
@@ -132,7 +132,7 @@ cargo_src_compile() {
 cargo_src_install() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") \
+	cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") "$@" \
 		|| die "cargo install failed"
 	rm -f "${D}/usr/.crates.toml"
 
-- 
2.20.1



  reply	other threads:[~2019-01-07 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  4:01 [gentoo-dev] [PATCH 1/2] cargo.eclass: allow passing additional arguments to cargo Georgy Yakovlev
2019-01-07  4:01 ` [gentoo-dev] [PATCH 2/2] cargo.eclass: add standard src_test Georgy Yakovlev
2019-01-07  7:27 ` [gentoo-dev] [PATCH 1/2] cargo.eclass: allow passing additional arguments to cargo Ulrich Mueller
2019-01-07 20:33   ` Georgy Yakovlev [this message]
2019-01-07 20:33     ` [gentoo-dev] [PATCH 2/2] cargo.eclass: add standard src_test Georgy Yakovlev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190107203351.5406-1-gyakovlev@gentoo.org \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox