summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2002-07-17 20:25:16 +0000
committerDan Armak <danarmak@gentoo.org>2002-07-17 20:25:16 +0000
commit2c0b7a8a3292bde39bfa40665a1dd07aa774cfe6 (patch)
tree019f5cc31f2909a70cca6a820489a6619e3a47df /eclass/kde-source.eclass
parentmasking gpc out of gcc3 profile (diff)
downloadgentoo-2-2c0b7a8a3292bde39bfa40665a1dd07aa774cfe6.tar.gz
gentoo-2-2c0b7a8a3292bde39bfa40665a1dd07aa774cfe6.tar.bz2
gentoo-2-2c0b7a8a3292bde39bfa40665a1dd07aa774cfe6.zip
changes and eclasses for upcomnig kde cvs ebuilds. they won't live in portage but there's no reason for the eclasses not to live here, makes it much more comfortable
Diffstat (limited to 'eclass/kde-source.eclass')
-rw-r--r--eclass/kde-source.eclass80
1 files changed, 80 insertions, 0 deletions
diff --git a/eclass/kde-source.eclass b/eclass/kde-source.eclass
new file mode 100644
index 000000000000..0d1b09305d27
--- /dev/null
+++ b/eclass/kde-source.eclass
@@ -0,0 +1,80 @@
+# 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-source.eclass,v 1.1 2002/07/17 20:25:16 danarmak Exp $
+
+# This is for kde-base cvs ebuilds. Read comments about settings.
+# It uses $S and sets $SRC_URI, so inherit it as late as possible (certainly after any other eclasses).
+# See http://www.gentoo.org/~danarmak/kde-cvs.html !
+# All of the real functionality is in cvs.eclass; this just adds some trivial kde-specific items
+
+ECLASS=kde-source
+INHERITED="$INHERITED $ECLASS"
+
+# --- begin user-configurable settings ---
+
+# Set yours in profile (e.g. make.conf), or export from the command line to override.
+# Most have acceptable default values or are set by the ebuilds, but be sure to read the comments
+# in cvs.eclass for detailed descriptions of them all.
+# You should probably set at least ECVS_SERVER.
+
+# TODO: add options to store the modules as tarballs in $DISTDIR or elsewhere
+
+# Under this directory the cvs modules are stored/accessed
+# Storing in tarballs in $DISTDIR to be implemented soon
+[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="/usr/src/kde"
+
+# Set to name of cvs server. Set to "" to disable fetching (offline mode).
+# In offline mode, we presume that modules are already checked out at the specified
+# location and that they shouldn't be updated.
+# Format example: "anoncvs.kde.org:/home/kde" (without :pserver:anonymous@ part)
+# Mirror list is available at http://developer.kde.org/source/anoncvs.html
+[ -z "$ECVS_SERVER" ] && ECVS_SERVER="anoncvs.kde.org:/home/kde"
+
+# default for kde-base ebuilds
+[ -z "$ECVS_MODULE" ] && ECVS_MODULE="$PN"
+
+# Other variables: see cvs.eclass
+
+# --- end user-configurable settings ---
+
+# cvs modules don't have a version in their names
+S="$WORKDIR/$PN"
+
+DESCRIPTION="$DESCRIPTION (cvs) "
+
+# set this to more easily maintain cvs and std ebuilds side-by-side
+# (we don't need to remove SRC_URI, kde-dist.eclass, kde.org.eclass etc
+# from the cvs ones). To download patches or something, set SRC_URI again after
+# inheriting kde_source.
+SRC_URI=""
+
+kde-source_src_unpack() {
+
+ debug-print-function $FUNCNAME $*
+
+ # we do this here and not in the very beginning because we need to keep
+ # the configuration order intact: env. and profile settings override
+ # kde-source.eclass defaults, which in turn override cvs.eclass defaults
+ inherit cvs
+
+ # this fetches cvs sources and copies them to $WORKDIR
+ cvs_src_unpack
+
+ # make sure checked-out module is accessible at $S, in case
+ # the ebuild overrode our S=$WORKDIR/$PN setting
+ if [ "$S" != "$WORKDIR/$PN" ]; then
+ cd $WORKDIR
+ ln -sf $PN $S
+ fi
+
+ # make sure we give them a clean cvs checkout
+ cd ${S}
+ [ -f "Makefile" ] && make cvs-clean
+ [ -f "config.cache" ] && rm config.cache
+
+}
+
+
+EXPORT_FUNCTIONS src_unpack
+