summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/subversion.eclass')
-rw-r--r--eclass/subversion.eclass29
1 files changed, 19 insertions, 10 deletions
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 6d26820b..4d5f8677 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -6,7 +6,7 @@
# Akinori Hattori <hattya@gentoo.org>
# @AUTHOR:
# Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Fetch software sources from subversion repositories
# @DESCRIPTION:
# The subversion eclass provides functions to fetch, patch and bootstrap
@@ -15,7 +15,11 @@
ESVN="${ECLASS}"
case ${EAPI:-0} in
- 4|5)
+ 0|1)
+ inherit eutils
+ EXPORT_FUNCTIONS src_unpack pkg_preinst
+ ;;
+ 2|3|4|5)
inherit eutils
EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
;;
@@ -30,15 +34,16 @@ esac
PROPERTIES+=" live"
-DEPEND="|| (
- dev-vcs/subversion[http]
- dev-vcs/subversion[webdav-neon]
- dev-vcs/subversion[webdav-serf]
- )
- net-misc/rsync"
+case ${EAPI:-0} in
+ 0|1) DEPEND="dev-vcs/subversion" ;;
+ *) DEPEND="|| ( dev-vcs/subversion[http]
+ dev-vcs/subversion[webdav-neon]
+ dev-vcs/subversion[webdav-serf] )" ;;
+esac
+DEPEND+=" net-misc/rsync"
case ${EAPI} in
- 4|5|6) ;;
+ 0|1|2|3|4|5|6) ;;
*) BDEPEND="${DEPEND}"; DEPEND="" ;;
esac
@@ -440,9 +445,12 @@ subversion_wc_info() {
# @FUNCTION: subversion_src_unpack
# @DESCRIPTION:
-# Default src_unpack. Fetch.
+# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
+ if has "${EAPI:-0}" 0 1; then
+ subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+ fi
}
# @FUNCTION: subversion_src_prepare
@@ -461,6 +469,7 @@ subversion_src_prepare() {
# want the logs to stick around if packages are uninstalled without messing with
# config protection.
subversion_pkg_preinst() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
local pkgdate=$(date "+%Y%m%d %H:%M:%S")
if [[ -n ${ESCM_LOGDIR} ]]; then
local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"