Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

6
www/ap-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.

31
www/ap-python/Makefile Normal file
View File

@@ -0,0 +1,31 @@
# $NetBSD: Makefile,v 1.25 2012/10/28 06:30:05 asau Exp $
#
DISTNAME= mod_python-2.7.11
PKGNAME= ap13-${PYPKGPREFIX}-python-2.7.11
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/modpython/}
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.modpython.org/
COMMENT= Python interpreter embedded into Apache
USE_TOOLS+= pax
CONFLICTS= ap-python-[0-9]* ap13-python-[0-9]* ap13-py[0-9]*-python-[0-9]*
SUPERSEDES= ap13-python-[0-9]*
GNU_CONFIGURE= yes
CONFIGURE_ENV+= PYTHON_BIN=${PYTHONBIN:Q} ac_cv_path_MKDEP=
INSTALLATION_DIRS= lib/httpd share/doc/ap-mod_python
PY_PATCHPLIST= yes
post-install:
cd ${WRKSRC}/doc-html && pax -rwpe . ${DESTDIR}${PREFIX}/share/doc/ap-mod_python
.include "../../lang/python/extension.mk"
.include "../../www/apache/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

123
www/ap-python/PLIST Normal file
View File

@@ -0,0 +1,123 @@
@comment $NetBSD: PLIST,v 1.1 2009/08/30 03:08:40 obache Exp $
lib/httpd/mod_python.so
${PYSITELIB}/mod_python/__init__.py
${PYSITELIB}/mod_python/__init__.pyc
${PYSITELIB}/mod_python/__init__.pyo
${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/httpdapi.py
${PYSITELIB}/mod_python/httpdapi.pyc
${PYSITELIB}/mod_python/httpdapi.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
${PYSITELIB}/mod_python/zhandler.py
${PYSITELIB}/mod_python/zhandler.pyc
${PYSITELIB}/mod_python/zhandler.pyo
share/doc/ap-mod_python/about.html
share/doc/ap-mod_python/app-vnsinst.html
share/doc/ap-mod_python/app-wininst.html
share/doc/ap-mod_python/contents.html
share/doc/ap-mod_python/dir-handlers-ach.html
share/doc/ap-mod_python/dir-handlers-auh.html
share/doc/ap-mod_python/dir-handlers-fuh.html
share/doc/ap-mod_python/dir-handlers-hph.html
share/doc/ap-mod_python/dir-handlers-pch.html
share/doc/ap-mod_python/dir-handlers-ph.html
share/doc/ap-mod_python/dir-handlers-pih.html
share/doc/ap-mod_python/dir-handlers-plh.html
share/doc/ap-mod_python/dir-handlers-prrh.html
share/doc/ap-mod_python/dir-handlers-syn.html
share/doc/ap-mod_python/dir-handlers-th.html
share/doc/ap-mod_python/dir-handlers-tph.html
share/doc/ap-mod_python/dir-handlers.html
share/doc/ap-mod_python/dir-other-epd.html
share/doc/ap-mod_python/dir-other-ipd.html
share/doc/ap-mod_python/dir-other-ipdv.html
share/doc/ap-mod_python/dir-other-par.html
share/doc/ap-mod_python/dir-other-pd.html
share/doc/ap-mod_python/dir-other-phm.html
share/doc/ap-mod_python/dir-other-pi.html
share/doc/ap-mod_python/dir-other-po.html
share/doc/ap-mod_python/dir-other-pomz.html
share/doc/ap-mod_python/dir-other-pp.html
share/doc/ap-mod_python/dir-other.html
share/doc/ap-mod_python/directives.html
share/doc/ap-mod_python/front.html
share/doc/ap-mod_python/genindex.html
share/doc/ap-mod_python/hand-cgi.html
share/doc/ap-mod_python/hand-httpdapy.html
share/doc/ap-mod_python/hand-pub-alg-args.html
share/doc/ap-mod_python/hand-pub-alg-auth.html
share/doc/ap-mod_python/hand-pub-alg-trav.html
share/doc/ap-mod_python/hand-pub-alg.html
share/doc/ap-mod_python/hand-pub-intro.html
share/doc/ap-mod_python/hand-pub.html
share/doc/ap-mod_python/hand-z.html
share/doc/ap-mod_python/handlers.html
share/doc/ap-mod_python/icons/blank.gif
share/doc/ap-mod_python/icons/blank.png
share/doc/ap-mod_python/icons/contents.gif
share/doc/ap-mod_python/icons/contents.png
share/doc/ap-mod_python/icons/icons2
share/doc/ap-mod_python/icons/index.gif
share/doc/ap-mod_python/icons/index.png
share/doc/ap-mod_python/icons/modules.gif
share/doc/ap-mod_python/icons/modules.png
share/doc/ap-mod_python/icons/next.gif
share/doc/ap-mod_python/icons/next.png
share/doc/ap-mod_python/icons/previous.gif
share/doc/ap-mod_python/icons/previous.png
share/doc/ap-mod_python/icons/up.gif
share/doc/ap-mod_python/icons/up.png
share/doc/ap-mod_python/index.html
share/doc/ap-mod_python/inst-apacheconfig.html
share/doc/ap-mod_python/inst-compiling.html
share/doc/ap-mod_python/inst-configure.html
share/doc/ap-mod_python/inst-installing.html
share/doc/ap-mod_python/inst-make.html
share/doc/ap-mod_python/inst-makeinstall.html
share/doc/ap-mod_python/inst-prerequisites.html
share/doc/ap-mod_python/inst-testing.html
share/doc/ap-mod_python/inst-trouble.html
share/doc/ap-mod_python/installation.html
share/doc/ap-mod_python/intr-flexibility.html
share/doc/ap-mod_python/intr-history.html
share/doc/ap-mod_python/intr-performance.html
share/doc/ap-mod_python/introduction.html
share/doc/ap-mod_python/modpython.css
share/doc/ap-mod_python/modpython.html
share/doc/ap-mod_python/modpython2
share/doc/ap-mod_python/module-apache.html
share/doc/ap-mod_python/node58.html
share/doc/ap-mod_python/node74.html
share/doc/ap-mod_python/pyapi-callback.html
share/doc/ap-mod_python/pyapi-debug.html
share/doc/ap-mod_python/pyapi-handler.html
share/doc/ap-mod_python/pyapi-interps.html
share/doc/ap-mod_python/pyapi-mpconn-mem.html
share/doc/ap-mod_python/pyapi-mpconn.html
share/doc/ap-mod_python/pyapi-mprequest-mem.html
share/doc/ap-mod_python/pyapi-mprequest-meth.html
share/doc/ap-mod_python/pyapi-mprequest.html
share/doc/ap-mod_python/pyapi-mpserver.html
share/doc/ap-mod_python/pyapi-mpsrv-mem.html
share/doc/ap-mod_python/pyapi-mpsrv-meth.html
share/doc/ap-mod_python/pyapi-mptable.html
share/doc/ap-mod_python/pyapi-util-fstor-fld.html
share/doc/ap-mod_python/pyapi-util-fstor.html
share/doc/ap-mod_python/pyapi-util-funcs.html
share/doc/ap-mod_python/pyapi-util.html
share/doc/ap-mod_python/pythonapi.html
share/doc/ap-mod_python/tut-more-complicated.html
share/doc/ap-mod_python/tut-overview.html
share/doc/ap-mod_python/tut-pub.html
share/doc/ap-mod_python/tut-what-it-do.html
share/doc/ap-mod_python/tutorial.html

12
www/ap-python/distinfo Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: distinfo,v 1.6 2009/08/30 03:08:40 obache Exp $
SHA1 (mod_python-2.7.11.tgz) = 8c123359f98a7acf077e078226fccdb0ff51c4ce
RMD160 (mod_python-2.7.11.tgz) = 1b34de01b3fa4bb27bb5a39396a2497db66fabd5
Size (mod_python-2.7.11.tgz) = 175763 bytes
SHA1 (patch-aa) = 43c2f7df1e2ad58cf8d334dde631990bc56ff3e9
SHA1 (patch-ab) = b79f50bed5ad6bda8f5e6aef111fbc9b9aedf943
SHA1 (patch-ac) = 1c2a5c1d961e9710561c406b60518fbfef4cb2cb
SHA1 (patch-ad) = a59ed67d803dfa93bd9db58b796b4821fc3b072e
SHA1 (patch-ae) = 2010c3b1522d61332bee60d052770e5addb115d1
SHA1 (patch-af) = cd658639b5443ae63185611768b91f167bb06c7d
SHA1 (patch-ag) = 0377336cdb8f40429d36277c23070a174a924c5b

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.3 2008/07/10 14:59:57 joerg Exp $
--- src/Makefile.in.orig 2001-04-07 07:43:21.000000000 +0200
+++ src/Makefile.in 2004-07-20 23:12:57.000000000 +0200
@@ -52,7 +52,7 @@
INCLUDES=@INCLUDES@
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@
-OPT=
+OPT=-DEAPI -fPIC
CFLAGS=$(OPT) $(INCLUDES)
srcdir=.

View File

@@ -0,0 +1,124 @@
$NetBSD: patch-ab,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $
--- src/tableobject.c.orig Mon May 28 23:00:41 2001
+++ src/tableobject.c Sun Nov 4 18:28:55 2001
@@ -185,6 +185,105 @@
};
/**
+ ** table_get
+ **
+ *
+ * Implements dictionary like get(k,[x]) method.
+ */
+
+static PyObject * table_get(tableobject *self, PyObject *args)
+{
+
+ PyObject *key,*v;
+ PyObject *failob = Py_None;
+ array_header *ah;
+ table_entry *elts;
+ int i, j;
+
+ if(!PyArg_ParseTuple(args, "O|O:get", &key, &failob))
+ return NULL;
+ v=tablegetitem(self,key);
+ if(v = NULL) {
+ v=failob;
+ Py_INCREF(failob);
+ }
+ return v;
+}
+
+/**
+ ** table_keys
+ **
+ *
+ * Implements dictionary like items() method.
+ */
+
+static PyObject * table_items(tableobject *self)
+{
+
+ PyObject *v;
+ array_header *ah;
+ table_entry *elts;
+ int i, j;
+
+ ah = ap_table_elts(self->table);
+ elts = (table_entry *) ah->elts;
+
+ v = PyList_New(ah->nelts);
+
+ for (i = 0, j = 0; i < ah->nelts; i++)
+ {
+ if (elts[i].key)
+ {
+ PyObject *vp = PyTuple_New(2);
+ if(vp == NULL) {
+ Py_DECREF(v);
+ return NULL;
+ }
+ PyTuple_SET_ITEM(vp,0,PyString_FromString(elts[i].key));
+ PyTuple_SET_ITEM(vp,1,PyString_FromString(ap_table_get(self->table,
+ elts[i].key)));
+ PyList_SetItem(v, j, vp);
+ j++;
+ }
+ }
+ return v;
+}
+/**
+ ** table_keys
+ **
+ *
+ * Implements dictionary like values() method.
+ * This mostly for completeness sake, I can't see use for it
+ */
+
+static PyObject * table_values(tableobject *self)
+{
+
+ PyObject *v;
+ array_header *ah;
+ table_entry *elts;
+ int i, j;
+
+ ah = ap_table_elts(self->table);
+ elts = (table_entry *) ah->elts;
+
+ v = PyList_New(ah->nelts);
+
+ for (i = 0, j = 0; i < ah->nelts; i++)
+ {
+ if (elts[i].key)
+ {
+ PyObject *val = PyString_FromString(ap_table_get(self->table,
+ elts[i].key));
+ PyList_SetItem(v, j, val);
+ j++;
+ }
+ }
+ return v;
+}
+
+
+/**
** table_keys
**
*
@@ -261,9 +360,13 @@
/* table method definitions */
static PyMethodDef tablemethods[] = {
- {"keys", (PyCFunction)table_keys, METH_VARARGS},
{"has_key", (PyCFunction)table_has_key, METH_VARARGS},
{"add", (PyCFunction)mp_table_add, METH_VARARGS},
+ {"items", (PyCFunction)table_items, METH_VARARGS},
+ {"keys", (PyCFunction)table_keys, METH_VARARGS},
+ {"get", (PyCFunction)table_get, METH_VARARGS},
+ {"values", (PyCFunction)table_values, METH_VARARGS},
+ /* Still needs: copy, update, clear, setdefault, popitem */
{NULL, NULL} /* sentinel */
};

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-ac,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $
--- src/mod_python.c.orig Sat Nov 10 13:06:57 2001
+++ src/mod_python.c Sat Nov 10 13:07:53 2001
@@ -474,11 +474,13 @@
if (! ((m = PyImport_ImportModule(MODULENAME)))) {
fprintf(stderr, "make_obcallback(): could not import %s.\n", MODULENAME);
+ PyErr_Print();
}
- if (! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) {
+ if (m && ! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) {
fprintf(stderr, "make_obcallback(): could not call %s.\n",
INITFUNC);
+ PyErr_Print();
}
return obCallBack;

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-ad,v 1.2 2009/08/30 03:08:40 obache Exp $
--- Makefile.in.orig 2000-12-06 03:05:37.000000000 +0000
+++ Makefile.in
@@ -82,7 +82,7 @@ install_dso: dso
@echo
@echo "Performing DSO installation."
@echo
- $(INSTALL) src/mod_python.so $(LIBEXECDIR)
+ $(INSTALL) src/mod_python.so $(DESTDIR)$(LIBEXECDIR)
@$(MAKE) install_py_lib
@echo
@echo "Now don't forget to edit your main config and add"
@@ -114,12 +114,13 @@ install_static: static
@echo
install_py_lib:
- $(INSTALL) -d $(PY_STD_LIB)/site-packages/mod_python
+ $(INSTALL) -d $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python
@for f in `ls lib/python/mod_python/*.py`; \
do \
- $(INSTALL) $$f $(PY_STD_LIB)/site-packages/mod_python; \
+ $(BSD_INSTALL_DATA) $$f $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python; \
done
- python $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python
+ @PYTHON_BIN@ $(PY_STD_LIB)/compileall.py $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python
+ @PYTHON_BIN@ -O $(PY_STD_LIB)/compileall.py $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python
clean:
cd src && $(MAKE) clean

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ae,v 1.1 2003/12/03 09:44:10 darcy Exp $
--- lib/python/mod_python/apache.py.orig 2002-04-19 14:20:40.000000000 -0400
+++ lib/python/mod_python/apache.py
@@ -552,6 +552,9 @@
elif string.lower(h) == "content-type":
self.req.content_type = v
self.req.headers_out[h] = v
+ elif h.lower() == "location":
+ self.req.status = HTTP_MOVED_TEMPORARILY
+ self.req.headers_out["location"] = v
else:
self.req.headers_out.add(h, v)
self.req.send_http_header()

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-af,v 1.1 2003/12/03 09:44:10 darcy Exp $
--- lib/python/mod_python/cgihandler.py.orig 2000-12-05 22:05:37.000000000 -0500
+++ lib/python/mod_python/cgihandler.py
@@ -108,6 +108,7 @@
# thread safe, this is why we must obtain the lock.
cwd = os.getcwd()
os.chdir(dir)
+ sys.path.append (dir)
# simulate cgi environment
env, si, so = apache.setup_cgi(req)
@@ -119,7 +120,9 @@
raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
# this executes the module
- imp.load_module(module_name, fd, path, desc)
+ try: imp.load_module(module_name, fd, path, desc)
+ except SystemExit, e:
+ if not e or not e.args or e.args[0]: raise
return apache.OK

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-ag,v 1.1 2003/12/03 09:44:10 darcy Exp $
--- lib/python/mod_python/apache.py.orig 2002-04-19 14:20:40.000000000 -0400
+++ lib/python/mod_python/apache.py
@@ -529,17 +529,9 @@
# are headers over yet?
headers_over = 0
- # first try RFC-compliant CRLF
- ss = string.split(self.headers, '\r\n\r\n', 1)
- if len(ss) < 2:
- # second try with \n\n
- ss = string.split(self.headers, '\n\n', 1)
- if len(ss) >= 2:
- headers_over = 1
- else:
- headers_over = 1
-
- if headers_over:
+ # split the headers from the body.
+ ss = string.split(self.headers.replace('\r\n', '\n'), '\n\n', 1)
+ if len(ss) == 2:
# headers done, process them
string.replace(ss[0], '\r\n', '\n')
lines = string.split(ss[0], '\n')