pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/extract Uncompress .xz using xzcat.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e5fc59f20632
branches:  trunk
changeset: 395503:e5fc59f20632
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Wed Jul 08 13:27:52 2009 +0000

description:
Uncompress .xz using xzcat.

diffstat:

 mk/extract/bsd.extract-vars.mk |  5 ++++-
 mk/extract/extract             |  6 ++++--
 mk/extract/extract.mk          |  3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

diffs (71 lines):

diff -r 567315302b07 -r e5fc59f20632 mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk    Wed Jul 08 12:54:57 2009 +0000
+++ b/mk/extract/bsd.extract-vars.mk    Wed Jul 08 13:27:52 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.11 2008/11/15 20:25:34 minskim Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.12 2009/07/08 13:27:52 minskim Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -56,6 +56,9 @@
 .if !empty(EXTRACT_ONLY:M*.lzma)
 USE_TOOLS+=    lzcat
 .endif
+.if !empty(EXTRACT_ONLY:M*.xz)
+USE_TOOLS+=    xzcat
+.endif
 .if !empty(EXTRACT_ONLY:M*.zip)
 USE_TOOLS+=    unzip
 .endif
diff -r 567315302b07 -r e5fc59f20632 mk/extract/extract
--- a/mk/extract/extract        Wed Jul 08 12:54:57 2009 +0000
+++ b/mk/extract/extract        Wed Jul 08 13:27:52 2009 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: extract,v 1.8 2008/11/15 20:25:34 minskim Exp $
+# $NetBSD: extract,v 1.9 2009/07/08 13:27:52 minskim Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -182,6 +182,7 @@
 *.gz|*.tgz|*.z)                        _cformat=gzip ;;
 *.bz2|*.tbz|*.tbz2|*.bz)       _cformat=bzip ;;
 *.lzma)                                _cformat=lzma ;;
+*.xz)                          _cformat=xz ;;
 *.Z)                           _cformat=compress ;;
 *)                             _cformat=none ;;
 esac
@@ -194,13 +195,14 @@
 gzip|compress) decompress_cat="${GZCAT}" ;;
 bzip)          decompress_cat="${BZCAT}" ;;
 lzma)          decompress_cat="${LZCAT}" ;;
+xz)            decompress_cat="${XZCAT}" ;;
 none)          decompress_cat="${CAT}" ;;
 *)             decompress_cat="${CAT}" ;;
 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.lzma|*.tar.Z|*.tar.z|*.tar|*.tar.bz)
+*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz)
                _format=tar ;;
 *.cpio|*.cpio.gz|*.cpio.bz2)
                _format=cpio ;;
diff -r 567315302b07 -r e5fc59f20632 mk/extract/extract.mk
--- a/mk/extract/extract.mk     Wed Jul 08 12:54:57 2009 +0000
+++ b/mk/extract/extract.mk     Wed Jul 08 13:27:52 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: extract.mk,v 1.29 2008/11/15 20:25:34 minskim Exp $
+# $NetBSD: extract.mk,v 1.30 2009/07/08 13:27:52 minskim Exp $
 #
 # The following variables may be set by the package Makefile and
 # specify how extraction happens:
@@ -176,6 +176,7 @@
 _EXTRACT_ENV+= ${TOOLS_UNRAR:D         UNRAR=${TOOLS_UNRAR:Q}}
 _EXTRACT_ENV+= ${TOOLS_UNZIP_CMD:D     UNZIP_CMD=${TOOLS_UNZIP_CMD:Q}}
 _EXTRACT_ENV+= ${TOOLS_UNZOO:D         UNZOO=${TOOLS_UNZOO:Q}}
+_EXTRACT_ENV+= ${TOOLS_XZCAT:D         XZCAT=${TOOLS_XZCAT:Q}}
 _EXTRACT_ENV+= ${EXTRACT_ENV}
 
 .if !empty(EXTRACT_USING:Mbsdtar)



Home | Main Index | Thread Index | Old Index