summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apache/mod_vhs/mod_vhs-1.0.32.ebuild')
-rw-r--r--www-apache/mod_vhs/mod_vhs-1.0.32.ebuild26
1 files changed, 18 insertions, 8 deletions
diff --git a/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild b/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild
index 59d1b0a7f728..a1d8d911839f 100644
--- a/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild
+++ b/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild,v 1.1 2007/09/09 09:46:49 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhs/mod_vhs-1.0.32.ebuild,v 1.2 2007/09/11 12:13:10 hollow Exp $
-inherit eutils apache-module
+inherit apache-module depend.php eutils
DESCRIPTION="Mass Virtual Hosting System for Apache 2"
HOMEPAGE="http://www.oav.net/projects/mod_vhs/"
@@ -17,12 +17,6 @@ DEPEND="dev-libs/libhome
php? ( dev-lang/php )
suphp? ( www-apache/mod_suphp )"
-myconf="-I/usr/include/home -lhome"
-use php && myconf="${myconf} $(/usr/bin/php-config --includes) -DHAVE_MOD_PHP_SUPPORT"
-use suphp && myconf="${myconf} -DHAVE_MOD_SUPHP_SUPPORT"
-use debug myconf="${myconf} -DVH_DEBUG"
-
-APXS2_ARGS="-a -c ${myconf} ${PN}.c"
APACHE2_MOD_CONF="99_${PN}"
APACHE2_MOD_DEFINE="VHS"
@@ -30,6 +24,22 @@ S="${WORKDIR}/${PN}"
need_apache2
+pkg_setup() {
+ myconf="-I/usr/include/home -lhome"
+
+ if use php; then
+ has_php
+ require_php_sapi_from apache2
+ myconf="${myconf} $(${PHPCONFIG} --includes) -DHAVE_MOD_PHP_SUPPORT"
+ fi
+
+ use suphp && myconf="${myconf} -DHAVE_MOD_SUPHP_SUPPORT"
+ use debug myconf="${myconf} -DVH_DEBUG"
+
+ APXS2_ARGS="-c ${myconf} ${PN}.c"
+ apache-module_pkg_setup
+}
+
src_unpack() {
unpack ${A}
cd "${S}"