/[gentoo-x86]/eclass/elisp.eclass
Gentoo

Diff of /eclass/elisp.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.8
1# Copyright 1999-2002 Gentoo Technologies, Inc. 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.8 2003/09/21 01:40:41 mkennedy Exp $
4#
3# Author Matthew Kennedy <mkennedy@gentoo.org> 5# Author Matthew Kennedy <mkennedy@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.1 2002/10/29 04:40:18 mkennedy Exp $ 6#
7# This eclass sets the site-lisp directory for emacs-related packages.
5 8
6# This eclass sets the site-lisp directory for emacs-related packages. 9inherit elisp-common
7 10
8ECLASS=elisp 11ECLASS=elisp
9INHERITED="$INHERITED $ECLASS" 12INHERITED="$INHERITED $ECLASS"
10 13
11SITELISP=/usr/share/emacs/site-lisp 14source /usr/portage/eclass/elisp-common.eclass
12 15
13elisp-install() { 16# SRC_URI should be set to wherever the primary app-emacs/ maintainer
14 local subdir=$1 17# keeps the local elisp mirror, since most app-emacs packages are
15 dodir ${SITELISP}/${subdir} 18# upstream as a single .el file.
16 insinto ${SITELISP}/${subdir} 19
17 shift 20# Note: This is no longer necessary.
18 doins $@ 21
22SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2"
23S="${WORKDIR}/"
24newdepend "virtual/emacs"
25IUSE=""
26
27src_unpack() {
28 unpack ${A}
29 if [ "${SIMPLE_ELISP}" = 't' ]
30 then
31 cd ${S} && mv ${P}.el ${PN}.el
32 fi
19} 33}
20 34
21elisp-site-file-install() { 35src_compile() {
22 local sitefile=$1 36 emacs --batch -f batch-byte-compile --no-site-file --no-init-file *.el || die
23 pushd ${S}
24 cp ${sitefile} .
25 D=${S}/ dosed "s:@SITELISP@:${SITELISP}/${PN}:g" $(basename ${sitefile})
26 insinto ${SITELISP}
27 doins ${S}/$(basename ${sitefile})
28 popd
29} 37}
30 38
31elisp-site-regen() { 39src_install() {
32 einfo "Regenerating ${SITELISP}/site-start.el..." 40 elisp-install ${PN} *.el *.elc
33 einfo "" 41 elisp-site-file-install ${FILESDIR}/${SITEFILE}
34 cat <<EOF >${SITELISP}/site-start.el 42}
35;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
36;;; -----------------------------------------------------------------
37 43
38EOF 44pkg_postinst() {
39 ls ${SITELISP}/[0-9][0-9]* |sort -n | \ 45 elisp-site-regen
40 while read sf
41 do
42 einfo " Addding $sf..."
43 # Great for debugging, too noisy and slow for users though
44# echo "(message \"Loading $sf...\")" >>${SITELISP}/site-start.el
45 cat $sf >>${SITELISP}/site-start.el
46 done
47 einfo ""
48} 46}
47
48pkg_postrm() {
49 elisp-site-regen
50}
51
52# Local Variables: ***
53# mode: shell-script ***
54# tab-width: 4 ***
55# indent-tabs-mode: t ***
56# End: ***

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20