summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-01-04 21:22:43 +0000
committerUlrich Müller <ulm@gentoo.org>2013-01-04 21:22:43 +0000
commitcedc14ef58167e2643877b1c5ae818cd21b693cd (patch)
treef11f76771678a78c787811f9510120a3a2d8c028
parentStable for ia64, wrt bug #436518 (diff)
downloadgentoo-2-cedc14ef58167e2643877b1c5ae818cd21b693cd.tar.gz
gentoo-2-cedc14ef58167e2643877b1c5ae818cd21b693cd.tar.bz2
gentoo-2-cedc14ef58167e2643877b1c5ae818cd21b693cd.zip
Sync eclasses from Emacs overlay.
elisp-common.eclass: Remove last remnants of backwards compatibility code from elisp-site-regen which was introduced at 2007-12-01. Distinguish between "version too low" and "could not determine version" in elisp_pkg_setup. elisp.eclass: Return 2 as exit status of elisp-need-emacs if the comparison could not be done, e.g., if emacs could not be executed.
-rw-r--r--eclass/ChangeLog11
-rw-r--r--eclass/elisp-common.eclass14
-rw-r--r--eclass/elisp.eclass11
3 files changed, 23 insertions, 13 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 9f0cbb922154..7283a9329a01 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.596 2013/01/04 13:23:43 hd_brummy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.597 2013/01/04 21:22:43 ulm Exp $
+
+ 04 Jan 2013; Ulrich Müller <ulm@gentoo.org> elisp.eclass,
+ elisp-common.eclass:
+ Sync eclasses from Emacs overlay.
+ elisp-common.eclass: Remove last remnants of backwards compatibility code
+ from elisp-site-regen which was introduced at 2007-12-01. Distinguish between
+ "version too low" and "could not determine version" in elisp_pkg_setup.
+ elisp.eclass: Return 2 as exit status of elisp-need-emacs if the comparison
+ could not be done, e.g., if emacs could not be executed.
04 Jan 2013; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-plugin-2.eclass:
fixed typo, thx to Martin Dummer on irc #vdr-gentoo
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 3aa9e3f6165b..fb161050b531 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.82 2012/09/01 09:39:07 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.83 2013/01/04 21:22:43 ulm Exp $
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
@@ -186,14 +186,14 @@ elisp-emacs-version() {
# @FUNCTION: elisp-need-emacs
# @USAGE: <version>
-# @RETURN: 0 if true, 1 otherwise
+# @RETURN: 0 if true, 1 if false, 2 if trouble
# @DESCRIPTION:
# Test if the eselected Emacs version is at least the major version
-# specified as argument.
+# of GNU Emacs specified as argument.
elisp-need-emacs() {
local need_emacs=$1 have_emacs
- have_emacs=$(elisp-emacs-version) || return
+ have_emacs=$(elisp-emacs-version) || return 2
einfo "Emacs version: ${have_emacs}"
if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then
eerror "This package needs GNU Emacs."
@@ -335,10 +335,6 @@ elisp-site-regen() {
ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"
- # Until January 2009, elisp-common.eclass sometimes created an
- # auxiliary file for backwards compatibility. Remove any such file.
- rm -f "${sitelisp}"/00site-gentoo.el
-
for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \
"${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el
do
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 2e3c9e0c37a6..be7176e27422 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.55 2012/08/17 20:29:24 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.56 2013/01/04 21:22:43 ulm Exp $
#
# @ECLASS: elisp.eclass
# @MAINTAINER:
@@ -83,7 +83,12 @@ RDEPEND="${DEPEND}"
# version requirement of the NEED_EMACS variable.
elisp_pkg_setup() {
- elisp-need-emacs "${NEED_EMACS:-21}" || die "Emacs version too low"
+ elisp-need-emacs "${NEED_EMACS:-21}"
+ case $? in
+ 0) ;;
+ 1) die "Emacs version too low" ;;
+ *) die "Could not determine Emacs version" ;;
+ esac
}
# @FUNCTION: elisp_src_unpack