diff options
author | Andreas K. Huettel (dilfridge) <dilfridge@gentoo.org> | 2015-11-28 22:15:52 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2015-12-19 14:17:07 +0100 |
commit | 73586f6429fd6ddaec2e32447886f7122cfa5840 (patch) | |
tree | da8fa946cbd8bda598fd1744fb701b892199f86c /eclass/perl-module.eclass | |
parent | perl-module.eclass: Remove references to perlinfo_done (diff) | |
download | gentoo-73586f6429fd6ddaec2e32447886f7122cfa5840.tar.gz gentoo-73586f6429fd6ddaec2e32447886f7122cfa5840.tar.bz2 gentoo-73586f6429fd6ddaec2e32447886f7122cfa5840.zip |
perl-module.eclass: Allow EAPI=6, ban PERL_EXPORT_PHASE_FUNCTIONS, GENTOO_DEPEND_ON_PERL_SUBSLOT, simplify dependency
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r-- | eclass/perl-module.eclass | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 0ef8d3d1e73a..f380730d871c 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -37,21 +37,48 @@ 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) + DEPEND="dev-lang/perl:=" + RDEPEND="dev-lang/perl:=" + ;; + noslotop) + DEPEND="dev-lang/perl" + RDEPEND="dev-lang/perl" + ;; + esac + + if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT}" ]]; then + eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT is banned in EAPI=6. If you don't want a slot operator" + die "set GENTOO_DEPEND_ON_PERL=noslotop instead." + fi + + if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then + eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Use perl-module.eclass if you need" + die "phase functions, perl-functions.eclass if not." + fi -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 |