/[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.48 Revision 1.56
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 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.48 2003/07/25 21:08:44 rac Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.56 2004/02/26 02:43:45 robbat2 Exp $
4# 4#
5# Author: Seemant Kulleen <seemant@gentoo.org> 5# Author: Seemant Kulleen <seemant@gentoo.org>
6# 6#
7# The perl-module eclass is designed to allow easier installation of perl 7# The perl-module eclass is designed to allow easier installation of perl
8# modules, and their incorporation into the Gentoo Linux system. 8# modules, and their incorporation into the Gentoo Linux system.
15 perlinfo updatepod 15 perlinfo updatepod
16 16
17eval `perl '-V:version'` 17eval `perl '-V:version'`
18newdepend ">=dev-lang/perl-5.8.0-r12" 18newdepend ">=dev-lang/perl-5.8.0-r12"
19SRC_PREP="no" 19SRC_PREP="no"
20SRC_TEST="skip"
20 21
21SITE_LIB="" 22SITE_LIB=""
22ARCH_LIB="" 23ARCH_LIB=""
23POD_DIR="" 24POD_DIR=""
24 25
26# handling of DESTDIR changed in makemaker 6.11
27MMSIXELEVEN=`perl -e 'use ExtUtils::MakeMaker; print( $ExtUtils::MakeMaker::VERSION ge "6.11" )'`
28
25perl-module_src_prep() { 29perl-module_src_prep() {
26
27 SRC_PREP="yes" 30 SRC_PREP="yes"
28 if [ "${style}" == "builder" ]; then 31 if [ "${style}" == "builder" ]; then
29 perl ${S}/Build.PL installdirs=vendor destdir=${D} 32 perl ${S}/Build.PL installdirs=vendor destdir=${D}
30 else 33 else
34 if [ "${MMSIXELEVEN}" ]; then
31 perl Makefile.PL INSTALLDIRS=vendor ${myconf} \ 35 perl Makefile.PL ${myconf} \
32 PREFIX=${D}/usr 36 PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
37 else
38 perl Makefile.PL ${myconf} \
39 PREFIX=${D}/usr INSTALLDIRS=vendor
40 fi
33 fi 41 fi
34 42
35} 43}
36 44
37perl-module_src_compile() { 45perl-module_src_compile() {
39 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep 47 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
40 if [ "${style}" != "builder" ]; then 48 if [ "${style}" != "builder" ]; then
41 make ${mymake} || die "compilation failed" 49 make ${mymake} || die "compilation failed"
42 fi 50 fi
43 51
52 if [ "${SRC_TEST}" == "do" ]; then
53 perl-module_src_test || die "test failed"
54 SRC_TEST="done"
55 fi
44} 56}
45 57
46perl-module_src_test() { 58perl-module_src_test() {
47 if [ "${style}" == "builder" ]; then 59 if [ "${style}" == "builder" ]; then
48 perl ${S}/Build test 60 perl ${S}/Build test
64 ARCH_LIB=${installarchlib} 76 ARCH_LIB=${installarchlib}
65 77
66 if [ "${style}" == "builder" ]; then 78 if [ "${style}" == "builder" ]; then
67 perl ${S}/Build install 79 perl ${S}/Build install
68 else 80 else
81 if [ "${MMSIXELEVEN}" ]; then
82 make ${myinst} ${mytargets} || die
83 else
69 make \ 84 make \
70 PREFIX=${D}/usr \ 85 PREFIX=${D}/usr \
71 INSTALLMAN1DIR=${D}/usr/share/man/man1 \ 86 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
72 INSTALLMAN2DIR=${D}/usr/share/man/man2 \ 87 INSTALLMAN2DIR=${D}/usr/share/man/man2 \
73 INSTALLMAN3DIR=${D}/usr/share/man/man3 \ 88 INSTALLMAN3DIR=${D}/usr/share/man/man3 \
74 INSTALLMAN4DIR=${D}/usr/share/man/man4 \ 89 INSTALLMAN4DIR=${D}/usr/share/man/man4 \
75 INSTALLMAN5DIR=${D}/usr/share/man/man5 \ 90 INSTALLMAN5DIR=${D}/usr/share/man/man5 \
76 INSTALLMAN6DIR=${D}/usr/share/man/man6 \ 91 INSTALLMAN6DIR=${D}/usr/share/man/man6 \
77 INSTALLMAN7DIR=${D}/usr/share/man/man7 \ 92 INSTALLMAN7DIR=${D}/usr/share/man/man7 \
78 INSTALLMAN8DIR=${D}/usr/share/man/man8 \ 93 INSTALLMAN8DIR=${D}/usr/share/man/man8 \
79 INSTALLSITEMAN1DIR=${D}/usr/share/man/man1 \ 94 INSTALLSITEMAN1DIR=${D}/usr/share/man/man1 \
80 INSTALLSITEMAN2DIR=${D}/usr/share/man/man2 \ 95 INSTALLSITEMAN2DIR=${D}/usr/share/man/man2 \
81 INSTALLSITEMAN3DIR=${D}/usr/share/man/man3 \ 96 INSTALLSITEMAN3DIR=${D}/usr/share/man/man3 \
82 INSTALLSITEMAN4DIR=${D}/usr/share/man/man4 \ 97 INSTALLSITEMAN4DIR=${D}/usr/share/man/man4 \
83 INSTALLSITEMAN5DIR=${D}/usr/share/man/man5 \ 98 INSTALLSITEMAN5DIR=${D}/usr/share/man/man5 \
84 INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \ 99 INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \
85 INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \ 100 INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \
86 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \ 101 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
102 INSTALLVENDORMAN3DIR=${D}/usr/share/man/man3 \
87 INSTALLSITEARCH=${D}/${SITE_ARCH} \ 103 INSTALLSITEARCH=${D}/${SITE_ARCH} \
88 INSTALLSCRIPT=${D}/usr/bin \ 104 INSTALLSCRIPT=${D}/usr/bin \
89 ${myinst} \ 105 ${myinst} \
90 ${mytargets} || die 106 ${mytargets} || die
107 fi
91 fi 108 fi
92 109
93 if [ -f ${D}${ARCH_LIB}/perllocal.pod ]; 110 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
94 then 111 then
95 touch ${D}/${POD_DIR}/${P}.pod 112 touch ${D}/${POD_DIR}/${P}.pod
112 129
113 for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do 130 for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do
114 sed -i -e "s:${D}:/:g" ${FILE} 131 sed -i -e "s:${D}:/:g" ${FILE}
115 done 132 done
116 133
117 dodoc Change* MANIFEST* README* ${mydoc} 134 for doc in Change* MANIFEST* README*; do
135 [ -s "$doc" ] && dodoc $doc
136 done
137 dodoc ${mydoc}
118} 138}
119 139
120 140
121perl-module_pkg_setup() { 141perl-module_pkg_setup() {
122 142

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20