Gentoo Archives: gentoo-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-dev@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-dev] [PATCH 1/2] subversion.eclass: Drop support for EAPIs 4 and 5
Date: Sat, 26 Feb 2022 13:49:17
Message-Id: 20220226134858.3624-1-ulm@gentoo.org
1 Signed-off-by: Ulrich Müller <ulm@g.o>
2 ---
3 eclass/subversion.eclass | 85 +++-------------------------------------
4 1 file changed, 5 insertions(+), 80 deletions(-)
5
6 diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
7 index aa1a5c355877..2a2297678ad1 100644
8 --- a/eclass/subversion.eclass
9 +++ b/eclass/subversion.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2021 Gentoo Authors
12 +# Copyright 1999-2022 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: subversion.eclass
16 @@ -6,16 +6,15 @@
17 # Akinori Hattori <hattya@g.o>
18 # @AUTHOR:
19 # Original Author: Akinori Hattori <hattya@g.o>
20 -# @SUPPORTED_EAPIS: 4 5 6 7
21 +# @SUPPORTED_EAPIS: 6 7
22 # @BLURB: Fetch software sources from subversion repositories
23 # @DESCRIPTION:
24 -# The subversion eclass provides functions to fetch, patch and bootstrap
25 -# software sources from subversion repositories.
26 +# The subversion eclass provides functions to fetch software sources
27 +# from subversion repositories.
28
29 ESVN="${ECLASS}"
30
31 case ${EAPI} in
32 - 4|5) inherit eutils ;;
33 6|7) inherit estack ;;
34 *) die "${ESVN}: EAPI ${EAPI:-0} is not supported" ;;
35 esac
36 @@ -27,7 +26,7 @@ DEPEND="
37 net-misc/rsync"
38
39 case ${EAPI} in
40 - 4|5|6) ;;
41 + 6) ;;
42 *) BDEPEND="${DEPEND}"; DEPEND="" ;;
43 esac
44
45 @@ -117,24 +116,6 @@ ESVN_PASSWORD="${ESVN_PASSWORD:-}"
46 # default: ${PN/-svn}.
47 ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
48
49 -# @ECLASS-VARIABLE: ESVN_BOOTSTRAP
50 -# @DESCRIPTION:
51 -# Bootstrap script or command like autogen.sh or etc..
52 -# Removed in EAPI 6 and later.
53 -ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
54 -
55 -# @ECLASS-VARIABLE: ESVN_PATCHES
56 -# @DESCRIPTION:
57 -# subversion eclass can apply patches in subversion_bootstrap().
58 -# you can use regexp in this variable like *.diff or *.patch or etc.
59 -# NOTE: patches will be applied before ESVN_BOOTSTRAP is processed.
60 -#
61 -# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
62 -# location, the installation dies.
63 -#
64 -# Removed in EAPI 6 and later, use PATCHES instead.
65 -ESVN_PATCHES="${ESVN_PATCHES:-}"
66 -
67 # @ECLASS-VARIABLE: ESVN_RESTRICT
68 # @DESCRIPTION:
69 # this should be a space delimited list of subversion eclass features to
70 @@ -363,50 +344,6 @@ subversion_fetch() {
71 echo
72 }
73
74 -# @FUNCTION: subversion_bootstrap
75 -# @DESCRIPTION:
76 -# Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
77 -# Removed in EAPI 6 and later.
78 -subversion_bootstrap() {
79 - [[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
80 -
81 - if has "export" ${ESVN_RESTRICT}; then
82 - return
83 - fi
84 -
85 - cd "${S}"
86 -
87 - if [[ -n ${ESVN_PATCHES} ]]; then
88 - local patch fpatch
89 - einfo "apply patches -->"
90 - for patch in ${ESVN_PATCHES}; do
91 - if [[ -f ${patch} ]]; then
92 - epatch "${patch}"
93 - else
94 - for fpatch in ${FILESDIR}/${patch}; do
95 - if [[ -f ${fpatch} ]]; then
96 - epatch "${fpatch}"
97 - else
98 - die "${ESVN}: ${patch} not found"
99 - fi
100 - done
101 - fi
102 - done
103 - echo
104 - fi
105 -
106 - if [[ -n ${ESVN_BOOTSTRAP} ]]; then
107 - einfo "begin bootstrap -->"
108 - if [[ -f ${ESVN_BOOTSTRAP} && -x ${ESVN_BOOTSTRAP} ]]; then
109 - einfo " bootstrap with a file: ${ESVN_BOOTSTRAP}"
110 - eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP."
111 - else
112 - einfo " bootstrap with command: ${ESVN_BOOTSTRAP}"
113 - eval "${ESVN_BOOTSTRAP}" || die "${ESVN}: can't eval ESVN_BOOTSTRAP."
114 - fi
115 - fi
116 -}
117 -
118 # @FUNCTION: subversion_wc_info
119 # @USAGE: [repo_uri]
120 # @RETURN: ESVN_WC_URL, ESVN_WC_ROOT, ESVN_WC_UUID, ESVN_WC_REVISION and ESVN_WC_PATH
121 @@ -440,15 +377,6 @@ subversion_src_unpack() {
122 subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
123 }
124
125 -# @FUNCTION: subversion_src_prepare
126 -# @DESCRIPTION:
127 -# Default src_prepare. Bootstrap.
128 -# Removed in EAPI 6 and later.
129 -subversion_src_prepare() {
130 - [[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is removed from subversion.eclass in EAPI 6 and later"
131 - subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
132 -}
133 -
134 # @FUNCTION: subversion_pkg_preinst
135 # @USAGE: [repo_uri]
136 # @DESCRIPTION:
137 @@ -537,6 +465,3 @@ subversion__get_peg_revision() {
138 }
139
140 EXPORT_FUNCTIONS src_unpack pkg_preinst
141 -if [[ ${EAPI} == [45] ]]; then
142 - EXPORT_FUNCTIONS src_prepare
143 -fi
144 --
145 2.35.1

Replies

Subject Author
[gentoo-dev] [PATCH 2/2] subversion.eclass: Support EAPI 8 "Ulrich Müller" <ulm@g.o>