1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

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
This commit is contained in:
Tobias Kortkamp 2017-10-12 10:51:00 +00:00
parent fef5c71e47
commit 3bd9ad9532
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=451845

View File

@ -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