From bd81ca2b95e98e9dc98465494b2aae929f826d8b Mon Sep 17 00:00:00 2001 From: tobik Date: Tue, 7 Aug 2018 19:55:32 +0000 Subject: [PATCH] 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 --- Mk/Uses/cargo.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index ab3951b25b710..3969dd7cb0e53 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