Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2018 19:55:32 +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: r476623 - head/Mk/Uses
Message-ID:  <201808071955.w77JtWRY030418@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808071955.w77JtWRY030418>