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