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

Diff of /eclass/cvs.eclass

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

Revision 1.59 Revision 1.64
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
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.59 2005/08/13 08:10:53 phreak Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.64 2006/06/15 14:45:59 vapier Exp $
4#
5# Maintainer: vapier@gentoo.org (and anyone who wants to help)
4 6
5# Current Maintainer: Tal Peer <coredumb@gentoo.org> 7inherit eutils
6# Original Author: Dan Armak <danarmak@gentoo.org>
7
8# SSH auth code by Danny <danny.milo@gmx.net>
9
10# SSH password authentication support and host key verification
11# support by Jeremy Maitin-Shepard <jbms@gentoo.org>
12
13 8
14# This eclass provides the generic cvs fetching functions. To use 9# This eclass provides the generic cvs fetching functions. To use
15# this from an ebuild, set the `ebuild-configurable settings' as 10# this from an ebuild, set the `ebuild-configurable settings' as
16# specified below in your ebuild before inheriting. Then either leave 11# specified below in your ebuild before inheriting. Then either leave
17# the default src_unpack or extend over cvs_src_unpack. If you find 12# the default src_unpack or extend over cvs_src_unpack. If you find
69 64
70 65
71# ECVS_TOP_DIR -- The directory under which CVS modules are checked 66# ECVS_TOP_DIR -- The directory under which CVS modules are checked
72# out. 67# out.
73 68
74[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${DISTDIR}/cvs-src" 69[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src"
75 70
76# ECVS_SERVER -- CVS path 71# ECVS_SERVER -- CVS path
77# 72#
78# The format is "server:/dir", e.g. "anoncvs.kde.org:/home/kde". 73# The format is "server:/dir", e.g. "anoncvs.kde.org:/home/kde".
79# Remove the other parts of the full CVSROOT, which might look like 74# Remove the other parts of the full CVSROOT, which might look like
155# --- end ebuild-configurable settings --- 150# --- end ebuild-configurable settings ---
156 151
157# add cvs to deps 152# add cvs to deps
158# ssh is used for ext auth 153# ssh is used for ext auth
159# sudo is used to run as a specified user 154# sudo is used to run as a specified user
160DEPEND="dev-util/cvs app-admin/sudo" 155DEPEND="dev-util/cvs"
156
157[ -n "$ECVS_RUNAS" ] && DEPEND="$DEPEND app-admin/sudo"
161 158
162if [ "$ECVS_AUTH" == "ext" ]; then 159if [ "$ECVS_AUTH" == "ext" ]; then
163 #default to ssh 160 #default to ssh
164 [ -z "$CVS_RSH" ] && export CVS_RSH="ssh" 161 [ -z "$CVS_RSH" ] && export CVS_RSH="ssh"
165 if [ "$CVS_RSH" != "ssh" ]; then 162 if [ "$CVS_RSH" != "ssh" ]; then
491 488
492 if [ -z "$ECVS_LOCALNAME" ]; then 489 if [ -z "$ECVS_LOCALNAME" ]; then
493 ECVS_LOCALNAME="$ECVS_MODULE" 490 ECVS_LOCALNAME="$ECVS_MODULE"
494 fi 491 fi
495 492
496 if [ "$ECVS_SERVER" == "offline" ]; then 493 local offline_pkg_var="ECVS_OFFLINE_${PN}"
494 if [ "${!offline_pkg_var}" == "1" -o "$ECVS_OFFLINE" == "1" -o "$ECVS_SERVER" == "offline" ]; then
497 # We're not required to fetch anything; the module already 495 # We're not required to fetch anything; the module already
498 # exists and shouldn't be updated. 496 # exists and shouldn't be updated.
499 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then 497 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then
500 debug-print "$FUNCNAME: offline mode" 498 debug-print "$FUNCNAME: offline mode"
501 else 499 else
533 # Implement some of base_src_unpack's functionality; note however 531 # Implement some of base_src_unpack's functionality; note however
534 # that base.eclass may not have been inherited! 532 # that base.eclass may not have been inherited!
535 if [ -n "$PATCHES" ]; then 533 if [ -n "$PATCHES" ]; then
536 debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching" 534 debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching"
537 cd "$S" 535 cd "$S"
538 for x in $PATCHES; do 536 epatch ${PATCHES}
539 debug-print "patching from $x"
540 patch -p0 < "$x"
541 done
542 # Make sure we don't try to apply patches more than once, 537 # Make sure we don't try to apply patches more than once,
543 # since cvs_src_unpack is usually called several times from 538 # since cvs_src_unpack is usually called several times from
544 # e.g. kde-source_src_unpack 539 # e.g. kde-source_src_unpack
545 export PATCHES="" 540 export PATCHES=""
546 fi 541 fi

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.64

  ViewVC Help
Powered by ViewVC 1.1.20