kde4-meta.eclass: Support tar.gz snapshot from git
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Mon, 2 May 2016 17:17:19 +0000 (19:17 +0200)
committerJohannes Huber <johu@gentoo.org>
Mon, 2 May 2016 17:18:15 +0000 (19:18 +0200)
Signed-off-by: Johannes Huber <johu@gentoo.org>
eclass/kde4-meta.eclass

index df7dfa41cfa5904fcc7437e3b93e6641687ff41e..ba7114dcfd991f74e9b3e755f9b1a69ea34b8204 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 #
@@ -185,6 +185,9 @@ kde4-meta_src_extract() {
                if [[ ${PV} =~ 4.4.11 ]]; then
                        postfix="bz2"
                        KMTARPARAMS+=" --bzip2"
+               elif [[ ${PV} =~ _pre ]]; then
+                       postfix="gz"
+                       KMTARPARAMS+=" --gz"
                else
                        postfix="xz"
                        KMTARPARAMS+=" --xz"
@@ -198,6 +201,9 @@ kde4-meta_src_extract() {
                # Detect real toplevel dir from tarball name - it will be used upon extraction
                # and in _list_needed_subdirectories
                topdir="${tarball%.tar.*}/"
+               if [[ ${topdir} =~ _pre ]]; then
+                       topdir="${topdir%-$PV*}/"
+               fi
 
                ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"