svn commit: r528945 - head/Mk/Uses
Tobias Kortkamp
tobik at FreeBSD.org
Mon Mar 23 03:57:28 UTC 2020
Author: tobik
Date: Mon Mar 23 03:57:26 2020
New Revision: 528945
URL: https://svnweb.freebsd.org/changeset/ports/528945
Log:
Mk/Uses/cargo.mk: Better deal with versions with build identifier suffixes
A crate spec like curl-sys-0.4.30+curl-7.69.1 was incorrectly
interpreted as having a name of 'curl-sys-0.4.30+curl' instead of
'curl-sys' and failed to fetch as a consequence.
Crate names can only be composed of a limited character set [1].
Limit the regular expressions to that set and make them less greedy.
[1] https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field
PR: 244977
Reported by: jbeich
Modified:
head/Mk/Uses/cargo.mk
Modified: head/Mk/Uses/cargo.mk
==============================================================================
--- head/Mk/Uses/cargo.mk Mon Mar 23 02:05:12 2020 (r528944)
+++ head/Mk/Uses/cargo.mk Mon Mar 23 03:57:26 2020 (r528945)
@@ -37,7 +37,7 @@ CARGO_DIST_SUBDIR?= rust/crates
# Generate list of DISTFILES.
.for _crate in ${CARGO_CRATES}
-MASTER_SITES+= CRATESIO/${_crate:C/^(.*)-[0-9].*/\1/}/${_crate:C/^.*-([0-9].*)/\1/}:cargo_${_crate:C/[^a-zA-Z0-9_]//g}
+MASTER_SITES+= CRATESIO/${_crate:C/^([-_a-zA-Z0-9]+)-[0-9].*/\1/}/${_crate:C/^[-_a-zA-Z0-9]+-([0-9].*)/\1/}:cargo_${_crate:C/[^a-zA-Z0-9_]//g}
DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:C/[^a-zA-Z0-9_]//g}
.endfor
More information about the svn-ports-all
mailing list