summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-08-28 09:55:01 +0000
committerUlrich Müller <ulm@gentoo.org>2008-08-28 09:55:01 +0000
commit779d73f4ec776fac0762a6321e6a9db3ded2118a (patch)
tree66f617b5ce15a5b6017f354e715af6729566c32b /eclass
parentAdd fix to compile on alpha, alpha stable wrt #200337 (diff)
downloadgentoo-2-779d73f4ec776fac0762a6321e6a9db3ded2118a.tar.gz
gentoo-2-779d73f4ec776fac0762a6321e6a9db3ded2118a.tar.bz2
gentoo-2-779d73f4ec776fac0762a6321e6a9db3ded2118a.zip
Sync elisp.eclass from Emacs overlay (revision 1138):
Remove global VERSION variable to reduce namespace pollution. Handle the case of empty ${A} in src_unpack.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/elisp.eclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index a2691e539aee..71e584d55f92 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.32 2008/06/23 21:38:42 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.33 2008/08/28 09:55:01 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -37,23 +37,23 @@
inherit elisp-common versionator
-VERSION=${NEED_EMACS:-21}
-DEPEND=">=virtual/emacs-${VERSION}"
-RDEPEND=">=virtual/emacs-${VERSION}"
+DEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
+RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
IUSE=""
elisp_pkg_setup() {
- local emacs_version="$(elisp-emacs-version)"
- if ! version_is_at_least "${VERSION}" "${emacs_version}"; then
- eerror "This package needs at least Emacs ${VERSION}."
+ local need_emacs=${NEED_EMACS:-21}
+ local have_emacs=$(elisp-emacs-version)
+ if ! version_is_at_least "${need_emacs}" "${have_emacs}"; then
+ eerror "This package needs at least Emacs ${need_emacs}."
eerror "Use \"eselect emacs\" to select the active version."
- die "Emacs version ${emacs_version} is too low."
+ die "Emacs version ${have_emacs} is too low."
fi
- einfo "Currently selected GNU Emacs version: ${emacs_version}"
+ einfo "Currently selected GNU Emacs version: ${have_emacs}"
}
elisp_src_unpack() {
- unpack ${A}
+ [ -n "${A}" ] && unpack ${A}
if [ -f ${P}.el ]; then
mv ${P}.el ${PN}.el || die "mv ${P}.el ${PN}.el failed"
fi