perl-module.eclass: Also populate BDEPEND in EAPI=7
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Wed, 14 Aug 2019 21:33:11 +0000 (23:33 +0200)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 15 Aug 2019 16:37:18 +0000 (18:37 +0200)
In addition, no slot op in DEPEND.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
eclass/perl-module.eclass

index 81f79992d766e4fd0bce39bfa704ff58af3c4294..e1fb97df3260b15843ceb191db90958767ab0726 100644 (file)
@@ -72,13 +72,13 @@ case ${EAPI:-0} in
                                ;;
                esac
                ;;
-       6|7)
+       6)
                [[ ${CATEGORY} == perl-core ]] && \
                        PERL_EXPF+=" pkg_postinst pkg_postrm"
 
                case "${GENTOO_DEPEND_ON_PERL:-yes}" in
                        yes)
-                               DEPEND="dev-lang/perl:="
+                               DEPEND="dev-lang/perl"
                                RDEPEND="dev-lang/perl:="
                                ;;
                        noslotop)
@@ -97,6 +97,33 @@ case ${EAPI:-0} in
                        die    "phase functions, perl-functions.eclass if not."
                fi
 
+               EXPORT_FUNCTIONS ${PERL_EXPF}
+               ;;
+       7)
+               [[ ${CATEGORY} == perl-core ]] && \
+                       PERL_EXPF+=" pkg_postinst pkg_postrm"
+
+               case "${GENTOO_DEPEND_ON_PERL:-yes}" in
+                       yes)
+                               DEPEND="dev-lang/perl"
+                               BDEPEND="dev-lang/perl"
+                               RDEPEND="dev-lang/perl:="
+                               ;;
+                       noslotop)
+                               DEPEND="dev-lang/perl"
+                               BDEPEND="dev-lang/perl"
+                               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}
                ;;
        *)