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

Diff of /eclass/elisp.eclass

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

Revision 1.3 Revision 1.11
1# Copyright 1999-2002 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# Author Matthew Kennedy <mkennedy@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.3 2003/02/11 22:19:53 mkennedy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.11 2004/06/25 00:39:48 vapier Exp $
5 4#
5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7#
6# This eclass sets the site-lisp directory for emacs-related packages. 8# This eclass sets the site-lisp directory for emacs-related packages.
7 9
10inherit elisp-common
8ECLASS=elisp 11ECLASS=elisp
9INHERITED="$INHERITED $ECLASS" 12INHERITED="$INHERITED $ECLASS"
10 13
11SITELISP=/usr/share/emacs/site-lisp 14# SRC_URI should be set to wherever the primary app-emacs/ maintainer
15# keeps the local elisp mirror, since most app-emacs packages are
16# upstream as a single .el file.
12 17
13elisp-install() { 18# Note: This is no longer necessary.
14 local subdir=$1 19
15 dodir ${SITELISP}/${subdir} 20SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2"
16 insinto ${SITELISP}/${subdir} 21if [ "${SIMPLE_ELISP}" = 't' ]; then
17 shift 22 S="${WORKDIR}/"
18 doins $@ 23#else
24# Use default value
25# S="${WORKDIR}/${P}"
26fi
27
28DEPEND="virtual/emacs"
29IUSE=""
30
31elisp_src_unpack() {
32 unpack ${A}
33 if [ "${SIMPLE_ELISP}" = 't' ]
34 then
35 cd ${S} && mv ${P}.el ${PN}.el
36 fi
19} 37}
20 38
21elisp-site-file-install() { 39elisp_src_compile() {
22 local sitefile=$1 40 elisp-compile *.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} 41}
30 42
31elisp-site-regen() { 43elisp_src_install() {
32 einfo "Regenerating ${SITELISP}/site-start.el..." 44 elisp-install ${PN} *.el *.elc
33 einfo "" 45 elisp-site-file-install ${FILESDIR}/${SITEFILE}
34 cat <<EOF >${SITELISP}/site-start.el 46}
35;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
36;;; -----------------------------------------------------------------
37 47
38EOF 48elisp_pkg_postinst() {
39 ls ${SITELISP}/[0-9][0-9]* |sort -n |grep -vE '~$' | \ 49 elisp-site-regen
40 while read sf
41 do
42 einfo " Adding $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} 50}
51
52elisp_pkg_postrm() {
53 elisp-site-regen
54}
55
56EXPORT_FUNCTIONS src_unpack src_compile src_install \
57 pkg_postinst pkg_postrm
58
59# Local Variables: ***
60# mode: shell-script ***
61# tab-width: 4 ***
62# indent-tabs-mode: t ***
63# End: ***

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20