diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-02-15 12:04:50 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-02-15 12:04:50 +0000 |
commit | 5aa07820a63aa61220d9a6d1236ec32976740a8e (patch) | |
tree | 2bf19262dad24296ad6ad7d1d4908ed4c86779b0 /Mk | |
parent | 382258c71f0213eba7fe1dc18153b2511aff6d70 (diff) | |
download | freebsd-ports-5aa07820a63aa61220d9a6d1236ec32976740a8e.zip |
Add a CRATESIO entry for crates.io to bsd.sites.mk
Switch cargo.mk over to it.
Differential Revision: https://reviews.freebsd.org/D19133
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/cargo.mk | 5 | ||||
-rw-r--r-- | Mk/bsd.sites.mk | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index f678c9c4b211..072964e30a1e 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -30,15 +30,12 @@ CARGO_VENDOR_DIR?= ${WRKSRC}/cargo-crates 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 diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk index ccd3ce64299d..f03a5207ec25 100644 --- a/Mk/bsd.sites.mk +++ b/Mk/bsd.sites.mk @@ -130,6 +130,10 @@ MASTER_SITE_CRAN+= \ 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 @@ MASTER_SITES_SUBDIRS= APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \ 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} \ |