diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2019-12-22 21:30:33 -0600 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2019-12-26 17:59:29 -0800 |
commit | 43c2a717e665e94232f46379013706959207c51a (patch) | |
tree | 3d6af6c0ddb30b4965a991af9e2449d53ca2b4eb /eclass | |
parent | dev-python/ipykernel: do not mangle the python call. (diff) | |
download | gentoo-43c2a717e665e94232f46379013706959207c51a.tar.gz gentoo-43c2a717e665e94232f46379013706959207c51a.tar.bz2 gentoo-43c2a717e665e94232f46379013706959207c51a.zip |
eclass/cargo.eclass: specify --path . to install
cargo install has long required --path . for 2018 edition crates but not
required it for 2015 edition crates. It is supported however for 2015
edition crates and works for all versions in the tree so it makes sense
to make it the default. Added CARGO_INSTALL_PATH as an eclass variable
allowing to override the default.
Closes: https://bugs.gentoo.org/703590
Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/14097
Tested-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cargo.eclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 13dd5c355fb3..fb759f95903f 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -34,6 +34,11 @@ IUSE="${IUSE} debug" ECARGO_HOME="${WORKDIR}/cargo_home" ECARGO_VENDOR="${ECARGO_HOME}/gentoo" +# @ECLASS-VARIABLE: CARGO_INSTALL_PATH +# @DESCRIPTION: +# Allows overriding the default cwd to run cargo install from +: ${CARGO_INSTALL_PATH:=.} + # @FUNCTION: cargo_crate_uris # @DESCRIPTION: # Generates the URIs to put in SRC_URI to help fetch dependencies. @@ -156,7 +161,8 @@ cargo_src_compile() { cargo_src_install() { debug-print-function ${FUNCNAME} "$@" - cargo install -vv -j $(makeopts_jobs) --root="${ED}/usr" $(usex debug --debug "") "$@" \ + cargo install -vv -j $(makeopts_jobs) --path ${CARGO_INSTALL_PATH} \ + --root="${ED}/usr" $(usex debug --debug "") "$@" \ || die "cargo install failed" rm -f "${ED}/usr/.crates.toml" |