/[gentoo-x86]/eclass/cvs.eclass
Gentoo

Diff of /eclass/cvs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.43 Revision 1.44
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.43 2003/06/30 18:17:11 danarmak Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.44 2003/07/04 13:21:02 danarmak Exp $
4# 4#
5# Author Dan Armak <danarmak@gentoo.org> 5# Author Dan Armak <danarmak@gentoo.org>
6# 6#
7# This eclass provides the generic cvs fetching functions. 7# This eclass provides the generic cvs fetching functions.
8# to use from an ebuild, set the 'ebuild-configurable settings' below in your ebuild before inheriting. 8# to use from an ebuild, set the 'ebuild-configurable settings' below in your ebuild before inheriting.
33# local name of module. useful if the module on the server is called 33# local name of module. useful if the module on the server is called
34# something common like 'driver' or is nested deep in a tree, and you don't 34# something common like 'driver' or is nested deep in a tree, and you don't
35# like useless empty directories. 35# like useless empty directories.
36# WARNING: to be set only from within ebuilds! if set in your shell or some such, 36# WARNING: to be set only from within ebuilds! if set in your shell or some such,
37# things wil break because the ebuild won't expect it and have e.g. a wrong $S setting. 37# things wil break because the ebuild won't expect it and have e.g. a wrong $S setting.
38[ -z "$ECVS_LOCALNAME" ] && ECVS_LOCALNAME="$ECVS_MODULE" 38# ECVS_LOCALNAME
39 39
40# Where the cvs modules are stored/accessed 40# Where the cvs modules are stored/accessed
41[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${DISTDIR}/cvs-src" 41[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${DISTDIR}/cvs-src"
42 42
43# Name of cvs server, set to "offline" to disable fetching 43# Name of cvs server, set to "offline" to disable fetching
238ECVS_CO_OPTS=$ECVS_CO_OPTS 238ECVS_CO_OPTS=$ECVS_CO_OPTS
239ECVS_TOP_DIR=$ECVS_TOP_DIR 239ECVS_TOP_DIR=$ECVS_TOP_DIR
240ECVS_SERVER=$ECVS_SERVER 240ECVS_SERVER=$ECVS_SERVER
241ECVS_USER=$ECVS_USER 241ECVS_USER=$ECVS_USER
242ECVS_PASS=$ECVS_PASS 242ECVS_PASS=$ECVS_PASS
243ECS_MODULE=$ECVS_MODULE 243ECVS_MODULE=$ECVS_MODULE
244ECVS_LOCAL=$ECVS_LOCAL 244ECVS_LOCAL=$ECVS_LOCAL
245ECVS_RUNAS=$ECVS_RUNAS 245ECVS_RUNAS=$ECVS_RUNAS
246ECVS_LOCALNAME=$ECVS_LOCALNAME" 246ECVS_LOCALNAME=$ECVS_LOCALNAME"
247 247
248 [ -z "$ECVS_MODULE" ] && die "ERROR: CVS module not set, cannot continue." 248 [ -z "$ECVS_MODULE" ] && die "ERROR: CVS module not set, cannot continue."
249
250 # merely setting this default value makes things fail when cvs_src_unpack is called
251 # more than once per ebuild (eg kdenonbeta submodules); so if we set a default value,
252 # we disable it again at the function's end.
253 # of course, we could instead always reference it with the bash syntax for 'take default
254 # value from this other variable if undefined', but i'm lazy.
255 if [ -z "$ECVS_LOCALNAME" ]; then
256 ECVS_LOCALNAME="$ECVS_MODULE"
257 ECVS_LOCALNAME_SETDEFAULT=true
258 fi
259
249 260
250 if [ "$ECVS_SERVER" == "offline" ]; then 261 if [ "$ECVS_SERVER" == "offline" ]; then
251 # we're not required to fetch anything, the module already exists and shouldn't be updated 262 # we're not required to fetch anything, the module already exists and shouldn't be updated
252 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then 263 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then
253 debug-print "$FUNCNAME: offline mode" 264 debug-print "$FUNCNAME: offline mode"
293 done 304 done
294 # make sure we don't try to apply patches more than once, since 305 # make sure we don't try to apply patches more than once, since
295 # cvs_src_unpack is usually called several times from e.g. kde-source_src_unpack 306 # cvs_src_unpack is usually called several times from e.g. kde-source_src_unpack
296 export PATCHES="" 307 export PATCHES=""
297 fi 308 fi
309
310 if [ -n "$ECVS_LOCALNAME_SETDEFAULT" ]; then
311 unset ECVS_LOCALNAME
312 unset ECVS_LOCALNAME_SETDEFAULT
313 fi
298 314
299} 315}
300 316
301EXPORT_FUNCTIONS src_unpack 317EXPORT_FUNCTIONS src_unpack

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.20