summaryrefslogtreecommitdiff
path: root/lang/rust
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2019-12-03 02:09:06 +0000
committerminskim <minskim@pkgsrc.org>2019-12-03 02:09:06 +0000
commit275c50625685f99b72e99dd2df77190e819b48f4 (patch)
treecb65e24fccc414884baac49b4519c255a087dd87 /lang/rust
parent7604782c73a91b5e9d5e3e663f5c7e9080ff8a74 (diff)
downloadpkgsrc-275c50625685f99b72e99dd2df77190e819b48f4.tar.gz
lang/rust/cargo.mk: Set default values for cargo package variables
With these values, a Rust package downloads its own distfile from crates.io by default, and shares dependancy crate distfiles with other Rust packages to avoid multiple downloads.
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/cargo.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk
index b18e8f02d33..6dfffe309c7 100644
--- a/lang/rust/cargo.mk
+++ b/lang/rust/cargo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.8 2019/11/03 19:04:07 rillig Exp $
+# $NetBSD: cargo.mk,v 1.9 2019/12/03 02:09:06 minskim 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
@@ -20,6 +20,9 @@
#
# See also www/geckodriver for a full example.
+MASTER_SITES?= -${MASTER_SITE_CRATESIO}${PKGBASE}/${PKGVERSION_NOREV}/download
+DIST_SUBDIR?= crates.io
+
BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust
USE_TOOLS+= bsdtar digest