/[gentoo-x86]/eclass/perl-module.eclass
Gentoo

Diff of /eclass/perl-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.58 Revision 1.62
1# Copyright 1999-2004 Gentoo Technologies, Inc. 1# Copyright 1999-2004 Gentoo Technologies, Inc.
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.58 2004/04/02 10:22:50 mcummings Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.62 2004/05/28 20:58:52 rac 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
13 13
14EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ 14EXPORT_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 17
18# 2004.05.10 rac
19# 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
21# ebuild should block versions of MakeMaker older than the one it
22# carries. in the meantime, since we have dumped support for MakeMaker
23# <6.11 and the associated broken DESTDIR handling, block here to save
24# people from sandbox trouble.
25#
26# 2004.05.25 rac
27# for the same reasons, make the perl dep >=5.8.2 to get everybody
28# with 5.8.0 and its 6.03 makemaker up to a version that can
29# understand DESTDIR
18 30
19newdepend ">=dev-lang/perl-5.8.0-r12" 31DEPEND=">=dev-lang/perl-5.8.2 !<dev-perl/ExtUtils-MakeMaker-6.17"
20SRC_PREP="no" 32SRC_PREP="no"
21SRC_TEST="skip" 33SRC_TEST="skip"
22 34
23PERL_VERSION="" 35PERL_VERSION=""
24SITE_ARCH="" 36SITE_ARCH=""
25SITE_LIB="" 37SITE_LIB=""
26ARCH_LIB="" 38ARCH_LIB=""
27POD_DIR="" 39POD_DIR=""
28MMSIXELEVEN=""
29 40
30perl-module_src_prep() { 41perl-module_src_prep() {
42
43 perlinfo
44
31 SRC_PREP="yes" 45 SRC_PREP="yes"
32 if [ "${style}" == "builder" ]; then 46 if [ "${style}" == "builder" ]; then
33 perl ${S}/Build.PL installdirs=vendor destdir=${D} 47 perl ${S}/Build.PL installdirs=vendor destdir=${D}
34 else 48 else
35 if [ "${MMSIXELEVEN}" ]; then
36 perl Makefile.PL ${myconf} \ 49 perl Makefile.PL ${myconf} \
37 PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} 50 PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
38 else
39 perl Makefile.PL ${myconf} \
40 PREFIX=${D}/usr INSTALLDIRS=vendor
41 fi
42 fi 51 fi
43
44} 52}
45 53
46perl-module_src_compile() { 54perl-module_src_compile() {
47 55
48 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep 56 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
60 if [ "${style}" == "builder" ]; then 68 if [ "${style}" == "builder" ]; then
61 perl ${S}/Build test 69 perl ${S}/Build test
62 else 70 else
63 make test 71 make test
64 fi 72 fi
65
66} 73}
67 74
68perl-module_src_install() { 75perl-module_src_install() {
69 76
70 perlinfo 77 perlinfo
73 test -z ${mytargets} && mytargets="install" 80 test -z ${mytargets} && mytargets="install"
74 81
75 if [ "${style}" == "builder" ]; then 82 if [ "${style}" == "builder" ]; then
76 perl ${S}/Build install 83 perl ${S}/Build install
77 else 84 else
78 if [ "${MMSIXELEVEN}" ]; then
79 make ${myinst} ${mytargets} || die 85 make ${myinst} ${mytargets} || die
80 else
81 make \
82 PREFIX=${D}/usr \
83 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
84 INSTALLMAN2DIR=${D}/usr/share/man/man2 \
85 INSTALLMAN3DIR=${D}/usr/share/man/man3 \
86 INSTALLMAN4DIR=${D}/usr/share/man/man4 \
87 INSTALLMAN5DIR=${D}/usr/share/man/man5 \
88 INSTALLMAN6DIR=${D}/usr/share/man/man6 \
89 INSTALLMAN7DIR=${D}/usr/share/man/man7 \
90 INSTALLMAN8DIR=${D}/usr/share/man/man8 \
91 INSTALLSITEMAN1DIR=${D}/usr/share/man/man1 \
92 INSTALLSITEMAN2DIR=${D}/usr/share/man/man2 \
93 INSTALLSITEMAN3DIR=${D}/usr/share/man/man3 \
94 INSTALLSITEMAN4DIR=${D}/usr/share/man/man4 \
95 INSTALLSITEMAN5DIR=${D}/usr/share/man/man5 \
96 INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \
97 INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \
98 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
99 INSTALLVENDORMAN3DIR=${D}/usr/share/man/man3 \
100 INSTALLSITEARCH=${D}/${SITE_ARCH} \
101 INSTALLSCRIPT=${D}/usr/bin \
102 ${myinst} \
103 ${mytargets} || die
104 fi
105 fi 86 fi
106 87
107 if [ -f ${D}${ARCH_LIB}/perllocal.pod ]; 88 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
108 then 89 then
109 touch ${D}/${POD_DIR}/${P}.pod 90 touch ${D}/${POD_DIR}/${P}.pod
175 ARCH_LIB=${installarchlib} 156 ARCH_LIB=${installarchlib}
176 eval `perl '-V:installarchlib'` 157 eval `perl '-V:installarchlib'`
177 ARCH_LIB=${installarchlib} 158 ARCH_LIB=${installarchlib}
178 eval `perl '-V:installsitearch'` 159 eval `perl '-V:installsitearch'`
179 SITE_LIB=${installsitearch} 160 SITE_LIB=${installsitearch}
180# handling of DESTDIR changed in makemaker 6.11
181 MMSIXELEVEN=`perl -e 'use ExtUtils::MakeMaker; print( $ExtUtils::MakeMaker::VERSION ge "6.11" )'`
182
183} 161}
184 162
185updatepod() { 163updatepod() {
186 perlinfo 164 perlinfo
187 165

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.62

  ViewVC Help
Powered by ViewVC 1.1.20