public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/2] EAPI7 Support for perl-{functions,module}.eclass
@ 2019-08-13 15:43 kentnl
  2019-08-13 15:43 ` [gentoo-dev] [PATCH 1/2] perl-functions.eclass: Add EAPI=7 support kentnl
  2019-08-13 15:43 ` [gentoo-dev] [PATCH 2/2] perl-module.class: Enable " kentnl
  0 siblings, 2 replies; 8+ messages in thread
From: kentnl @ 2019-08-13 15:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: perl, Kent Fredric

From: Kent Fredric <kentnl@gentoo.org>

These are already committed to tree [ :( ] just relaying to the list
for added oversight/feedback and to make sure any EAPI7 specific
changes like BROOT/BDEPENDS etc get checked off before widespread usage
starts happening.

Any follow-up submissions will be relayed to the list on top of this
series.

Andreas K. Hüttel (2):
  perl-functions.eclass: Add EAPI=7 support
  perl-module.class: Enable EAPI=7 support

-- 
2.22.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 1/2] perl-functions.eclass: Add EAPI=7 support
  2019-08-13 15:43 [gentoo-dev] [PATCH 0/2] EAPI7 Support for perl-{functions,module}.eclass kentnl
@ 2019-08-13 15:43 ` kentnl
  2019-08-13 15:43 ` [gentoo-dev] [PATCH 2/2] perl-module.class: Enable " kentnl
  1 sibling, 0 replies; 8+ messages in thread
From: kentnl @ 2019-08-13 15:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: perl, Andreas K. Hüttel

From: Andreas K. Hüttel <dilfridge@gentoo.org>

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 eclass/perl-functions.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e7775f31b8e..e6168a07534 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -1,26 +1,26 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: perl-functions.eclass
 # @MAINTAINER:
 # perl@gentoo.org
 # @AUTHOR:
 # Seemant Kulleen <seemant@gentoo.org>
 # Andreas K. Huettel <dilfridge@gentoo.org>
 # Kent Fredric <kentnl@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: helper functions eclass for perl modules
 # @DESCRIPTION:
 # The perl-functions eclass is designed to allow easier installation of perl
 # modules, and their incorporation into the Gentoo Linux system.
 # It provides helper functions, no phases or variable manipulation in
 # global scope.
 
 [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
 
 case "${EAPI:-0}" in
-	5|6)
+	5|6|7)
 		;;
 	*)
 		die "EAPI=${EAPI} is not supported by perl-functions.eclass"
 		;;
@@ -130,70 +130,70 @@ perl_delete_emptybsdir() {
 # @FUNCTION: perl_fix_packlist
 # @DESCRIPTION:
 # Look through ${D} for .packlist text files containing the temporary installation
 # folder (i.e. ${D}). If the pattern is found, silently replace it with `/'.
 # Remove duplicate entries; then validate all entries in the packlist against ${D}
 # and prune entries that do not correspond to installed files.
 perl_fix_packlist() {
 	debug-print-function $FUNCNAME "$@"
 
 	local packlist_temp="${T}/.gentoo_packlist_temp"
 	find "${D}" -type f -name '.packlist' -print0 | while read -rd '' f ; do
 		if file "${f}" | grep -q -i " text" ; then
                         einfo "Fixing packlist file /${f#${D}}"
 
 			# remove the temporary build dir path
-			sed -i -e "s:${D}:/:g" "${f}"
+			sed -i -e "s:${D%/}/:/:g" "${f}"
 
 			# remove duplicate entries
 			sort -u "${f}" > "${packlist_temp}"
 			mv "${packlist_temp}" "${f}"
 
 			# remove files that dont exist
 			cat "${f}" | while read -r entry; do
 				if [ ! -e "${D}/${entry}" ]; then
 					einfo "Pruning surplus packlist entry ${entry}"
 					grep -v -x -F "${entry}" "${f}" > "${packlist_temp}"
 					mv "${packlist_temp}" "${f}"
 				fi
 			done
 		fi
 	done
 }
 
 # @FUNCTION: perl_remove_temppath
 # @DESCRIPTION:
 # Look through ${D} for text files containing the temporary installation
 # folder (i.e. ${D}). If the pattern is found, replace it with `/' and warn.
 perl_remove_temppath() {
 	debug-print-function $FUNCNAME "$@"
 
 	find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
 		if file "${f}" | grep -q -i " text" ; then
 			grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
-			sed -i -e "s:${D}:/:g" "${f}"
+			sed -i -e "s:${D%/}/:/:g" "${f}"
 		fi
 	done
 }
 
 # @FUNCTION: perl_rm_files
 # @USAGE: <list of files>
 # @DESCRIPTION:
 # Remove certain files from a Perl release and remove them from the MANIFEST
 # while we're there.
 #
 # Most useful in src_prepare for nuking bad tests, and is highly recommended
 # for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what they
 # test is completely irrelevant to end users, and frequently fail simply
 # because the authors of Test::Pod... changed their recommendations, and thus
 # failures are only useful feedback to Authors, not users.
 #
 # Removing from MANIFEST also avoids needless log messages warning
 # users about files "missing from their kit".
 #
 # Example:
 # @CODE
 # src_test() {
 #   perl_rm_files t/pod{,-coverage}.t
 #   perl-module_src_test
 # }
 # @CODE
-- 
2.22.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
  2019-08-13 15:43 [gentoo-dev] [PATCH 0/2] EAPI7 Support for perl-{functions,module}.eclass kentnl
  2019-08-13 15:43 ` [gentoo-dev] [PATCH 1/2] perl-functions.eclass: Add EAPI=7 support kentnl
@ 2019-08-13 15:43 ` kentnl
  2019-08-13 19:39   ` James Le Cuirot
  1 sibling, 1 reply; 8+ messages in thread
From: kentnl @ 2019-08-13 15:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: perl, Andreas K. Hüttel

From: Andreas K. Hüttel <dilfridge@gentoo.org>

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 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
@@ -1,19 +1,19 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: perl-module.eclass
 # @MAINTAINER:
 # perl@gentoo.org
 # @AUTHOR:
 # Seemant Kulleen <seemant@gentoo.org>
 # Andreas K. Hüttel <dilfridge@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: eclass for installing Perl module distributions
 # @DESCRIPTION:
 # The perl-module eclass is designed to allow easier installation of Perl
 # module distributions, and their incorporation into the Gentoo Linux system.
 # All exported functions from perl-functions.eclass (inherited here)
 # explicitly also belong to the interface of perl-module.eclass.
 # If your package does not use any Perl-specific build system (as, e.g.,
 # ExtUtils::MakeMaker or Module::Build), we recommend to use perl-functions.eclass
 # instead.
@@ -21,12 +21,12 @@
 case ${EAPI:-0} in
 	5)
 		inherit eutils multiprocessing unpacker perl-functions
 		PERL_EXPF="src_unpack src_prepare src_configure src_compile src_test src_install"
 		;;
-	6)
+	6|7)
 		inherit multiprocessing perl-functions
 		PERL_EXPF="src_prepare src_configure src_compile src_test src_install"
 		;;
 	*)
 		die "EAPI=${EAPI} is not supported by 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"
 		;;
@@ -107,43 +107,43 @@ esac
 LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
 
 # @ECLASS-VARIABLE: DIST_NAME
 # @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override PN for the calculation of S,
+# (EAPI=6 and later) This variable provides a way to override PN for the calculation of S,
 # SRC_URI, and HOMEPAGE. Defaults to PN.
 
 # @ECLASS-VARIABLE: DIST_VERSION
 # @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override PV for the calculation of S and SRC_URI.
+# (EAPI=6 and later) This variable provides a way to override PV for the calculation of S and SRC_URI.
 # Use it to provide the non-normalized, upstream version number. Defaults to PV.
 # Named MODULE_VERSION in EAPI=5.
 
 # @ECLASS-VARIABLE: DIST_A_EXT
 # @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override the distfile extension for the calculation of
+# (EAPI=6 and later) This variable provides a way to override the distfile extension for the calculation of
 # SRC_URI. Defaults to tar.gz. Named MODULE_A_EXT in EAPI=5.
 
 # @ECLASS-VARIABLE: DIST_A
 # @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override the distfile name for the calculation of
+# (EAPI=6 and later) This variable provides a way to override the distfile name for the calculation of
 # SRC_URI. Defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT} Named MODULE_A in EAPI=5.
 
 # @ECLASS-VARIABLE: DIST_AUTHOR
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# (EAPI=6) This variable sets the module author name for the calculation of
+# (EAPI=6 and later) This variable sets the module author name for the calculation of
 # SRC_URI. Named MODULE_AUTHOR in EAPI=5.
 
 # @ECLASS-VARIABLE: DIST_SECTION
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# (EAPI=6) This variable sets the module section for the calculation of
+# (EAPI=6 and later) This variable sets the module section for the calculation of
 # SRC_URI. Only required in rare cases for very special snowflakes.
 # Named MODULE_SECTION in EAPI=5.
 
 # @ECLASS-VARIABLE: DIST_EXAMPLES
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# (EAPI=6) This Bash array allows passing a list of example files to be installed
+# (EAPI=6 and later) This Bash array allows passing a list of example files to be installed
 # in /usr/share/doc/${PF}/examples. If set before inherit, automatically adds
 # a use-flag examples, if not you'll have to add the useflag in your ebuild.
 # Examples are installed only if the useflag examples exists and is activated.
@@ -287,54 +287,54 @@ perl-module_src_configure() {
 # @FUNCTION: perl-module_src_compile
 # @DESCRIPTION:
 # Compile the ebuild sources.
 # This function is to be called during the ebuild src_compile() phase.
 perl-module_src_compile() {
 	debug-print-function $FUNCNAME "$@"
 	perl_set_version
 
 	if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
 		local mymake_local=(${mymake})
 	else
 		local mymake_local=("${mymake[@]}")
 	fi
 
 	if [[ -f Build ]] ; then
 		./Build build \
 			|| die "Compilation failed"
 	elif [[ -f Makefile ]] ; then
 		set -- \
 			OTHERLDFLAGS="${LDFLAGS}" \
 			"${mymake_local[@]}"
 		einfo "emake" "$@"
 		emake "$@" \
 			|| die "Compilation failed"
 #			OPTIMIZE="${CFLAGS}" \
 	fi
 }
 
 # @ECLASS-VARIABLE: DIST_TEST
 # @DESCRIPTION:
-# (EAPI=6) Variable that controls if tests are run in the test phase
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase
 # at all, and if yes under which conditions. Defaults to "do parallel"
 # If neither "do" nor "parallel" is recognized, tests are skipped.
 # (In EAPI=5 the variable is called SRC_TEST, defaults to "skip", and
 # recognizes fewer options.)
 # The following space-separated keywords are recognized:
 #   do       : run tests
 #   parallel : run tests in parallel
 #   verbose  : increase test verbosity
 #   network  : do not try to disable network tests
 
 # @ECLASS-VARIABLE: DIST_TEST_OVERRIDE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# (EAPI=6) Variable that controls if tests are run in the test phase
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase
 # at all, and if yes under which conditions. It is intended for use in
 # make.conf or the environment by ebuild authors during testing, and
 # accepts the same values as DIST_TEST. If set, it overrides DIST_TEST
 # completely. DO NOT USE THIS IN EBUILDS!
 
 # @FUNCTION: perl-module_src-test
 # @DESCRIPTION:
 # This code attempts to work out your threadingness and runs tests
 # according to the settings of DIST_TEST using Test::Harness.
-- 
2.22.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
  2019-08-13 15:43 ` [gentoo-dev] [PATCH 2/2] perl-module.class: Enable " kentnl
@ 2019-08-13 19:39   ` James Le Cuirot
  2019-08-13 23:42     ` Kent Fredric
  2019-08-14 21:35     ` [gentoo-dev] [PATCH] perl-module.eclass: Also populate BDEPEND in EAPI=7 dilfridge
  0 siblings, 2 replies; 8+ messages in thread
From: James Le Cuirot @ 2019-08-13 19:39 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 3365 bytes --]

On Wed, 14 Aug 2019 03:43:12 +1200
kentnl@gentoo.org wrote:

> From: Andreas K. Hüttel <dilfridge@gentoo.org>
> 
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
>  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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
  2019-08-13 19:39   ` James Le Cuirot
@ 2019-08-13 23:42     ` Kent Fredric
  2019-08-14  9:16       ` James Le Cuirot
  2019-08-14 21:35     ` [gentoo-dev] [PATCH] perl-module.eclass: Also populate BDEPEND in EAPI=7 dilfridge
  1 sibling, 1 reply; 8+ messages in thread
From: Kent Fredric @ 2019-08-13 23:42 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

On Tue, 13 Aug 2019 20:39:01 +0100
James Le Cuirot <chewi@gentoo.org> wrote:

> 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.

I'd imagine that for CC, you'd need all perl modules installed to
BDEPEND _and_ DEPEND _AND_ RDEPEND,

Because the configure stage runs Makefile.PL on the host perl, and it
checks the existence of all "runtime" and "compile time" dependencies
itself, and it does this by *loading* them into the host perl.

Failure to load them on the host perl produces lots of warnings in the
best of cases, and errors in the worst of cases.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
  2019-08-13 23:42     ` Kent Fredric
@ 2019-08-14  9:16       ` James Le Cuirot
  2019-08-14 10:53         ` Kent Fredric
  0 siblings, 1 reply; 8+ messages in thread
From: James Le Cuirot @ 2019-08-14  9:16 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

On Wed, 14 Aug 2019 11:42:16 +1200
Kent Fredric <kentnl@gentoo.org> wrote:

> On Tue, 13 Aug 2019 20:39:01 +0100
> James Le Cuirot <chewi@gentoo.org> wrote:
> 
> > 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.  
> 
> I'd imagine that for CC, you'd need all perl modules installed to
> BDEPEND _and_ DEPEND _AND_ RDEPEND,
> 
> Because the configure stage runs Makefile.PL on the host perl, and it
> checks the existence of all "runtime" and "compile time" dependencies
> itself, and it does this by *loading* them into the host perl.
> 
> Failure to load them on the host perl produces lots of warnings in the
> best of cases, and errors in the worst of cases.

Yes, I thought that was probably the case. Python is more forgiving in
this regard.

When trying to solve this problem in cross-boss, I found that
Makefile-based modules would usually build if you ran Perl through QEMU
during src_configure and ran Make with some tweaked variables during
src_compile and src_install but this is extremely hacky.

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support
  2019-08-14  9:16       ` James Le Cuirot
@ 2019-08-14 10:53         ` Kent Fredric
  0 siblings, 0 replies; 8+ messages in thread
From: Kent Fredric @ 2019-08-14 10:53 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

On Wed, 14 Aug 2019 10:16:57 +0100
James Le Cuirot <chewi@gentoo.org> wrote:

> Yes, I thought that was probably the case. Python is more forgiving in
> this regard.

In perls case, some of that unforgivingness is upstream dev's stuffing
custom logic into Makefile.PL that calls "die", when EUMM will
automatically warn anyway, even if nothing in the build process will
*actually* require the dependencies present until it runs src_test. But
that's just par for 'we have to patch upstream anyway to not be silly'


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH] perl-module.eclass: Also populate BDEPEND in EAPI=7
  2019-08-13 19:39   ` James Le Cuirot
  2019-08-13 23:42     ` Kent Fredric
@ 2019-08-14 21:35     ` dilfridge
  1 sibling, 0 replies; 8+ messages in thread
From: dilfridge @ 2019-08-14 21:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Andreas K. Hüttel

From: Andreas K. Hüttel <dilfridge@gentoo.org>

In addition, no slot op in DEPEND.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-14 21:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-13 15:43 [gentoo-dev] [PATCH 0/2] EAPI7 Support for perl-{functions,module}.eclass kentnl
2019-08-13 15:43 ` [gentoo-dev] [PATCH 1/2] perl-functions.eclass: Add EAPI=7 support kentnl
2019-08-13 15:43 ` [gentoo-dev] [PATCH 2/2] perl-module.class: Enable " kentnl
2019-08-13 19:39   ` James Le Cuirot
2019-08-13 23:42     ` Kent Fredric
2019-08-14  9:16       ` James Le Cuirot
2019-08-14 10:53         ` Kent Fredric
2019-08-14 21:35     ` [gentoo-dev] [PATCH] perl-module.eclass: Also populate BDEPEND in EAPI=7 dilfridge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox