pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc lang/rust: Extract .cargo without making a copy in ${W...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4317aa7b66bd
branches:  trunk
changeset: 386592:4317aa7b66bd
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Tue Oct 23 16:39:29 2018 +0000

description:
lang/rust: Extract .cargo without making a copy in ${WRKDIR}

diffstat:

 lang/rust/cargo.mk |  6 +++---
 mk/extract/extract |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r b923a14b2fb4 -r 4317aa7b66bd lang/rust/cargo.mk
--- a/lang/rust/cargo.mk        Tue Oct 23 16:31:12 2018 +0000
+++ b/lang/rust/cargo.mk        Tue Oct 23 16:39:29 2018 +0000
@@ -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 @@
 .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 @@
        ${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
 
diff -r b923a14b2fb4 -r 4317aa7b66bd mk/extract/extract
--- a/mk/extract/extract        Tue Oct 23 16:31:12 2018 +0000
+++ b/mk/extract/extract        Tue Oct 23 16:39:29 2018 +0000
@@ -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 @@
 
 # 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 @@
 
 # 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