meson.eclass: Don't mix host *FLAGS with build *FLAGS
[gentoo.git] / eclass / xemacs-elisp.eclass
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 #
4 # Copyright 2007-2011 Hans de Graaff <graaff@gentoo.org>
5 #
6 # Based on elisp.eclass:
7 # Copyright 2007 Christian Faulhammer <opfer@gentoo.org>
8 # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
9 # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
10 #
11 # @ECLASS: xemacs-elisp.eclass
12 # @MAINTAINER:
13 # xemacs@gentoo.org
14 # @BLURB: Eclass for XEmacs Lisp packages
15 # @DESCRIPTION:
16 # Emacs support for other than pure elisp packages is handled by
17 # xemacs-elisp-common.eclass where you won't have a dependency on XEmacs
18 # itself.  All elisp-* functions are documented there.
19
20 # @ECLASS-VARIABLE: SIMPLE_ELISP
21 # @DEFAULT_UNSET
22 # @DESCRIPTION:
23 # Setting SIMPLE_ELISP=t in an ebuild means, that the package's source
24 # is a single (in whatever way) compressed elisp file with the file name
25 # ${PN}-${PV}.  This eclass will then redefine ${S}, and move
26 # ${PN}-${PV}.el to ${PN}.el in src_unpack().
27
28 inherit xemacs-elisp-common
29
30 if [ "${SIMPLE_ELISP}" = 't' ]; then
31         S="${WORKDIR}/"
32 fi
33
34
35 DEPEND="app-editors/xemacs"
36 IUSE=""
37
38 xemacs-elisp_src_unpack() {
39         unpack ${A}
40         if [ "${SIMPLE_ELISP}" = 't' ]
41                 then
42                 cd "${S}" && mv ${P}.el ${PN}.el
43         fi
44 }
45
46 xemacs-elisp_src_compile() {
47         xemacs-elisp-compile *.el
48 }
49
50 xemacs-elisp_src_install () {
51         xemacs-elisp-install "${PN}" *.el *.elc
52 }
53
54 EXPORT_FUNCTIONS src_unpack src_compile src_install