summaryrefslogtreecommitdiff
path: root/www/ap2-python
diff options
context:
space:
mode:
authordarcy <darcy@pkgsrc.org>2004-07-17 01:11:36 +0000
committerdarcy <darcy@pkgsrc.org>2004-07-17 01:11:36 +0000
commit405f23f2d93b263d00df7ad12b42718d84af36d6 (patch)
treefd068e80ae017b73ab08e9475d0da7b07a86feb2 /www/ap2-python
parentdf1425f0f078aa79270618a0ba804ed7eee49dfa (diff)
downloadpkgsrc-405f23f2d93b263d00df7ad12b42718d84af36d6.tar.gz
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.
Diffstat (limited to 'www/ap2-python')
-rw-r--r--www/ap2-python/DESCR6
-rw-r--r--www/ap2-python/MESSAGE19
-rw-r--r--www/ap2-python/Makefile29
-rw-r--r--www/ap2-python/PLIST30
-rw-r--r--www/ap2-python/distinfo5
-rw-r--r--www/ap2-python/patches/patch-aa15
6 files changed, 104 insertions, 0 deletions
diff --git a/www/ap2-python/DESCR b/www/ap2-python/DESCR
new file mode 100644
index 00000000000..08e8605686d
--- /dev/null
+++ b/www/ap2-python/DESCR
@@ -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.
diff --git a/www/ap2-python/MESSAGE b/www/ap2-python/MESSAGE
new file mode 100644
index 00000000000..6a2220c1357
--- /dev/null
+++ b/www/ap2-python/MESSAGE
@@ -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
+
+===========================================================================
diff --git a/www/ap2-python/Makefile b/www/ap2-python/Makefile
new file mode 100644
index 00000000000..fe5f992c34f
--- /dev/null
+++ b/www/ap2-python/Makefile
@@ -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"
+
diff --git a/www/ap2-python/PLIST b/www/ap2-python/PLIST
new file mode 100644
index 00000000000..c1d854389d4
--- /dev/null
+++ b/www/ap2-python/PLIST
@@ -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
diff --git a/www/ap2-python/distinfo b/www/ap2-python/distinfo
new file mode 100644
index 00000000000..71966cc1578
--- /dev/null
+++ b/www/ap2-python/distinfo
@@ -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
diff --git a/www/ap2-python/patches/patch-aa b/www/ap2-python/patches/patch-aa
new file mode 100644
index 00000000000..4f0ca53ad99
--- /dev/null
+++ b/www/ap2-python/patches/patch-aa
@@ -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 {