Support unpacking .txz-suffixed archives.
---
 bin/eapi.sh          |  4 ++++
 bin/phase-helpers.sh | 13 +++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/bin/eapi.sh b/bin/eapi.sh
index fa57999..878f8e7 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -118,6 +118,10 @@ ___eapi_unpack_supports_xz() {
        [[ ! ${1-${EAPI}} =~ ^(0|1|2)$ ]]
 }
 
+___eapi_unpack_supports_txz() {
+       [[ ! ${1-${EAPI}} =~ 
^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+}
+
 ___eapi_econf_passes_--disable-dependency-tracking() {
        [[ ! ${1-${EAPI}} =~ ^(0|1|2|3)$ ]]
 }
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 49b5547..0be79fd 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -456,6 +456,19 @@ unpack() {
                                        __vecho "unpack ${x}: file format not 
recognized. Ignoring."
                                fi
                                ;;
+                       txz)
+                               if ___eapi_unpack_is_case_sensitive && \
+                                       [[ " txz " != *" ${suffix} "* ]] ; then
+                                       eqawarn "QA Notice: unpack called with" 
\
+                                               "suffix '${suffix}' which is 
unofficially supported" \
+                                               "with EAPI '${EAPI}'. Instead 
use 'txz'."
+                               fi
+                               if ___eapi_supports_txz; then
+                                       tar xoJf "$srcdir$x" || die "$myfail"
+                               else
+                                       __vecho "unpack ${x}: file format not 
recognized. Ignoring."
+                               fi
+                               ;;
                        *)
                                __vecho "unpack ${x}: file format not 
recognized. Ignoring."
                                ;;
-- 
2.0.4


Reply via email to