summaryrefslogtreecommitdiff
path: root/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild')
-rw-r--r--dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild119
1 files changed, 119 insertions, 0 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
new file mode 100644
index 000000000000..85b4e4bf2b15
--- /dev/null
+++ b/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=SHAY
+DIST_VERSION=1.40
+inherit depend.apache perl-module
+
+DESCRIPTION="Test.pm wrapper with helpers for testing Apache"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ~mips ppc ppc64 sparc x86"
+IUSE="test"
+
+DEPEND="virtual/perl-ExtUtils-MakeMaker"
+
+need_apache
+
+PATCHES=(
+ "${FILESDIR}/${P}-catfile-import.patch"
+ "${FILESDIR}/${P}-fix-missing-semicolon.patch"
+ "${FILESDIR}/${P}-phpclient.patch"
+)
+
+pkg_setup() {
+ perl_set_version
+}
+
+src_install() {
+ # This is to avoid conflicts with a deprecated Apache::Test stepping
+ # in and causing problems/install errors
+ if [ -f "${S}"/.mypacklist ];
+ then
+ rm -f "${S}"/.mypacklist
+ fi
+ perl-module_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"
+ "Apache::TestBuild"
+ "Apache::TestClient"
+ "Apache::TestCommon"
+ "Apache::TestCommonPost"
+ "Apache::TestConfig"
+ "Apache::TestConfigC"
+ "Apache::TestConfigPHP"
+ "Apache::TestConfigParrot"
+ "Apache::TestConfigParse"
+ "Apache::TestConfigPerl"
+ "Apache::TestHarness"
+ "Apache::TestHarnessPHP"
+ "Apache::TestMB"
+ "Apache::TestMM"
+ "Apache::TestPerlDB"
+ "Apache::TestReport"
+ "Apache::TestRequest"
+ "Apache::TestRun"
+ "Apache::TestRunPHP 1.00"
+ "Apache::TestRunParrot 1.00"
+ "Apache::TestRunPerl 1.00"
+ "Apache::TestSSLCA"
+ "Apache::TestServer"
+ "Apache::TestSmoke"
+ "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}"
+ perl -Mblib="${S}" -M"${dep} ()" -e1
+ eend $? || failed+=( "$dep" )
+ done
+ if [[ ${failed[@]} ]]; then
+ echo
+ eerror "One or more modules failed compile:";
+ for dep in "${failed[@]}"; do
+ eerror " ${dep}"
+ done
+ die "Failing due to module compilation errors";
+ fi
+ perl_rm_files t/more/02testmore.t t/more/04testmore.t
+ perl-module_src_test
+}
+pkg_postinst() {
+ use test || optdep_notice
+}