summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-10-16 09:28:58 +0000
committerUlrich Müller <ulm@gentoo.org>2008-10-16 09:28:58 +0000
commite252f2f9d2a689684e892deb7a5d7b6cd4ad9889 (patch)
treefd8df45b516aa491a994c8c05ba16ad05cc8ef28
parentCleanup old ebuilds. (diff)
downloadhistorical-e252f2f9d2a689684e892deb7a5d7b6cd4ad9889.tar.gz
historical-e252f2f9d2a689684e892deb7a5d7b6cd4ad9889.tar.bz2
historical-e252f2f9d2a689684e892deb7a5d7b6cd4ad9889.zip
Partial sync from Emacs overlay (revision 1176).
elisp.class: Allow for packages without site-init file in elisp_src_install. Remove "die" messages since elisp-common.eclass is verbose enough. Document SITEFILE variable. elisp-common.eclass: Use sed instead of cat for concatenation of site-init files, since they may not have a trailing newline. Add function names to error messages. Document SITEETC as eclass variable.
-rw-r--r--eclass/elisp-common.eclass19
-rw-r--r--eclass/elisp.eclass18
2 files changed, 24 insertions, 13 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 387be54b8be1..324e562a37eb 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.49 2008/10/12 19:48:21 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.50 2008/10/16 09:28:58 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -37,7 +37,7 @@
# elisp files is also supported, since the current directory is added to the
# load-path which makes sure that all files are loadable.
#
-# elisp-compile *.el || die "elisp-compile failed"
+# elisp-compile *.el || die
#
# Formerly, function elisp-comp() was used for compilation of interdependent
# elisp files. This usage is considered as obsolete.
@@ -59,7 +59,7 @@
# something else, but remember to tell elisp-site-file-install() (see below)
# the change, as it defaults to ${PN}.
#
-# elisp-install ${PN} *.el *.elc || die "elisp-install failed"
+# elisp-install ${PN} *.el *.elc || die
#
# To let the Emacs support be activated by Emacs on startup, you need
# to provide a site file (shipped in ${FILESDIR}) which contains the startup
@@ -86,12 +86,14 @@
# keybindings as they might interfere with the user's settings. Give a hint
# in pkg_postinst(), which should be enough.
#
-# The naming scheme for this site file is "[0-9][0-9]*-gentoo.el", where the
-# two digits at the beginning define the loading order. So if you depend on
-# another Emacs package, your site file's number must be higher!
+# The naming scheme for this site-init file matches the shell pattern
+# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define the
+# loading order (numbers below 10 or above 89 are reserved for internal use).
+# So if you depend on another Emacs package, your site file's number must be
+# higher!
#
# Best practice is to define a SITEFILE variable in the global scope of your
-# ebuild (right after DEPEND e.g.):
+# ebuild (e.g., right after DEPEND):
#
# SITEFILE=50${PN}-gentoo.el
#
@@ -378,7 +380,8 @@ elisp-site-regen() {
;;; Code:
EOF
- cat "${sflist[@]}" </dev/null >>"${tmpdir}"/site-gentoo.el
+ # Use sed instead of cat here, since files may miss a trailing newline.
+ sed '$q' "${sflist[@]}" </dev/null >>"${tmpdir}"/site-gentoo.el
cat <<-EOF >>"${tmpdir}"/site-gentoo.el
(provide 'site-gentoo)
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 85687a508f69..9173445a2b65 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.34 2008/09/19 08:12:48 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.35 2008/10/16 09:28:58 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -24,6 +24,13 @@
# file with the file name ${P}.el, then this eclass will move ${P}.el to
# ${PN}.el in src_unpack().
+# @ECLASS-VARIABLE: SITEFILE
+# @DESCRIPTION:
+# Name of package's site-init file. The filename must match the shell
+# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
+# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
+# in most cases.
+
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# DOCS="blah.txt ChangeLog" is automatically used to install the given
@@ -59,13 +66,14 @@ elisp_src_unpack() {
}
elisp_src_compile() {
- elisp-compile *.el || die "elisp-compile failed"
+ elisp-compile *.el || die
}
elisp_src_install() {
- elisp-install ${PN} *.el *.elc || die "elisp-install failed"
- elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
- || die "elisp-site-file-install failed"
+ elisp-install ${PN} *.el *.elc || die
+ if [ -n "${SITEFILE}" ]; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ fi
if [ -n "${DOCS}" ]; then
dodoc ${DOCS} || die "dodoc failed"
fi