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

Diff of /eclass/subversion.eclass

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

Revision 1.79 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.79 2012/06/10 11:31:12 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
28DESCRIPTION="Based on the ${ECLASS} eclass" 30DEPEND+=" net-misc/rsync"
29
30SUBVERSION_DEPEND="dev-vcs/subversion
31 net-misc/rsync"
32
33if [[ -z "${ESVN_DISABLE_DEPENDENCIES}" ]]; then
34 DEPEND="${SUBVERSION_DEPEND}"
35fi
36 31
37# @ECLASS-VARIABLE: ESVN_STORE_DIR 32# @ECLASS-VARIABLE: ESVN_STORE_DIR
38# @DESCRIPTION: 33# @DESCRIPTION:
39# 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
40[[ -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"
64# @DESCRIPTION: 59# @DESCRIPTION:
65# repository uri 60# repository uri
66# 61#
67# 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
68# 63#
69# supported protocols: 64# supported URI schemes:
70# http:// 65# http://
71# https:// 66# https://
72# svn:// 67# svn://
73# svn+ssh:// 68# svn+ssh://
69# file://
74# 70#
75# 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
76ESVN_REPO_URI="${ESVN_REPO_URI:-}" 72ESVN_REPO_URI="${ESVN_REPO_URI:-}"
77 73
78# @ECLASS-VARIABLE: ESVN_REVISION 74# @ECLASS-VARIABLE: ESVN_REVISION
138# 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
139# restrict. 135# restrict.
140# export) 136# export)
141# don't export the working copy to S. 137# don't export the working copy to S.
142ESVN_RESTRICT="${ESVN_RESTRICT:-}" 138ESVN_RESTRICT="${ESVN_RESTRICT:-}"
143
144# @ECLASS-VARIABLE: ESVN_DISABLE_DEPENDENCIES
145# @DESCRIPTION:
146# Set this variable to a non-empty value to disable the automatic inclusion of
147# Subversion in dependencies.
148ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}"
149 139
150# @ECLASS-VARIABLE: ESVN_OFFLINE 140# @ECLASS-VARIABLE: ESVN_OFFLINE
151# @DESCRIPTION: 141# @DESCRIPTION:
152# 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
153# 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
197 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty." 187 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
198 fi 188 fi
199 189
200 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}" 190 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
201 191
202 # check for the protocol 192 # check for the scheme
203 local protocol="${repo_uri%%:*}" 193 local scheme="${repo_uri%%:*}"
204 case "${protocol}" in 194 case "${scheme}" in
205 http|https) 195 http|https)
206 if ! built_with_use -o dev-vcs/subversion webdav-neon webdav-serf; then
207 echo
208 eerror "In order to emerge this package, you need to"
209 eerror "reinstall Subversion with support for WebDAV."
210 eerror "Subversion requires either Neon or Serf to support WebDAV."
211 echo
212 die "${ESVN}: reinstall Subversion with support for WebDAV."
213 fi
214 ;; 196 ;;
215 svn|svn+ssh) 197 svn|svn+ssh)
216 ;; 198 ;;
199 file)
200 ;;
217 *) 201 *)
218 die "${ESVN}: fetch from '${protocol}' is not yet implemented." 202 die "${ESVN}: fetch from '${scheme}' is not yet implemented."
219 ;; 203 ;;
220 esac 204 esac
221 205
222 addread "/etc/subversion" 206 addread "/etc/subversion"
223 addwrite "${ESVN_STORE_DIR}" 207 addwrite "${ESVN_STORE_DIR}"

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

  ViewVC Help
Powered by ViewVC 1.1.20