pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc
Module Name: pkgsrc
Committed By: minskim
Date: Tue Oct 23 16:39:29 UTC 2018
Modified Files:
pkgsrc/lang/rust: cargo.mk
pkgsrc/mk/extract: extract
Log Message:
lang/rust: Extract .cargo without making a copy in ${WRKDIR}
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/rust/cargo.mk
cvs rdiff -u -r1.17 -r1.18 pkgsrc/mk/extract/extract
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/rust/cargo.mk
diff -u pkgsrc/lang/rust/cargo.mk:1.3 pkgsrc/lang/rust/cargo.mk:1.4
--- pkgsrc/lang/rust/cargo.mk:1.3 Fri Sep 21 21:26:33 2018
+++ pkgsrc/lang/rust/cargo.mk Tue Oct 23 16:39:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.3 2018/09/21 21:26:33 minskim Exp $
+# $NetBSD: cargo.mk,v 1.4 2018/10/23 16:39:29 minskim Exp $
#
# Common logic that can be used by packages that depend on cargo crates
# from crates.io. This lets existing pkgsrc infrastructure fetch and verify
@@ -29,6 +29,7 @@ DISTFILES?= ${DEFAULT_DISTFILES}
.for _crate in ${CARGO_CRATE_DEPENDS}
DISTFILES+= ${_crate}.crate
SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9.]+$//}/${_crate:C/^.*-([0-9.]+)$/\1/}/download
+EXTRACT_DIR.${_crate}.crate?= ${CARGO_VENDOR_DIR}
.endfor
post-extract: cargo-vendor-crates
@@ -39,9 +40,8 @@ cargo-vendor-crates:
${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" >> ${WRKSRC}/.cargo/config
${RUN}${MKDIR} ${CARGO_VENDOR_DIR}
.for _crate in ${CARGO_CRATE_DEPENDS}
- ${RUN}${TOOLS_PATH.bsdtar} -C ${CARGO_VENDOR_DIR} -xzf ${WRKDIR}/${_crate}.crate
${RUN}${PRINTF} '{"package":"%s","files":{}}' \
- $$(${DIGEST} sha256 < ${WRKDIR}/${_crate}.crate) \
+ $$(${DIGEST} sha256 < ${_DISTDIR}/${_crate}.crate) \
> ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json
.endfor
Index: pkgsrc/mk/extract/extract
diff -u pkgsrc/mk/extract/extract:1.17 pkgsrc/mk/extract/extract:1.18
--- pkgsrc/mk/extract/extract:1.17 Wed Aug 22 20:48:37 2018
+++ pkgsrc/mk/extract/extract Tue Oct 23 16:39:29 2018
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: extract,v 1.17 2018/08/22 20:48:37 maya Exp $
+# $NetBSD: extract,v 1.18 2018/10/23 16:39:29 minskim Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -175,7 +175,7 @@ esac
# Derive the compression format of the archive based on the file extension.
case "$distfile" in
-*.gz|*.tgz|*.z) _cformat=gzip ;;
+*.gz|*.tgz|*.z|*.crate) _cformat=gzip ;;
*.7z) _cformat=7z ;;
*.bz2|*.tbz|*.tbz2|*.bz) _cformat=bzip ;;
*.lz) _cformat=lzip ;;
@@ -202,7 +202,7 @@ esac
# Derive the format of the archive based on the file extension.
case "$distfile" in
-*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z)
+*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z|*.crate)
_format=tar ;;
*.cpio|*.cpio.gz|*.cpio.bz2)
_format=cpio ;;
Home |
Main Index |
Thread Index |
Old Index