summaryrefslogtreecommitdiff
path: root/www/ap2-python
diff options
context:
space:
mode:
authoradam <adam>2014-02-17 17:20:28 +0000
committeradam <adam>2014-02-17 17:20:28 +0000
commited4d574434a03bfcced4d99b6d891001a8820ef8 (patch)
tree7079d909ee708a6840d7b8a9a7f7bde80bc93585 /www/ap2-python
parent75949c0d3de6719d0484130257a2a62ebf49aeef (diff)
downloadpkgsrc-ed4d574434a03bfcced4d99b6d891001a8820ef8.tar.gz
Changes 3.5.0:
* Support for Python 3.3 * Simpler, faster and up-to-date with latest Python code for creating/maintaining interpreter and thread state. * A much faster WSGI implementation (start_response now implemented in C)
Diffstat (limited to 'www/ap2-python')
-rw-r--r--www/ap2-python/DESCR11
-rw-r--r--www/ap2-python/MESSAGE21
-rw-r--r--www/ap2-python/Makefile27
-rw-r--r--www/ap2-python/PLIST15
-rw-r--r--www/ap2-python/distinfo11
-rw-r--r--www/ap2-python/patches/patch-aa15
-rw-r--r--www/ap2-python/patches/patch-ab13
-rw-r--r--www/ap2-python/patches/patch-dist_version.sh14
8 files changed, 60 insertions, 67 deletions
diff --git a/www/ap2-python/DESCR b/www/ap2-python/DESCR
index 08e8605686d..6634ed946fd 100644
--- a/www/ap2-python/DESCR
+++ b/www/ap2-python/DESCR
@@ -1,6 +1,5 @@
-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.
+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
index 6a2220c1357..6bd90807afd 100644
--- a/www/ap2-python/MESSAGE
+++ b/www/ap2-python/MESSAGE
@@ -1,19 +1,24 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2004/07/17 01:11:36 darcy Exp $
+$NetBSD: MESSAGE,v 1.2 2014/02/17 17:20:28 adam Exp $
+
+In order to use this module in your Apache installation, you need to
+add the following to your httpd.conf file:
+
+ LoadModule python_module lib/httpd/mod_python.so
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
+ 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:
+following lines to ${PREFIX}/sbin/envvars:
-LD_PRELOAD=/usr/lib/libc_r.so # or libpthread.so
-export LD_PRELOAD
+ 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
index 566c143fed8..1f48ef6698b 100644
--- a/www/ap2-python/Makefile
+++ b/www/ap2-python/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2014/01/25 10:30:26 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2014/02/17 17:20:28 adam Exp $
-DISTNAME= mod_python-${VERSION}
-PKGNAME= ${APACHE_PKG_PREFIX}-${PYPKGPREFIX}-python-${VERSION}
+DISTNAME= mod_python-3.5.0
+PKGNAME= ${APACHE_PKG_PREFIX}-${PYPKGPREFIX}-${DISTNAME:S/mod_//}
CATEGORIES= www python
MASTER_SITES= http://archive.apache.org/dist/httpd/modpython/
EXTRACT_SUFX= .tgz
@@ -11,21 +11,18 @@ HOMEPAGE= http://www.modpython.org/
COMMENT= Apache module that embeds the Python interpreter
LICENSE= apache-2.0
-MAKE_JOBS_SAFE= no
+PKG_APACHE_ACCEPTED= apache2 apache22 apache24
-USE_LIBTOOL= YES
-APACHE_MODULE= YES
-VERSION= 3.3.1
+MAKE_JOBS_SAFE= no
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+=--with-apxs=${APXS:Q}
-CONFIGURE_ARGS+=--with-python=${PYTHONBIN:Q}
+APACHE_MODULE= yes
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --with-apxs=${APXS:Q}
+CONFIGURE_ARGS+= --with-python=${PYTHONBIN:Q}
-PY_PATCHPLIST= YES
-
-PKG_APACHE_ACCEPTED= apache2 apache22
-
-PYTHON_VERSIONS_INCOMPATIBLE= 33 # not yet ported as of 3.3.1; 3.5.0 is supposed to work
+INSTALLATION_DIRS+= bin
+PY_PATCHPLIST= yes
.include "../../lang/python/extension.mk"
.include "../../mk/apache.mk"
diff --git a/www/ap2-python/PLIST b/www/ap2-python/PLIST
index ecdeef18b6e..fc602efa2bb 100644
--- a/www/ap2-python/PLIST
+++ b/www/ap2-python/PLIST
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.5 2009/06/14 22:00:17 joerg Exp $
+@comment $NetBSD: PLIST,v 1.6 2014/02/17 17:20:28 adam Exp $
+bin/mod_python
lib/httpd/mod_python.so
${PYSITELIB}/mod_python/Cookie.py
${PYSITELIB}/mod_python/Cookie.pyc
@@ -19,9 +20,9 @@ ${PYSITELIB}/mod_python/cache.pyo
${PYSITELIB}/mod_python/cgihandler.py
${PYSITELIB}/mod_python/cgihandler.pyc
${PYSITELIB}/mod_python/cgihandler.pyo
-${PYSITELIB}/mod_python/importer.py
-${PYSITELIB}/mod_python/importer.pyc
-${PYSITELIB}/mod_python/importer.pyo
+${PYSITELIB}/mod_python/httpdconf.py
+${PYSITELIB}/mod_python/httpdconf.pyc
+${PYSITELIB}/mod_python/httpdconf.pyo
${PYSITELIB}/mod_python/psp.py
${PYSITELIB}/mod_python/psp.pyc
${PYSITELIB}/mod_python/psp.pyo
@@ -37,3 +38,9 @@ ${PYSITELIB}/mod_python/testhandler.pyo
${PYSITELIB}/mod_python/util.py
${PYSITELIB}/mod_python/util.pyc
${PYSITELIB}/mod_python/util.pyo
+${PYSITELIB}/mod_python/version.py
+${PYSITELIB}/mod_python/version.pyc
+${PYSITELIB}/mod_python/version.pyo
+${PYSITELIB}/mod_python/wsgi.py
+${PYSITELIB}/mod_python/wsgi.pyc
+${PYSITELIB}/mod_python/wsgi.pyo
diff --git a/www/ap2-python/distinfo b/www/ap2-python/distinfo
index 8f1af951f42..382561eea8d 100644
--- a/www/ap2-python/distinfo
+++ b/www/ap2-python/distinfo
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.5 2008/09/15 21:20:23 abs Exp $
+$NetBSD: distinfo,v 1.6 2014/02/17 17:20:28 adam Exp $
-SHA1 (mod_python-3.3.1.tgz) = e538170fd78e09408b6d8593da980b126a0fef93
-RMD160 (mod_python-3.3.1.tgz) = f78f93172963317f4318f8f2455419743c8fb4f5
-Size (mod_python-3.3.1.tgz) = 447954 bytes
-SHA1 (patch-aa) = a7aa4b50f4fb3a6d36e2e2ab86ab6fb19c85cc3d
-SHA1 (patch-ab) = dd6908cb05ddea36cf6d88ec246bd045411979d5
+SHA1 (mod_python-3.5.0.tgz) = 9208bb813172ab51d601d78e439ea552f676d2d1
+RMD160 (mod_python-3.5.0.tgz) = 03315af0843892059a11758209f350c82164acc3
+Size (mod_python-3.5.0.tgz) = 571403 bytes
+SHA1 (patch-dist_version.sh) = 9f3dbf596238aa106e06ec1c8b27a90619ef4978
diff --git a/www/ap2-python/patches/patch-aa b/www/ap2-python/patches/patch-aa
deleted file mode 100644
index 4f0ca53ad99..00000000000
--- a/www/ap2-python/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$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 {
diff --git a/www/ap2-python/patches/patch-ab b/www/ap2-python/patches/patch-ab
deleted file mode 100644
index 74e0ad7fb19..00000000000
--- a/www/ap2-python/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2008/09/15 21:20:24 abs Exp $
-
---- src/connobject.c.orig 2006-12-03 04:36:37.000000000 +0000
-+++ src/connobject.c
-@@ -139,7 +139,7 @@ static PyObject * _conn_read(conn_rec *c
- bytes_read = 0;
-
- while ((bytes_read < len || len == 0) &&
-- !(b == APR_BRIGADE_SENTINEL(b) ||
-+ !(b == APR_BRIGADE_SENTINEL(bb) ||
- APR_BUCKET_IS_EOS(b) || APR_BUCKET_IS_FLUSH(b))) {
-
- const char *data;
diff --git a/www/ap2-python/patches/patch-dist_version.sh b/www/ap2-python/patches/patch-dist_version.sh
new file mode 100644
index 00000000000..22e9d9b0853
--- /dev/null
+++ b/www/ap2-python/patches/patch-dist_version.sh
@@ -0,0 +1,14 @@
+$NetBSD: patch-dist_version.sh,v 1.1 2014/02/17 17:20:28 adam Exp $
+
+Don't depend on 'git'.
+
+--- dist/version.sh.orig 2014-02-17 13:35:44.000000000 +0000
++++ dist/version.sh
+@@ -5,6 +5,5 @@ MPV_PATH="`dirname $0`/../src/include/mp
+ MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
+ MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
+ PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
+-GIT=`git describe --always`
+
+-echo $MAJ.$MIN.$PCH-$GIT
++echo $MAJ.$MIN.$PCH