/[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.40 Revision 1.48
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.40 2003/06/02 07:54:15 mcummings Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.48 2003/07/25 21:08:44 rac 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.
13EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ 13EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \
14 src_compile src_install src_test \ 14 src_compile src_install src_test \
15 perlinfo updatepod 15 perlinfo updatepod
16 16
17eval `perl '-V:version'` 17eval `perl '-V:version'`
18DEPEND="dev-lang/perl 18newdepend ">=dev-lang/perl-5.8.0-r12"
19 >=dev-perl/ExtUtils-MakeMaker-6.05-r5
20 ${DEPEND}"
21SRC_PREP="no" 19SRC_PREP="no"
22 20
23SITE_LIB="" 21SITE_LIB=""
24ARCH_LIB="" 22ARCH_LIB=""
25POD_DIR="" 23POD_DIR=""
26 24
27perl-module_src_prep() { 25perl-module_src_prep() {
28 26
29 SRC_PREP="yes" 27 SRC_PREP="yes"
30 perl Makefile.PL ${myconf} \ 28 if [ "${style}" == "builder" ]; then
29 perl ${S}/Build.PL installdirs=vendor destdir=${D}
30 else
31 perl Makefile.PL INSTALLDIRS=vendor ${myconf} \
31 PREFIX=${D}/usr 32 PREFIX=${D}/usr
33 fi
34
32} 35}
33 36
34perl-module_src_compile() { 37perl-module_src_compile() {
35 38
36 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep 39 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
40 if [ "${style}" != "builder" ]; then
37 make ${mymake} || die "compilation failed" 41 make ${mymake} || die "compilation failed"
42 fi
43
38} 44}
39 45
40perl-module_src_test() { 46perl-module_src_test() {
47 if [ "${style}" == "builder" ]; then
48 perl ${S}/Build test
49 else
41 make test 50 make test
51 fi
52
42} 53}
43 54
44perl-module_src_install() { 55perl-module_src_install() {
45 56
46 perlinfo 57 perlinfo
50 eval `perl '-V:installsitearch'` 61 eval `perl '-V:installsitearch'`
51 SITE_ARCH=${installsitearch} 62 SITE_ARCH=${installsitearch}
52 eval `perl '-V:installarchlib'` 63 eval `perl '-V:installarchlib'`
53 ARCH_LIB=${installarchlib} 64 ARCH_LIB=${installarchlib}
54 65
55 66 if [ "${style}" == "builder" ]; then
67 perl ${S}/Build install
68 else
56 make \ 69 make \
57 PREFIX=${D}/usr \ 70 PREFIX=${D}/usr \
58 INSTALLMAN1DIR=${D}/usr/share/man/man1 \ 71 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
59 INSTALLMAN2DIR=${D}/usr/share/man/man2 \ 72 INSTALLMAN2DIR=${D}/usr/share/man/man2 \
60 INSTALLMAN3DIR=${D}/usr/share/man/man3 \ 73 INSTALLMAN3DIR=${D}/usr/share/man/man3 \
73 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \ 86 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
74 INSTALLSITEARCH=${D}/${SITE_ARCH} \ 87 INSTALLSITEARCH=${D}/${SITE_ARCH} \
75 INSTALLSCRIPT=${D}/usr/bin \ 88 INSTALLSCRIPT=${D}/usr/bin \
76 ${myinst} \ 89 ${myinst} \
77 ${mytargets} || die 90 ${mytargets} || die
78 91 fi
79 92
80 if [ -f ${D}${ARCH_LIB}/perllocal.pod ]; 93 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
81 then 94 then
82 touch ${D}/${POD_DIR}/${P}.pod 95 touch ${D}/${POD_DIR}/${P}.pod
83 sed -e "s:${D}::g" \ 96 sed -e "s:${D}::g" \
96 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site 109 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
97 rm -f ${D}/${SITE_LIB}/perllocal.pod 110 rm -f ${D}/${SITE_LIB}/perllocal.pod
98 fi 111 fi
99 112
100 for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do 113 for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do
101 sed -ie "s:${D}:/:g" ${FILE} 114 sed -i -e "s:${D}:/:g" ${FILE}
102 done 115 done
103 116
104 dodoc Change* MANIFEST* README* ${mydoc} 117 dodoc Change* MANIFEST* README* ${mydoc}
105} 118}
106 119
157 done 170 done
158 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do 171 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
159 cat ${FILE} >> ${SITE_LIB}/perllocal.pod 172 cat ${FILE} >> ${SITE_LIB}/perllocal.pod
160 rm -f ${FILE} 173 rm -f ${FILE}
161 done 174 done
162
163 #cat ${POD_DIR}/*.pod.arch >> ${ARCH_LIB}/perllocal.pod
164 #cat ${POD_DIR}/*.pod.site >> ${SITE_LIB}/perllocal.pod
165 #rm -f ${POD_DIR}/*.pod.site
166 #rm -f ${POD_DIR}/*.pod.site
167 fi 175 fi
168} 176}

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

  ViewVC Help
Powered by ViewVC 1.1.20