aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2017-10-12 18:51:00 +0800
committerKoop Mast <kwm@rainbow-runner.nl>2018-02-04 05:43:19 +0800
commit98d91abe0a036fda394be1ae60bd245d85fe7c18 (patch)
tree1a476c1e366ea9e990b808dc0551a21734231ead /Mk/Uses
parent948ad0a345e0fa2b79a41c403694b544df3e64bb (diff)
downloadfreebsd-ports-gnome-98d91abe0a036fda394be1ae60bd245d85fe7c18.tar.gz
freebsd-ports-gnome-98d91abe0a036fda394be1ae60bd245d85fe7c18.tar.zst
freebsd-ports-gnome-98d91abe0a036fda394be1ae60bd245d85fe7c18.zip
Mk/Uses/cargo.mk: Fix crate name and version split
cargo.mk is a little too eager in splitting a crate's name and version in two when the version contains a dash (e.g. csv-1.0.0-beta.4) and the wrong URL ends up being used in MASTER_SITES e.g. .../csv-1.0.0/beta.4/download/... instead of the correct one .../csv/1.0.0-beta.4/download/... Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D12628
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/cargo.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 54d4b323ce9c..1037df26792b 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -38,7 +38,7 @@ CARGO_DIST_SUBDIR?= rust/crates
# Generate list of DISTFILES.
.for _crate in ${CARGO_CRATES}
-MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/-[^-]*$//}/${_crate:C/^.*-//}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g}
+MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/-[0-9].*$//}/${_crate:C/^.*-([0-9].*)/\1/}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g}
DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:S/-//g:S/.//g}
.endfor