| 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.106 2007/07/17 11:59:18 swegener Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.107 2007/08/19 11:39:53 ian 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 |
| … | |
… | |
| 10 | |
10 | |
| 11 | inherit base |
11 | inherit base |
| 12 | |
12 | |
| 13 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test src_unpack |
13 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test src_unpack |
| 14 | |
14 | |
|
|
15 | # 2005.08.19 ian |
|
|
16 | # Added ${myconf} - bug #176818 |
|
|
17 | # |
| 15 | # 2005.04.28 mcummings |
18 | # 2005.04.28 mcummings |
| 16 | # Mounting problems with src_test functions has forced me to make the |
19 | # Mounting problems with src_test functions has forced me to make the |
| 17 | # compilation of perl modules honor the FEATURES maketest flag rather than what |
20 | # compilation of perl modules honor the FEATURES maketest flag rather than what |
| 18 | # is generally necessary. I've left a block to make sure we still need to set |
21 | # is generally necessary. I've left a block to make sure we still need to set |
| 19 | # the SRC_TEST="do" flag on the suspicion that otherwise we will face 10 times |
22 | # the SRC_TEST="do" flag on the suspicion that otherwise we will face 10 times |
| 20 | # as many bug reports as we have lately. |
23 | # as many bug reports as we have lately. |
| 21 | |
24 | # |
| 22 | # 2004.05.10 rac |
25 | # 2004.05.10 rac |
| 23 | # block on makemaker versions earlier than that in the 5.8.2 core. in |
26 | # block on makemaker versions earlier than that in the 5.8.2 core. in |
| 24 | # actuality, this should be handled in the perl ebuild, so every perl |
27 | # actuality, this should be handled in the perl ebuild, so every perl |
| 25 | # ebuild should block versions of MakeMaker older than the one it |
28 | # ebuild should block versions of MakeMaker older than the one it |
| 26 | # carries. in the meantime, since we have dumped support for MakeMaker |
29 | # carries. in the meantime, since we have dumped support for MakeMaker |
| … | |
… | |
| 116 | |
119 | |
| 117 | SRC_PREP="yes" |
120 | SRC_PREP="yes" |
| 118 | find ${S} -type d -name "\.svn" -exec /bin/rm -rf {} \; 2>/dev/null |
121 | find ${S} -type d -name "\.svn" -exec /bin/rm -rf {} \; 2>/dev/null |
| 119 | if [ "${PREFER_BUILDPL}" == "yes" ] && ( [ -f Build.PL ] || [ ${PN} == "module-build" ] ); then |
122 | if [ "${PREFER_BUILDPL}" == "yes" ] && ( [ -f Build.PL ] || [ ${PN} == "module-build" ] ); then |
| 120 | einfo "Using Module::Build" |
123 | einfo "Using Module::Build" |
| 121 | echo "$pm_echovar" | perl Build.PL --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)" |
124 | echo "$pm_echovar" | perl Build.PL ${myconf} --installdirs=vendor --destdir=${D} --libdoc= || die "Unable to build! (are you using USE=\"build\"?)" |
| 122 | elif [ -f Makefile.PL ] && [ ! ${PN} == "module-build" ]; then |
125 | elif [ -f Makefile.PL ] && [ ! ${PN} == "module-build" ]; then |
| 123 | einfo "Using ExtUtils::MakeMaker" |
126 | einfo "Using ExtUtils::MakeMaker" |
| 124 | echo "$pm_echovar" | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
127 | echo "$pm_echovar" | perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ |
| 125 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)" |
128 | PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} || die "Unable to build! (are you using USE=\"build\"?)" |
| 126 | fi |
129 | fi |