1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

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.
This commit is contained in:
Tobias Kortkamp 2019-06-10 10:56:04 +00:00
parent 4b3a895599
commit 4eab6d1261
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=503890

View File

@ -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"