Gentoo Archives: gentoo-dev

From: dilfridge@g.o
To: gentoo-dev@l.g.o
Cc: "Andreas K. Hüttel" <dilfridge@g.o>
Subject: [gentoo-dev] [PATCH] perl-module.eclass: Also populate BDEPEND in EAPI=7
Date: Wed, 14 Aug 2019 21:36:15
Message-Id: 20190814213553.25846-1-dilfridge@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support by James Le Cuirot
From: Andreas K. Hüttel <dilfridge@g.o>

In addition, no slot op in DEPEND.

Signed-off-by: Andreas K. Hüttel <dilfridge@g.o>
---
 eclass/perl-module.eclass | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 81f79992d766..e1fb97df3260 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -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}
 		;;
 	*)
-- 
2.22.0