Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 20 Dec 2015 12:25:32
Message-Id: 1450613980.d0d5ea0dfc160d2e86a2f5ac5684ca8cf7f65fa9.ulm@gentoo
1 commit: d0d5ea0dfc160d2e86a2f5ac5684ca8cf7f65fa9
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 19 12:08:36 2015 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 20 12:19:40 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0d5ea0d
7
8 elisp.eclass: Support EAPI 6.
9
10 eclass/elisp.eclass | 35 +++++++++++++++++++++++++----------
11 1 file changed, 25 insertions(+), 10 deletions(-)
12
13 diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
14 index 1178880..93a7d4b 100644
15 --- a/eclass/elisp.eclass
16 +++ b/eclass/elisp.eclass
17 @@ -65,13 +65,21 @@
18 # DOCS="blah.txt ChangeLog" is automatically used to install the given
19 # files by dodoc in src_install().
20
21 -inherit elisp-common eutils
22 +inherit elisp-common
23
24 case ${EAPI:-0} in
25 - 0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
26 - pkg_{setup,postinst,postrm} ;;
27 - *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
28 - pkg_{setup,postinst,postrm} ;;
29 + 0|1)
30 + inherit eutils
31 + EXPORT_FUNCTIONS src_{unpack,compile,install} \
32 + pkg_{setup,postinst,postrm} ;;
33 + 2|3|4|5)
34 + inherit eutils
35 + EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
36 + pkg_{setup,postinst,postrm} ;;
37 + 6)
38 + EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
39 + pkg_{setup,postinst,postrm} ;;
40 + *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
41 esac
42
43 DEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
44 @@ -117,21 +125,28 @@ elisp_src_unpack() {
45 # for in the current working dir, WORKDIR, and FILESDIR.
46
47 elisp_src_prepare() {
48 - local patch
49 + local patch file
50 for patch in ${ELISP_PATCHES}; do
51 if [[ -f ${patch} ]]; then
52 - epatch "${patch}"
53 + file="${patch}"
54 elif [[ -f ${WORKDIR}/${patch} ]]; then
55 - epatch "${WORKDIR}/${patch}"
56 + file="${WORKDIR}/${patch}"
57 elif [[ -f ${FILESDIR}/${patch} ]]; then
58 - epatch "${FILESDIR}/${patch}"
59 + file="${FILESDIR}/${patch}"
60 else
61 die "Cannot find ${patch}"
62 fi
63 + case ${EAPI:-0} in
64 + 0|1|2|3|4|5) epatch "${file}" ;;
65 + 6) eapply "${file}" ;;
66 + esac
67 done
68
69 # apply any user patches
70 - epatch_user
71 + case ${EAPI:-0} in
72 + 0|1|2|3|4|5) epatch_user ;;
73 + 6) eapply_user ;;
74 + esac
75
76 if [[ -n ${ELISP_REMOVE} ]]; then
77 rm ${ELISP_REMOVE} || die