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

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

  ViewVC Help
Powered by ViewVC 1.1.20