summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2014-02-27 00:20:57 +0000
committerChristoph Junghans <ottxor@gentoo.org>2014-02-27 00:20:57 +0000
commitbe29b11214f0572626589fc3bb6a51b5bc74e737 (patch)
treef64e07de151e9568375bd92d680874c3cd60868b /eclass
parentVersion bump. Update 9999 to match current release. Add "use logger" to init ... (diff)
downloadgentoo-2-be29b11214f0572626589fc3bb6a51b5bc74e737.tar.gz
gentoo-2-be29b11214f0572626589fc3bb6a51b5bc74e737.tar.bz2
gentoo-2-be29b11214f0572626589fc3bb6a51b5bc74e737.zip
added lzip support (bug #501912)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/unpacker.eclass16
2 files changed, 18 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index d7365152da2f..906ae4b02e3d 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1148 2014/02/25 13:01:49 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1149 2014/02/27 00:20:57 ottxor Exp $
+
+ 27 Feb 2014; Christoph Junghans <ottxor@gentoo.org> unpacker.eclass:
+ added lzip support (bug #501912)
25 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
Use git init+fetch rather than clone in order to fix checking out to
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 5756ca18c3aa..83dddfd16d14 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.15 2014/02/18 06:13:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.16 2014/02/27 00:20:57 ottxor Exp $
# @ECLASS: unpacker.eclass
# @MAINTAINER:
@@ -25,6 +25,13 @@ ___ECLASS_ONCE_UNPACKER="recur -_+^+_- spank"
# `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc" options.
# Note: this is meant for users to set, not ebuilds.
+# @ECLASS-VARIABLE: UNPACKER_LZIP
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Utility to use to decompress lzip files. Will dynamically pick between
+# `pdlzip` and `lzip`. Make sure your choice accepts the "-dc" options.
+# Note: this is meant for users to set, not ebuilds.
+
# for internal use only (unpack_pdv and unpack_makeself)
find_unpackable_file() {
local src=$1
@@ -344,6 +351,9 @@ _unpacker() {
comp="gzip -dc" ;;
*.lzma|*.xz|*.txz)
comp="xz -dc" ;;
+ *.lz)
+ : ${UNPACKER_LZIP:=$(type -P pdlzip || type -P lzip)}
+ comp="${UNPACKER_LZIP} -dc" ;;
*) comp="" ;;
esac
@@ -438,6 +448,8 @@ unpacker_src_uri_depends() {
d="app-arch/xz-utils" ;;
*.zip)
d="app-arch/unzip" ;;
+ *.lz)
+ d="|| ( app-arch/pdlzip app-arch/lzip )" ;;
esac
deps+=" ${d}"
done