Add support for 7z, RAR and LHA/LZH.
Signed-off-by: Stephan Hartmann <
sultan@gentoo.org>
---
eclass/unpacker.eclass | 59 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index c9dab4345c9..74899fd77b7 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -4,7 +4,7 @@
# @ECLASS: unpacker.eclass
# @MAINTAINER:
#
base-system@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs
# @DESCRIPTION:
# Some extraneous file formats are not part of PMS, or are only in certain
@@ -16,7 +16,7 @@
# - support partial unpacks?
case ${EAPI:-0} in
- [567]) ;;
+ [5678]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -335,6 +335,47 @@ unpack_zip() {
[[ $? -le 1 ]] || die "unpacking ${zip} failed (arch=unpack_zip)"
}
+# @FUNCTION: unpack_7z
+# @USAGE: <7z file>
+# @DESCRIPTION:
+# Unpack 7z archives.
+unpack_7z() {
+ [[ $# -eq 1 ]] || d