summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-09-25 19:57:06 +0200
committerUlrich Müller <ulm@gentoo.org>2020-09-25 19:57:06 +0200
commit88c36c962efd502778b33cb511e3b52da3558c49 (patch)
tree07b37cf472ee0ebda06bb3df082a2fbaf1460c98
parentapp-editors/emacs: Fix build failure. (diff)
downloademacs-88c36c962efd502778b33cb511e3b52da3558c49.tar.gz
emacs-88c36c962efd502778b33cb511e3b52da3558c49.tar.bz2
emacs-88c36c962efd502778b33cb511e3b52da3558c49.zip
elisp-common.eclass: Sync from gentoo repo.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--eclass/elisp-common.eclass15
1 files changed, 9 insertions, 6 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 0bf6c01..66a3a32 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -393,9 +393,9 @@ elisp-modules-install() {
# @DESCRIPTION:
# Install Emacs site-init file in SITELISP directory. Automatically
# inserts a standard comment header with the name of the package
-# (unless it is already present). Tokens @SITELISP@, @SITEETC@, and
-# @EMACSMODULES@ are replaced by the path to the package's subdirectory
-# in SITELISP, SITEETC, and EMACSMODULES, respectively.
+# (unless it is already present). Tokens @SITELISP@, @SITEETC@,
+# and @EMACSMODULES@ are replaced by the path to the package's
+# subdirectory in SITELISP, SITEETC, and EMACSMODULES, respectively.
elisp-site-file-install() {
local sf="${1##*/}" my_pn="${2:-${PN}}" modules ret
@@ -407,9 +407,12 @@ elisp-site-file-install() {
sf="${T}/${sf}"
ebegin "Installing site initialisation file for GNU Emacs"
[[ $1 = "${sf}" ]] || cp "$1" "${sf}"
- [[ ${EAPI} == [45] ]] && grep -q "@EMACSMODULES@" "${sf}" \
- && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}"
- modules=${EMACSMODULES//@libdir@/$(get_libdir)}
+ if [[ ${EAPI} == [45] ]]; then
+ grep -q "@EMACSMODULES@" "${sf}" \
+ && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}"
+ else
+ modules=${EMACSMODULES//@libdir@/$(get_libdir)}
+ fi
sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \
-e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" \
-e "s:@SITEETC@:${EPREFIX}${SITEETC}/${my_pn}:g" \