| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.93 2006/06/06 14:01:48 mcummings Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.96 2006/06/12 20:11:39 mcummings Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Seemant Kulleen <seemant@gentoo.org> |
5 | # Author: Seemant Kulleen <seemant@gentoo.org> |
| 6 | # Maintained by the Perl herd <perl@gentoo.org> |
6 | # Maintained by the Perl herd <perl@gentoo.org> |
| 7 | # |
7 | # |
| 8 | # The perl-module eclass is designed to allow easier installation of perl |
8 | # The perl-module eclass is designed to allow easier installation of perl |
| … | |
… | |
| 101 | einfo "Using ExtUtils::MakeMaker" |
101 | einfo "Using ExtUtils::MakeMaker" |
| 102 | #perl Makefile.PL ${myconf} \ |
102 | #perl Makefile.PL ${myconf} \ |
| 103 | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
103 | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
| 104 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)" |
104 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)" |
| 105 | fi |
105 | fi |
| 106 | if [ -f Build.PL ] ; then |
106 | if [ -f Build.PL ] && ( [ ! -f Makefile.PL ] || [ ${PN} == "module-build" ]); then |
| 107 | einfo "Using Module::Build" |
107 | einfo "Using Module::Build" |
| 108 | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)" |
108 | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)" |
| 109 | fi |
109 | fi |
| 110 | if [ ! -f Build.PL ] && [ ! -f Makefile.PL ]; then |
110 | if [ ! -f Build.PL ] && [ ! -f Makefile.PL ]; then |
| 111 | einfo "No Make or Build file detected..." |
111 | einfo "No Make or Build file detected..." |
| … | |
… | |
| 118 | perlinfo |
118 | perlinfo |
| 119 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
119 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
| 120 | if [ -f Makefile ]; then |
120 | if [ -f Makefile ]; then |
| 121 | make ${mymake} || die "compilation failed" |
121 | make ${mymake} || die "compilation failed" |
| 122 | elif [ -f Build ]; then |
122 | elif [ -f Build ]; then |
| 123 | perl Build build |
123 | perl Build build || die "compilation failed" |
| 124 | fi |
124 | fi |
| 125 | |
125 | |
| 126 | } |
126 | } |
| 127 | |
127 | |
| 128 | perl-module_src_test() { |
128 | perl-module_src_test() { |