summaryrefslogtreecommitdiff
blob: 8ae24a0aff4c1bb47ae5fccd76d6dfac069e2685 (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
48
49
50
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-php/roadsend-php/roadsend-php-2.9.5.ebuild,v 1.1 2008/02/15 18:04:24 hkbst Exp $

MY_PVL=${PV/_p/-r}
MY_PV=${PV%%_p[0-9]}
MY_PL=${PN}-${MY_PVL}
MY_P=${PN}-${MY_PV}

DESCRIPTION="Roadsend PHP compiler"
HOMEPAGE="http://code.roadsend.com/pcc"
SRC_URI="http://code.roadsend.com/snaps/${MY_PL}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"

KEYWORDS="~amd64 ~x86"

DEPEND=">=dev-scheme/bigloo-3.0c
		>=net-misc/curl-7.15.1-r1
		mysql? ( dev-db/mysql )
		sqlite3? ( >=dev-db/sqlite-3.3.12 )
		pcre? ( >=dev-libs/libpcre-6.6 )
		xml? ( dev-libs/libxml2 )
		odbc? ( dev-db/unixODBC )
		fastcgi? ( dev-libs/fcgi )"

RDEPEND="${DEPEND}"
SLOT="0"

IUSE="debug fastcgi mysql odbc pcre sqlite3 xml"
#IUSE="fastcgi mysql odbc pcre sqlite3 xml"

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

src_compile() {
	econf $(use_with pcre) $(use_with fastcgi fcgi) $(use_with xml) $(use_with mysql) $(use_with sqlite3) $(use_with odbc)

	if use debug; then
		emake -j1 debug || die "make debug failed"
	else
		emake -j1 || die "make failed"
	fi
}

src_test() {
	LD_LIBRARY_PATH="${S}/libs/" emake -j1 test || die "standalone tests failed"
}

src_install() {
	emake -j1 DESTDIR="${D}" install || die "make install failed"
}