| 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.4 2002/05/05 08:05:32 seemant Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.12 2002/07/02 19:34:01 seemant 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 |
| 9 | . /usr/portage/eclass/inherit.eclass || die |
|
|
| 10 | inherit perl-post |
9 | inherit perl-post |
| 11 | |
10 | |
| 12 | ECLASS=base |
11 | ECLASS=base |
| 13 | EXPORT_FUNCTIONS src_compile src_install |
12 | EXPORT_FUNCTIONS src_compile src_install src_test |
| 14 | |
13 | |
| 15 | newdepend ">=sys-devel/perl-5" |
14 | newdepend ">=sys-devel/perl-5" |
| 16 | |
15 | |
|
|
16 | SRC_PREP="no" |
|
|
17 | |
|
|
18 | base_src_prep() { |
|
|
19 | |
|
|
20 | SRC_PREP="yes" |
|
|
21 | perl Makefile.PL ${myconf} |
|
|
22 | } |
|
|
23 | |
| 17 | base_src_compile() { |
24 | base_src_compile() { |
| 18 | perl Makefile.PL ${myconf} |
25 | |
| 19 | make || die |
26 | [ "${SRC_PREP}" != "yes" ] && base_src_prep |
|
|
27 | make ${mymake} || die "compilation failed" |
|
|
28 | } |
|
|
29 | |
|
|
30 | base_src_test() { |
|
|
31 | make test |
| 20 | } |
32 | } |
| 21 | |
33 | |
| 22 | base_src_install() { |
34 | base_src_install() { |
| 23 | |
35 | |
|
|
36 | perl_perlinfo |
| 24 | dodir ${POD_DIR} |
37 | dodir ${POD_DIR} |
|
|
38 | |
|
|
39 | test -z ${mytargets} && mytargets="install" |
| 25 | |
40 | |
| 26 | make \ |
41 | make \ |
| 27 | PREFIX=${D}/usr \ |
42 | PREFIX=${D}/usr \ |
| 28 | INSTALLMAN1DIR=${D}/usr/share/man/man1 \ |
43 | INSTALLMAN1DIR=${D}/usr/share/man/man1 \ |
| 29 | INSTALLMAN2DIR=${D}/usr/share/man/man2 \ |
44 | INSTALLMAN2DIR=${D}/usr/share/man/man2 \ |
| … | |
… | |
| 31 | INSTALLMAN4DIR=${D}/usr/share/man/man4 \ |
46 | INSTALLMAN4DIR=${D}/usr/share/man/man4 \ |
| 32 | INSTALLMAN5DIR=${D}/usr/share/man/man5 \ |
47 | INSTALLMAN5DIR=${D}/usr/share/man/man5 \ |
| 33 | INSTALLMAN6DIR=${D}/usr/share/man/man6 \ |
48 | INSTALLMAN6DIR=${D}/usr/share/man/man6 \ |
| 34 | INSTALLMAN7DIR=${D}/usr/share/man/man7 \ |
49 | INSTALLMAN7DIR=${D}/usr/share/man/man7 \ |
| 35 | INSTALLMAN8DIR=${D}/usr/share/man/man8 \ |
50 | INSTALLMAN8DIR=${D}/usr/share/man/man8 \ |
| 36 | install || die |
51 | ${myinst} \ |
|
|
52 | ${mytargets} || die |
| 37 | |
53 | |
| 38 | eval `perl '-V:installarchlib'` |
|
|
| 39 | sed -e "s:${D}::g" \ |
54 | sed -e "s:${D}::g" \ |
| 40 | ${D}/${installarchlib}/perllocal.pod \ |
55 | ${D}/${ARCH_LIB}/perllocal.pod \ |
| 41 | > ${D}/${POD_DIR}/${PF}.pod |
56 | > ${D}/${POD_DIR}/${P}.pod |
| 42 | |
57 | |
| 43 | rm -f ${D}/${installarchlib}/perllocal.pod |
58 | rm -f ${D}/${ARCH_LIB}/perllocal.pod |
| 44 | |
59 | |
| 45 | dodoc ChangeLog MANIFEST NOTES README VERSIONS WARNING ToDo |
60 | dodoc Change* MANIFEST* README* ${mydoc} |
| 46 | } |
61 | } |