diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-04-10 23:22:40 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-04-10 23:23:12 +0200 |
commit | 3f3d74016a147390d2e494fa615d61bf6f395688 (patch) | |
tree | 38cfdea10c3474bd94bbaf512cbc1f8b224fd841 /eclass/perl-module.eclass | |
parent | x11-misc/bumblebee: drop old version (diff) | |
download | gentoo-3f3d74016a147390d2e494fa615d61bf6f395688.tar.gz gentoo-3f3d74016a147390d2e494fa615d61bf6f395688.tar.bz2 gentoo-3f3d74016a147390d2e494fa615d61bf6f395688.zip |
perl-module.eclass: Fix M::B and M::B::T QA check for EAPI=7
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r-- | eclass/perl-module.eclass | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 4c43c0e67ea1..3f7e4100db07 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -276,19 +276,38 @@ perl-module_src_configure() { fi if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then - einfo "Using Module::Build::Tiny" - if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." - die " Add dev-perl/Module-Build-Tiny to DEPEND!" - fi - else - einfo "Using Module::Build" - if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." - die " Add dev-perl/Module-Build to DEPEND!" - fi - fi + case ${EAPI:-0} in + 5|6) + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then + einfo "Using Module::Build::Tiny" + if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + die " Add dev-perl/Module-Build-Tiny to DEPEND!" + fi + else + einfo "Using Module::Build" + if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + die " Add dev-perl/Module-Build to DEPEND!" + fi + fi + ;; + *) + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then + einfo "Using Module::Build::Tiny" + if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!" + fi + else + einfo "Using Module::Build" + if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + eerror " Add dev-perl/Module-Build to BDEPEND!" + fi + fi + ;; + esac set -- \ --installdirs=vendor \ --libdoc= \ |