Gentoo Archives: gentoo-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] elisp-common.eclass: Drop support for EAPIs 0 to 3.
Date: Sat, 14 Dec 2019 17:09:06
Message-Id: w6gk16yu95o.fsf@kph.uni-mainz.de
1 This goes along with a small code simplification, since doins will die
2 by itself in EAPI 4 or later.
3
4 Signed-off-by: Ulrich Müller <ulm@g.o>
5 ---
6 eclass/elisp-common.eclass | 17 ++++++++++-------
7 1 file changed, 10 insertions(+), 7 deletions(-)
8
9 diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
10 index 05b03f493957..ea172fe5a870 100644
11 --- a/eclass/elisp-common.eclass
12 +++ b/eclass/elisp-common.eclass
13 @@ -1,4 +1,4 @@
14 -# Copyright 1999-2015 Gentoo Foundation
15 +# Copyright 1999-2019 Gentoo Authors
16 # Distributed under the terms of the GNU General Public License v2
17
18 # @ECLASS: elisp-common.eclass
19 @@ -10,6 +10,7 @@
20 # Mamoru Komachi <usata@g.o>
21 # Christian Faulhammer <fauli@g.o>
22 # Ulrich Müller <ulm@g.o>
23 +# @SUPPORTED_EAPIS: 4 5 6 7
24 # @BLURB: Emacs-related installation utilities
25 # @DESCRIPTION:
26 #
27 @@ -156,6 +157,11 @@
28 # environment, so it is no problem when you unset USE=emacs between
29 # merge and unmerge of a package.
30
31 +case ${EAPI:-0} in
32 + 4|5|6|7) ;;
33 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
34 +esac
35 +
36 # @ECLASS-VARIABLE: SITELISP
37 # @DESCRIPTION:
38 # Directory where packages install Emacs Lisp files.
39 @@ -298,12 +304,11 @@ elisp-make-autoload-file() {
40 elisp-install() {
41 local subdir="$1"
42 shift
43 - ebegin "Installing Elisp files for GNU Emacs support"
44 + einfo "Installing Elisp files for GNU Emacs support"
45 ( # subshell to avoid pollution of calling environment
46 insinto "${SITELISP}/${subdir}"
47 doins "$@"
48 )
49 - eend $? "elisp-install: doins failed" || die
50 }
51
52 # @FUNCTION: elisp-site-file-install
53 @@ -316,14 +321,14 @@ elisp-install() {
54 # respectively.
55
56 elisp-site-file-install() {
57 - local sf="${1##*/}" my_pn="${2:-${PN}}" ret
58 + local sf="${1##*/}" my_pn="${2:-${PN}}"
59 local header=";;; ${PN} site-lisp configuration"
60
61 [[ ${sf} == [0-9][0-9]*-gentoo*.el ]] \
62 || ewarn "elisp-site-file-install: bad name of site-init file"
63 [[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el"
64 + einfo "Installing site-init file ${sf} for GNU Emacs"
65 sf="${T}/${sf}"
66 - ebegin "Installing site initialisation file for GNU Emacs"
67 [[ $1 = "${sf}" ]] || cp "$1" "${sf}"
68 sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \
69 -e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" \
70 @@ -332,9 +337,7 @@ elisp-site-file-install() {
71 insinto "${SITELISP}/site-gentoo.d"
72 doins "${sf}"
73 )
74 - ret=$?
75 rm -f "${sf}"
76 - eend ${ret} "elisp-site-file-install: doins failed" || die
77 }
78
79 # @FUNCTION: elisp-site-regen
80 --
81 2.24.1

Attachments

File name MIME type
signature.asc application/pgp-signature