diff options
author | danger <danger@FreeBSD.org> | 2010-09-12 00:47:20 +0800 |
---|---|---|
committer | danger <danger@FreeBSD.org> | 2010-09-12 00:47:20 +0800 |
commit | d97912c86d810f16b72499538cc2eced053c85f0 (patch) | |
tree | 668dd1abfb0b87c3375539384726a99c4138efca /www/uwsgi | |
parent | c5445b2fffdbfa3c5eefded76a2c9d21de68c43d (diff) | |
download | freebsd-ports-gnome-d97912c86d810f16b72499538cc2eced053c85f0.tar.gz freebsd-ports-gnome-d97912c86d810f16b72499538cc2eced053c85f0.tar.zst freebsd-ports-gnome-d97912c86d810f16b72499538cc2eced053c85f0.zip |
- update to lates 0.9.6
- add simple rc.d script
- add LICENSE info
Diffstat (limited to 'www/uwsgi')
-rw-r--r-- | www/uwsgi/Makefile | 6 | ||||
-rw-r--r-- | www/uwsgi/distinfo | 6 | ||||
-rw-r--r-- | www/uwsgi/files/patch-http.c | 11 | ||||
-rw-r--r-- | www/uwsgi/files/patch-plugins.c | 19 | ||||
-rw-r--r-- | www/uwsgi/files/patch-routing.c | 20 | ||||
-rw-r--r-- | www/uwsgi/files/patch-uwsgi.h | 11 | ||||
-rw-r--r-- | www/uwsgi/files/uwsgi.in | 59 |
7 files changed, 128 insertions, 4 deletions
diff --git a/www/uwsgi/Makefile b/www/uwsgi/Makefile index 332a2dfa4227..7fa106b56aad 100644 --- a/www/uwsgi/Makefile +++ b/www/uwsgi/Makefile @@ -6,17 +6,21 @@ # PORTNAME= uwsgi -PORTVERSION= 0.9.5.3 +PORTVERSION= 0.9.6 CATEGORIES= www python MASTER_SITES= http://projects.unbit.it/downloads/ MAINTAINER= danger@FreeBSD.org COMMENT= Developer-friendly WSGI server which uses uwsgi protocol +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + MAKE_JOBS_SAFE= yes USE_GNOME= libxml2 USE_PYTHON= 2.4+ +USE_RC_SUBR= uwsgi PLIST_FILES= bin/${PORTNAME} diff --git a/www/uwsgi/distinfo b/www/uwsgi/distinfo index 822a238d8a89..575ed9d8362a 100644 --- a/www/uwsgi/distinfo +++ b/www/uwsgi/distinfo @@ -1,3 +1,3 @@ -MD5 (uwsgi-0.9.5.3.tar.gz) = f4835859bc87080a58289b980b7ae15c -SHA256 (uwsgi-0.9.5.3.tar.gz) = 55e96a78c369b50c589fdb736e81a388a4edef70ac2f51f202253ece8fcef5d3 -SIZE (uwsgi-0.9.5.3.tar.gz) = 122968 +MD5 (uwsgi-0.9.6.tar.gz) = 1f07815457cd38cd10b9f2bf8625cfae +SHA256 (uwsgi-0.9.6.tar.gz) = 87ecd2c1b28af7b855e316b738552ef0de67f35178fb9024e663be715a686abf +SIZE (uwsgi-0.9.6.tar.gz) = 145535 diff --git a/www/uwsgi/files/patch-http.c b/www/uwsgi/files/patch-http.c new file mode 100644 index 000000000000..fd78ec0c4168 --- /dev/null +++ b/www/uwsgi/files/patch-http.c @@ -0,0 +1,11 @@ +--- ./http.c.orig 2010-08-29 06:51:52.000000000 +0200 ++++ ./http.c 2010-09-10 16:34:23.990426501 +0200 +@@ -182,7 +182,7 @@ + struct uwsgi_http_req *ur = (struct uwsgi_http_req *) u_h_r ; + + int clientfd = ur->fd; +- int uwsgi_fd; ++ int uwsgi_fd = 0; + + int need_to_read = 1; + int state = uwsgi_http_method; diff --git a/www/uwsgi/files/patch-plugins.c b/www/uwsgi/files/patch-plugins.c new file mode 100644 index 000000000000..6df5a7a50f90 --- /dev/null +++ b/www/uwsgi/files/patch-plugins.c @@ -0,0 +1,19 @@ +--- ./plugins.c.orig 2010-08-29 06:51:52.000000000 +0200 ++++ ./plugins.c 2010-09-10 16:33:35.471808130 +0200 +@@ -1,6 +1,7 @@ + #include "uwsgi.h" + +-void embed_plugins(struct uwsgi_server *uwsgi) { ++int embed_plugins(struct uwsgi_server *uwsgi) { ++ int ret = 0; + + #ifdef UWSGI_EMBED_PLUGIN_PSGI + if (uwsgi->plugin_arg_psgi) +@@ -17,6 +18,7 @@ + ret = uwsgi_load_plugin(uwsgi, 7, "rack_plugin.so", uwsgi->plugin_arg_rack, 0); + #endif + ++ return ret; + } + + int uwsgi_load_plugin(struct uwsgi_server *uwsgi, int modifier, char *plugin, char *pargs, int absolute) { diff --git a/www/uwsgi/files/patch-routing.c b/www/uwsgi/files/patch-routing.c new file mode 100644 index 000000000000..bdb01ff2f414 --- /dev/null +++ b/www/uwsgi/files/patch-routing.c @@ -0,0 +1,20 @@ +--- ./routing.c.orig 2010-08-29 06:51:52.000000000 +0200 ++++ ./routing.c 2010-09-10 16:34:10.586680517 +0200 +@@ -63,7 +63,7 @@ + void uwsgi_route_action_wsgi(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req, struct uwsgi_route *ur) { + + int i; +- PyObject *route_py_callbase, *route_py_dict; ++ PyObject *route_py_callbase = NULL, *route_py_dict = NULL; + + uwsgi_log("managing WSGI route...\n"); + if (ur->callable == NULL) { +@@ -106,7 +106,7 @@ + + void uwsgi_route_action_uwsgi(struct uwsgi_server *uwsgi, struct wsgi_request *wsgi_req, struct uwsgi_route *ur) { + +- PyObject *route_py_callbase, *route_py_dict; ++ PyObject *route_py_callbase = NULL, *route_py_dict = NULL; + int i; + + uwsgi_log("managing uwsgi route...\n"); diff --git a/www/uwsgi/files/patch-uwsgi.h b/www/uwsgi/files/patch-uwsgi.h new file mode 100644 index 000000000000..d07cb386cd16 --- /dev/null +++ b/www/uwsgi/files/patch-uwsgi.h @@ -0,0 +1,11 @@ +--- ./uwsgi.h.orig 2010-09-10 16:34:33.959880773 +0200 ++++ ./uwsgi.h 2010-09-10 16:34:41.542504418 +0200 +@@ -1018,7 +1018,7 @@ + #endif + + int uwsgi_load_plugin(struct uwsgi_server *, int, char *, char *, int); +-void embed_plugins(struct uwsgi_server *); ++int embed_plugins(struct uwsgi_server *); + + + // PLUGINS diff --git a/www/uwsgi/files/uwsgi.in b/www/uwsgi/files/uwsgi.in new file mode 100644 index 000000000000..868846ff23fc --- /dev/null +++ b/www/uwsgi/files/uwsgi.in @@ -0,0 +1,59 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: uwsgi +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable uwsgi: +# +# uwsgi_enable (bool): Set it to "YES" to enable uwsgi +# Default is "NO". +# uwsgi_socket (path/str): Set the path to the uwsgi unix socket +# Default is /tmp/uwsgi.sock. +# uwsgi_logfile (path): Set the path to the uwsgi log file +# Default is /var/log/uwsgi.log. +# uwsgi_pidfile (path): Set the path to the uwsgi pid file +# Default is /var/run/uwsgi/uwsgi.pid. +# uwsgi_uid (int): Set the UID of the process to run with +# Default is 80. +# uwsgi_gid (int): Set the GID of the process to run with +# Default is 80. +# uwsgi_flags (str): Set the uwsgi command line arguments +# Default is "-M -L". + +. /etc/rc.subr + +name="uwsgi" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${uwsgi_enable="NO"} +: ${uwsgi_socket="/tmp/${name}.sock"} +: ${uwsgi_logfile="/var/log/${name}.log"} +: ${uwsgi_pidfile="/var/run/${name}.pid"} +: ${uwsgi_uid="80"} +: ${uwsgi_gid="80"} +: ${uwsgi_flags="-M -L"} + +command=%%PREFIX%%/bin/uwsgi +command_args="--pidfile ${uwsgi_pidfile} -s ${uwsgi_socket} -d ${uwsgi_logfile} --uid ${uwsgi_uid} --gid ${uwsgi_gid} ${uwsgi_flags}" +stop_postcmd=stop_postcmd +reload_precmd=reload_precmd +sig_reload="TERM" +sig_stop="KILL" +extra_commands="reload" + +stop_postcmd() +{ + rm -f ${uwsgi_pidfile} ${uwsgi_socket} +} + +reload_precmd() +{ + echo "Restarting ${name} gracefully without closing the main sockets." +} + +run_rc_command "$1" |