/[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.7
1# Copyright 1999-2004 Gentoo Foundation 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.1.1.1 2005/11/30 09:59:37 chriswhite Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.7 2003/09/20 22:27:08 mkennedy Exp $
4# 4#
5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> 5# Author Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7# 6#
8# This eclass sets the site-lisp directory for emacs-related packages. 7# This eclass sets the site-lisp directory for emacs-related packages.
9 8
10inherit elisp-common 9ECLASS=elisp
10INHERITED="$INHERITED $ECLASS"
11
12SITELISP=/usr/share/emacs/site-lisp
13
14elisp-install() {
15 local subdir=$1
16 dodir ${SITELISP}/${subdir}
17 insinto ${SITELISP}/${subdir}
18 shift
19 doins $@
20}
21
22elisp-site-file-install() {
23 local sitefile=$1
24 pushd ${S}
25 cp ${sitefile} .
26 D=${S}/ dosed "s:@SITELISP@:${SITELISP}/${PN}:g" $(basename ${sitefile})
27 insinto ${SITELISP}
28 doins ${S}/$(basename ${sitefile})
29 popd
30}
31
32elisp-site-regen() {
33 einfo "Regenerating ${SITELISP}/site-start.el..."
34 einfo ""
35 cat <<EOF >${SITELISP}/site-start.el
36;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
37;;; -----------------------------------------------------------------
38
39EOF
40 ls ${SITELISP}/[0-9][0-9]* |sort -n |grep -vE '~$' | \
41 while read sf
42 do
43 einfo " Adding $sf..."
44 # Great for debugging, too noisy and slow for users though
45# echo "(message \"Loading $sf...\")" >>${SITELISP}/site-start.el
46 cat $sf >>${SITELISP}/site-start.el
47 done
48 einfo ""
49}
50
51# DEFAULT OVERRIDES
11 52
12# SRC_URI should be set to wherever the primary app-emacs/ maintainer 53# SRC_URI should be set to wherever the primary app-emacs/ maintainer
13# keeps the local elisp mirror, since most app-emacs packages are 54# keeps the local elisp mirror, since most app-emacs packages are
14# upstream as a single .el file. 55# upstream as a single .el file
15
16# Note: This is no longer necessary.
17 56
18SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2" 57SRC_URI="http://cvs.gentoo.org/~mkennedy/app-emacs/${P}.el.bz2"
19if [ "${SIMPLE_ELISP}" = 't' ]; then
20 S="${WORKDIR}/" 58S="${WORKDIR}/"
21#else 59# newdepend "virtual/emacs"
22# Use default value
23# S="${WORKDIR}/${P}"
24fi
25
26DEPEND="virtual/emacs"
27IUSE="" 60IUSE=""
28 61
29elisp_src_unpack() { 62src_unpack() {
30 unpack ${A} 63 unpack ${A}
31 if [ "${SIMPLE_ELISP}" = 't' ] 64 if [ "${SIMPLE_ELISP}" = 't' ]
32 then 65 then
33 cd ${S} && mv ${P}.el ${PN}.el 66 cd ${S} && mv ${P}.el ${PN}.el
34 fi 67 fi
35} 68}
36 69
37elisp_src_compile() { 70src_compile() {
38 elisp-compile *.el || die 71 emacs --batch -f batch-byte-compile --no-site-file --no-init-file *.el || die
39} 72}
40 73
41elisp_src_install() { 74src_install() {
42 elisp-install ${PN} *.el *.elc 75 elisp-install ${PN} *.el *.elc
43 elisp-site-file-install ${FILESDIR}/${SITEFILE} 76 elisp-site-file-install ${FILESDIR}/${SITEFILE}
44} 77}
45 78
46elisp_pkg_postinst() { 79pkg_postinst() {
47 elisp-site-regen 80 elisp-site-regen
48} 81}
49 82
50elisp_pkg_postrm() { 83pkg_postrm() {
51 elisp-site-regen 84 elisp-site-regen
52} 85}
53 86
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.7

  ViewVC Help
Powered by ViewVC 1.1.20