| 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.67 2005/03/14 18:28:04 mcummings Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.70 2005/05/17 14:36:13 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 |
| … | |
… | |
| 12 | INHERITED="${INHERITED} ${ECLASS}" |
12 | INHERITED="${INHERITED} ${ECLASS}" |
| 13 | |
13 | |
| 14 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ |
14 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ |
| 15 | src_compile src_install src_test \ |
15 | src_compile src_install src_test \ |
| 16 | perlinfo updatepod |
16 | perlinfo updatepod |
|
|
17 | |
|
|
18 | # 2005.04.28 mcummings |
|
|
19 | # Mounting problems with src_test functions has forced me to make the |
|
|
20 | # compilation of perl modules honor the FEATURES maketest flag rather than what |
|
|
21 | # is generally necessary. I've left a block to make sure we still need to set |
|
|
22 | # the SRC_TEST="do" flag on the suspicion that otherwise we will face 10 times |
|
|
23 | # as many bug reports as we have lately. |
| 17 | |
24 | |
| 18 | # 2004.05.10 rac |
25 | # 2004.05.10 rac |
| 19 | # 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 |
| 20 | # 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 |
| 21 | # ebuild should block versions of MakeMaker older than the one it |
28 | # ebuild should block versions of MakeMaker older than the one it |
| … | |
… | |
| 96 | |
103 | |
| 97 | perlinfo |
104 | perlinfo |
| 98 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
105 | [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep |
| 99 | if [ -z ${BUILDER_VER} ]; then |
106 | if [ -z ${BUILDER_VER} ]; then |
| 100 | make ${mymake} || die "compilation failed" |
107 | make ${mymake} || die "compilation failed" |
|
|
108 | else |
|
|
109 | perl ${S}/Build build |
| 101 | fi |
110 | fi |
| 102 | |
111 | |
|
|
112 | } |
|
|
113 | |
|
|
114 | perl-module_src_test() { |
| 103 | if [ "${SRC_TEST}" == "do" ]; then |
115 | if [ "${SRC_TEST}" == "do" ]; then |
| 104 | perl-module_src_test || die "test failed" |
|
|
| 105 | SRC_TEST="done" |
|
|
| 106 | fi |
|
|
| 107 | } |
|
|
| 108 | |
|
|
| 109 | perl-module_src_test() { |
|
|
| 110 | perlinfo |
116 | perlinfo |
| 111 | if [ -z ${BUILDER_VER} ]; then |
117 | if [ -z ${BUILDER_VER} ]; then |
| 112 | make test |
118 | make test || die "test failed" |
| 113 | else |
119 | else |
| 114 | perl ${S}/Build test |
120 | perl ${S}/Build test || die "test failed" |
|
|
121 | fi |
| 115 | fi |
122 | fi |
| 116 | } |
123 | } |
| 117 | |
124 | |
| 118 | perl-module_src_install() { |
125 | perl-module_src_install() { |
| 119 | |
126 | |
| … | |
… | |
| 137 | done |
144 | done |
| 138 | |
145 | |
| 139 | for doc in Change* MANIFEST* README*; do |
146 | for doc in Change* MANIFEST* README*; do |
| 140 | [ -s "$doc" ] && dodoc $doc |
147 | [ -s "$doc" ] && dodoc $doc |
| 141 | done |
148 | done |
|
|
149 | if [ -s "${mydoc}" ]; then |
| 142 | dodoc ${mydoc} |
150 | dodoc ${mydoc} |
|
|
151 | fi |
| 143 | } |
152 | } |
| 144 | |
153 | |
| 145 | |
154 | |
| 146 | perl-module_pkg_setup() { |
155 | perl-module_pkg_setup() { |
| 147 | |
156 | |