diff options
author | nia <nia@pkgsrc.org> | 2020-06-14 15:33:27 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-06-14 15:33:27 +0000 |
commit | 6126f20f213effac25d2b477408cb022d7795aae (patch) | |
tree | 883c3889f85a9a0b583726a3b6ffaa4cf9123229 /lang/rust/cargo.mk | |
parent | 8ee5b232965adfd9937fc7cf874314933b58a950 (diff) | |
download | pkgsrc-6126f20f213effac25d2b477408cb022d7795aae.tar.gz |
Rename rust-bin's PKGNAME to rust-bin. Add rust.mk for rust packages.
This allows rust-bin and rust to coexist in bulk builds (for testing, etc),
but the packages still may not be installed at the same time.
rust.mk as a solution for picking the correct rust variant was suggested
by gdt@. It is intended to be included directly by packages that do not
use cargo.mk, and indirectly by packages that do use cargo.mk.
rust.mk provides one user-settable variable:
RUST_TYPE
as before, whether to bootstrap rust from source or use
official binaries. may be "src" or "bin"
And two package-settable variables:
RUST_REQ
the minimum version of Rust required by the package.
defaults to "1.20.0"
RUST_RUNTIME
whether Rust is a runtime dependency, may be "yes" or "no"
Diffstat (limited to 'lang/rust/cargo.mk')
-rw-r--r-- | lang/rust/cargo.mk | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk index abba173d573..3195eca1206 100644 --- a/lang/rust/cargo.mk +++ b/lang/rust/cargo.mk @@ -1,4 +1,4 @@ -# $NetBSD: cargo.mk,v 1.16 2020/06/14 11:19:34 rillig Exp $ +# $NetBSD: cargo.mk,v 1.17 2020/06/14 15:33:27 nia Exp $ # # Common logic that can be used by packages that depend on cargo crates # from crates.io. This lets existing pkgsrc infrastructure fetch and verify @@ -22,13 +22,7 @@ MASTER_SITES?= -${MASTER_SITE_CRATESIO}${PKGBASE}/${PKGVERSION_NOREV}/download -.include "type.mk" - -.if ${RUST_TYPE} != "bin" -BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust -.else -BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust-bin -.endif +.include "../../lang/rust/rust.mk" USE_TOOLS+= bsdtar digest CARGO_VENDOR_DIR= ${WRKDIR}/vendor |