From 3f225ddcc75da12b4deabb630c64e77e80f14cd6 Mon Sep 17 00:00:00 2001 From: Michael Cummings Date: Sun, 27 Nov 2005 22:22:22 +0000 Subject: [PATCH] Avoids building man3 pages out of perldocs for perl-modules, still enabled in perl-app eclass. --- eclass/perl-app.eclass | 56 +++++++++++++++++++++++++++++++++++++++ eclass/perl-module.eclass | 11 ++++---- 2 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 eclass/perl-app.eclass diff --git a/eclass/perl-app.eclass b/eclass/perl-app.eclass new file mode 100644 index 000000000000..d7fc9d178a15 --- /dev/null +++ b/eclass/perl-app.eclass @@ -0,0 +1,56 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/perl-app.eclass,v 1.1 2005/11/27 22:22:22 mcummings Exp $ + +# +# Author: Michael Cummings +# Maintained by the Perl herd +# +# The perl-app eclass is designed to allow easier installation of perl +# apps, ineheriting the full structure of the perl-module eclass but allowing +# man3 pages to be built. This is to work around a collision-protect bug in the +# default perl-module eclass + +inherit perl-module + +EXPORT_FUNCTIONS src_compile + +perl-app_src_prep() { + + perlinfo + + export PERL_MM_USE_DEFAULT=1 + + + SRC_PREP="yes" + if [ -f ${S}/Build.PL ] && [ "${USE_BUILDER}" == "yes" ]; then + einfo "Using Module::Build" + if [ -z ${BUILDER_VER} ]; then + eerror + eerror "Please post a bug on http://bugs.gentoo.org assigned to" + eerror "perl@gentoo.org - ${P} was added without a dependancy" + eerror "on dev-perl/module-build" + eerror "${BUILDER_VER}" + eerror + die + else + perl ${S}/Build.PL installdirs=vendor destdir=${D} + fi + else + einfo "Using ExtUtils::MakeMaker" + perl Makefile.PL ${myconf} \ + prefiX=/usr INSTALLDIRS=vendor DESTDIR=${D} + fi +} + +perl-app_src_compile() { + + perlinfo + [ "${SRC_PREP}" != "yes" ] && perl-app_src_prep + if [ -z ${BUILDER_VER} ]; then + make ${mymake} || die "compilation failed" + else + perl ${S}/Build build + fi + +} diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index ca4f1ac1635b..7af94076dc0f 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.79 2005/07/24 13:14:53 mcummings Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.80 2005/11/27 22:22:22 mcummings Exp $ # # Author: Seemant Kulleen # Maintained by the Perl herd @@ -10,7 +10,7 @@ EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ - src_compile src_install src_test + src_compile src_install src_test perlinfo fixlocalpod updatepod # 2005.04.28 mcummings # Mounting problems with src_test functions has forced me to make the @@ -102,11 +102,12 @@ perl-module_src_prep() { eerror die else - perl ${S}/Build.PL installdirs=vendor destdir=${D} + perl ${S}/Build.PL installdirs=vendor destdir=${D} libdoc= fi else einfo "Using ExtUtils::MakeMaker" - perl Makefile.PL ${myconf} \ + #perl Makefile.PL ${myconf} \ + perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} fi } @@ -118,7 +119,7 @@ perl-module_src_compile() { if [ -z ${BUILDER_VER} ]; then make ${mymake} || die "compilation failed" else - perl ${S}/Build build + perl ${S}/Build build fi } -- 2.26.2