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 /eclass/kde-patch.eclass
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
Diffstat (limited to 'eclass/kde-patch.eclass')
-rw-r--r--eclass/kde-patch.eclass43
1 files changed, 43 insertions, 0 deletions
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"
+