1 |
commit: be1546c53db3f239a96ae8bb25382eccae863507 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 9 08:25:22 2019 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 9 08:25:22 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=be1546c5 |
7 |
|
8 |
elisp.eclass: Sync from gentoo repo. |
9 |
|
10 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
11 |
|
12 |
eclass/elisp.eclass | 25 +++++++++++-------------- |
13 |
1 file changed, 11 insertions(+), 14 deletions(-) |
14 |
|
15 |
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass |
16 |
index c885345..bcd80a9 100644 |
17 |
--- a/eclass/elisp.eclass |
18 |
+++ b/eclass/elisp.eclass |
19 |
@@ -38,7 +38,8 @@ |
20 |
# @DESCRIPTION: |
21 |
# Space separated list of patches to apply after unpacking the sources. |
22 |
# Patch files are searched for in the current working dir, WORKDIR, and |
23 |
-# FILESDIR. |
24 |
+# FILESDIR. This variable is semi-deprecated, preferably use the |
25 |
+# PATCHES array instead if the EAPI supports it. |
26 |
|
27 |
# @ECLASS-VARIABLE: ELISP_REMOVE |
28 |
# @DEFAULT_UNSET |
29 |
@@ -59,12 +60,6 @@ |
30 |
# Space separated list of Texinfo sources. Respective GNU Info files |
31 |
# will be generated in src_compile() and installed in src_install(). |
32 |
|
33 |
-# @ECLASS-VARIABLE: DOCS |
34 |
-# @DEFAULT_UNSET |
35 |
-# @DESCRIPTION: |
36 |
-# DOCS="blah.txt ChangeLog" is automatically used to install the given |
37 |
-# files by dodoc in src_install(). |
38 |
- |
39 |
inherit elisp-common |
40 |
case ${EAPI:-0} in |
41 |
4|5) inherit epatch ;; |
42 |
@@ -101,7 +96,7 @@ elisp_pkg_setup() { |
43 |
# WORKDIR for packages distributed that way. |
44 |
|
45 |
elisp_src_unpack() { |
46 |
- [[ -n ${A} ]] && unpack ${A} |
47 |
+ default |
48 |
if [[ -f ${P}.el ]]; then |
49 |
# the "simple elisp" case with a single *.el file in WORKDIR |
50 |
mv ${P}.el ${PN}.el || die |
51 |
@@ -132,10 +127,10 @@ elisp_src_prepare() { |
52 |
esac |
53 |
done |
54 |
|
55 |
- # apply any user patches |
56 |
+ # apply PATCHES (if supported in EAPI), and any user patches |
57 |
case ${EAPI} in |
58 |
4|5) epatch_user ;; |
59 |
- *) eapply_user ;; |
60 |
+ *) default ;; |
61 |
esac |
62 |
|
63 |
if [[ -n ${ELISP_REMOVE} ]]; then |
64 |
@@ -177,11 +172,13 @@ elisp_src_install() { |
65 |
if [[ -n ${ELISP_TEXINFO} ]]; then |
66 |
set -- ${ELISP_TEXINFO} |
67 |
set -- ${@##*/} |
68 |
- doinfo ${@/%.*/.info*} || die |
69 |
- fi |
70 |
- if [[ -n ${DOCS} ]]; then |
71 |
- dodoc ${DOCS} || die |
72 |
+ doinfo ${@/%.*/.info*} |
73 |
fi |
74 |
+ # install documentation only when explicitly requested |
75 |
+ case ${EAPI} in |
76 |
+ 4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;; |
77 |
+ *) declare -p DOCS &>/dev/null && einstalldocs ;; |
78 |
+ esac |
79 |
if declare -f readme.gentoo_create_doc >/dev/null; then |
80 |
readme.gentoo_create_doc |
81 |
fi |