Initial import of ap2-python

Version 3.1.3
Apache module that embeds the Python interpreter

As discussed on the mailing list, this package builds and runs for the
most part but fails if the web server has too many backends.  Adding it
breaks nothing and does add functionality.  I will file a PR to keep
track of the remaining issue.
This commit is contained in:
darcy 2004-07-17 01:11:36 +00:00
parent df1425f0f0
commit 405f23f2d9
6 changed files with 104 additions and 0 deletions

6
www/ap2-python/DESCR Normal file
View file

@ -0,0 +1,6 @@
mod_python is an Apache module that embeds the Python interpreter
within the server. With mod_python you can write web-based applications
in Python that will run many times faster than traditional CGI and
will have access to advanced features such as ability to retain
database connections and other data between hits and access to
Apache internals.

19
www/ap2-python/MESSAGE Normal file
View file

@ -0,0 +1,19 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
Also remember to add to your Apache configuration in the appropriate context:
PythonPath "['/path/to/foo', '/path/to/bar']"
AddHandler python-program .py
PythonHandler foobar
PythonDebug On
For more information, see http://www.modpython.org/.
And, if you built apache without thread support, you may need to add the
following lines to $PREFIX/sbin/envvars:
LD_PRELOAD=/usr/lib/libc_r.so # or libpthread.so
export LD_PRELOAD
===========================================================================

29
www/ap2-python/Makefile Normal file
View file

@ -0,0 +1,29 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
# FreeBSD Id: ports/www/mod_python3/Makefile,v 1.28 2004/03/11 14:36:30 perky Exp
DISTNAME= mod_python-${VERSION}
PKGNAME= ap2-${PYPKGPREFIX}-python-${VERSION}
CATEGORIES= www python
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD:=modpython/}
EXTRACT_SUFX= .tgz
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.modpython.org/
COMMENT= Apache module that embeds the Python interpreter
USE_BUILDLINK3= YES
USE_PKGINSTALL= YES
APACHE_MODULE= YES
VERSION=3.1.3
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--with-apxs="${APXS}"
ONFIGURE_ARGS+=-
PYTHON_VERSIONS_ACCEPTED= 23 23pth
PY_PATCHPLIST= YES
.include "../../lang/python/extension.mk"
.include "../../www/apache2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

30
www/ap2-python/PLIST Normal file
View file

@ -0,0 +1,30 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
lib/httpd/mod_python.so
@exec %D/sbin/apxs -e -a -n python %f
@unexec %D/sbin/apxs -e -A -n python %f
${PYSITELIB}/mod_python/Cookie.py
${PYSITELIB}/mod_python/Cookie.pyc
${PYSITELIB}/mod_python/Cookie.pyo
${PYSITELIB}/mod_python/Session.py
${PYSITELIB}/mod_python/Session.pyc
${PYSITELIB}/mod_python/Session.pyo
${PYSITELIB}/mod_python/__init__.py
${PYSITELIB}/mod_python/__init__.pyc
${PYSITELIB}/mod_python/__init__.pyo
${PYSITELIB}/mod_python/_psp.so
${PYSITELIB}/mod_python/apache.py
${PYSITELIB}/mod_python/apache.pyc
${PYSITELIB}/mod_python/apache.pyo
${PYSITELIB}/mod_python/cgihandler.py
${PYSITELIB}/mod_python/cgihandler.pyc
${PYSITELIB}/mod_python/cgihandler.pyo
${PYSITELIB}/mod_python/psp.py
${PYSITELIB}/mod_python/psp.pyc
${PYSITELIB}/mod_python/psp.pyo
${PYSITELIB}/mod_python/publisher.py
${PYSITELIB}/mod_python/publisher.pyc
${PYSITELIB}/mod_python/publisher.pyo
${PYSITELIB}/mod_python/util.py
${PYSITELIB}/mod_python/util.pyc
${PYSITELIB}/mod_python/util.pyo
@dirrm ${PYSITELIB}/mod_python

5
www/ap2-python/distinfo Normal file
View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
SHA1 (mod_python-3.1.3.tgz) = c8d0df6b2a779005b6d32a775294cd742326ddfa
Size (mod_python-3.1.3.tgz) = 293548 bytes
SHA1 (patch-aa) = a7aa4b50f4fb3a6d36e2e2ab86ab6fb19c85cc3d

View file

@ -0,0 +1,15 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
--- src/requestobject.c.orig 2004-06-10 17:55:28.000000000 -0400
+++ src/requestobject.c
@@ -1118,8 +1118,8 @@ static PyObject *getreq_recmbr_off(reque
{
PyMemberDef *md = find_memberdef(request_rec_mbrs, name);
char *addr = (char *)self->request_rec + md->offset;
- if (sizeof(apr_off_t) == sizeof(LONG_LONG)) {
- LONG_LONG l = *(LONG_LONG*)addr;
+ if (sizeof(apr_off_t) == sizeof(long long)) {
+ long long l = *(long long*)addr;
return PyLong_FromLongLong(l);
}
else {