# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI=5
inherit depend.apache apache-module perl-module eutils
# We need both, apache and perl but either apache without threads or perl with
# ithreads, bug 373943
DEPEND="
- >=dev-perl/Apache-Test-1.360
>=dev-perl/CGI-3.08
dev-lang/perl[ithreads]
www-servers/apache
APACHE2_MOD_CONF="2.0.3/75_${PN}"
APACHE2_MOD_DEFINE="PERL"
-SRC_TEST="do"
+RESTRICT=test
DOCFILES="Changes INSTALL README STATUS"
epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244
# bug 352724
- epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
- rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
+ rm -rf Apache-{Reload,SizeLimit}/ lib/Bundle/ || die
sed -i \
-e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \
-e 's:^lib/Bundle/Apache2.pm::' \
|| die
}
-src_test() {
- # make test notes whether it is running as root, and drops
- # privileges all the way to "nobody" if so, so we must adjust
- # write permissions accordingly in this case.
-
- # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
- if [[ "$(id -u)" == "0" ]]; then
- chown nobody:nobody "${WORKDIR}" "${T}"
- fi
-
- # this does not || die because of bug 21325. kudos to smark for
- # the idea of setting HOME.
- TMPDIR="${T}" HOME="${T}/" perl-module_src_test
-}
-
src_install() {
apache-module_src_install
"${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
for fname in $(find "${D}" -type f -not -name '*.so'); do
- grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
- sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} || die
done
# All the rest
perl_remove_temppath