diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2009-02-23 23:46:31 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2009-02-23 23:46:31 +0000 |
commit | ee9ff60f8345afc6b1f0375fe00145afe42aa865 (patch) | |
tree | 4bdbfb0eed4cddeb04e7bfff5a0ceb8d81b7ccf0 /eclass | |
parent | Version bump, fixes bug 260074. Change location of etcdir. (diff) | |
download | gentoo-2-ee9ff60f8345afc6b1f0375fe00145afe42aa865.tar.gz gentoo-2-ee9ff60f8345afc6b1f0375fe00145afe42aa865.tar.bz2 gentoo-2-ee9ff60f8345afc6b1f0375fe00145afe42aa865.zip |
make eclass ready for eapi2
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/vdr-plugin.eclass | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/eclass/vdr-plugin.eclass b/eclass/vdr-plugin.eclass index 20c64bc82d09..6c143ec80c57 100644 --- a/eclass/vdr-plugin.eclass +++ b/eclass/vdr-plugin.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.65 2008/07/03 11:18:13 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.66 2009/02/23 23:46:31 zzam Exp $ # # Author: # Matthias Schwarzott <zzam@gentoo.org> @@ -387,21 +387,16 @@ vdr-plugin_pkg_setup() { einfo "\tvdr-${VDRVERSION} [API version ${APIVERSION}]" } -vdr-plugin_src_unpack() { - if [[ -z ${VDR_INCLUDE_DIR} ]]; then - eerror "Wrong use of vdr-plugin.eclass." - eerror "An ebuild for a vdr-plugin will not work without calling vdr-plugin_pkg_setup." - echo - eerror "Please report this at bugs.gentoo.org." - die "vdr-plugin_pkg_setup not called!" - fi - [ -z "$1" ] && vdr-plugin_src_unpack unpack add_local_patch patchmakefile i18n +vdr-plugin_src_util() { while [ "$1" ]; do case "$1" in + all) + vdr-plugin_src_util unpack add_local_patch patchmakefile i18n + ;; all_but_unpack) - vdr-plugin_src_unpack add_local_patch patchmakefile i18n + vdr-plugin_src_util add_local_patch patchmakefile i18n ;; unpack) base_src_unpack @@ -424,6 +419,33 @@ vdr-plugin_src_unpack() { done } +vdr-plugin_src_unpack() { + if [[ -z ${VDR_INCLUDE_DIR} ]]; then + eerror "Wrong use of vdr-plugin.eclass." + eerror "An ebuild for a vdr-plugin will not work without calling vdr-plugin_pkg_setup." + echo + eerror "Please report this at bugs.gentoo.org." + die "vdr-plugin_pkg_setup not called!" + fi + if [ -z "$1" ]; then + case "${EAPI:-0}" in + 2) + vdr-plugin_src_util unpack + ;; + *) + vdr-plugin_src_util all + ;; + esac + + else + vdr-plugin_src_util $@ + fi +} + +vdr-plugin_src_prepare() { + vdr-plugin_src_util all_but_unpack +} + vdr-plugin_src_compile() { [ -z "$1" ] && vdr-plugin_src_compile prepare compile @@ -548,4 +570,11 @@ vdr-plugin_pkg_config() { vdr-plugin_print_enable_command } -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm pkg_config +case "${EAPI:-0}" in + 2) + EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config + ;; + *) + EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm pkg_config + ;; +esac |