Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: eclass/
Date: Thu, 08 Aug 2019 21:24:11
Message-Id: 1565299390.95c7e8ec0ef6b07ebb83ba35d174bb35b647f83c.ulm@gentoo
1 commit: 95c7e8ec0ef6b07ebb83ba35d174bb35b647f83c
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 8 21:23:10 2019 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 8 21:23:10 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=95c7e8ec
7
8 subversion.eclass: Re-add support for old EAPIs.
9
10 Bug: https://bugs.gentoo.org/690646
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 eclass/subversion.eclass | 29 +++++++++++++++++++----------
14 1 file changed, 19 insertions(+), 10 deletions(-)
15
16 diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
17 index 6d26820b..4d5f8677 100644
18 --- a/eclass/subversion.eclass
19 +++ b/eclass/subversion.eclass
20 @@ -6,7 +6,7 @@
21 # Akinori Hattori <hattya@g.o>
22 # @AUTHOR:
23 # Original Author: Akinori Hattori <hattya@g.o>
24 -# @SUPPORTED_EAPIS: 4 5 6 7
25 +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
26 # @BLURB: Fetch software sources from subversion repositories
27 # @DESCRIPTION:
28 # The subversion eclass provides functions to fetch, patch and bootstrap
29 @@ -15,7 +15,11 @@
30 ESVN="${ECLASS}"
31
32 case ${EAPI:-0} in
33 - 4|5)
34 + 0|1)
35 + inherit eutils
36 + EXPORT_FUNCTIONS src_unpack pkg_preinst
37 + ;;
38 + 2|3|4|5)
39 inherit eutils
40 EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
41 ;;
42 @@ -30,15 +34,16 @@ esac
43
44 PROPERTIES+=" live"
45
46 -DEPEND="|| (
47 - dev-vcs/subversion[http]
48 - dev-vcs/subversion[webdav-neon]
49 - dev-vcs/subversion[webdav-serf]
50 - )
51 - net-misc/rsync"
52 +case ${EAPI:-0} in
53 + 0|1) DEPEND="dev-vcs/subversion" ;;
54 + *) DEPEND="|| ( dev-vcs/subversion[http]
55 + dev-vcs/subversion[webdav-neon]
56 + dev-vcs/subversion[webdav-serf] )" ;;
57 +esac
58 +DEPEND+=" net-misc/rsync"
59
60 case ${EAPI} in
61 - 4|5|6) ;;
62 + 0|1|2|3|4|5|6) ;;
63 *) BDEPEND="${DEPEND}"; DEPEND="" ;;
64 esac
65
66 @@ -440,9 +445,12 @@ subversion_wc_info() {
67
68 # @FUNCTION: subversion_src_unpack
69 # @DESCRIPTION:
70 -# Default src_unpack. Fetch.
71 +# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
72 subversion_src_unpack() {
73 subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
74 + if has "${EAPI:-0}" 0 1; then
75 + subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
76 + fi
77 }
78
79 # @FUNCTION: subversion_src_prepare
80 @@ -461,6 +469,7 @@ subversion_src_prepare() {
81 # want the logs to stick around if packages are uninstalled without messing with
82 # config protection.
83 subversion_pkg_preinst() {
84 + has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
85 local pkgdate=$(date "+%Y%m%d %H:%M:%S")
86 if [[ -n ${ESCM_LOGDIR} ]]; then
87 local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"