summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde4-base.eclass9
-rw-r--r--eclass/kde4-meta.eclass6
2 files changed, 11 insertions, 4 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index 96dea73279f..99aafc6eba7 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -418,6 +418,13 @@ esac
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
+# @ECLASS-VARIABLE: TARBALL
+# @DESCRIPTION:
+# Stores package tarball name - detected from SRC_URI. We need this variable
+# to unpack source in reliable way (patches in distfiles listed in SRC_URI would
+# cause problem otherwise.
+TARBALL="${SRC_URI##*/}"
+
# @ECLASS-VARIABLE: PREFIX
# @DESCRIPTION:
# Set the installation PREFIX. All kde-base ebuilds go into the KDE4 installation directory.
@@ -486,7 +493,7 @@ kde4-base_src_unpack() {
unpack "${A}" || die "Unpack ${A} failed"
# Detect real toplevel dir - issue with unstable snapshots
if [[ ${KDEBASE} = kde-base ]]; then
- local topleveldir=`basename ${SRC_URI%.tar.*}`
+ local topleveldir="${TARBALL%.tar.*}"
if [[ "${topleveldir}" != "${P}" ]]; then
mv "${topleveldir}" "${P}" || die "Died while moving \"${topleveldir}\" to \"${P}\""
fi
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
index dbc02d63ca1..79b8f11ec66 100644
--- a/eclass/kde4-meta.eclass
+++ b/eclass/kde4-meta.eclass
@@ -233,13 +233,13 @@ kde4-meta_src_extract() {
fi
else
local abort tarfile f extractlist topleveldir moduleprefix
- tarfile="${DISTDIR}/${A}"
+ tarfile="${DISTDIR}/${TARBALL}"
# Detect real toplevel dir - issue with unstable snapshots
# It will be used in __list_needed_subdirectories
- topleveldir=`basename ${SRC_URI%.tar.*}`/
+ topleveldir="${TARBALL%.tar.*}/"
- ebegin "Unpacking parts of ${A} to ${WORKDIR}"
+ ebegin "Unpacking parts of ${TARBALL} to ${WORKDIR}"
kde4-meta_create_extractlists