diff options
author | 2017-10-15 13:30:45 +1300 | |
---|---|---|
committer | 2017-10-15 13:31:19 +1300 | |
commit | f0033250966ab2248ade9c51f12143607185c610 (patch) | |
tree | e87b0a08d622d8d1cdcc8ae43838e3aa1baa9044 /dev-perl/Apache-Test | |
parent | dev-perl/Browser-Open: Add remote-id to metadata (diff) | |
download | gentoo-f0033250966ab2248ade9c51f12143607185c610.tar.gz gentoo-f0033250966ab2248ade9c51f12143607185c610.tar.bz2 gentoo-f0033250966ab2248ade9c51f12143607185c610.zip |
dev-perl/Apache-Test: Fix handling of optional dep on mod_perl
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'dev-perl/Apache-Test')
-rw-r--r-- | dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild b/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild index 2c4a9339e935..652bbb3377fe 100644 --- a/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild +++ b/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild @@ -12,7 +12,7 @@ DESCRIPTION="Test.pm wrapper with helpers for testing Apache" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="" +IUSE="test" DEPEND="virtual/perl-ExtUtils-MakeMaker" @@ -39,7 +39,27 @@ src_install() { } # Parallel tests seem to be bad. DIST_TEST="do" + +optdep_notice() { + local i + elog "This package has several modules which may require additional dependencies" + elog "to use. However, it is up to you to install them separately if you need this" + elog "optional functionality:" + elog + i="$(if has_version 'www-apache/mod_perl'; then echo '[I]'; else echo '[ ]'; fi)" + elog " $i www-apache/mod_perl" + elog " - Running Perl code natively in Apache via" + elog " Apache::TestHandler, Apache::TestReportPerl, or Apache::TestSmokePerl" + + if use test; then + elog + elog "This module will perform additional tests if these dependencies are" + elog "pre-installed" + fi +} src_test() { + optdep_notice + echo local MODULES=( "Apache::Test ${DIST_VERSION}" "Apache::Test5005compat 0.01" @@ -53,14 +73,12 @@ src_test() { "Apache::TestConfigParrot" "Apache::TestConfigParse" "Apache::TestConfigPerl" - "Apache::TestHandler" "Apache::TestHarness" "Apache::TestHarnessPHP" "Apache::TestMB" "Apache::TestMM" "Apache::TestPerlDB" "Apache::TestReport" - "Apache::TestReportPerl" "Apache::TestRequest" "Apache::TestRun" "Apache::TestRunPHP 1.00" @@ -69,12 +87,16 @@ src_test() { "Apache::TestSSLCA" "Apache::TestServer" "Apache::TestSmoke" - "Apache::TestSmokePerl" "Apache::TestSort" "Apache::TestTrace 0.01" "Apache::TestUtil 0.02" "Bundle::ApacheTest ${DISTVERSION}" ) + has_version "www-apache/mod_perl" && MODULES+=( + "Apache::TestHandler" + "Apache::TestReportPerl" + "Apache::TestSmokePerl" + ) local failed=() for dep in "${MODULES[@]}"; do ebegin "Compile testing ${dep}" @@ -92,3 +114,6 @@ src_test() { perl_rm_files t/more/02testmore.t t/more/04testmore.t perl-module_src_test } +pkg_postinst() { + use test || optdep_notice +} |