Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
Date: Tue, 13 Aug 2019 19:39:18
Message-Id: 20190813203901.6df00bd6@symphony.aura-online.co.uk
In Reply to: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support by kentnl@gentoo.org
On Wed, 14 Aug 2019 03:43:12 +1200
kentnl@g.o wrote:

> From: Andreas K. Hüttel <dilfridge@g.o> > > Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> > --- > eclass/perl-module.eclass | 30 +++++++++++++++--------------- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass > index 20b9947caca..81f79992d76 100644 > --- a/eclass/perl-module.eclass > +++ b/eclass/perl-module.eclass > @@ -44,61 +44,61 @@ esac > case ${EAPI:-0} in > 5) > [[ ${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:=[-build(-)]" > ;; > *) > DEPEND="dev-lang/perl[-build(-)]" > ;; > esac > 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 > ;; > - 6) > + 6|7) > [[ ${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:-yes}" != "yes" ]]; then > - eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6. If you don't want a slot operator" > + eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. 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" > + eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need" > die "phase functions, perl-functions.eclass if not." > fi > > EXPORT_FUNCTIONS ${PERL_EXPF} > ;; > *) > die "EAPI=${EAPI:-0} is not supported by perl-module.eclass" > ;;
First off, I don't think the SLOT operator in DEPEND actually does anything? I believe it's only meaningful for RDEPEND? Apart from that, I would say that dev-lang/perl should go in BDEPEND too, again without the SLOT operator. You need to execute Perl to build Perl modules, right? Whether it's also needed in DEPEND is a little more nuanced. For modules including native code, yes definitely. For others, maybe not but it's not worth complicating things here. Unfortunately there's currently no way to say that the versions of a package across BDEPEND, DEPEND, and RDEPEND must be (roughly?) equal so there's nothing to stop an ancient Perl in / building a module for a newer Perl in ROOT but that's a problem that goes far beyond Perl. Cross-compiling Perl modules is still a bit of a car crash anyway. Regards, -- James Le Cuirot (chewi) Gentoo Linux Developer

Replies