summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMaciej Mrozowski (reavertm) <reavertm@poczta.fm>2009-02-06 19:53:03 +0100
committerMaciej Mrozowski (reavertm) <reavertm@poczta.fm>2009-02-06 19:53:03 +0100
commitb1470f2f348584038b7f14ea5a559a20547fe8da (patch)
tree48df45fbb559c5c86188161431d9070cec7e15a8 /eclass
parent68c6eb024ace1a02a57f5200f8a972c9a6e0cf60 (diff)
downloadkde-b1470f2f348584038b7f14ea5a559a20547fe8da.tar.gz
kde-b1470f2f348584038b7f14ea5a559a20547fe8da.tar.bz2
kde-b1470f2f348584038b7f14ea5a559a20547fe8da.zip
Fix nasty eclass issue (with SRC_URI containing multiple entries, like patches in disfiles)
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