--- perl-module.eclass +++ perl-module.eclass @@ -127,13 +127,25 @@ fi if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then - einfo "Using Module::Build" - if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${PN} != Module-Build ]] ; then - eqawarn "QA Notice: The ebuild uses Module::Build but doesn't depend on it." - eqawarn " Add virtual/perl-Module-Build to DEPEND!" - if [[ -n ${PERLQAFATAL} ]]; then - eerror "Bailing out due to PERLQAFATAL=1"; - die; + 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 + eqawarn "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + eqawarn " Add dev-perl/Module-Build-Tiny to DEPEND!" + if [[ -n ${PERLQAFATAL} ]]; then + eerror "Bailing out due to PERLQAFATAL=1"; + die + fi + fi + else + einfo "Using Module::Build" + if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${PN} != Module-Build ]] ; then + eqawarn "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + eqawarn " Add virtual/perl-Module-Build to DEPEND!" + if [[ -n ${PERLQAFATAL} ]]; then + eerror "Bailing out due to PERLQAFATAL=1"; + die + fi fi fi set -- \ @@ -257,23 +269,22 @@ local f - if [[ -z ${mytargets} ]] ; then + if [[ -f Build ]]; then + mytargets="${mytargets:-install}" + mbparams="${mbparams:---pure}" + einfo "./Build ${mytargets} ${mbparams}" + ./Build ${mytargets} ${mbparams} \ + || die "./Build ${mytargets} ${mbparams} failed" + elif [[ -f Makefile ]]; then case "${CATEGORY}" in dev-perl|perl-core) mytargets="pure_install" ;; *) mytargets="install" ;; esac - fi - - if [[ $(declare -p myinst 2>&-) != "declare -a myinst="* ]]; then - local myinst_local=(${myinst}) - else - local myinst_local=("${myinst[@]}") - fi - - if [[ -f Build ]] ; then - ./Build ${mytargets} \ - || die "./Build ${mytargets} failed" - elif [[ -f Makefile ]] ; then + if [[ $(declare -p myinst 2>&-) != "declare -a myinst="* ]]; then + local myinst_local=(${myinst}) + else + local myinst_local=("${myinst[@]}") + fi emake "${myinst_local[@]}" ${mytargets} \ || die "emake ${myinst_local[@]} ${mytargets} failed" fi