Gentoo Archives: gentoo-dev

From: Torsten Veller <ml-en@××××××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: perl eclass review - EAPI=3 + new helper eclass
Date: Tue, 20 Apr 2010 06:50:34
Message-Id: 20100420074544.TA09dbc.tv@veller.net
In Reply to: [gentoo-dev] perl eclass review - EAPI=3 + new helper eclass by Torsten Veller
* Torsten Veller <ml-en@××××××.net>:
> The perl-module.eclass must be updated to support EAPI=3 [1] and > a new eclass will be added which does contain some (more or less) useful > stand-alone functions split from the old perl-module.eclass without > exporting phase functions.
Somehow I was sleeping: It's more useful to set EXPORT_FUNCTIONS conditionally and have all functions in perl-module.eclass. I think this justifies the elimination of the perl-helper.eclass. Sorry for the confusion. Hopefully wide awake now. New perl-helper.eclass: | # Copyright 1999-2010 Gentoo Foundation | # Distributed under the terms of the GNU General Public License v2 | # $Header: $ | | # @DEAD | | PERL_EXPORT_PHASE_FUNCTIONS=no | inherit perl-module Head of new perl-module.eclass: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=tree;f=eclass;hb=HEAD | @@ -12,19 +12,19 @@ | # The perl-module eclass is designed to allow easier installation of perl | # modules, and their incorporation into the Gentoo Linux system. | | -inherit perl-helper eutils base | +inherit eutils base | [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives | | PERL_EXPF="src_unpack src_compile src_test src_install" | | case "${EAPI:-0}" in | 0|1) | - PERL_EXPF="${PERL_EXPF} pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm" | + PERL_EXPF+=" pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm" | ;; | 2|3) | - PERL_EXPF="${PERL_EXPF} src_prepare src_configure" | + PERL_EXPF+=" src_prepare src_configure" | [[ ${CATEGORY} == "perl-core" ]] && \ | - PERL_EXPF="${PERL_EXPF} pkg_postinst pkg_postrm" | + PERL_EXPF+=" pkg_postinst pkg_postrm" | | case "${GENTOO_DEPEND_ON_PERL:-yes}" in | yes) | @@ -38,7 +38,17 @@ case "${EAPI:-0}" in | ;; | esac | | -EXPORT_FUNCTIONS ${PERL_EXPF} | +case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in | + yes) | + EXPORT_FUNCTIONS ${PERL_EXPF} | + ;; | + no) | + debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" | + ;; | + *) | + DEPEND+=" PERL_EXPORT_PHASE_FUNCTIONS-UNSUPPORTED" | + ;; | +esac | | DESCRIPTION="Based on the $ECLASS eclass" ...