summaryrefslogtreecommitdiff
path: root/lang/rust/cargo.mk
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-05-18 16:17:20 +0000
committernia <nia@pkgsrc.org>2020-05-18 16:17:20 +0000
commite0f068173539c267c86b9a92471163db419c4415 (patch)
treebb206ee521fdb3b44997e7993294b1e2f84a4e69 /lang/rust/cargo.mk
parent5d4353a4d8c4311949e93f340ad1e2eecfae9d4d (diff)
downloadpkgsrc-e0f068173539c267c86b9a92471163db419c4415.tar.gz
lang: Add rust-bin.
Dumb package that selects and installs a binary rust distribution based on its guess of your platform (FreeBSD, NetBSD, Linux x86_64 are all supported). These binaries are the official ones provided by rust upstream and are the same as those provided by the `rustup` tool. You can choose to use a binary rust distribution by setting: RUST_TYPE=bin in mk.conf (or source distribution with RUST_TYPE=src). Currently, RUST_TYPE=bin by default ONLY for NetBSD-x86_64. This is because TNF has been shown to _repeatedly_ be unable and _unwilling_ to ensure that rust-dependent packages build properly on their infrastructure, and NetBSD users are all suffering for it. This was based on minskim's work in pkgsrc-wip. It was tested by building librsvg and firefox-esr with the resulting binaries.
Diffstat (limited to 'lang/rust/cargo.mk')
-rw-r--r--lang/rust/cargo.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk
index 82fc0f533c9..0da62a8b8c0 100644
--- a/lang/rust/cargo.mk
+++ b/lang/rust/cargo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.11 2020/01/19 16:53:10 maya Exp $
+# $NetBSD: cargo.mk,v 1.12 2020/05/18 16:17:20 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,7 +22,13 @@
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
USE_TOOLS+= bsdtar digest
CARGO_VENDOR_DIR= ${WRKDIR}/vendor