summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2002-06-05 19:09:21 +0000
committerDan Armak <danarmak@gentoo.org>2002-06-05 19:09:21 +0000
commit8cfbd799e9dda6c857a982cebb41a4a25b956953 (patch)
tree4f8cbd29876ff88bc82787dd87e766775120cf41
parentmasking kde 3.0.1.20020604 for brief testing (diff)
downloadgentoo-2-8cfbd799e9dda6c857a982cebb41a4a25b956953.tar.gz
gentoo-2-8cfbd799e9dda6c857a982cebb41a4a25b956953.tar.bz2
gentoo-2-8cfbd799e9dda6c857a982cebb41a4a25b956953.zip
for the upcoming kde 3.0.1.20020604
-rw-r--r--eclass/base.eclass16
-rw-r--r--eclass/kde-patch.eclass43
-rw-r--r--eclass/kde.org.eclass4
3 files changed, 59 insertions, 4 deletions
diff --git a/eclass/base.eclass b/eclass/base.eclass
index aa490d69ea2f..9da000dd4b07 100644
--- a/eclass/base.eclass
+++ b/eclass/base.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.14 2002/05/21 18:14:08 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.15 2002/06/05 19:09:21 danarmak Exp $
# The base eclass defines some default functions and variables. Nearly everything
# else inherits from here.
ECLASS=base
@@ -21,6 +21,9 @@ base_src_unpack() {
case $1 in
unpack)
debug-print-section unpack
+ # rather ugly fix - check for usage of kde-patch.eclass
+ [ -n "$PATCH" -a -n "$ORIGPV" -a -n "$DATE" -a -n "$OLDIFS" ] && \
+ A="`echo $A | sed -e s:${PATCH}::g --`"
unpack ${A}
;;
patch)
@@ -28,9 +31,18 @@ base_src_unpack() {
cd ${S}
patch -p0 < ${FILESDIR}/${P}-gentoo.diff
;;
+ autopatch)
+ debug-print-section autopatch
+ debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES"
+ cd ${S}
+ for x in $PATCHES; do
+ debug-print "$FUNCNAME: autopatch: patching from ${x}"
+ patch -p0 < ${x}
+ done
+ ;;
all)
debug-print-section all
- base_src_unpack unpack
+ base_src_unpack unpack autopatch
;;
esac
diff --git a/eclass/kde-patch.eclass b/eclass/kde-patch.eclass
new file mode 100644
index 000000000000..5657a2d57f88
--- /dev/null
+++ b/eclass/kde-patch.eclass
@@ -0,0 +1,43 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Dan Armak <danarmak@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde-patch.eclass,v 1.1 2002/06/05 19:09:21 danarmak Exp $
+# This applies homemade patches from the tarball to the date specified.
+ECLASS=kde-patch
+
+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.org.eclass b/eclass/kde.org.eclass
index ced6a779402d..93d87c3fc982 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -1,12 +1,12 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.7 2002/05/07 19:26:22 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.8 2002/06/05 19:09:21 danarmak Exp $
# Contains the locations of ftp.kde.org packages and their mirrors
ECLASS=kde.org
SRC_PATH="kde/stable/${PV}/src/${P}.tar.bz2"
-SRC_URI="ftp://ftp.kde.org/pub/$SRC_PATH
+SRC_URI="$SRC_URI ftp://ftp.kde.org/pub/$SRC_PATH
ftp://download.us.kde.org/pub/kde/$SRC_PATH
ftp://download.uk.kde.org/pub/kde/$SRC_PATH
ftp://download.au.kde.org/pub/kde/$SRC_PATH