summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2003-01-30 19:21:56 +0000
committerDan Armak <danarmak@gentoo.org>2003-01-30 19:21:56 +0000
commit83267771e0c7feff324376d9e00d05ed112c9b0d (patch)
tree713d69189885f1cc9761a6bc8b0337b58ef5a2cd /eclass
parentfixed homepage url (diff)
downloadgentoo-2-83267771e0c7feff324376d9e00d05ed112c9b0d.tar.gz
gentoo-2-83267771e0c7feff324376d9e00d05ed112c9b0d.tar.bz2
gentoo-2-83267771e0c7feff324376d9e00d05ed112c9b0d.zip
add a kde_src_unpack(). it calls base_src_unpack (passing on all section parameters) then fixes the \'languageChange undeclared\' bug in a centralized manner by touching all .ui files. this change should be transparent to ebuilds; i will be changing those that call base_src_unpack to use kde_src_unpack so that they can make use of the new fix.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde-patch.eclass45
-rw-r--r--eclass/kde.eclass32
2 files changed, 29 insertions, 48 deletions
diff --git a/eclass/kde-patch.eclass b/eclass/kde-patch.eclass
deleted file mode 100644
index f1b577bfcc86..000000000000
--- a/eclass/kde-patch.eclass
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde-patch.eclass,v 1.4 2002/10/25 19:55:52 vapier Exp $
-# This applies homemade patches from the tarball to the date specified.
-
-ECLASS=kde-patch
-INHERITED="$INHERITED $ECLASS"
-
-debug-print "Entering eclass $ECLASS"
-
-# ${PV} comes in the form of x.y.z.YYYYMMDD where x.y.z is the original (unpatched) version
-# and YYYYMMDD is the patch's datestamp. The patch lives on a gentoo mirror and is called
-# ${PN}-x.y.z-YYYYMMDD.diff. We figure out automagically the two parts of the current $PV.
-
-# I'm not that good at regexps etc., so I emulate std coding practices
-
-OLDIFS="$IFS" # backup so that we don't distort future loops
-IFS="." # separator string that determines the breakup of a string by bash's "for x in; do; done"
-
-for DATE in $PV
-do
- # if not last component of separated $PV
- if [ ! "${ORIGPV}.${DATE}" == "${PV}" ]; then
- [ -n "$ORIGPV" ] && ORIGPV="${ORIGPV}.${DATE}" || ORIGPV="$DATE" # don't add a leading dot
- fi
-done
-
-IFS="$OLDIFS" #restore
-
-# now $ORIGPV and $DATE should have the right values
-debug-print "$ECLASS: ORIGPV=$ORIGPV, DATE=$DATE"
-
-PATCH="${PN}-${ORIGPV}-${DATE}.diff"
-SRC_URI="$SRC_URI mirror://gentoo/${PATCH}"
-
-# for the new base_src_unpack functionality
-PATCHES="$PATCHES ${DISTDIR}/${PATCH}"
-
-# Set the right Pv for correct handling of the main sources. This is why this eclass
-# should be sourced before all others.
-PV="$ORIGPV"
-[ "$PR" != "r0" ] && PVR="$PN-$PV-$PR" || PVR="$PV"
-P="$PN-$PV"
-
diff --git a/eclass/kde.eclass b/eclass/kde.eclass
index c247a148e0f9..2cc0fe715e97 100644
--- a/eclass/kde.eclass
+++ b/eclass/kde.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.67 2002/11/24 21:29:55 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.68 2003/01/30 19:21:56 danarmak Exp $
# The kde eclass is inherited by all kde-* eclasses. Few ebuilds inherit straight from here.
inherit base kde-functions
ECLASS=kde
@@ -17,7 +17,7 @@ if [ -n "$KDEBASE" -a -n "`use ppc`" -a "${PV//3.1}" != "$PV" ]; then
else
DEPEND="$DEPEND sys-devel/automake"
fi
-DEPEND="$DEPEND sys-devel/autoconf sys-devel/make"
+DEPEND="$DEPEND sys-devel/autoconf sys-devel/make sys-devel/perl" # perl is used for makefile generation
# all kde apps need this one
newdepend "~kde-base/kde-env-3"
@@ -25,6 +25,32 @@ newdepend "~kde-base/kde-env-3"
# overridden in other places like kde-dist, kde-source and some individual ebuilds
SLOT="0"
+kde_src_unpack() {
+
+ debug-print-function $FUNCNAME $*
+
+ # call base_src_unpack, which implements most of the functionality and has sections,
+ # unlike this function. The change from base_src_unpack to kde_src_unpack is thus
+ # wholly transparent for ebuilds.
+ base_src_unpack $*
+
+ # kde-specific stuff stars here
+
+ # fix the 'languageChange undeclared' bug group: touch all .ui files, so that the
+ # makefile regenerate any .cpp and .h files depending on them.
+ cd $S
+ debug-print "$FUNCNAME: Searching for .ui files in $PWD"
+ UIFILES="`find . -name *.ui -print`"
+ debug-print "$FUNCNAME: .ui files found:"
+ debug-print "$UIFILES"
+ # done in two stages, because touch doens't have a silent/force mode
+ if [ -n "$UIFILES" ]; then
+ debug-print "$FUNCNAME: touching .ui files..."
+ touch $UIFILES
+ fi
+
+}
+
kde_src_compile() {
debug-print-function $FUNCNAME $*
@@ -129,4 +155,4 @@ kde_src_install() {
}
-EXPORT_FUNCTIONS src_compile src_install
+EXPORT_FUNCTIONS src_unpack src_compile src_install