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

Diff of /eclass/elisp.eclass

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

Revision 1.34 Revision 1.36
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.34 2008/09/19 08:12:48 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.36 2008/11/16 10:23:42 ulm Exp $
4# 4#
5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> 5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> 6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org> 7# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org>
8# Copyright 2007-2008 Ulrich Müller <ulm@gentoo.org> 8# Copyright 2007-2008 Ulrich Müller <ulm@gentoo.org>
21# All elisp-* functions are documented there. 21# All elisp-* functions are documented there.
22# 22#
23# If the package's source is a single (in whatever way) compressed elisp 23# If the package's source is a single (in whatever way) compressed elisp
24# file with the file name ${P}.el, then this eclass will move ${P}.el to 24# file with the file name ${P}.el, then this eclass will move ${P}.el to
25# ${PN}.el in src_unpack(). 25# ${PN}.el in src_unpack().
26
27# @ECLASS-VARIABLE: SITEFILE
28# @DESCRIPTION:
29# Name of package's site-init file. The filename must match the shell
30# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
31# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
32# in most cases.
26 33
27# @ECLASS-VARIABLE: DOCS 34# @ECLASS-VARIABLE: DOCS
28# @DESCRIPTION: 35# @DESCRIPTION:
29# DOCS="blah.txt ChangeLog" is automatically used to install the given 36# DOCS="blah.txt ChangeLog" is automatically used to install the given
30# files by dodoc in src_install(). 37# files by dodoc in src_install().
47 if ! version_is_at_least "${need_emacs}" "${have_emacs}"; then 54 if ! version_is_at_least "${need_emacs}" "${have_emacs}"; then
48 eerror "This package needs at least Emacs ${need_emacs}." 55 eerror "This package needs at least Emacs ${need_emacs}."
49 eerror "Use \"eselect emacs\" to select the active version." 56 eerror "Use \"eselect emacs\" to select the active version."
50 die "Emacs version ${have_emacs} is too low." 57 die "Emacs version ${have_emacs} is too low."
51 fi 58 fi
59 einfo "Emacs version: ${have_emacs}"
52} 60}
53 61
54elisp_src_unpack() { 62elisp_src_unpack() {
55 [ -n "${A}" ] && unpack ${A} 63 [ -n "${A}" ] && unpack ${A}
56 if [ -f ${P}.el ]; then 64 if [ -f ${P}.el ]; then
57 mv ${P}.el ${PN}.el || die "mv ${P}.el ${PN}.el failed" 65 mv ${P}.el ${PN}.el || die "mv ${P}.el ${PN}.el failed"
58 fi 66 fi
59} 67}
60 68
61elisp_src_compile() { 69elisp_src_compile() {
62 elisp-compile *.el || die "elisp-compile failed" 70 elisp-compile *.el || die
63} 71}
64 72
65elisp_src_install() { 73elisp_src_install() {
66 elisp-install ${PN} *.el *.elc || die "elisp-install failed" 74 elisp-install ${PN} *.el *.elc || die
75 if [ -n "${SITEFILE}" ]; then
67 elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ 76 elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
68 || die "elisp-site-file-install failed" 77 fi
69 if [ -n "${DOCS}" ]; then 78 if [ -n "${DOCS}" ]; then
70 dodoc ${DOCS} || die "dodoc failed" 79 dodoc ${DOCS} || die "dodoc failed"
71 fi 80 fi
72} 81}
73 82

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20