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

Diff of /eclass/subversion.eclass

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

Revision 1.80 Revision 1.83
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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/subversion.eclass,v 1.80 2012/07/29 03:37:37 hattya Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.83 2012/07/29 05:54:17 hattya Exp $
4 4
5# @ECLASS: subversion.eclass 5# @ECLASS: subversion.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Akinori Hattori <hattya@gentoo.org> 7# Akinori Hattori <hattya@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
17ESVN="${ECLASS}" 17ESVN="${ECLASS}"
18 18
19case "${EAPI:-0}" in 19case "${EAPI:-0}" in
20 0|1) 20 0|1)
21 EXPORT_FUNCTIONS src_unpack pkg_preinst 21 EXPORT_FUNCTIONS src_unpack pkg_preinst
22 DEPEND="dev-vcs/subversion"
22 ;; 23 ;;
23 *) 24 *)
24 EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst 25 EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
26 DEPEND="|| ( dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
25 ;; 27 ;;
26esac 28esac
27 29
28SUBVERSION_DEPEND="dev-vcs/subversion 30DEPEND+=" net-misc/rsync"
29 net-misc/rsync"
30
31if [[ -z "${ESVN_DISABLE_DEPENDENCIES}" ]]; then
32 DEPEND="${SUBVERSION_DEPEND}"
33fi
34 31
35# @ECLASS-VARIABLE: ESVN_STORE_DIR 32# @ECLASS-VARIABLE: ESVN_STORE_DIR
36# @DESCRIPTION: 33# @DESCRIPTION:
37# subversion sources store directory. Users may override this in /etc/make.conf 34# subversion sources store directory. Users may override this in /etc/make.conf
38[[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src" 35[[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
62# @DESCRIPTION: 59# @DESCRIPTION:
63# repository uri 60# repository uri
64# 61#
65# e.g. http://foo/trunk, svn://bar/trunk, svn://bar/branch/foo@1234 62# e.g. http://foo/trunk, svn://bar/trunk, svn://bar/branch/foo@1234
66# 63#
67# supported protocols: 64# supported URI schemes:
68# http:// 65# http://
69# https:// 66# https://
70# svn:// 67# svn://
71# svn+ssh:// 68# svn+ssh://
69# file://
72# 70#
73# to peg to a specific revision, append @REV to the repo's uri 71# to peg to a specific revision, append @REV to the repo's uri
74ESVN_REPO_URI="${ESVN_REPO_URI:-}" 72ESVN_REPO_URI="${ESVN_REPO_URI:-}"
75 73
76# @ECLASS-VARIABLE: ESVN_REVISION 74# @ECLASS-VARIABLE: ESVN_REVISION
136# this should be a space delimited list of subversion eclass features to 134# this should be a space delimited list of subversion eclass features to
137# restrict. 135# restrict.
138# export) 136# export)
139# don't export the working copy to S. 137# don't export the working copy to S.
140ESVN_RESTRICT="${ESVN_RESTRICT:-}" 138ESVN_RESTRICT="${ESVN_RESTRICT:-}"
141
142# @ECLASS-VARIABLE: ESVN_DISABLE_DEPENDENCIES
143# @DESCRIPTION:
144# Set this variable to a non-empty value to disable the automatic inclusion of
145# Subversion in dependencies.
146ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}"
147 139
148# @ECLASS-VARIABLE: ESVN_OFFLINE 140# @ECLASS-VARIABLE: ESVN_OFFLINE
149# @DESCRIPTION: 141# @DESCRIPTION:
150# Set this variable to a non-empty value to disable the automatic updating of 142# Set this variable to a non-empty value to disable the automatic updating of
151# an svn source tree. This is intended to be set outside the subversion source 143# an svn source tree. This is intended to be set outside the subversion source
195 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty." 187 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
196 fi 188 fi
197 189
198 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}" 190 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
199 191
200 # check for the protocol 192 # check for the scheme
201 local protocol="${repo_uri%%:*}" 193 local scheme="${repo_uri%%:*}"
202 case "${protocol}" in 194 case "${scheme}" in
203 http|https) 195 http|https)
204 if ! built_with_use -o dev-vcs/subversion webdav-neon webdav-serf; then
205 echo
206 eerror "In order to emerge this package, you need to"
207 eerror "reinstall Subversion with support for WebDAV."
208 eerror "Subversion requires either Neon or Serf to support WebDAV."
209 echo
210 die "${ESVN}: reinstall Subversion with support for WebDAV."
211 fi
212 ;; 196 ;;
213 svn|svn+ssh) 197 svn|svn+ssh)
214 ;; 198 ;;
199 file)
200 ;;
215 *) 201 *)
216 die "${ESVN}: fetch from '${protocol}' is not yet implemented." 202 die "${ESVN}: fetch from '${scheme}' is not yet implemented."
217 ;; 203 ;;
218 esac 204 esac
219 205
220 addread "/etc/subversion" 206 addread "/etc/subversion"
221 addwrite "${ESVN_STORE_DIR}" 207 addwrite "${ESVN_STORE_DIR}"

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.83

  ViewVC Help
Powered by ViewVC 1.1.20