summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTorsten Veller <tove@gentoo.org>2009-03-06 11:44:18 +0000
committerTorsten Veller <tove@gentoo.org>2009-03-06 11:44:18 +0000
commita3973095eec14135c57feef5261ab23a379b0c85 (patch)
treeca9413d74af2635719537fa46b89929ea9715e4e /eclass
parent- EAPI 2 support (diff)
downloadgentoo-2-a3973095eec14135c57feef5261ab23a379b0c85.tar.gz
gentoo-2-a3973095eec14135c57feef5261ab23a379b0c85.tar.bz2
gentoo-2-a3973095eec14135c57feef5261ab23a379b0c85.zip
EAPI=2 support
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-app.eclass49
1 files changed, 11 insertions, 38 deletions
diff --git a/eclass/perl-app.eclass b/eclass/perl-app.eclass
index 6507a02876b5..a2cfbdb0968f 100644
--- a/eclass/perl-app.eclass
+++ b/eclass/perl-app.eclass
@@ -1,53 +1,26 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/perl-app.eclass,v 1.10 2006/12/09 14:34:01 mcummings Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-app.eclass,v 1.11 2009/03/06 11:44:18 tove Exp $
-#
# Author: Michael Cummings <mcummings@gentoo.org>
# Maintained by the Perl herd <perl@gentoo.org>
-#
-# The perl-app eclass is designed to allow easier installation of perl
-# apps, ineheriting the full structure of the perl-module eclass but allowing
-# man3 pages to be built. This is to work around a collision-protect bug in the
-# default perl-module eclass
inherit perl-module
-EXPORT_FUNCTIONS src_compile
+case "${EAPI:-0}" in
+ 0|1) EXPORT_FUNCTIONS src_compile ;;
+ 2) EXPORT_FUNCTIONS src_configure src_compile ;;
+esac
perl-app_src_prep() {
- perlinfo
-
- export PERL_MM_USE_DEFAULT=1
- # Disable ExtUtils::AutoInstall from prompting
- export PERL_EXTUTILS_AUTOINSTALL="--skipdeps"
-
+ perl-app_src_configure
+}
- SRC_PREP="yes"
- pwd
- if [ "${PREFER_BUILDPL}" == "yes" ] && ( [ -f Build.PL ] || [ ${PN} == "module-build" ] ); then
- einfo "Using Module::Build"
- echo "$pm_echovar" | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)"
- elif [ -f Makefile.PL ] && [ ! ${PN} == "module-build" ]; then
- einfo "Using ExtUtils::MakeMaker"
- echo "$pm_echovar" | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\
- PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)"
- fi
- if [ ! -f Build.PL ] && [ ! -f Makefile.PL ]; then
- einfo "No Make or Build file detected..."
- return
- fi
+perl-app_src_configure() {
+ perl-module_src_configure
}
perl-app_src_compile() {
-
- perlinfo
- [ "${SRC_PREP}" != "yes" ] && perl-app_src_prep
- if [ -f Makefile ]; then
- make ${mymake} || die "compilation failed"
- elif [ -f Build ]; then
- perl Build build || die "compilation failed"
- fi
- fixlocalpod
-
+ has "${EAPI:-0}" 0 1 && perl-app_src_prep
+ perl-module_src_compile
}