summaryrefslogtreecommitdiff
blob: aa2f943a408d34f2dfc893bb2273acdaab8f954a (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
51
52
53
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_python/mod_python-3.5.0.ebuild,v 1.4 2015/04/13 09:40:08 ago Exp $

EAPI=5

PYTHON_COMPAT=( python2_7 python3_3 python3_4 )

inherit apache-module eutils python-single-r1

DESCRIPTION="An Apache2 module providing an embedded Python interpreter"
HOMEPAGE="http://modpython.org/"
SRC_URI="http://dist.modpython.org/dist/${P}.tgz"

LICENSE="Apache-2.0"
KEYWORDS="alpha amd64 ~ia64 ~mips ppc ~sparc ~x86"
IUSE="doc test"
SLOT="0"

APACHE2_MOD_CONF="16_${PN}"
APACHE2_MOD_DEFINE="PYTHON"
need_apache2_2

RDEPEND="${RDEPEND}"
DEPEND="${DEPEND}
	test? (
		app-admin/apache-tools
		net-misc/curl
	)"

src_prepare() {
	epatch "${FILESDIR}"/${P}-buildsystem.patch

	export CFLAGS="$(apxs2 -q CFLAGS)"
	export LDFLAGS="$(apxs2 -q LDFLAGS)"
}

src_compile() {
	default
}

src_test() {
	cd test || die
	PYTHONPATH="$(ls -d ${S}/dist/build/lib.*)" ${PYTHON} test.py || die
}

src_install() {
	default

	use doc && dohtml -r doc-html/*

	apache-module_src_install
}