diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-03-23 03:57:26 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-03-23 03:57:26 +0000 |
commit | 5d337babdf83828dca4a8b8a591d96020463208e (patch) | |
tree | 29491a3c6c9b4adace2465571f1f0cdc5b743331 /Mk | |
parent | [NEW] devel/py-parameterized: Parameterized testing with any Python test fram... (diff) |
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
Notes
Notes:
svn path=/head/; revision=528945
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/cargo.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index e30d07ce0fe4..56f352b93feb 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -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 |