| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.20 2007/07/10 20:14:52 ulm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.22 2007/08/27 19:41:03 ulm Exp $ |
| 4 | # |
4 | # |
| 5 | # Copyright 2007 Christian Faulhammer <opfer@gentoo.org> |
5 | # Copyright 2007 Christian Faulhammer <opfer@gentoo.org> |
| 6 | # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> |
6 | # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> |
| 7 | # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> |
7 | # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> |
| 8 | # Copyright 2007 Ulrich Mueller <ulm@gentoo.org> |
8 | # Copyright 2007 Ulrich Mueller <ulm@gentoo.org> |
| 9 | # |
9 | # |
|
|
10 | # @ECLASS: elisp.eclass |
|
|
11 | # @MAINTAINER: |
|
|
12 | # emacs@gentoo.org |
|
|
13 | # @BLURB: Eclass for Emacs Lisp packages |
|
|
14 | # @DESCRIPTION: |
|
|
15 | # |
| 10 | # This eclass sets the site-lisp directory for emacs-related packages. |
16 | # This eclass sets the site-lisp directory for Emacs-related packages. |
| 11 | # |
17 | # |
| 12 | # Emacs support for other than pure elisp packages is handled by |
18 | # Emacs support for other than pure elisp packages is handled by |
| 13 | # elisp-common.eclass where you won't have a dependency on Emacs itself. |
19 | # elisp-common.eclass where you won't have a dependency on Emacs itself. |
| 14 | # All elisp-* functions are documented there. |
20 | # All elisp-* functions are documented there. |
| 15 | # |
21 | # |
| 16 | # Setting SIMPLE_ELISP=t in an ebuild means, that the package's source |
22 | # Setting SIMPLE_ELISP=t in an ebuild means, that the package's source |
| 17 | # is a single (in whatever way) compressed elisp file with the file name |
23 | # is a single (in whatever way) compressed elisp file with the file name |
| 18 | # ${PN}-${PV}. The consequences: |
24 | # ${PN}-${PV}. This eclass will then redefine ${S}, and move |
| 19 | # |
|
|
| 20 | # 1.) ${S} is redefined, |
|
|
| 21 | # 2.) ${PN}-${PV}.el is moved to ${PN}.el in src_unpack(). |
25 | # ${PN}-${PV}.el to ${PN}.el in src_unpack(). |
| 22 | # |
26 | # |
| 23 | # DOCS="blah.txt ChangeLog" is automatically used to install the given |
27 | # DOCS="blah.txt ChangeLog" is automatically used to install the given |
| 24 | # files by dodoc in src_install(). |
28 | # files by dodoc in src_install(). |
| 25 | # |
29 | # |
| 26 | # If you need anything different from Emacs 21, use the NEED_EMACS |
30 | # If you need anything different from Emacs 21, use the NEED_EMACS |
| … | |
… | |
| 33 | DEPEND=">=virtual/emacs-${VERSION}" |
37 | DEPEND=">=virtual/emacs-${VERSION}" |
| 34 | RDEPEND=">=virtual/emacs-${VERSION}" |
38 | RDEPEND=">=virtual/emacs-${VERSION}" |
| 35 | IUSE="" |
39 | IUSE="" |
| 36 | |
40 | |
| 37 | if [ "${SIMPLE_ELISP}" = 't' ]; then |
41 | if [ "${SIMPLE_ELISP}" = 't' ]; then |
| 38 | S="${WORKDIR}/" |
42 | S="${WORKDIR}" |
| 39 | fi |
43 | fi |
| 40 | |
44 | |
| 41 | elisp_pkg_setup() { |
45 | elisp_pkg_setup() { |
| 42 | local emacs_version="$(elisp-emacs-version)" |
46 | local emacs_version="$(elisp-emacs-version)" |
| 43 | if ! version_is_at_least "${VERSION}" "${emacs_version}"; then |
47 | if ! version_is_at_least "${VERSION}" "${emacs_version}"; then |