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

Diff of /eclass/elisp.eclass

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

Revision 1.38 Revision 1.40
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.38 2009/03/12 12:08:47 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.40 2009/03/29 19:49:45 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-2009 Christian Faulhammer <fauli@gentoo.org> 7# Copyright 2007-2009 Christian Faulhammer <fauli@gentoo.org>
8# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org> 8# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org>
36# @ECLASS-VARIABLE: DOCS 36# @ECLASS-VARIABLE: DOCS
37# @DESCRIPTION: 37# @DESCRIPTION:
38# DOCS="blah.txt ChangeLog" is automatically used to install the given 38# DOCS="blah.txt ChangeLog" is automatically used to install the given
39# files by dodoc in src_install(). 39# files by dodoc in src_install().
40 40
41# @ECLASS-VARIABLE: ELISP_PATCHES
42# @DESCRIPTION:
43# Any patches to apply after unpacking the sources. Patches are searched
44# both in ${PWD} and ${FILESDIR}.
45
41# @ECLASS-VARIABLE: SITEFILE 46# @ECLASS-VARIABLE: SITEFILE
42# @DESCRIPTION: 47# @DESCRIPTION:
43# Name of package's site-init file. The filename must match the shell 48# Name of package's site-init file. The filename must match the shell
44# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are 49# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
45# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice 50# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
46# in most cases. 51# in most cases.
47 52
48inherit elisp-common versionator 53inherit elisp-common eutils versionator
49 54
50EXPORT_FUNCTIONS \ 55case "${EAPI:-0}" in
51 src_unpack src_compile src_install \ 56 0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
52 pkg_setup pkg_postinst pkg_postrm 57 pkg_{setup,postinst,postrm} ;;
58 *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
59 pkg_{setup,postinst,postrm} ;;
60esac
53 61
54DEPEND=">=virtual/emacs-${NEED_EMACS:-21}" 62DEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
55RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}" 63RDEPEND="${DEPEND}"
56IUSE="" 64IUSE=""
57 65
58elisp_pkg_setup() { 66elisp_pkg_setup() {
59 local need_emacs=${NEED_EMACS:-21} 67 local need_emacs=${NEED_EMACS:-21}
60 local have_emacs=$(elisp-emacs-version) 68 local have_emacs=$(elisp-emacs-version)
67} 75}
68 76
69elisp_src_unpack() { 77elisp_src_unpack() {
70 [ -n "${A}" ] && unpack ${A} 78 [ -n "${A}" ] && unpack ${A}
71 if [ -f ${P}.el ]; then 79 if [ -f ${P}.el ]; then
80 # the "simple elisp" case with a single *.el file in WORKDIR
72 mv ${P}.el ${PN}.el || die 81 mv ${P}.el ${PN}.el || die
82 [ -d "${S}" ] || S=${WORKDIR}
73 fi 83 fi
84
85 case "${EAPI:-0}" in
86 0|1) elisp_src_prepare ;;
87 esac
74} 88}
89
90elisp_src_prepare() {
91 local patch
92 for patch in ${ELISP_PATCHES}; do
93 if [ -f "${patch}" ]; then
94 epatch "${patch}"
95 elif [ -f "${FILESDIR}/${patch}" ]; then
96 epatch "${FILESDIR}/${patch}"
97 else
98 die "Cannot find ${patch}"
99 fi
100 done
101}
102
103elisp_src_configure() { :; }
75 104
76elisp_src_compile() { 105elisp_src_compile() {
77 elisp-compile *.el || die 106 elisp-compile *.el || die
78} 107}
79 108

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20