From: "Andreas K. Huettel (dilfridge)" <dilfri...@gentoo.org>
--- eclass/perl-module.eclass | 54 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 5a476d2..82c72fc 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -37,21 +37,55 @@ case "${EAPI:-0}" in RDEPEND="${DEPEND}" ;; esac + + case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in + yes) + EXPORT_FUNCTIONS ${PERL_EXPF} + ;; + no) + debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" + ;; + *) + die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" + ;; + esac ;; - *) - die "EAPI=${EAPI} is not supported by perl-module.eclass" - ;; -esac + 6) + [[ ${CATEGORY} == "perl-core" ]] && \ + PERL_EXPF+=" pkg_postinst pkg_postrm" + + case "${GENTOO_DEPEND_ON_PERL:-yes}" in + yes) + case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in + yes) + DEPEND="dev-lang/perl:=" + ;; + *) + DEPEND="dev-lang/perl" + ;; + esac + RDEPEND="${DEPEND}" + ;; + esac + + case "${PERL_EXPORT_PHASE_FUNCTIONS:-undefined}" in + yes) + die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. It defaults to yes anyway." + ;; + no) + die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Inherit perl-functions.eclass instead." + ;; + undefined) + ;; + *) + die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6." + ;; + esac -case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in - yes) EXPORT_FUNCTIONS ${PERL_EXPF} ;; - no) - debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" - ;; *) - die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" + die "EAPI=${EAPI} is not supported by perl-module.eclass" ;; esac -- 2.6.3