From nobody Sun Nov 07 15:28:26 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6F64C1846247; Sun, 7 Nov 2021 15:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HnJ6f2g4vz3PtN; Sun, 7 Nov 2021 15:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3201A2007C; Sun, 7 Nov 2021 15:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A7FSQfV047698; Sun, 7 Nov 2021 15:28:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A7FSQRv047697; Sun, 7 Nov 2021 15:28:26 GMT (envelope-from git) Date: Sun, 7 Nov 2021 15:28:26 GMT Message-Id: <202111071528.1A7FSQRv047697@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tobias Kortkamp Subject: git: d2eb03d1c0d3 - main - Uses/cargo: Make it easier to build ports with out-of-tree toolchain List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tobik X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2eb03d1c0d343b2fe350b9079f6c54dfcfbaa1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tobik: URL: https://cgit.FreeBSD.org/ports/commit/?id=d2eb03d1c0d343b2fe350b9079f6c54dfcfbaa1f commit d2eb03d1c0d343b2fe350b9079f6c54dfcfbaa1f Author: Tobias Kortkamp AuthorDate: 2021-11-07 14:08:57 +0000 Commit: Tobias Kortkamp CommitDate: 2021-11-07 15:24:13 +0000 Uses/cargo: Make it easier to build ports with out-of-tree toolchain - CARGO_CARGO_BIN -> CARGO - Add RUSTC and RUSTDOC for overriding rustc and rustdoc --- Mk/Uses/cargo.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index 76b44f3f2ba3..1da833d29c4f 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -100,8 +100,10 @@ CARGO_BUILDDEP?= yes BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.56.0:lang/${RUST_DEFAULT} .endif -# Location of cargo binary (default to lang/rust's Cargo binary) -CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo +# Location of toolchain (default to lang/rust's toolchain) +CARGO?= ${LOCALBASE}/bin/cargo +RUSTC?= ${LOCALBASE}/bin/rustc +RUSTDOC?= ${LOCALBASE}/bin/rustdoc # Location of the cargo output directory. CARGO_TARGET_DIR?= ${WRKDIR}/target @@ -124,8 +126,8 @@ CARGO_ENV+= \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ CARGO_TARGET_${CARGO_BUILD_TARGET:S/-/_/g:tu}_LINKER="${CC}" \ RUST_BACKTRACE=1 \ - RUSTC=${LOCALBASE}/bin/rustc \ - RUSTDOC=${LOCALBASE}/bin/rustdoc \ + RUSTC=${RUSTC} \ + RUSTDOC=${RUSTDOC} \ RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:C/.+/-C link-arg=&/}" # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk @@ -143,7 +145,7 @@ STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip .endif # Helper to shorten cargo calls. -_CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO_CARGO_BIN} +_CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} # User arguments for cargo targets.