/[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.42 Revision 1.43
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.42 2003/06/18 14:16:22 mcummings Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.43 2003/06/27 00:57:17 mcummings 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.
24POD_DIR="" 24POD_DIR=""
25 25
26perl-module_src_prep() { 26perl-module_src_prep() {
27 27
28 SRC_PREP="yes" 28 SRC_PREP="yes"
29 if [ "${style}" == "builder" ]; then
30 perl ${S}/Build.PL destdir=${D}
31 else
29 perl Makefile.PL ${myconf} \ 32 perl Makefile.PL ${myconf} \
30 PREFIX=${D}/usr 33 PREFIX=${D}/usr
34 fi
35
31} 36}
32 37
33perl-module_src_compile() { 38perl-module_src_compile() {
34 39
35 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep 40 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
41 if [ "${style}" != "builder" ]; then
36 make ${mymake} || die "compilation failed" 42 make ${mymake} || die "compilation failed"
43 fi
44
37} 45}
38 46
39perl-module_src_test() { 47perl-module_src_test() {
48 if [ "${style}" == "builder" ]; then
49 perl ${S}/Build test
50 else
40 make test 51 make test
52 fi
53
41} 54}
42 55
43perl-module_src_install() { 56perl-module_src_install() {
44 57
45 perlinfo 58 perlinfo
49 eval `perl '-V:installsitearch'` 62 eval `perl '-V:installsitearch'`
50 SITE_ARCH=${installsitearch} 63 SITE_ARCH=${installsitearch}
51 eval `perl '-V:installarchlib'` 64 eval `perl '-V:installarchlib'`
52 ARCH_LIB=${installarchlib} 65 ARCH_LIB=${installarchlib}
53 66
54 67 if [ "${style}" == "builder" ]; then
68 perl ${S}/Build install
69 else
55 make \ 70 make \
56 PREFIX=${D}/usr \ 71 PREFIX=${D}/usr \
57 INSTALLMAN1DIR=${D}/usr/share/man/man1 \ 72 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
58 INSTALLMAN2DIR=${D}/usr/share/man/man2 \ 73 INSTALLMAN2DIR=${D}/usr/share/man/man2 \
59 INSTALLMAN3DIR=${D}/usr/share/man/man3 \ 74 INSTALLMAN3DIR=${D}/usr/share/man/man3 \
72 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \ 87 INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
73 INSTALLSITEARCH=${D}/${SITE_ARCH} \ 88 INSTALLSITEARCH=${D}/${SITE_ARCH} \
74 INSTALLSCRIPT=${D}/usr/bin \ 89 INSTALLSCRIPT=${D}/usr/bin \
75 ${myinst} \ 90 ${myinst} \
76 ${mytargets} || die 91 ${mytargets} || die
77 92 fi
78 93
79 if [ -f ${D}${ARCH_LIB}/perllocal.pod ]; 94 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
80 then 95 then
81 touch ${D}/${POD_DIR}/${P}.pod 96 touch ${D}/${POD_DIR}/${P}.pod
82 sed -e "s:${D}::g" \ 97 sed -e "s:${D}::g" \
156 done 171 done
157 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do 172 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
158 cat ${FILE} >> ${SITE_LIB}/perllocal.pod 173 cat ${FILE} >> ${SITE_LIB}/perllocal.pod
159 rm -f ${FILE} 174 rm -f ${FILE}
160 done 175 done
161
162 #cat ${POD_DIR}/*.pod.arch >> ${ARCH_LIB}/perllocal.pod
163 #cat ${POD_DIR}/*.pod.site >> ${SITE_LIB}/perllocal.pod
164 #rm -f ${POD_DIR}/*.pod.site
165 #rm -f ${POD_DIR}/*.pod.site
166 fi 176 fi
167} 177}

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.20