summaryrefslogtreecommitdiff
path: root/eclass/perl-module.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /eclass/perl-module.eclass
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r--eclass/perl-module.eclass57
1 files changed, 42 insertions, 15 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 20b9947caca9..e1fb97df3260 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,4 +1,4 @@
-# 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
@@ -7,7 +7,7 @@
# @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
@@ -23,7 +23,7 @@ case ${EAPI:-0} in
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"
;;
@@ -78,7 +78,7 @@ case ${EAPI:-0} in
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes)
- DEPEND="dev-lang/perl:="
+ DEPEND="dev-lang/perl"
RDEPEND="dev-lang/perl:="
;;
noslotop)
@@ -88,17 +88,44 @@ case ${EAPI:-0} in
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}
;;
+ 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}
+ ;;
*)
die "EAPI=${EAPI:-0} is not supported by perl-module.eclass"
;;
@@ -108,42 +135,42 @@ 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.
@@ -314,7 +341,7 @@ perl-module_src_compile() {
# @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
@@ -328,7 +355,7 @@ perl-module_src_compile() {
# @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