aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-06-10 10:56:04 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-06-10 10:56:04 +0000
commit4eab6d1261489035440e5973f12060d03dc98076 (patch)
tree383b72f18e8199c6668f8be43715291f1ed72902 /Mk
parent4b3a8955991d577e0999140492faa832e4932df5 (diff)
downloadports-4eab6d1261489035440e5973f12060d03dc98076.tar.gz
ports-4eab6d1261489035440e5973f12060d03dc98076.zip
Mk/Uses/cargo.mk: Add CARGO_INSTALL_PATH knob
It can be used to overwrite the --path argument when calling `cargo install` to point cargo to different local crates to install. This might be necessary when ${WRKSRC}/Cargo.toml is only a virtual manifest.
Notes
Notes: svn path=/head/; revision=503890
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/cargo.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 368abcaa8255..92dbc41102d5 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -86,6 +86,7 @@ CARGO_CARGO_RUN= \
# User arguments for cargo targets.
CARGO_BUILD_ARGS?=
CARGO_INSTALL_ARGS?=
+CARGO_INSTALL_PATH?= .
CARGO_TEST_ARGS?=
CARGO_UPDATE_ARGS?=
@@ -257,12 +258,14 @@ do-build:
.if !target(do-install) && ${CARGO_INSTALL:tl} == "yes"
do-install:
+. for path in ${CARGO_INSTALL_PATH}
@${CARGO_CARGO_RUN} install \
- --path . \
+ --path "${path}" \
--root "${STAGEDIR}${PREFIX}" \
--verbose \
${CARGO_INSTALL_ARGS}
@${RM} -- "${STAGEDIR}${PREFIX}/.crates.toml"
+. endfor
.endif
.if !target(do-test) && ${CARGO_TEST:tl} == "yes"