# HG changeset patch # User Franz Glasner # Date 1552121920 -3600 # Node ID 98faecd6ea000390b4c371f15f575104e91fa2e8 # Parent 70b8e449d5638939bb06808ff4388ae4442f922d# Parent 5227737fcf7419f0f2fbea4284c6e14716309de4 MERGE: port revision 2 from uwsgi 2.0.16 diff -r 5227737fcf74 -r 98faecd6ea00 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Sat Mar 09 09:58:40 2019 +0100 @@ -0,0 +1,3 @@ +syntax: regexp + +^work/ diff -r 5227737fcf74 -r 98faecd6ea00 Makefile --- a/Makefile Fri Mar 08 21:21:52 2019 +0100 +++ b/Makefile Sat Mar 09 09:58:40 2019 +0100 @@ -1,46 +1,42 @@ -# Created by: Daniel Gerzo -# $FreeBSD: head/www/uwsgi/Makefile 494507 2019-03-03 12:50:54Z pi $ +# Created by: Franz Glasner +# $FreeBSD$ +# Based on www/uwsgi by: Daniel Gerzo -PORTNAME= uwsgi +PORTNAME= uwsginl PORTVERSION= 2.0.16 PORTREVISION= 2 -CATEGORIES= www python +CATEGORIES= www MASTER_SITES= http://projects.unbit.it/downloads/ +DISTNAME= uwsgi-${DISTVERSION} -MAINTAINER= eugene@zhegan.in -COMMENT= Developer-friendly WSGI server which uses uwsgi protocol - -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/LICENSE +MAINTAINER= freebsd-dev@dom66.de +COMMENT= Application host which uses the uwsgi protocol (nolang profile) -USES= pkgconfig python -USE_PYTHON= distutils concurrent optsuffix -USE_RC_SUBR= uwsgi +LICENSE= GPLv2-WITH-LINKING-EXCEPTION +LICENSE_GROUPS= FSF GPL OSI +LICENSE_NAME= GPLv2 with linking exception +LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_EMBED_PLUGINS=cgi +USES= pkgconfig python:build +USE_RC_SUBR= uwsginl -PYSETUP= uwsgiconfig.py -PYDISTUTILS_BUILD_TARGET= --build -PYDISTUTILS_BUILDARGS= --verbose +MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_PROFILE=nolang.ini UWSGI_BIN_NAME=${PORTNAME} UWSGI_EMBED_PLUGINS=cgi,clock_realtime,echo,logpipe UWSGI_PROFILE_OVERRIDE=plugin_dir=${PREFIX}/${PLUGIN_DIR} USERS= uwsgi GROUPS= uwsgi -PLIST_FILES= bin/uwsgi \ - ${PYTHON_SITELIBDIR}/uwsgidecorators.py +PLIST_SUB= PORTNAME=${PORTNAME} PLUGIN_DIR=${PLUGIN_DIR} -SUB_LIST= PYTHON_VER=${PYTHON_VER} - -OPTIONS_DEFINE= DEBUG JSON PCRE XML SSL +OPTIONS_DEFINE= DEBUGSYM UWSGIDEBUG JSON PCRE XML SSL OPTIONS_DEFAULT= SSL -OPTIONS_GROUP= PLG -OPTIONS_GROUP_PLG= PSGI +DEBUGSYM_DESC= Build with debug symbols +UWSGIDEBUG_DESC= Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG) -PLG_DESC= Enable plugins -PSGI_DESC= PSGI embedded plugin +DEBUGSYM_VARS= EXTRA_BUILDARGS+=--debug -DEBUG_VARS= PYDISTUTILS_BUILDARGS+=--debug +UWSGIDEBUG_VARS= BUILDCONF_DEBUG=true JSON_VARS= BUILDCONF_JSON=jansson JSON_LIB_DEPENDS= libjansson.so:devel/jansson @@ -48,8 +44,6 @@ PCRE_VARS= BUILDCONF_PCRE=true PCRE_LIB_DEPENDS= libpcre.so:devel/pcre -PSGI_USES= perl5 - XML_VARS= BUILDCONF_XML=libxml2 XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 @@ -58,20 +52,23 @@ SSL_CFLAGS= -I${OPENSSLINC} SSL_LDFLAGS= ${OPENSSL_LDFLAGS} +.include + +PLUGIN_DIR= lib/${PORTNAME}/plugins + post-patch: -.for var in JSON PCRE XML SSL - @${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}:Ufalse}|' ${WRKSRC}/buildconf/base.ini +.for bcvar in DEBUG JSON PCRE XML SSL + @${REINPLACE_CMD} -e '/^${bcvar:tl} =/ s|= .*|= ${BUILDCONF_${bcvar}:Ufalse}|' ${WRKSRC}/buildconf/base.ini .endfor -post-patch-PSGI-on: - @${REINPLACE_CMD} -e 's/%(main_plugin)s,/%(main_plugin)s, psgi,/' ${WRKSRC}/buildconf/base.ini - do-configure: @${DO_NADA} +do-build: + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} uwsgiconfig.py --build ${EXTRA_BUILDARGS} --verbose) + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ - @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - ${INSTALL_DATA} ${WRKSRC}/uwsgidecorators.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + ${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR} .include diff -r 5227737fcf74 -r 98faecd6ea00 files/uwsgi.in --- a/files/uwsgi.in Fri Mar 08 21:21:52 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: head/www/uwsgi/files/uwsgi.in 473044 2018-06-22 14:59:33Z swills $ -# -# 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__