summaryrefslogtreecommitdiff
path: root/mk/extract
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2009-07-08 13:27:52 +0000
committerminskim <minskim@pkgsrc.org>2009-07-08 13:27:52 +0000
commitc8a7d69055e4f8e4c3d94583ab1df1c0fe1e1c80 (patch)
treea43a0c074ad3b0e7db9907ea436cccd430a9c44c /mk/extract
parente2a4ae30306ec5eb15a278c105d0fd428d652edd (diff)
downloadpkgsrc-c8a7d69055e4f8e4c3d94583ab1df1c0fe1e1c80.tar.gz
Uncompress .xz using xzcat.
Diffstat (limited to 'mk/extract')
-rw-r--r--mk/extract/bsd.extract-vars.mk5
-rwxr-xr-xmk/extract/extract6
-rw-r--r--mk/extract/extract.mk3
3 files changed, 10 insertions, 4 deletions
diff --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk
index c2ab65f3d3e..e077cfd41d9 100644
--- a/mk/extract/bsd.extract-vars.mk
+++ b/mk/extract/bsd.extract-vars.mk
@@ -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 @@ USE_TOOLS+= bzcat
.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 --git a/mk/extract/extract b/mk/extract/extract
index b57e842527a..a5893f00dc8 100755
--- a/mk/extract/extract
+++ b/mk/extract/extract
@@ -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 @@ case "$distfile" in
*.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 @@ case "$cformat" in
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 --git a/mk/extract/extract.mk b/mk/extract/extract.mk
index 3a056f0b2fa..effa00a85c3 100644
--- a/mk/extract/extract.mk
+++ b/mk/extract/extract.mk
@@ -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_TEST:D TEST=${TOOLS_TEST:Q}}
_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)