Index: head/Mk/Uses/cargo.mk =================================================================== --- head/Mk/Uses/cargo.mk +++ head/Mk/Uses/cargo.mk @@ -30,15 +30,12 @@ CARGO_CARGOTOML?= ${WRKSRC}/Cargo.toml CARGO_CARGOLOCK?= ${WRKSRC}/Cargo.lock -# Define MASTER_SITES_CRATESIO for crates.io -MASTER_SITES_CRATESIO= https://crates.io/api/v1/crates - # Save crates inside ${DISTDIR}/rust/crates by default. CARGO_DIST_SUBDIR?= rust/crates # Generate list of DISTFILES. .for _crate in ${CARGO_CRATES} -MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/^(.*)-[0-9].*/\1/}/${_crate:C/^.*-([0-9].*)/\1/}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g} +MASTER_SITES+= CRATESIO/${_crate:C/^(.*)-[0-9].*/\1/}/${_crate:C/^.*-([0-9].*)/\1/}:cargo_${_crate:S/-//g:S/.//g} DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:S/-//g:S/.//g} .endfor Index: head/Mk/bsd.sites.mk =================================================================== --- head/Mk/bsd.sites.mk +++ head/Mk/bsd.sites.mk @@ -130,6 +130,10 @@ MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,} .endif +.if !defined(IGNORE_MASTER_SITE_CRATESIO) +MASTER_SITE_CRATESIO+= https://crates.io/api/v1/crates/%SUBDIR%/download?dummy=/ +.endif + .if !defined(IGNORE_MASTER_SITE_DEBIAN) MASTER_SITE_DEBIAN+= \ http://cdn.debian.net/debian/%SUBDIR%/ \ @@ -1240,6 +1244,7 @@ APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \ BERLIOS:${PORTNAME:tl}.berlios \ CHEESESHOP:source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:S/-${DISTVERSIONFULL}$//} \ + CRATESIO:${PORTNAME}/${DISTVERSIONFULL} \ DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \ FARSIGHT:${PORTNAME} \ FESTIVAL:${PORTVERSION} \