/[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.20 Revision 1.21
1# Copyright 2002 Gentoo Technologies, Inc. 1# Copyright 2002 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# Author: Seemant Kulleen <seemant@gentoo.org> 3# Author: Seemant Kulleen <seemant@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.20 2002/08/16 12:20:09 mcummings Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.21 2002/09/09 21:51:14 mcummings Exp $
5# The perl-module eclass is designed to allow easier installation of perl 5# The perl-module eclass is designed to allow easier installation of perl
6# modules, and their incorporation into the Gentoo Linux system. 6# modules, and their incorporation into the Gentoo Linux system.
7 7
8#first inherit the pkg_postinst() and pkg_postrm() functions 8#first inherit the pkg_postinst() and pkg_postrm() functions
9inherit perl-post 9inherit perl-post
11ECLASS=perl-module 11ECLASS=perl-module
12INHERITED="$INHERITED $ECLASS" 12INHERITED="$INHERITED $ECLASS"
13 13
14EXPORT_FUNCTIONS src_compile src_install src_test 14EXPORT_FUNCTIONS src_compile src_install src_test
15 15
16eval `perl '-V:version'`
17 if [ ${version} == '5.6.1' ];
18 then
19 DEPEND=">=sys-devel/perl-5 \
20 dev-perl/ExtUtils-MakeMaker"
21 else
16DEPEND=">=sys-devel/perl-5" 22 DEPEND=">=sys-devel/perl-5"
23 fi
24
17 25
18SRC_PREP="no" 26SRC_PREP="no"
19 27
20perl-module_src_prep() { 28perl-module_src_prep() {
21 29
22 SRC_PREP="yes" 30 SRC_PREP="yes"
23 eval `perl '-V:version'` 31 eval `perl '-V:version'`
24 if [ ${version} == '5.6.1' ];
25 then
26 perl Makefile.PL ${myconf}
27 else
28 perl Makefile.PL ${myconf} \ 32 perl Makefile.PL ${myconf} \
29 PREFIX=${D}/usr 33 PREFIX=${D}/usr
30 fi
31} 34}
32 35
33perl-module_src_compile() { 36perl-module_src_compile() {
34 37
35 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep 38 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
61 ${mytargets} || die 64 ${mytargets} || die
62 65
63 66
64 if [ -f ${D}${ARCH_LIB}/perllocal.pod ]; 67 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
65 then 68 then
69 touch ${D}/${POD_DIR}/${P}.pod
66 sed -e "s:${D}::g" ${D}${ARCH_LIB}/perllocal.pod > ${D}/${POD_DIR}/${P}.pod 70 sed -e "s:${D}::g" ${D}${ARCH_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
71 touch ${D}/${POD_DIR}/${P}.pod.arch
67 cp ${D}/${POD_DIR}/${P}.pod ${D}/${POD_DIR}/${P}.pod.arch 72 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch
68 rm -f ${D}/${ARCH_LIB}/perllocal.pod 73 rm -f ${D}/${ARCH_LIB}/perllocal.pod
69 fi 74 fi
70 75
71 if [ -f ${D}${SITE_LIB}/perllocal.pod ]; 76 if [ -f ${D}${SITE_LIB}/perllocal.pod ];
72 then 77 then
78 touch ${D}/${POD_DIR}/${P}.pod
73 sed -e "s:${D}::g" ${D}${SITE_LIB}/perllocal.pod > ${D}/${POD_DIR}/${P}.pod 79 sed -e "s:${D}::g" ${D}${SITE_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
80 touch ${D}/${POD_DIR}/${P}.pod.site
74 cp ${D}/${POD_DIR}/${P}.pod ${D}/${POD_DIR}/${P}.pod.site 81 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
75 rm -f ${D}/${SITE_LIB}/perllocal.pod 82 rm -f ${D}/${SITE_LIB}/perllocal.pod
76 fi 83 fi
77 84
78 dodoc Change* MANIFEST* README* ${mydoc} 85 dodoc Change* MANIFEST* README* ${mydoc}
79} 86}

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20