summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2008-11-15 20:25:34 +0000
committerminskim <minskim@pkgsrc.org>2008-11-15 20:25:34 +0000
commit9d21508d1a3575431b2864386d470902ad7cabbe (patch)
tree08926f444ec6b2f87aaf39a7e6d1d28e894e20e8 /mk
parent492b7040ee42df35ac2ec8cad5649633fca45b85 (diff)
downloadpkgsrc-9d21508d1a3575431b2864386d470902ad7cabbe.tar.gz
Decompress .lzma files with lzcat.
Diffstat (limited to 'mk')
-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 adc3a00f33e..c2ab65f3d3e 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.10 2008/05/25 20:02:02 joerg Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.11 2008/11/15 20:25:34 minskim Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -53,6 +53,9 @@ USE_TOOLS+= pax
!empty(EXTRACT_ONLY:M*.tbz2)
USE_TOOLS+= bzcat
.endif
+.if !empty(EXTRACT_ONLY:M*.lzma)
+USE_TOOLS+= lzcat
+.endif
.if !empty(EXTRACT_ONLY:M*.zip)
USE_TOOLS+= unzip
.endif
diff --git a/mk/extract/extract b/mk/extract/extract
index 62d8b1ee76d..b57e842527a 100755
--- a/mk/extract/extract
+++ b/mk/extract/extract
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: extract,v 1.7 2007/07/31 17:42:40 jlam Exp $
+# $NetBSD: extract,v 1.8 2008/11/15 20:25:34 minskim Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -181,6 +181,7 @@ esac
case "$distfile" in
*.gz|*.tgz|*.z) _cformat=gzip ;;
*.bz2|*.tbz|*.tbz2|*.bz) _cformat=bzip ;;
+*.lzma) _cformat=lzma ;;
*.Z) _cformat=compress ;;
*) _cformat=none ;;
esac
@@ -192,13 +193,14 @@ ${TEST} -n "$cformat" || cformat="$_cformat"
case "$cformat" in
gzip|compress) decompress_cat="${GZCAT}" ;;
bzip) decompress_cat="${BZCAT}" ;;
+lzma) decompress_cat="${LZCAT}" ;;
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.Z|*.tar.z|*.tar|*.tar.bz)
+*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.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 3a53de641d6..3a056f0b2fa 100644
--- a/mk/extract/extract.mk
+++ b/mk/extract/extract.mk
@@ -1,4 +1,4 @@
-# $NetBSD: extract.mk,v 1.28 2008/05/26 13:39:08 joerg Exp $
+# $NetBSD: extract.mk,v 1.29 2008/11/15 20:25:34 minskim Exp $
#
# The following variables may be set by the package Makefile and
# specify how extraction happens:
@@ -165,6 +165,7 @@ _EXTRACT_ENV+= ${TOOLS_CP:D CP=${TOOLS_CP:Q}}
_EXTRACT_ENV+= ${TOOLS_ECHO:D ECHO=${TOOLS_ECHO:Q}}
_EXTRACT_ENV+= ${TOOLS_CMDLINE.gzcat:D GZCAT=${TOOLS_CMDLINE.gzcat:Q}}
_EXTRACT_ENV+= ${TOOLS_LHA:D LHA=${TOOLS_LHA:Q}}
+_EXTRACT_ENV+= ${TOOLS_LZCAT:D LZCAT=${TOOLS_LZCAT:Q}}
_EXTRACT_ENV+= ${TOOLS_MKDIR:D MKDIR=${TOOLS_MKDIR:Q}}
_EXTRACT_ENV+= ${TOOLS_RM:D RM=${TOOLS_RM:Q}}
_EXTRACT_ENV+= ${TOOLS_RPM2PKG:D RPM2PKG=${TOOLS_RPM2PKG:Q}}