diff options
author | Ulrich Müller <ulm@gentoo.org> | 2009-02-18 20:30:22 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2009-02-18 20:30:22 +0000 |
commit | 77ba98ce846b5e77a4351cb50761268c7f0bdbcb (patch) | |
tree | d3494d45bad7bbae5743510de2f202984d5e3702 /eclass/elisp.eclass | |
parent | Sync from Portage tree. (diff) | |
download | emacs-77ba98ce846b5e77a4351cb50761268c7f0bdbcb.tar.gz emacs-77ba98ce846b5e77a4351cb50761268c7f0bdbcb.tar.bz2 emacs-77ba98ce846b5e77a4351cb50761268c7f0bdbcb.zip |
New elisp_src_prepare function to apply patches.
svn path=/emacs-overlay/; revision=1274
Diffstat (limited to 'eclass/elisp.eclass')
-rw-r--r-- | eclass/elisp.eclass | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index 8f65d9c..1fa9345 100644 --- a/eclass/elisp.eclass +++ b/eclass/elisp.eclass @@ -5,7 +5,7 @@ # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> # Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org> -# Copyright 2007-2008 Ulrich Müller <ulm@gentoo.org> +# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org> # # @ECLASS: elisp.eclass # @MAINTAINER: @@ -42,7 +42,7 @@ # variable before inheriting elisp.eclass. Set it to the major version # your package uses and the dependency will be adjusted. -inherit elisp-common versionator +inherit elisp-common eutils versionator DEPEND=">=virtual/emacs-${NEED_EMACS:-21}" RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}" @@ -64,8 +64,23 @@ elisp_src_unpack() { if [ -f ${P}.el ]; then mv ${P}.el ${PN}.el || die fi + + # for backwards compatibility + case "${EAPI:-0}" in + 0|1) elisp_src_prepare ;; + esac +} + +elisp_src_prepare() { + local p + [ -d "${S}" ] && cd "${S}" + for p in ${PATCHES}; do + epatch ${p} + done } +elisp_src_configure() { :; } + elisp_src_compile() { elisp-compile *.el || die } @@ -88,6 +103,11 @@ elisp_pkg_postrm() { elisp-site-regen } -EXPORT_FUNCTIONS \ - src_unpack src_compile src_install \ - pkg_setup pkg_postinst pkg_postrm +case "${EAPI:-0}" in + 0|1) EXPORT_FUNCTIONS \ + src_unpack src_compile src_install \ + pkg_setup pkg_postinst pkg_postrm ;; + *) EXPORT_FUNCTIONS \ + src_unpack src_prepare src_configure src_compile src_install \ + pkg_setup pkg_postinst pkg_postrm ;; +esac |