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 3/4] elisp.eclass: Drop support for EAPI 4 and 5
Date: Thu, 15 Apr 2021 06:36:51
Message-Id: 20210415063543.28602-3-ulm@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] elisp-common.eclass: Add timeout to version detection by "Ulrich Müller"
1 Signed-off-by: Ulrich Müller <ulm@g.o>
2 ---
3 eclass/elisp.eclass | 26 ++++++++------------------
4 1 file changed, 8 insertions(+), 18 deletions(-)
5
6 diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
7 index a092041009bf..d763a4944d2d 100644
8 --- a/eclass/elisp.eclass
9 +++ b/eclass/elisp.eclass
10 @@ -9,7 +9,7 @@
11 # Jeremy Maitin-Shepard <jbms@×××××.com>
12 # Christian Faulhammer <fauli@g.o>
13 # Ulrich Müller <ulm@g.o>
14 -# @SUPPORTED_EAPIS: 4 5 6 7
15 +# @SUPPORTED_EAPIS: 6 7
16 # @BLURB: Eclass for Emacs Lisp packages
17 # @DESCRIPTION:
18 #
19 @@ -40,7 +40,7 @@
20 # Space separated list of patches to apply after unpacking the sources.
21 # Patch files are searched for in the current working dir, WORKDIR, and
22 # FILESDIR. This variable is semi-deprecated, preferably use the
23 -# PATCHES array instead if the EAPI supports it.
24 +# PATCHES array instead.
25
26 # @ECLASS-VARIABLE: ELISP_REMOVE
27 # @DEFAULT_UNSET
28 @@ -62,8 +62,8 @@
29 # will be generated in src_compile() and installed in src_install().
30
31 inherit elisp-common
32 +
33 case ${EAPI:-0} in
34 - 4|5) inherit epatch ;;
35 6|7) ;;
36 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
37 esac
38 @@ -73,8 +73,7 @@ EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
39
40 RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*"
41 case ${EAPI} in
42 - 4) RDEPEND="${RDEPEND%:*}"; DEPEND="${RDEPEND}" ;;
43 - 5|6) DEPEND="${RDEPEND}" ;;
44 + 6) DEPEND="${RDEPEND}" ;;
45 *) BDEPEND="${RDEPEND}" ;;
46 esac
47
48 @@ -118,17 +117,11 @@ elisp_src_prepare() {
49 else
50 die "Cannot find ${patch}"
51 fi
52 - case ${EAPI} in
53 - 4|5) epatch "${file}" ;;
54 - *) eapply "${file}" ;;
55 - esac
56 + eapply "${file}"
57 done
58
59 - # apply PATCHES (if supported in EAPI), and any user patches
60 - case ${EAPI} in
61 - 4|5) epatch_user ;;
62 - *) default ;;
63 - esac
64 + # apply PATCHES and any user patches
65 + default
66
67 if [[ -n ${ELISP_REMOVE} ]]; then
68 rm ${ELISP_REMOVE} || die
69 @@ -172,10 +165,7 @@ elisp_src_install() {
70 doinfo ${@/%.*/.info*}
71 fi
72 # install documentation only when explicitly requested
73 - case ${EAPI} in
74 - 4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;;
75 - *) [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs ;;
76 - esac
77 + [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs
78 if declare -f readme.gentoo_create_doc >/dev/null; then
79 readme.gentoo_create_doc
80 fi
81 --
82 2.31.1