Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass
Date: Thu, 28 Aug 2008 09:55:05
Message-Id: E1KYeDV-0004UT-TN@stork.gentoo.org
1 ulm 08/08/28 09:55:01
2
3 Modified: elisp.eclass
4 Log:
5 Sync elisp.eclass from Emacs overlay (revision 1138):
6
7 Remove global VERSION variable to reduce namespace pollution.
8 Handle the case of empty ${A} in src_unpack.
9
10 Revision Changes Path
11 1.33 eclass/elisp.eclass
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.33&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.33&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.32&r2=1.33
16
17 Index: elisp.eclass
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
20 retrieving revision 1.32
21 retrieving revision 1.33
22 diff -u -r1.32 -r1.33
23 --- elisp.eclass 23 Jun 2008 21:38:42 -0000 1.32
24 +++ elisp.eclass 28 Aug 2008 09:55:01 -0000 1.33
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2008 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.32 2008/06/23 21:38:42 opfer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.33 2008/08/28 09:55:01 ulm Exp $
30 #
31 # Copyright 2002-2003 Matthew Kennedy <mkennedy@g.o>
32 # Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com>
33 @@ -37,23 +37,23 @@
34
35 inherit elisp-common versionator
36
37 -VERSION=${NEED_EMACS:-21}
38 -DEPEND=">=virtual/emacs-${VERSION}"
39 -RDEPEND=">=virtual/emacs-${VERSION}"
40 +DEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
41 +RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
42 IUSE=""
43
44 elisp_pkg_setup() {
45 - local emacs_version="$(elisp-emacs-version)"
46 - if ! version_is_at_least "${VERSION}" "${emacs_version}"; then
47 - eerror "This package needs at least Emacs ${VERSION}."
48 + local need_emacs=${NEED_EMACS:-21}
49 + local have_emacs=$(elisp-emacs-version)
50 + if ! version_is_at_least "${need_emacs}" "${have_emacs}"; then
51 + eerror "This package needs at least Emacs ${need_emacs}."
52 eerror "Use \"eselect emacs\" to select the active version."
53 - die "Emacs version ${emacs_version} is too low."
54 + die "Emacs version ${have_emacs} is too low."
55 fi
56 - einfo "Currently selected GNU Emacs version: ${emacs_version}"
57 + einfo "Currently selected GNU Emacs version: ${have_emacs}"
58 }
59
60 elisp_src_unpack() {
61 - unpack ${A}
62 + [ -n "${A}" ] && unpack ${A}
63 if [ -f ${P}.el ]; then
64 mv ${P}.el ${PN}.el || die "mv ${P}.el ${PN}.el failed"
65 fi