diff options
author | shattered <shattered@pkgsrc.org> | 2013-11-16 07:45:26 +0000 |
---|---|---|
committer | shattered <shattered@pkgsrc.org> | 2013-11-16 07:45:26 +0000 |
commit | 7bd92bf13e6df71a0d8a2751486284ced8b1cb96 (patch) | |
tree | ae4625dae335f7c5a7fd6762f52f9783effb94ce | |
parent | 3462284071beee133651c29dd397767ed7f9000d (diff) | |
download | pkgsrc-7bd92bf13e6df71a0d8a2751486284ced8b1cb96.tar.gz |
Decompress .lz files with lzip.
-rw-r--r-- | mk/extract/bsd.extract-vars.mk | 5 | ||||
-rwxr-xr-x | mk/extract/extract | 7 | ||||
-rw-r--r-- | mk/tools/replace.mk | 13 |
3 files changed, 21 insertions, 4 deletions
diff --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk index 6350ba1a232..0cb357b0ed5 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.15 2013/04/12 12:38:14 obache Exp $ +# $NetBSD: bsd.extract-vars.mk,v 1.16 2013/11/16 07:45:26 shattered 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*.lz) +USE_TOOLS+= lzip +.endif .if !empty(EXTRACT_ONLY:M*.lzma) USE_TOOLS+= xzcat .endif diff --git a/mk/extract/extract b/mk/extract/extract index c1a7ea85774..7edd05f71f1 100755 --- a/mk/extract/extract +++ b/mk/extract/extract @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: extract,v 1.15 2013/02/28 18:26:22 jperkin Exp $ +# $NetBSD: extract,v 1.16 2013/11/16 07:45:26 shattered Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -108,6 +108,7 @@ set -u # treat undefined variables as errors : ${GEM:="gem unpack"} : ${GZCAT:="gzip -cd"} : ${LHA:=lha} +: ${LZCAT:="lzip -cd"} : ${MKDIR:=mkdir} : ${PAX:=pax} : ${RM:=rm} @@ -184,6 +185,7 @@ case "$distfile" in *.gz|*.tgz|*.z) _cformat=gzip ;; *.7z) _cformat=7z ;; *.bz2|*.tbz|*.tbz2|*.bz) _cformat=bzip ;; +*.lz) _cformat=lzip ;; *.lzma) _cformat=lzma ;; *.xz) _cformat=xz ;; *.Z) _cformat=compress ;; @@ -198,6 +200,7 @@ case "$cformat" in gzip|compress) decompress_cat="${GZCAT}" ;; 7z) decompress_cat="${P7ZA_SO}" ;; bzip) decompress_cat="${BZCAT}" ;; +lzip) decompress_cat="${LZCAT}" ;; lzma) decompress_cat="${XZCAT}" ;; xz) decompress_cat="${XZCAT}" ;; none) decompress_cat="${CAT}" ;; @@ -206,7 +209,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.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) _format=tar ;; *.cpio|*.cpio.gz|*.cpio.bz2) _format=cpio ;; diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index 4d9746984ba..490c311f576 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.263 2013/11/06 13:12:50 obache Exp $ +# $NetBSD: replace.mk,v 1.264 2013/11/16 07:45:26 shattered Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -584,6 +584,17 @@ TOOLS_PATH.lha= ${TOOLS_PREFIX.lha}/bin/lha . endif .endif +.if !defined(TOOLS_IGNORE.lzip) && !empty(_USE_TOOLS:Mlzip) +. if !empty(PKGPATH:Marchivers/lzip) +MAKEFLAGS+= TOOLS_IGNORE.lzip= +. elif !empty(_TOOLS_USE_PKGSRC.lzip:M[yY][eE][sS]) +TOOLS_DEPENDS.lzcat?= lzip>=1.14:../../archivers/lzip +TOOLS_CREATE+= lzip +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lzip=lzip +TOOLS_PATH.lzip= ${TOOLS_PREFIX.lzip}/bin/lzip +. endif +.endif + .if !defined(TOOLS_IGNORE.lzcat) && !empty(_USE_TOOLS:Mlzcat) . if !empty(PKGPATH:Marchivers/xz) MAKEFLAGS+= TOOLS_IGNORE.lzcat= |