Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v2 7/8] autotools-utils.eclass: Remove EAPI 2&3 support
Date: Thu, 09 Aug 2018 15:21:44
Message-Id: 20180809151602.11147-8-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 0/8] eutils/path_exists removal by "Michał Górny"
1 ---
2 eclass/autotools-utils.eclass | 29 ++++-------------------------
3 1 file changed, 4 insertions(+), 25 deletions(-)
4
5 diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
6 index f8d2c7fdc247..b0047048662d 100644
7 --- a/eclass/autotools-utils.eclass
8 +++ b/eclass/autotools-utils.eclass
9 @@ -1,4 +1,4 @@
10 -# Copyright 1999-2017 Gentoo Foundation
11 +# Copyright 1999-2018 Gentoo Foundation
12 # Distributed under the terms of the GNU General Public License v2
13
14 # @ECLASS: autotools-utils.eclass
15 @@ -89,7 +89,7 @@
16
17 case ${EAPI:-0} in
18 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
19 - 2|3|4|5) ;;
20 + 4|5) ;;
21 *) die "EAPI=${EAPI} is not supported" ;;
22 esac
23
24 @@ -281,8 +281,6 @@ autotools-utils_src_configure() {
25 [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \
26 || die 'autotools-utils.eclass: myeconfargs has to be an array.'
27
28 - [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
29 -
30 # Common args
31 local econfargs=()
32
33 @@ -338,31 +336,12 @@ autotools-utils_src_install() {
34 emake DESTDIR="${D}" "$@" install || die "emake install failed"
35 popd > /dev/null || die
36
37 - # Move docs installed by autotools (in EAPI < 4).
38 - if [[ ${EAPI} == [23] ]] \
39 - && path_exists "${D}${EPREFIX}"/usr/share/doc/${PF}/*; then
40 - if [[ $(find "${D}${EPREFIX}"/usr/share/doc/${PF}/* -type d) ]]; then
41 - eqawarn "autotools-utils: directories in docdir require at least EAPI 4"
42 - else
43 - mkdir "${T}"/temp-docdir
44 - mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \
45 - || die "moving docs to tempdir failed"
46 -
47 - dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
48 - rm -r "${T}"/temp-docdir || die
49 - fi
50 - fi
51 -
52 # XXX: support installing them from builddir as well?
53 if declare -p DOCS &>/dev/null; then
54 # an empty list == don't install anything
55 if [[ ${DOCS[@]} ]]; then
56 - if [[ ${EAPI} == [23] ]]; then
57 - dodoc "${DOCS[@]}" || die
58 - else
59 - # dies by itself
60 - dodoc -r "${DOCS[@]}"
61 - fi
62 + # dies by itself
63 + dodoc -r "${DOCS[@]}"
64 fi
65 else
66 local f
67 --
68 2.18.0