Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2019 10:56:05 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r503890 - head/Mk/Uses
Message-ID:  <201906101056.x5AAu5D3045469@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jun 10 10:56:04 2019
New Revision: 503890
URL: https://svnweb.freebsd.org/changeset/ports/503890

Log:
  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.

Modified:
  head/Mk/Uses/cargo.mk

Modified: head/Mk/Uses/cargo.mk
==============================================================================
--- head/Mk/Uses/cargo.mk	Mon Jun 10 10:40:39 2019	(r503889)
+++ head/Mk/Uses/cargo.mk	Mon Jun 10 10:56:04 2019	(r503890)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906101056.x5AAu5D3045469>