aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-08-08 03:55:32 +0800
committertobik <tobik@FreeBSD.org>2018-08-08 03:55:32 +0800
commitbd81ca2b95e98e9dc98465494b2aae929f826d8b (patch)
tree77673339861993f2f3cd3a1e14d6497dce246570 /Mk/Uses
parent26493d759aceefc6297e4825a2e0dbefec8deaed (diff)
downloadfreebsd-ports-gnome-bd81ca2b95e98e9dc98465494b2aae929f826d8b.tar.gz
freebsd-ports-gnome-bd81ca2b95e98e9dc98465494b2aae929f826d8b.tar.zst
freebsd-ports-gnome-bd81ca2b95e98e9dc98465494b2aae929f826d8b.zip
Mk/Uses/cargo.mk: Fix crate name and version split (take 2)
cargo.mk is still too eager in splitting a crate's name and version in two when the name contains a dash followed by a number. For example with utf-8-0.7.4 the wrong URL ends up being used in MASTER_SITES .../utf/8-0.7.4/download/... instead of .../utf-8/0.7.4/download/... PR: 230413 Reported by: Thomas Hurst <tom@hur.st>
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 ab3951b25b71..3969dd7cb0e5 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/-[0-9].*$//}/${_crate:C/^.*-([0-9].*)/\1/}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g}
+MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/^(.*)-[0-9].*/\1/}/${_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