summaryrefslogtreecommitdiff
path: root/www/py-uwsgi
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-01-23 14:47:05 +0000
committerwiz <wiz@pkgsrc.org>2014-01-23 14:47:05 +0000
commit3662432ae69967edf068a4ec391635c98a21c1a8 (patch)
tree8644ba28a14ea9c943daaff81ff3fe49487f8c3e /www/py-uwsgi
parent05330a1616d3196b1c193569f9e5f045b28a0f73 (diff)
downloadpkgsrc-3662432ae69967edf068a4ec391635c98a21c1a8.tar.gz
Update to 2.0 (python-3.x compatible) based on the wip package by othyro.
Changes: uWSGI 2.0 Changelog [20131230] Important changes Dynamic options have been definitely removed as well as the broken_plugins directory Bugfixes and improvements improved log rotation do not rely on unix signals to print request status during harakiri added magic vars for uid and gid various Lua fixes a tons of coverity-governed bugfixes made by Riccardo Magliocchetti New features --attach-daemon2 this is a keyval based option for configuring external daemons. Updated docs are: :doc:`AttachingDaemons` Linux setns() support One of the biggest improvements in uWSGI 1.9-2.0 has been the total support for Linux namespaces. This last patch adds support for the setns() syscall. This syscall allows a process to "attach" to a running namespace. uWSGI instances can exposes their namespaces file descriptors (basically they are the files in /proc/self/ns) via a unix socket. External instances connects to that unix socket and automatically enters the mapped namespace. to spawn an instance in "namespace server mode", you use the --setns-socket <addr> option uwsgi --setns-socket /var/run/ns.socket --unshare net,ipc,uts ... to attach you simply use --setns <addr> uwsgi --setns /var/run/ns.socket ... Updated docs: :doc:`Namespaces` "private" hooks When uWSGI runs your hooks, it verbosely print the whole hook action line. This could be a security problem in some scenario (for example when you run initial phases as root user but allows unprivileged access to logs). Prefixing your action with a '!' will suppress full logging: [uwsgi] hook-asap = !exec:my_secret_command Support for yajl library (JSON parser) Til now uWSGI only supported jansson as the json parser required for managing .js config files. You can now use the yajl library (available in centos) as alternative JSON parser (will be automatically detected) Perl spooler support The perl/PSGI plugin can now be used as a spooler server: uwsgi::spooler(sub { my $args = shift; print Dumper($args); return -2; }); The client part is still missing as we need to fix some internal api problem. Expect it in 2.0.1 ;) Gateways can drop privileges Gateways (like http router, sslrouter, rawrouter, forkptyrouter ...) can now drop privileges independently by the master. Currently only the http/https/spdy router exposes the new option (--http-uid/--http-gid) Subscriptions-governed SNI contexts The subscription subsystem now supports 3 additional keys (you can set them with the --subscribe2 option): sni_key sni_cert sni_ca all of the takes a path to the relevant ssl files.
Diffstat (limited to 'www/py-uwsgi')
-rw-r--r--www/py-uwsgi/Makefile28
-rw-r--r--www/py-uwsgi/PLIST53
-rw-r--r--www/py-uwsgi/distinfo15
-rw-r--r--www/py-uwsgi/options.mk75
-rw-r--r--www/py-uwsgi/patches/patch-base.ini20
-rw-r--r--www/py-uwsgi/patches/patch-logging.c27
-rw-r--r--www/py-uwsgi/patches/patch-uwsgi.h16
-rw-r--r--www/py-uwsgi/patches/patch-uwsgiconfig.py109
8 files changed, 212 insertions, 131 deletions
diff --git a/www/py-uwsgi/Makefile b/www/py-uwsgi/Makefile
index cc1042f88ac..b43eb9f3abc 100644
--- a/www/py-uwsgi/Makefile
+++ b/www/py-uwsgi/Makefile
@@ -1,23 +1,33 @@
-# $NetBSD: Makefile,v 1.19 2014/01/04 13:56:01 rodent Exp $
+# $NetBSD: Makefile,v 1.20 2014/01/23 14:47:05 wiz Exp $
-DISTNAME= uwsgi-1.4.10
+DISTNAME= uwsgi-2.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES= python www
+CATEGORIES= www python
MASTER_SITES= http://projects.unbit.it/downloads/
-MAINTAINER= joerg@NetBSD.org
+MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://projects.unbit.it/uwsgi
COMMENT= Feature-rich WSGI server
-LICENSE= gnu-gpl-v2
+LICENSE= gnu-gpl-v2 # with linking exception
-USE_LANGUAGES= c
+USE_LANGUAGES= c
+USE_TOOLS+= pkg-config
-PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
+PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
EGG_NAME= ${DISTNAME:S/uwsgi/uWSGI/}
+.include "options.mk"
+
+INSTALL_ENV+= UWSGI_INCLUDES=${PREFIX}/include
+INSTALL_ENV+= UWSGI_PROFILE_OVERRIDE="${UWSGI_DEBUG}${UWSGI_JSON}${UWSGI_PCRE}${UWSGI_SSL}${UWSGI_UUID}${UWSGI_XML}${UWSGI_YAML}"
+INSTALLATION_DIRS+= share/examples/py-uwsgi
+
post-install:
- mv ${DESTDIR}${PREFIX}/bin/uwsgi ${DESTDIR}${PREFIX}/bin/uwsgi-${PYVERSSUFFIX}
+ ${MV} ${DESTDIR}${PREFIX}/bin/uwsgi ${DESTDIR}${PREFIX}/bin/uwsgi-${PYVERSSUFFIX}
+ ${INSTALL_DATA} ${WRKSRC}/examples/* \
+ ${DESTDIR}${PREFIX}/share/examples/py-uwsgi
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
.include "../../lang/python/egg.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/py-uwsgi/PLIST b/www/py-uwsgi/PLIST
index 447ce7a4e4b..fe4281f044e 100644
--- a/www/py-uwsgi/PLIST
+++ b/www/py-uwsgi/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2012/10/16 07:41:51 wiz Exp $
+@comment $NetBSD: PLIST,v 1.4 2014/01/23 14:47:05 wiz Exp $
bin/uwsgi-${PYVERSSUFFIX}
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -7,3 +7,54 @@ ${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/uwsgidecorators.py
${PYSITELIB}/uwsgidecorators.pyc
${PYSITELIB}/uwsgidecorators.pyo
+share/examples/py-uwsgi/bootstrap.py
+share/examples/py-uwsgi/bootstrap2.py
+share/examples/py-uwsgi/bootstrap3.py
+share/examples/py-uwsgi/bootstrap4.py
+share/examples/py-uwsgi/bootstrap5.py
+share/examples/py-uwsgi/config.lua
+share/examples/py-uwsgi/config.ru
+share/examples/py-uwsgi/config17.ru
+share/examples/py-uwsgi/config2.lua
+share/examples/py-uwsgi/config2.ru
+share/examples/py-uwsgi/config30.ru
+share/examples/py-uwsgi/corostream.pl
+share/examples/py-uwsgi/debug.ini
+share/examples/py-uwsgi/fibers.ru
+share/examples/py-uwsgi/fibers.yml
+share/examples/py-uwsgi/flaskpost.py
+share/examples/py-uwsgi/heavytest.ini
+share/examples/py-uwsgi/heavytest.py
+share/examples/py-uwsgi/info_uwsgi.php
+share/examples/py-uwsgi/logic.ini
+share/examples/py-uwsgi/mega.xml
+share/examples/py-uwsgi/mjpeg_stream.py
+share/examples/py-uwsgi/mojoapp.pl
+share/examples/py-uwsgi/multi.ini
+share/examples/py-uwsgi/multi.xml
+share/examples/py-uwsgi/multiapp.py
+share/examples/py-uwsgi/protected.ini
+share/examples/py-uwsgi/router.lua
+share/examples/py-uwsgi/simple_app.py
+share/examples/py-uwsgi/simple_app_wsgi2.py
+share/examples/py-uwsgi/simple_logger.py
+share/examples/py-uwsgi/sites.xml
+share/examples/py-uwsgi/sputnik.ws
+share/examples/py-uwsgi/staticfilesnmp.py
+share/examples/py-uwsgi/taskqueue.py
+share/examples/py-uwsgi/uwsgi.xml
+share/examples/py-uwsgi/uwsgirouter.py
+share/examples/py-uwsgi/uwsgirouter2.py
+share/examples/py-uwsgi/uwsgirouter3.py
+share/examples/py-uwsgi/uwsgirouter4.py
+share/examples/py-uwsgi/uwsgirouter5.py
+share/examples/py-uwsgi/uwsgistatus.py
+share/examples/py-uwsgi/welcome.ini
+share/examples/py-uwsgi/welcome.py
+share/examples/py-uwsgi/welcome3.py
+share/examples/py-uwsgi/werkzeug.js
+share/examples/py-uwsgi/werkzeug.yml
+share/examples/py-uwsgi/werkzeug_strict.yml
+share/examples/py-uwsgi/xmlindex-html.xsl
+share/examples/py-uwsgi/xmlindex.ini
+share/examples/py-uwsgi/zmqgevent.ini
diff --git a/www/py-uwsgi/distinfo b/www/py-uwsgi/distinfo
index e73c140de05..d71864bbc0c 100644
--- a/www/py-uwsgi/distinfo
+++ b/www/py-uwsgi/distinfo
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.14 2014/01/05 03:46:11 rodent Exp $
+$NetBSD: distinfo,v 1.15 2014/01/23 14:47:05 wiz Exp $
-SHA1 (uwsgi-1.4.10.tar.gz) = cc903eeacce6bc9adf76d20a89510e24b9c0364c
-RMD160 (uwsgi-1.4.10.tar.gz) = fc7b03d6e5d52751f8872a5aeb4f4a27fd94e887
-Size (uwsgi-1.4.10.tar.gz) = 590892 bytes
-SHA1 (patch-base.ini) = 20cf4008c9d6f443869147d49fb1c83128d78a17
-SHA1 (patch-logging.c) = 3ba8a94c68951e7ce4c76ee34a99755a23ccd53c
-SHA1 (patch-uwsgi.h) = 1e72e42be6ab7663c3e6123c33236f5f20832563
-SHA1 (patch-uwsgiconfig.py) = ea708ac89516dfc3ca0615937856bed68369b1c0
+SHA1 (uwsgi-2.0.tar.gz) = 6a210d25ab66b5726850fe0c80793ede55f02bcf
+RMD160 (uwsgi-2.0.tar.gz) = d42e8d630e08696247de75ec208de6c57a918ca8
+Size (uwsgi-2.0.tar.gz) = 744221 bytes
+SHA1 (patch-base.ini) = f1b61f8323a7be92ebae5c87b8a32b3109145036
+SHA1 (patch-uwsgi.h) = 911aa69e7973b92c726fa293748ae6a875b45353
+SHA1 (patch-uwsgiconfig.py) = 712bed7b8c114f1c9c457660151137fa469f0cb5
diff --git a/www/py-uwsgi/options.mk b/www/py-uwsgi/options.mk
new file mode 100644
index 00000000000..6aa4e741f82
--- /dev/null
+++ b/www/py-uwsgi/options.mk
@@ -0,0 +1,75 @@
+# $NetBSD: options.mk,v 1.1 2014/01/23 14:47:05 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.py-uwsgi
+PKG_SUPPORTED_OPTIONS= debug openssl pcre uuid yaml zlib
+PKG_SUGGESTED_OPTIONS+= libxml2 openssl zlib
+
+PKG_OPTIONS_OPTIONAL_GROUPS+= json xml
+PKG_OPTIONS_GROUP.json= jansson yajl
+PKG_OPTIONS_GROUP.xml= expat libxml2
+
+.include "../../mk/bsd.options.mk"
+
+UWSGI_DEBUG= debug=false;
+.if !empty(PKG_OPTIONS:Mdebug)
+UWSGI_DEBUG= debug=true;
+.endif
+
+UWSGI_XML= xml=auto;
+.if !empty(PKG_OPTIONS:Mexpat)
+.include "../../textproc/expat/buildlink3.mk"
+UWSGI_XML= xml=expat;
+.elif !empty(PKG_OPTIONS:Mlibxml2)
+.include "../../textproc/libxml2/buildlink3.mk"
+UWSGI_XML= xml=libxml2;
+.else
+UWSGI_XML= xml=false;
+.endif
+
+UWSGI_JSON= json=auto;
+.if !empty(PKG_OPTIONS:Mjansson)
+.include "../../textproc/jansson/buildlink3.mk"
+UWSGI_JSON= json=jansson;
+.elif !empty(PKG_OPTIONS:Myajl)
+.include "../../devel/yajl/buildlink3.mk"
+UWSGI_JSON= json=yajl;
+BROKEN= The yajl option requires a yajl.pc file which that package doesn't have.
+.else
+UWSGI_JSON= json=false;
+.endif
+
+UWSGI_SSL= ssl=auto;
+.if !empty(PKG_OPTIONS:Mopenssl)
+.include "../../security/openssl/buildlink3.mk"
+UWSGI_SSL= ssl=true;
+.else
+UWSGI_SSL= ssl=false;
+.endif
+
+UWSGI_PCRE= pcre=auto;
+.if !empty(PKG_OPTIONS:Mpcre)
+.include "../../devel/pcre/buildlink3.mk"
+UWSGI_PCRE= pcre=true;
+.else
+UWSGI_PCRE= pcre=false;
+.endif
+
+UWSGI_UUID= uuid=auto;
+.if !empty(PKG_OPTIONS:Muuid)
+.include "../../devel/libuuid/buildlink3.mk"
+UWSGI_UUID= uuid=true;
+.else
+UWSGI_UUID= uuid=false;
+.endif
+
+UWSGI_YAML= yaml=auto
+.if !empty(PKG_OPTIONS:Myaml)
+.include "../../textproc/libyaml/buildlink3.mk"
+UWSGI_YAML= yaml=true
+.else
+UWSGI_YAML= yaml=false
+.endif
+
+.if !empty(PKG_OPTIONS:Mzlib)
+.include "../../devel/zlib/buildlink3.mk"
+.endif
diff --git a/www/py-uwsgi/patches/patch-base.ini b/www/py-uwsgi/patches/patch-base.ini
index 3b389ba9b2f..853eb63aafb 100644
--- a/www/py-uwsgi/patches/patch-base.ini
+++ b/www/py-uwsgi/patches/patch-base.ini
@@ -1,13 +1,23 @@
-$NetBSD: patch-base.ini,v 1.2 2014/01/04 13:56:01 rodent Exp $
+$NetBSD: patch-base.ini,v 1.3 2014/01/23 14:47:05 wiz Exp $
---- buildconf/base.ini.orig 2013-08-23 12:51:18.000000000 +0000
+Build CGI plugin too. Add directive for uuid detection.
+
+--- buildconf/base.ini.orig 2013-12-30 08:44:59.000000000 +0000
+++ buildconf/base.ini
-@@ -29,7 +29,7 @@ plugins =
+@@ -4,6 +4,7 @@ yaml = true
+ json = auto
+ ssl = auto
+ pcre = auto
++uuid = auto
+ routing = auto
+ debug = false
+ unbit = false
+@@ -13,7 +14,7 @@ plugins =
bin_name = uwsgi
append_version =
plugin_dir = .
--embedded_plugins = %(main_plugin)s, ping, cache, nagios, rrdtool, carbon, rpc, corerouter, fastrouter, http, ugreen, signal, syslog, rsyslog, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter
-+embedded_plugins = %(main_plugin)s, cgi, ping, cache, nagios, rrdtool, carbon, rpc, corerouter, fastrouter, http, ugreen, signal, syslog, rsyslog, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter
+-embedded_plugins = %(main_plugin)s, ping, cache, nagios, rrdtool, carbon, rpc, corerouter, fastrouter, http, ugreen, signal, syslog, rsyslog, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter, router_static, sslrouter, spooler, cheaper_busyness, symcall, transformation_tofile, transformation_gzip, transformation_chunked, transformation_offload, router_memcached, router_redis, router_hash, router_expires, router_metrics, transformation_template, stats_pusher_socket
++embedded_plugins = %(main_plugin)s, cgi, ping, cache, nagios, rrdtool, carbon, rpc, corerouter, fastrouter, http, ugreen, signal, syslog, rsyslog, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter, router_static, sslrouter, spooler, cheaper_busyness, symcall, transformation_tofile, transformation_gzip, transformation_chunked, transformation_offload, router_memcached, router_redis, router_hash, router_expires, router_metrics, transformation_template, stats_pusher_socket
as_shared_library = false
locking = auto
diff --git a/www/py-uwsgi/patches/patch-logging.c b/www/py-uwsgi/patches/patch-logging.c
deleted file mode 100644
index 5d037946d72..00000000000
--- a/www/py-uwsgi/patches/patch-logging.c
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-logging.c,v 1.3 2014/01/04 13:56:01 rodent Exp $
-
---- core/logging.c.orig 2013-08-23 12:51:18.000000000 +0000
-+++ core/logging.c
-@@ -306,7 +306,7 @@ void uwsgi_setup_log_master(void) {
- int is_id = 1;
- int i;
- for (i = 0; i < (space - name); i++) {
-- if (!isalnum(name[i])) {
-+ if (!isalnum((int) name[i])) {
- is_id = 0;
- break;
- }
-@@ -695,8 +695,13 @@ void get_memusage(uint64_t * rss, uint64
- struct kinfo_proc *kproc;
- kproc = kvm_getprocs(kv, KERN_PROC_PID, uwsgi.mypid, &cnt);
- if (kproc && cnt > 0) {
-+#if defined(__FreeBSD__)
- *vsz = kproc->ki_size;
- *rss = kproc->ki_rssize * uwsgi.page_size;
-+#elif defined(__DragonFly__)
-+ *vsz = kproc->kp_vm_map_size;
-+ *rss = kproc->kp_vm_rssize * uwsgi.page_size;
-+#endif
- }
- #elif defined(UWSGI_NEW_OPENBSD)
- struct kinfo_proc *kproc;
diff --git a/www/py-uwsgi/patches/patch-uwsgi.h b/www/py-uwsgi/patches/patch-uwsgi.h
index 27a67a10278..f5bc36d57ad 100644
--- a/www/py-uwsgi/patches/patch-uwsgi.h
+++ b/www/py-uwsgi/patches/patch-uwsgi.h
@@ -1,14 +1,16 @@
-$NetBSD: patch-uwsgi.h,v 1.4 2014/01/04 13:56:01 rodent Exp $
+$NetBSD: patch-uwsgi.h,v 1.5 2014/01/23 14:47:05 wiz Exp $
---- uwsgi.h.orig 2013-08-23 12:51:18.000000000 +0000
+Avoid clash with sys/user.h inclusion in logging.c on DragonFly BSD.
+
+--- uwsgi.h.orig 2013-12-30 08:44:59.000000000 +0000
+++ uwsgi.h
-@@ -278,6 +278,10 @@ extern int pivot_root(const char *new_ro
- #include <sys/devpoll.h>
- #elif defined(__HAIKU__)
+@@ -323,6 +323,10 @@ extern int pivot_root(const char *new_ro
+ #elif defined(__CYGWIN__)
+ #elif defined(__HURD__)
#else
-+#ifdef __DragonFly__
++#if defined(__DragonFly__)
+/* avoid clash with sys/user.h inclusion in logging.c */
-+#define _KERNEL_STRUCTURES
++#define _KERNEL_STRUCTURES
+#endif /* __DragonFly__ */
#include <sys/event.h>
#endif
diff --git a/www/py-uwsgi/patches/patch-uwsgiconfig.py b/www/py-uwsgi/patches/patch-uwsgiconfig.py
index 10a98990ed3..c0a4912b8ef 100644
--- a/www/py-uwsgi/patches/patch-uwsgiconfig.py
+++ b/www/py-uwsgi/patches/patch-uwsgiconfig.py
@@ -1,85 +1,46 @@
-$NetBSD: patch-uwsgiconfig.py,v 1.7 2014/01/05 03:46:11 rodent Exp $
+$NetBSD: patch-uwsgiconfig.py,v 1.8 2014/01/23 14:47:05 wiz Exp $
---- uwsgiconfig.py.orig 2013-08-23 12:51:18.000000000 +0000
+Disable inclusion of certain packages by default. Use options framework instead.
+
+--- uwsgiconfig.py.orig 2013-12-30 08:44:59.000000000 +0000
+++ uwsgiconfig.py
-@@ -635,6 +635,8 @@ class uConf(object):
+@@ -68,6 +68,7 @@ report = {
+ 'timer': False,
+ 'filemonitor': False,
+ 'pcre': False,
++ 'uuid': False,
+ 'routing': False,
+ 'capabilities': False,
+ 'yaml': False,
+@@ -734,7 +735,7 @@ class uConf(object):
+ if 'UWSGI_PROFILE_OVERRIDE' in os.environ:
+ for item in os.environ['UWSGI_PROFILE_OVERRIDE'].split(';'):
+ k,v = item.split('=', 2)
+- uc.set(k, v)
++ self.set(k, v)
+
+ if 'UWSGI_AS_LIB' in os.environ:
+ self.set('as_shared_library', 'true')
+@@ -816,6 +817,8 @@ class uConf(object):
if locking_mode == 'auto':
if uwsgi_os == 'Linux' or uwsgi_os == 'SunOS':
locking_mode = 'pthread_mutex'
-+ elif uwsgi_os == 'NetBSD':
-+ locking_mode = 'posix_sem';
++ elif uwsgi_os == 'NetBSD':
++ locking_mode = 'posix_sem';
# FreeBSD umtx is still not ready for process shared locking
# starting from FreeBSD 9 posix semaphores can be shared between processes
- elif uwsgi_os == 'FreeBSD':
-@@ -672,7 +674,7 @@ class uConf(object):
- if int(sun_major) >= 5:
- if int(sun_minor) >= 10:
- event_mode = 'port'
-- elif uwsgi_os in ('Darwin', 'FreeBSD', 'OpenBSD', 'NetBSD'):
-+ elif uwsgi_os in ('Darwin', 'FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly'):
- event_mode = 'kqueue'
-
- if event_mode == 'epoll':
-@@ -791,7 +793,7 @@ class uConf(object):
- has_pcre = False
-
- # re-enable after pcre fix
-- if self.get('pcre'):
-+ if self.get('pcreOFF'):
- if self.get('pcre') == 'auto':
- pcreconf = spcall('pcre-config --libs')
- if pcreconf:
-@@ -854,7 +856,7 @@ class uConf(object):
- has_json = False
- has_uuid = False
+ elif uwsgi_os in ('FreeBSD', 'GNU/kFreeBSD'):
+@@ -1019,10 +1022,11 @@ class uConf(object):
+ self.libs.append('-lcap')
+ report['capabilities'] = True
- if self.has_include('uuid/uuid.h'):
-+ if False and self.has_include('uuid/uuid.h'):
- has_uuid = True
++ if self.get('uuid') and self.get('uuid') != 'false' and self.has_include('uuid/uuid.h'):
self.cflags.append("-DUWSGI_UUID")
- if uwsgi_os == 'Linux' or os.path.exists('/usr/lib/libuuid.so') or os.path.exists('/usr/local/lib/libuuid.so') or os.path.exists('/usr/lib64/libuuid.so') or os.path.exists('/usr/local/lib64/libuuid.so'):
-@@ -956,7 +958,7 @@ class uConf(object):
- self.gcc_list.append('core/ini')
- report['ini'] = True
-
-- if self.get('yaml'):
-+ if self.get('yamlOFF'):
- self.cflags.append("-DUWSGI_YAML")
- self.gcc_list.append('core/yaml')
- report['yaml'] = True
-@@ -970,7 +972,7 @@ class uConf(object):
- self.libs.append('-lyaml')
- report['yaml'] = 'libyaml'
-
-- if self.get('json'):
-+ if self.get('jsonOFF'):
- if self.get('json') == 'auto':
- jsonconf = spcall("pkg-config --cflags jansson")
- if jsonconf:
-@@ -993,7 +995,7 @@ class uConf(object):
- if has_json:
- report['json'] = True
-
-- if self.get('ldap'):
-+ if self.get('ldapOFF'):
- if self.get('ldap') == 'auto':
- if self.has_include('ldap.h'):
- self.cflags.append("-DUWSGI_LDAP")
-@@ -1020,7 +1022,7 @@ class uConf(object):
- report['ssl'] = True
-
-
-- if has_uuid and self.get('zeromq'):
-+ if has_uuid and self.get('zeromqOFF'):
- if self.get('zeromq') == 'auto':
- if self.has_include('zmq.h'):
- self.cflags.append("-DUWSGI_ZEROMQ")
-@@ -1080,7 +1082,7 @@ class uConf(object):
- self.gcc_list.append('core/xmlconf')
- report['xml'] = 'expat'
+- if uwsgi_os in ('Linux', 'GNU', 'GNU/kFreeBSD') or uwsgi_os.startswith('CYGWIN') or os.path.exists('/usr/lib/libuuid.so') or os.path.exists('/usr/local/lib/libuuid.so') or os.path.exists('/usr/lib64/libuuid.so') or os.path.exists('/usr/local/lib64/libuuid.so'):
++ if uwsgi_os in ('Linux', 'GNU', 'GNU/kFreeBSD') or uwsgi_os.startswith('CYGWIN') or os.path.exists('/usr/lib/libuuid.so') or os.path.exists('/usr/local/lib/libuuid.so') or os.path.exists('/usr/lib64/libuuid.so') or os.path.exists('/usr/local/lib64/libuuid.so') or os.path.exists(os.environ['PREFIX'] + '/lib/libuuid.so'):
+ self.libs.append('-luuid')
++ report['uuid'] = True
-- if self.get('sqlite3'):
-+ if self.get('sqlite3OFF'):
- if self.get('sqlite3') == 'auto':
- if self.has_include('sqlite3.h'):
- self.cflags.append("-DUWSGI_SQLITE3")
+ if self.get('append_version'):
+ if not self.get('append_version').startswith('-'):