# HG changeset patch # User Franz Glasner # Date 1505315362 -7200 # Node ID 748e69c58ee309f887f62c0d37d36dff36ac4cc1 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port diff -r 000000000000 -r 748e69c58ee3 Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Wed Sep 13 17:09:22 2017 +0200 @@ -0,0 +1,64 @@ +# Created by: Daniel Gerzo +# $FreeBSD: head/www/uwsgi/Makefile 448482 2017-08-21 17:49:01Z ultima $ + +PORTNAME= uwsgi +PORTVERSION= 2.0.15 +PORTREVISION= 2 +CATEGORIES= www python +MASTER_SITES= http://projects.unbit.it/downloads/ + +MAINTAINER= ports@FreeBSD.org +COMMENT= Developer-friendly WSGI server which uses uwsgi protocol + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= pkgconfig python ssl +USE_PYTHON= distutils +USE_RC_SUBR= uwsgi + +CFLAGS+= -I${OPENSSLINC} +LDFLAGS+= ${OPENSSL_LDFLAGS} +MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_EMBED_PLUGINS=cgi + +PYSETUP= uwsgiconfig.py +PYDISTUTILS_BUILD_TARGET= --build +PYDISTUTILS_BUILDARGS= --verbose + +USERS= uwsgi +GROUPS= uwsgi + +PLIST_FILES= bin/uwsgi \ + %%PYTHON_SITELIBDIR%%/uwsgidecorators.py + +OPTIONS_DEFINE= DEBUG JSON PCRE XML + +DEBUG_VARS= PYDISTUTILS_BUILDARGS+=--debug + +JSON_VARS= BUILDCONF_JSON=jansson +JSON_LIB_DEPENDS= libjansson.so:devel/jansson + +PCRE_VARS= BUILDCONF_PCRE=true +PCRE_LIB_DEPENDS= libpcre.so:devel/pcre + +XML_VARS= BUILDCONF_XML=libxml2 +XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 + +LIB_DEPENDS+= libjansson.so:devel/jansson libpcre.so:devel/pcre libxml2.so:textproc/libxml2 + +.include + +post-patch: +.for var in JSON PCRE XML + @${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}:Ufalse}|' ${WRKSRC}/buildconf/base.ini +.endfor + +do-configure: + @${DO_NADA} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ + @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + ${INSTALL_DATA} ${WRKSRC}/uwsgidecorators.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +.include diff -r 000000000000 -r 748e69c58ee3 distinfo --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distinfo Wed Sep 13 17:09:22 2017 +0200 @@ -0,0 +1,3 @@ +TIMESTAMP = 1495495189 +SHA256 (uwsgi-2.0.15.tar.gz) = 572ef9696b97595b4f44f6198fe8c06e6f4e6351d930d22e5330b071391272ff +SIZE (uwsgi-2.0.15.tar.gz) = 795070 diff -r 000000000000 -r 748e69c58ee3 files/patch-uwsgiconfig.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/patch-uwsgiconfig.py Wed Sep 13 17:09:22 2017 +0200 @@ -0,0 +1,18 @@ +--- uwsgiconfig.py.orig 2015-10-07 04:34:01 UTC ++++ uwsgiconfig.py +@@ -784,15 +784,6 @@ class uConf(object): + self.cflags.append('-DUWSGI_HAS_IFADDRS') + report['ifaddrs'] = True + +- if uwsgi_os in ('FreeBSD', 'OpenBSD'): +- if self.has_include('execinfo.h') or os.path.exists('/usr/local/include/execinfo.h'): +- if os.path.exists('/usr/local/include/execinfo.h'): +- self.cflags.append('-I/usr/local/include') +- self.ldflags.append('-L/usr/local/lib') +- self.cflags.append('-DUWSGI_HAS_EXECINFO') +- self.libs.append('-lexecinfo') +- report['execinfo'] = True +- + if uwsgi_os == 'GNU/kFreeBSD': + if self.has_include('execinfo.h'): + self.cflags.append('-DUWSGI_HAS_EXECINFO') diff -r 000000000000 -r 748e69c58ee3 files/uwsgi.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/uwsgi.in Wed Sep 13 17:09:22 2017 +0200 @@ -0,0 +1,159 @@ +#!/bin/sh +# +# $FreeBSD: head/www/uwsgi/files/uwsgi.in 448482 2017-08-21 17:49:01Z ultima $ +# +# 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_socket_mode (int): Set the mode of the socket. +# Default is 660. +# uwsgi_socket_owner (str): Set the owner of the socket. +# Default is uwsgi:www. +# uwsgi_emperor (bool): Set it to "YES" to run uwsgi in emperor mode +# Default is "NO". +# uwsgi_configfile (path): Set the path to the config file +# Default is %%PREFIX%%/etc/uwsgi/uwsgi.ini. +# uwsgi_vassals_dir (path): Set the path to the vassals directory +# Default is %%PREFIX%%/etc/uwsgi/vassals. +# 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.pid. +# uwsgi_uid (int): Set the UID of the process to run with +# Default is uwsgi. +# uwsgi_gid (int): Set the GID of the process to run with +# Default is uwsgi. +# uwsgi_flags (str): Set the uwsgi command line arguments +# Default is "-L". +# uwsgi_procname (str): Define to "uWSGI" if you start uwsgi with +# --auto-procname option. +# +# If you would like to have multiple uWSGI instances running, you can +# define multiple profiles: +# +# uwsgi_profiles (str): Set the list of uwsgi profiles +# Default is "". +# +# For each profile you can then define different options (except for +# uwsgi_enable) using the syntax uwsgi__