summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2003-05-30 08:13:44 +0000
committerSeemant Kulleen <seemant@gentoo.org>2003-05-30 08:13:44 +0000
commit6ccfb263f0e31efe8cc650e111dfa637038c58e9 (patch)
treed35306fda47b06edf98dc9db8a8699bdd486c3e3 /eclass/perl-module.eclass
parentremoved make test (diff)
downloadhistorical-6ccfb263f0e31efe8cc650e111dfa637038c58e9.tar.gz
historical-6ccfb263f0e31efe8cc650e111dfa637038c58e9.tar.bz2
historical-6ccfb263f0e31efe8cc650e111dfa637038c58e9.zip
folded perl-post functions into perl-module eclass -- was needless
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r--eclass/perl-module.eclass79
1 files changed, 72 insertions, 7 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 4732bcce961d..060862f1f86f 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,19 +1,17 @@
# 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.34 2003/03/11 21:26:32 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.35 2003/05/30 08:13:44 seemant Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
#
# The perl-module eclass is designed to allow easier installation of perl
# modules, and their incorporation into the Gentoo Linux system.
-#first inherit the pkg_postinst() and pkg_postrm() functions
-inherit perl-post
-
ECLASS=perl-module
-INHERITED="$INHERITED $ECLASS"
+INHERITED="${INHERITED} ${ECLASS}"
-EXPORT_FUNCTIONS src_compile src_install src_test
+EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \
+ src_compile src_install src_test
eval `perl '-V:version'`
DEPEND="dev-lang/perl
@@ -21,6 +19,10 @@ DEPEND="dev-lang/perl
${DEPEND}"
SRC_PREP="no"
+SITE_LIB=""
+ARCH_LIB=""
+POD_DIR=""
+
perl-module_src_prep() {
SRC_PREP="yes"
@@ -40,7 +42,7 @@ perl-module_src_test() {
perl-module_src_install() {
- perl-post_perlinfo
+ perlinfo
dodir ${POD_DIR}
test -z ${mytargets} && mytargets="install"
@@ -96,3 +98,66 @@ perl-module_src_install() {
dodoc Change* MANIFEST* README* ${mydoc}
}
+
+
+perl-module_pkg_setup() {
+
+ perlinfo
+}
+
+
+perl-module_pkg_preinst() {
+
+ perlinfo
+}
+
+perl-module_pkg_postinst() {
+
+ updatepod
+}
+
+perl-module_pkg_prerm() {
+
+ updatepod
+}
+
+perl-module_pkg_postrm() {
+
+ updatepod
+}
+
+perlinfo() {
+
+ if [ -f /usr/bin/perl ]
+ then
+ eval `perl '-V:installarchlib'`
+ eval `perl '-V:installsitearch'`
+ ARCH_LIB=${installarchlib}
+ SITE_LIB=${installsitearch}
+
+ eval `perl '-V:version'`
+ POD_DIR="/usr/share/perl/gentoo-pods/${version}"
+ fi
+
+}
+
+updatepod() {
+ perlinfo
+
+ if [ -d "${POD_DIR}" ]
+ then
+ for FILE in `find ${POD_DIR} -type f -name "*.pod.arch"`; do
+ cat ${FILE} >> ${ARCH_LIB}/perllocal.pod
+ rm -f ${FILE}
+ done
+ for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
+ 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
+}