summaryrefslogtreecommitdiff
blob: 59702d734d210f58331251d47e2d78660b4f9fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2008 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.3 2008/02/06 21:49:27 hollow Exp $

inherit apache-module depend.php eutils

DESCRIPTION="Mass Virtual Hosting System for Apache 2"
HOMEPAGE="http://www.oav.net/projects/mod_vhs/"
SRC_URI="http://www.oav.net/projects/mod_vhs/${P}.tar.gz"

KEYWORDS="~amd64 ~x86"
LICENSE="Apache-1.1"
SLOT="0"
IUSE="debug php suphp"

DEPEND="dev-libs/libhome
	php? ( dev-lang/php )
	suphp? ( www-apache/mod_suphp )"

APACHE2_MOD_CONF="99_${PN}"
APACHE2_MOD_DEFINE="VHS"

S="${WORKDIR}/${PN}"

need_apache2

src_compile() {
	local 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_src_compile
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i -e 's:chari:char:g' ${PN}.c
}