blob: 75b628d192121eec5c0aafb463deae3797de90dc (
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
54
55
56
57
58
59
60
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-2.7.11.ebuild,v 1.2 2005/02/27 02:33:22 kloeri Exp $
inherit python apache-module
DESCRIPTION="Python module for Apache 1.x, not for Apache 2.x"
SRC_URI="mirror://apache/httpd/modpython/${P}.tgz"
HOMEPAGE="http://www.modpython.org/"
LICENSE="as-is"
KEYWORDS="~x86"
SLOT="0"
IUSE=""
#APACHE1_MOD_CONF="16_${PN}-r1"
APACHE1_MOD_DEFINE="PYTHON"
DOCFILES="COPYRIGHT CREDITS NEWS README"
need_apache1
src_compile() {
# If we dont add that, ./configure breaks this ebuild
# because the last task (make depend) is somehow borked
echo 'echo "configure done"' >> configure
sed -ie 's:OPT=:OPT=$(OPTFLAGS):' ${S}/src/Makefile.in
sed -ie 's/\(\\"thread\\" in sys.builtin_module_names\)/int(\1)/' ${S}/configure
export OPTFLAGS="`/usr/sbin/apxs -q CFLAGS`"
econf --with-apxs=${APXS1}
sed -ie 's:LIBEXECDIR=:LIBEXECDIR=${D}:' Makefile
sed -ie 's:PY_STD_LIB=:PY_STD_LIB=${D}:' Makefile
sed -ie 's:CFLAGS=$(OPT) $(INCLUDES):CFLAGS=$(OPT) $(INCLUDES) -DEAPI -O0:' ${S}/src/Makefile
emake || die "emake failed"
}
src_install() {
python_version
PY_LIBPATH="/usr/lib/python${PYVER}"
dodir ${APACHE1_MODULESDIR}
dodir ${PY_LIBPATH}
# compileall.py is needed or make install will fail
cp ${PY_LIBPATH}/compileall.py ${D}${PY_LIBPATH}
emake install || die
rm ${D}${PY_LIBPATH}/compileall.py
insinto /usr/share/doc/${PF}/html
doins doc-html/*
insinto /usr/share/doc/${PF}/html/icons
doins doc-html/icons/*
apache-module_src_install
insinto ${APACHE1_MODULES_CONFDIR}
newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf
}
|