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

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20