aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2017-10-12 18:51:00 +0800
committertobik <tobik@FreeBSD.org>2017-10-12 18:51:00 +0800
commit764c66d1cba287f7ecec54220465dfe60621e80c (patch)
treef61bef2aa5af89cd34221e5c0e01ba04158a0534 /Mk/Uses
parent008d57c0ed28c857886ffffdb98ca2063699c6f9 (diff)
downloadfreebsd-ports-gnome-764c66d1cba287f7ecec54220465dfe60621e80c.tar.gz
freebsd-ports-gnome-764c66d1cba287f7ecec54220465dfe60621e80c.tar.zst
freebsd-ports-gnome-764c66d1cba287f7ecec54220465dfe60621e80c.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