| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 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.1.1.1 2005/11/30 09:59:37 chriswhite Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.8 2003/09/21 01:40:41 mkennedy Exp $ |
| 4 | # |
4 | # |
| 5 | # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> |
5 | # Author Matthew Kennedy <mkennedy@gentoo.org> |
| 6 | # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> |
|
|
| 7 | # |
6 | # |
| 8 | # This eclass sets the site-lisp directory for emacs-related packages. |
7 | # This eclass sets the site-lisp directory for emacs-related packages. |
| 9 | |
8 | |
| 10 | inherit elisp-common |
9 | inherit elisp-common |
|
|
10 | |
|
|
11 | ECLASS=elisp |
|
|
12 | INHERITED="$INHERITED $ECLASS" |
|
|
13 | |
|
|
14 | source /usr/portage/eclass/elisp-common.eclass |
| 11 | |
15 | |
| 12 | # SRC_URI should be set to wherever the primary app-emacs/ maintainer |
16 | # SRC_URI should be set to wherever the primary app-emacs/ maintainer |
| 13 | # keeps the local elisp mirror, since most app-emacs packages are |
17 | # keeps the local elisp mirror, since most app-emacs packages are |
| 14 | # upstream as a single .el file. |
18 | # upstream as a single .el file. |
| 15 | |
19 | |
| 16 | # Note: This is no longer necessary. |
20 | # Note: This is no longer necessary. |
| 17 | |
21 | |
| 18 | SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2" |
22 | SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2" |
| 19 | if [ "${SIMPLE_ELISP}" = 't' ]; then |
|
|
| 20 | S="${WORKDIR}/" |
23 | S="${WORKDIR}/" |
| 21 | #else |
24 | newdepend "virtual/emacs" |
| 22 | # Use default value |
|
|
| 23 | # S="${WORKDIR}/${P}" |
|
|
| 24 | fi |
|
|
| 25 | |
|
|
| 26 | DEPEND="virtual/emacs" |
|
|
| 27 | IUSE="" |
25 | IUSE="" |
| 28 | |
26 | |
| 29 | elisp_src_unpack() { |
27 | src_unpack() { |
| 30 | unpack ${A} |
28 | unpack ${A} |
| 31 | if [ "${SIMPLE_ELISP}" = 't' ] |
29 | if [ "${SIMPLE_ELISP}" = 't' ] |
| 32 | then |
30 | then |
| 33 | cd ${S} && mv ${P}.el ${PN}.el |
31 | cd ${S} && mv ${P}.el ${PN}.el |
| 34 | fi |
32 | fi |
| 35 | } |
33 | } |
| 36 | |
34 | |
| 37 | elisp_src_compile() { |
35 | src_compile() { |
| 38 | elisp-compile *.el || die |
36 | emacs --batch -f batch-byte-compile --no-site-file --no-init-file *.el || die |
| 39 | } |
37 | } |
| 40 | |
38 | |
| 41 | elisp_src_install() { |
39 | src_install() { |
| 42 | elisp-install ${PN} *.el *.elc |
40 | elisp-install ${PN} *.el *.elc |
| 43 | elisp-site-file-install ${FILESDIR}/${SITEFILE} |
41 | elisp-site-file-install ${FILESDIR}/${SITEFILE} |
| 44 | } |
42 | } |
| 45 | |
43 | |
| 46 | elisp_pkg_postinst() { |
44 | pkg_postinst() { |
| 47 | elisp-site-regen |
45 | elisp-site-regen |
| 48 | } |
46 | } |
| 49 | |
47 | |
| 50 | elisp_pkg_postrm() { |
48 | pkg_postrm() { |
| 51 | elisp-site-regen |
49 | elisp-site-regen |
| 52 | } |
50 | } |
| 53 | |
|
|
| 54 | EXPORT_FUNCTIONS src_unpack src_compile src_install \ |
|
|
| 55 | pkg_postinst pkg_postrm |
|
|
| 56 | |
51 | |
| 57 | # Local Variables: *** |
52 | # Local Variables: *** |
| 58 | # mode: shell-script *** |
53 | # mode: shell-script *** |
| 59 | # tab-width: 4 *** |
54 | # tab-width: 4 *** |
| 60 | # indent-tabs-mode: t *** |
55 | # indent-tabs-mode: t *** |