Date: Mon, 23 Mar 2020 03:57:26 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r528945 - head/Mk/Uses Message-ID: <202003230357.02N3vQBi019327@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003230357.02N3vQBi019327>