pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Decompress .lz files with lzip.
details: https://anonhg.NetBSD.org/pkgsrc/rev/d808835bba3d
branches: trunk
changeset: 626586:d808835bba3d
user: shattered <shattered%pkgsrc.org@localhost>
date: Sat Nov 16 07:45:26 2013 +0000
description:
Decompress .lz files with lzip.
diffstat:
mk/extract/bsd.extract-vars.mk | 5 ++++-
mk/extract/extract | 7 +++++--
mk/tools/replace.mk | 13 ++++++++++++-
3 files changed, 21 insertions(+), 4 deletions(-)
diffs (90 lines):
diff -r b4efd14d472a -r d808835bba3d mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk Sat Nov 16 07:45:00 2013 +0000
+++ b/mk/extract/bsd.extract-vars.mk Sat Nov 16 07:45:26 2013 +0000
@@ -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 @@
!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 -r b4efd14d472a -r d808835bba3d mk/extract/extract
--- a/mk/extract/extract Sat Nov 16 07:45:00 2013 +0000
+++ b/mk/extract/extract Sat Nov 16 07:45:26 2013 +0000
@@ -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 @@
: ${GEM:="gem unpack"}
: ${GZCAT:="gzip -cd"}
: ${LHA:=lha}
+: ${LZCAT:="lzip -cd"}
: ${MKDIR:=mkdir}
: ${PAX:=pax}
: ${RM:=rm}
@@ -184,6 +185,7 @@
*.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 @@
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 @@
# 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 -r b4efd14d472a -r d808835bba3d mk/tools/replace.mk
--- a/mk/tools/replace.mk Sat Nov 16 07:45:00 2013 +0000
+++ b/mk/tools/replace.mk Sat Nov 16 07:45:26 2013 +0000
@@ -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 @@
. 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=
Home |
Main Index |
Thread Index |
Old Index