summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichael Cummings <mcummings@gentoo.org>2002-08-16 15:16:39 +0000
committerMichael Cummings <mcummings@gentoo.org>2002-08-16 15:16:39 +0000
commit9e50927f18dff58b12f91678f8e73b7af7a5b601 (patch)
tree1cd3864a48fd8c4c70b5fdbcdc954cdbeab45ede /eclass
parentdigest for ExtUtils-MakeMaker (diff)
downloadgentoo-2-9e50927f18dff58b12f91678f8e73b7af7a5b601.tar.gz
gentoo-2-9e50927f18dff58b12f91678f8e73b7af7a5b601.tar.bz2
gentoo-2-9e50927f18dff58b12f91678f8e73b7af7a5b601.zip
This is a test version of the perl-module eclass with forced makemaker
upgrade support - need to test it on all platforms before committing since it will change the core perl 5.6.1 makemaker functions
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-module-test.eclass82
1 files changed, 82 insertions, 0 deletions
diff --git a/eclass/perl-module-test.eclass b/eclass/perl-module-test.eclass
new file mode 100644
index 000000000000..85111bcd9af1
--- /dev/null
+++ b/eclass/perl-module-test.eclass
@@ -0,0 +1,82 @@
+# Copyright 2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2
+# Author: Seemant Kulleen <seemant@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module-test.eclass,v 1.1 2002/08/16 15:16:39 mcummings Exp $
+# The perl-module eclass is designed to allow easier installation of perl
+# modules, and their incorporation into the Gentoo Linux system.
+
+#first inherit the pkg_postinst() and pkg_postrm() functions
+inherit perl-post
+
+ECLASS=perl-module
+INHERITED="$INHERITED $ECLASS"
+
+EXPORT_FUNCTIONS src_compile src_install src_test
+
+eval `perl '-V:version'`
+ if [ ${version} == '5.6.1' ];
+ then
+ DEPEND=">=sys-devel/perl-5 \
+ dev-perl/ExtUtils-MakeMaker"
+ else
+ DEPEND=">=sys-devel/perl-5"
+ fi
+
+
+SRC_PREP="no"
+
+perl-module_src_prep() {
+
+ SRC_PREP="yes"
+ eval `perl '-V:version'`
+ perl Makefile.PL ${myconf} \
+ PREFIX=${D}/usr
+}
+
+perl-module_src_compile() {
+
+ [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
+ make ${mymake} || die "compilation failed"
+}
+
+perl-module_src_test() {
+ make test
+}
+
+perl-module_src_install() {
+
+ perl-post_perlinfo
+ dodir ${POD_DIR}
+
+ test -z ${mytargets} && mytargets="install"
+
+ make \
+ PREFIX=${D}/usr \
+ INSTALLMAN1DIR=${D}/usr/share/man/man1 \
+ INSTALLMAN2DIR=${D}/usr/share/man/man2 \
+ INSTALLMAN3DIR=${D}/usr/share/man/man3 \
+ INSTALLMAN4DIR=${D}/usr/share/man/man4 \
+ INSTALLMAN5DIR=${D}/usr/share/man/man5 \
+ INSTALLMAN6DIR=${D}/usr/share/man/man6 \
+ INSTALLMAN7DIR=${D}/usr/share/man/man7 \
+ INSTALLMAN8DIR=${D}/usr/share/man/man8 \
+ ${myinst} \
+ ${mytargets} || die
+
+
+ if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
+ then
+ sed -e "s:${D}::g" ${D}${ARCH_LIB}/perllocal.pod > ${D}/${POD_DIR}/${P}.pod
+ cp ${D}/${POD_DIR}/${P}.pod ${D}/${POD_DIR}/${P}.pod.arch
+ rm -f ${D}/${ARCH_LIB}/perllocal.pod
+ fi
+
+ if [ -f ${D}${SITE_LIB}/perllocal.pod ];
+ then
+ sed -e "s:${D}::g" ${D}${SITE_LIB}/perllocal.pod > ${D}/${POD_DIR}/${P}.pod
+ cp ${D}/${POD_DIR}/${P}.pod ${D}/${POD_DIR}/${P}.pod.site
+ rm -f ${D}/${SITE_LIB}/perllocal.pod
+ fi
+
+ dodoc Change* MANIFEST* README* ${mydoc}
+}