summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichael Cummings <mcummings@gentoo.org>2003-08-22 09:17:52 +0000
committerMichael Cummings <mcummings@gentoo.org>2003-08-22 09:17:52 +0000
commit1caec18fd1103355971dbc3edefb84a08594d4a1 (patch)
tree94f46f8b6cd703ee4b8171e445a0e14f15138465 /eclass
parentbk bump - conflicted with -r8 bump (diff)
downloadgentoo-2-1caec18fd1103355971dbc3edefb84a08594d4a1.tar.gz
gentoo-2-1caec18fd1103355971dbc3edefb84a08594d4a1.tar.bz2
gentoo-2-1caec18fd1103355971dbc3edefb84a08594d4a1.zip
man3 directive fix - bug 27014
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-module.eclass3
-rw-r--r--eclass/perl-post.eclass131
2 files changed, 115 insertions, 19 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 24884ff2568d..d1065b1bae82 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.49 2003/07/27 14:46:02 mcummings Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.50 2003/08/22 09:17:52 mcummings Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
#
@@ -84,6 +84,7 @@ perl-module_src_install() {
INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \
INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \
INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
+ INSTALLVENDORMAN3DIR=${D}/usr/share/man/man3 \
INSTALLSITEARCH=${D}/${SITE_ARCH} \
INSTALLSCRIPT=${D}/usr/bin \
${myinst} \
diff --git a/eclass/perl-post.eclass b/eclass/perl-post.eclass
index eb8b460ab522..7ed385fe181a 100644
--- a/eclass/perl-post.eclass
+++ b/eclass/perl-post.eclass
@@ -1,51 +1,151 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.12 2003/06/02 10:01:15 mcummings Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.13 2003/08/22 09:17:52 mcummings Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
#
-# The perl-post eclass is designed to allow the ${installarchdir}/perllocal.pod
-# file to be updated cleanly after perl and/or perl-modules are installed
-# or removed.
+# The perl-module eclass is designed to allow easier installation of perl
+# modules, and their incorporation into the Gentoo Linux system.
-ECLASS=perl-post
-INHERITED="$INHERITED $ECLASS"
+ECLASS=perl-module
+INHERITED="${INHERITED} ${ECLASS}"
EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \
+ src_compile src_install src_test \
perlinfo updatepod
+eval `perl '-V:version'`
+newdepend ">=dev-lang/perl-5.8.0-r12"
+SRC_PREP="no"
+
SITE_LIB=""
ARCH_LIB=""
POD_DIR=""
+perl-module_src_prep() {
+
+ SRC_PREP="yes"
+ if [ "${style}" == "builder" ]; then
+ perl ${S}/Build.PL installdirs=vendor destdir=${D}
+ else
+ perl Makefile.PL ${myconf} \
+ PREFIX=${D}/usr INSTALLDIRS=vendor
+ fi
+
+}
+
+perl-module_src_compile() {
+
+ [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
+ if [ "${style}" != "builder" ]; then
+ make ${mymake} || die "compilation failed"
+ fi
+
+}
+
+perl-module_src_test() {
+ if [ "${style}" == "builder" ]; then
+ perl ${S}/Build test
+ else
+ make test
+ fi
+
+}
+
+perl-module_src_install() {
+
+ perlinfo
+ dodir ${POD_DIR}
+
+ test -z ${mytargets} && mytargets="install"
+ eval `perl '-V:installsitearch'`
+ SITE_ARCH=${installsitearch}
+ eval `perl '-V:installarchlib'`
+ ARCH_LIB=${installarchlib}
+
+ if [ "${style}" == "builder" ]; then
+ perl ${S}/Build install
+ else
+ make \
+ PREFIX=${D}/usr \
+ INSTALLMAN1DIR=${D}/usr/share/man/man1 \
+ INSTALLMAN2DIR=${D}/usr/share/man/man2 \
+ INSTALLMAN3DIR=${D}/usr/share/man/man3 \
+ INSTALLMAN4DIR=${D}/usr/share/man/man4 \
+ INSTALLMAN5DIR=${D}/usr/share/man/man5 \
+ INSTALLMAN6DIR=${D}/usr/share/man/man6 \
+ INSTALLMAN7DIR=${D}/usr/share/man/man7 \
+ INSTALLMAN8DIR=${D}/usr/share/man/man8 \
+ INSTALLSITEMAN1DIR=${D}/usr/share/man/man1 \
+ INSTALLSITEMAN2DIR=${D}/usr/share/man/man2 \
+ INSTALLSITEMAN3DIR=${D}/usr/share/man/man3 \
+ INSTALLSITEMAN4DIR=${D}/usr/share/man/man4 \
+ INSTALLSITEMAN5DIR=${D}/usr/share/man/man5 \
+ INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \
+ INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \
+ INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
+ INSTALLVENDORMAN3DIR=${D}/usr/share/man/man3 \
+ INSTALLSITEARCH=${D}/${SITE_ARCH} \
+ INSTALLSCRIPT=${D}/usr/bin \
+ ${myinst} \
+ ${mytargets} || die
+ fi
+
+ if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
+ then
+ touch ${D}/${POD_DIR}/${P}.pod
+ sed -e "s:${D}::g" \
+ ${D}${ARCH_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
+ touch ${D}/${POD_DIR}/${P}.pod.arch
+ cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch
+ rm -f ${D}/${ARCH_LIB}/perllocal.pod
+ fi
+
+ if [ -f ${D}${SITE_LIB}/perllocal.pod ];
+ then
+ touch ${D}/${POD_DIR}/${P}.pod
+ sed -e "s:${D}::g" \
+ ${D}${SITE_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
+ touch ${D}/${POD_DIR}/${P}.pod.site
+ cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
+ rm -f ${D}/${SITE_LIB}/perllocal.pod
+ fi
+
+ for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do
+ sed -i -e "s:${D}:/:g" ${FILE}
+ done
+
+ dodoc Change* MANIFEST* README* ${mydoc}
+}
+
-perl-post_pkg_setup() {
+perl-module_pkg_setup() {
perlinfo
}
-perl-post_pkg_preinst() {
+perl-module_pkg_preinst() {
perlinfo
}
-perl-post_pkg_postinst() {
+perl-module_pkg_postinst() {
updatepod
}
-perl-post_pkg_prerm() {
+perl-module_pkg_prerm() {
updatepod
}
-perl-post_pkg_postrm() {
+perl-module_pkg_postrm() {
updatepod
}
-perl-post_perlinfo() {
+perlinfo() {
if [ -f /usr/bin/perl ]
then
@@ -60,7 +160,7 @@ perl-post_perlinfo() {
}
-perl-post_updatepod() {
+updatepod() {
perlinfo
if [ -d "${POD_DIR}" ]
@@ -73,10 +173,5 @@ perl-post_updatepod() {
cat ${FILE} >> ${SITE_LIB}/perllocal.pod
rm -f ${FILE}
done
-
- #cat ${POD_DIR}/*.pod.arch >> ${ARCH_LIB}/perllocal.pod
- #cat ${POD_DIR}/*.pod.site >> ${SITE_LIB}/perllocal.pod
- #rm -f ${POD_DIR}/*.pod.site
- #rm -f ${POD_DIR}/*.pod.site
fi
}