summaryrefslogtreecommitdiff
path: root/lang/rust
diff options
context:
space:
mode:
authorfox <fox@pkgsrc.org>2019-07-17 11:04:45 +0000
committerfox <fox@pkgsrc.org>2019-07-17 11:04:45 +0000
commit9f2634edab06f72551982d19bfb40ffc7da9ca82 (patch)
tree09b0c67b708cccf81cf38e9dc6037c75d3533b1b /lang/rust
parentd405d26756aba7768c87b038918f9e6800238317 (diff)
downloadpkgsrc-9f2634edab06f72551982d19bfb40ffc7da9ca82.tar.gz
rust: Modifies the regular expression to follow semver specification used by
crates. Previously, crates with a '-' outside the version and version with semver pre-release version and semver build metadata were not properly handled. Improvement suggestion by leot@ Tested all cargo.mk users in pkgsrc. This also addresses PR/54316.
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/cargo.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk
index 8dcf101a04d..5d2ec51b962 100644
--- a/lang/rust/cargo.mk
+++ b/lang/rust/cargo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.6 2018/11/27 15:45:23 adam Exp $
+# $NetBSD: cargo.mk,v 1.7 2019/07/17 11:04:45 fox 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
@@ -28,7 +28,7 @@ CARGO_VENDOR_DIR= ${WRKDIR}/vendor
DISTFILES?= ${DEFAULT_DISTFILES}
.for _crate in ${CARGO_CRATE_DEPENDS}
DISTFILES+= ${_crate}.crate
-SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9.]+$//}/${_crate:C/^.*-([0-9.]+)$/\1/}/download
+SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9]+\.[0-9.]+.*$//}/${_crate:C/^.*-([0-9]+\.[0-9.]+.*)$/\1/}/download
EXTRACT_DIR.${_crate}.crate?= ${CARGO_VENDOR_DIR}
.endfor