svn commit: r476623 - head/Mk/Uses

Tobias Kortkamp tobik at FreeBSD.org
Tue Aug 7 19:55:33 UTC 2018


Author: tobik
Date: Tue Aug  7 19:55:32 2018
New Revision: 476623
URL: https://svnweb.freebsd.org/changeset/ports/476623

Log:
  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 <tom at hur.st>

Modified:
  head/Mk/Uses/cargo.mk

Modified: head/Mk/Uses/cargo.mk
==============================================================================
--- head/Mk/Uses/cargo.mk	Tue Aug  7 19:42:37 2018	(r476622)
+++ head/Mk/Uses/cargo.mk	Tue Aug  7 19:55:32 2018	(r476623)
@@ -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
 


More information about the svn-ports-all mailing list