diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
commit | 61f10f985e19dfe20a4d9552902625edd5b6eabb (patch) | |
tree | 50db31971b38c4e0358253ef5005058a46fc773e /eclass/perl-module.eclass | |
parent | 34dea8e38f88007799629d0a56b12dec480b1d21 (diff) |
gentoo resync : 21.06.2021
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r-- | eclass/perl-module.eclass | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 6285e9363156..3c1b4c3c5acc 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -43,7 +43,9 @@ esac # dev-lang/perl is automatically added by the eclass. It defaults to yes. # Set to no to disable, set to noslotop to add a perl dependency without # slot operator (EAPI=6). All packages installing into the vendor_perl -# path must use yes here. +# path must use yes here. (EAPI=8 and later) Also adds a test useflag, +# a use-conditional build time dependency on virtual/perl-Test-Simple, and +# the required RESTRICT setting. case ${EAPI:-0} in 5) @@ -103,7 +105,7 @@ case ${EAPI:-0} in EXPORT_FUNCTIONS ${PERL_EXPF} ;; - *) + 7) [[ ${CATEGORY} == perl-core ]] && \ PERL_EXPF+=" pkg_postinst pkg_postrm" @@ -130,6 +132,36 @@ case ${EAPI:-0} in EXPORT_FUNCTIONS ${PERL_EXPF} ;; + *) + [[ ${CATEGORY} == perl-core ]] && \ + PERL_EXPF+=" pkg_postinst pkg_postrm" + + case "${GENTOO_DEPEND_ON_PERL:-yes}" in + yes|noslotop) + DEPEND="dev-lang/perl" + BDEPEND="dev-lang/perl + test? ( virtual/perl-Test-Simple )" + IUSE="test" + RESTRICT="!test? ( test )" + ;;& + yes) + RDEPEND="dev-lang/perl:=" + ;; + noslotop) + RDEPEND="dev-lang/perl" + ;; + esac + + if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later." + fi + + if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then + die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later." + fi + + EXPORT_FUNCTIONS ${PERL_EXPF} + ;; esac LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" |