diff options
-rw-r--r-- | eclass/perl-module.eclass | 4 | ||||
-rw-r--r-- | eclass/perl-post.eclass | 38 |
2 files changed, 31 insertions, 11 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 4121f81b7a02..8f3ace3ea5b6 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -1,7 +1,7 @@ # Copyright 2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 # Author: Seemant Kulleen <seemant@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.3 2002/05/05 07:06:40 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.4 2002/05/05 08:05:32 seemant Exp $ # The perl-module eclass is designed to allow easier installation of perl # modules, and their incorporation into the Gentoo Linux system. @@ -10,7 +10,7 @@ inherit perl-post ECLASS=base -EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm +EXPORT_FUNCTIONS src_compile src_install newdepend ">=sys-devel/perl-5" diff --git a/eclass/perl-post.eclass b/eclass/perl-post.eclass index e1a3871486c3..4169b924bdd5 100644 --- a/eclass/perl-post.eclass +++ b/eclass/perl-post.eclass @@ -1,43 +1,63 @@ # Copyright 2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 # Author: Seemant Kulleen <seemant@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.1 2002/05/05 07:00:38 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.2 2002/05/05 08:05:32 seemant Exp $ # 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. ECLASS=perl -EXPORT_FUNCTIONS pkg_postinst pkg_postrm +EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_prerm pkg_postrm perlinfo -TMP_VERSION=`perl '-V:version'` -POD_DIR="/usr/share/${version}/gentoo-pods" +perl_pkg_preinst() { + + perlinfo +} perl_pkg_postinst() { - eval `perl '-V:installarchlib'` + perlinfo + if [ -d "${POD_DIR}" ] then for i in `ls ${POD_DIR}` do if [ -f "${i}" ] then - cat ${i} > ${installarchlib}/perllocal.pod + cat ${i} > ${ARCH_LIB}/perllocal.pod fi done fi } -perl_pkg_postrm() { +perl_pkg_prerm() { + + perlinfo +} - eval `perl '-V:installarchlib'` +perl_pkg_postrm() { + + perlinfo + + einfo ${POD_DIR} + if [ -d "${POD_DIR}" ] then for i in ${POD_DIR}/*.pod do if [ -f "${i}" ] then - cat ${i} > ${installarchlib}/perllocal.pod + cat ${i} > ${ARCH_LIB}/perllocal.pod fi done fi } + + +perl_perlinfo() { + + TMP_VERSION="`if [ -f /usr/bin/perl ] ; then perl '-V:version' ; fi`" + ARCH_LIB="`if [ -f /usr/bin/perl ] ; then perl '-V:installarchlib' ; fi`" + POD_DIR="/usr/share/perl/gentoo-pods/${version}" + +} |