summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2019-07-15 15:38:08 +0200
committerUlrich Müller <ulm@gentoo.org>2019-07-17 15:41:18 +0200
commit1177d3f97df1da011a5f0e1932fcf53787153cbd (patch)
tree6c28fdcec658ef3e98271793c300d367d248ae3f /eclass
parentdev-libs/libgaminggear: Bump to EAPI-7 (diff)
downloadgentoo-1177d3f97df1da011a5f0e1932fcf53787153cbd.tar.gz
gentoo-1177d3f97df1da011a5f0e1932fcf53787153cbd.tar.bz2
gentoo-1177d3f97df1da011a5f0e1932fcf53787153cbd.zip
subversion.eclass: Support EAPI 7, drop EAPIs 0 to 3.
Closes: https://bugs.gentoo.org/678344 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/subversion.eclass44
1 files changed, 22 insertions, 22 deletions
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index d9f9daf7eb6e..4dd2b48c6ce6 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: subversion.eclass
@@ -6,35 +6,39 @@
# Akinori Hattori <hattya@gentoo.org>
# @AUTHOR:
# Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
-# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories
+# @SUPPORTED_EAPIS: 4 5 6 7
+# @BLURB: Fetch software sources from subversion repositories
# @DESCRIPTION:
# The subversion eclass provides functions to fetch, patch and bootstrap
# software sources from subversion repositories.
-inherit eutils
-
ESVN="${ECLASS}"
-case "${EAPI:-0}" in
- 0|1)
- EXPORT_FUNCTIONS src_unpack pkg_preinst
- DEPEND="dev-vcs/subversion"
- ;;
- 2|3|4|5)
+case ${EAPI:-0} in
+ 4|5)
+ inherit eutils
EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
- DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
;;
- 6)
+ 6|7)
+ inherit estack
EXPORT_FUNCTIONS src_unpack pkg_preinst
- DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
;;
*)
- die "EAPI ${EAPI} is not supported in subversion.eclass"
+ die "${ESVN}: EAPI ${EAPI:-0} is not supported"
;;
esac
-DEPEND+=" net-misc/rsync"
+DEPEND="|| (
+ dev-vcs/subversion[http]
+ dev-vcs/subversion[webdav-neon]
+ dev-vcs/subversion[webdav-serf]
+ )
+ net-misc/rsync"
+
+case ${EAPI} in
+ 4|5|6) ;;
+ *) BDEPEND="${DEPEND}"; DEPEND="" ;;
+esac
# @ECLASS-VARIABLE: ESVN_STORE_DIR
# @DESCRIPTION:
@@ -434,12 +438,9 @@ subversion_wc_info() {
# @FUNCTION: subversion_src_unpack
# @DESCRIPTION:
-# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
+# Default src_unpack. Fetch.
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
@@ -458,10 +459,9 @@ 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}"
+ local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
if [[ ! -d ${dir} ]]; then
mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
fi