1 |
commit: 88c36c962efd502778b33cb511e3b52da3558c49 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 25 17:57:06 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 25 17:57:06 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=88c36c96 |
7 |
|
8 |
elisp-common.eclass: Sync from gentoo repo. |
9 |
|
10 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
11 |
|
12 |
eclass/elisp-common.eclass | 15 +++++++++------ |
13 |
1 file changed, 9 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass |
16 |
index 0bf6c01..66a3a32 100644 |
17 |
--- a/eclass/elisp-common.eclass |
18 |
+++ b/eclass/elisp-common.eclass |
19 |
@@ -393,9 +393,9 @@ elisp-modules-install() { |
20 |
# @DESCRIPTION: |
21 |
# Install Emacs site-init file in SITELISP directory. Automatically |
22 |
# inserts a standard comment header with the name of the package |
23 |
-# (unless it is already present). Tokens @SITELISP@, @SITEETC@, and |
24 |
-# @EMACSMODULES@ are replaced by the path to the package's subdirectory |
25 |
-# in SITELISP, SITEETC, and EMACSMODULES, respectively. |
26 |
+# (unless it is already present). Tokens @SITELISP@, @SITEETC@, |
27 |
+# and @EMACSMODULES@ are replaced by the path to the package's |
28 |
+# subdirectory in SITELISP, SITEETC, and EMACSMODULES, respectively. |
29 |
|
30 |
elisp-site-file-install() { |
31 |
local sf="${1##*/}" my_pn="${2:-${PN}}" modules ret |
32 |
@@ -407,9 +407,12 @@ elisp-site-file-install() { |
33 |
sf="${T}/${sf}" |
34 |
ebegin "Installing site initialisation file for GNU Emacs" |
35 |
[[ $1 = "${sf}" ]] || cp "$1" "${sf}" |
36 |
- [[ ${EAPI} == [45] ]] && grep -q "@EMACSMODULES@" "${sf}" \ |
37 |
- && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}" |
38 |
- modules=${EMACSMODULES//@libdir@/$(get_libdir)} |
39 |
+ if [[ ${EAPI} == [45] ]]; then |
40 |
+ grep -q "@EMACSMODULES@" "${sf}" \ |
41 |
+ && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}" |
42 |
+ else |
43 |
+ modules=${EMACSMODULES//@libdir@/$(get_libdir)} |
44 |
+ fi |
45 |
sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \ |
46 |
-e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" \ |
47 |
-e "s:@SITEETC@:${EPREFIX}${SITEETC}/${my_pn}:g" \ |