| 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.89 2006/05/02 02:14:13 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 |
| … | |
… | |
| 90 | perl-module_src_prep() { |
90 | perl-module_src_prep() { |
| 91 | |
91 | |
| 92 | perlinfo |
92 | perlinfo |
| 93 | |
93 | |
| 94 | export PERL_MM_USE_DEFAULT=1 |
94 | export PERL_MM_USE_DEFAULT=1 |
|
|
95 | # Disable ExtUtils::AutoInstall from prompting |
|
|
96 | export PERL_EXTUTILS_AUTOINSTALL="--skipdeps" |
| 95 | |
97 | |
| 96 | |
98 | |
| 97 | SRC_PREP="yes" |
99 | SRC_PREP="yes" |
| 98 | if [ -f Makefile.PL ] && [ ! ${PN} == "module-build" ]; then |
100 | if [ -f Makefile.PL ] && [ ! ${PN} == "module-build" ]; then |
| 99 | einfo "Using ExtUtils::MakeMaker" |
101 | einfo "Using ExtUtils::MakeMaker" |
| 100 | #perl Makefile.PL ${myconf} \ |
102 | #perl Makefile.PL ${myconf} \ |
| 101 | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
103 | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
| 102 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} |
104 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)" |
| 103 | fi |
105 | fi |
| 104 | if [ -f Build.PL ] ; then |
106 | if [ -f Build.PL ] && ( [ ! -f Makefile.PL ] || [ ${PN} == "module-build" ]); then |
| 105 | einfo "Using Module::Build" |
107 | einfo "Using Module::Build" |
| 106 | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= |
108 | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)" |
| 107 | fi |
109 | fi |
| 108 | if [ ! -f Build.PL ] && [ ! -f Makefile.PL ]; then |
110 | if [ ! -f Build.PL ] && [ ! -f Makefile.PL ]; then |
| 109 | einfo "No Make or Build file detected..." |
111 | einfo "No Make or Build file detected..." |
| 110 | return |
112 | return |
| 111 | fi |
113 | fi |
| … | |
… | |
| 116 | perlinfo |
118 | perlinfo |
| 117 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
119 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
| 118 | if [ -f Makefile ]; then |
120 | if [ -f Makefile ]; then |
| 119 | make ${mymake} || die "compilation failed" |
121 | make ${mymake} || die "compilation failed" |
| 120 | elif [ -f Build ]; then |
122 | elif [ -f Build ]; then |
| 121 | perl Build build |
123 | perl Build build || die "compilation failed" |
| 122 | fi |
124 | fi |
| 123 | |
125 | |
| 124 | } |
126 | } |
| 125 | |
127 | |
| 126 | perl-module_src_test() { |
128 | perl-module_src_test() { |