Mercurial > hgrepos > FreeBSD > ports > www > uwsginl
changeset 74:20902803d406
MERGE: Upstream version 2.0.18.
Nothing really changed.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 11 Jun 2020 22:43:41 +0200 |
| parents | f85a4096574d (diff) 5f9369cd567d (current diff) |
| children | b247df50c169 |
| files | uwsginl-plugin-lang-py3/distinfo uwsginl/Makefile uwsginl/distinfo |
| diffstat | 40 files changed, 678 insertions(+), 245 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,3 @@ +syntax: regexp + +/work/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgsigs Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,1 @@ +689ef3454fc98e68f72a3403d97c9523785e4845 0 iQIzBAABCAAdFiEEnJ+K/GJ0KgNZGXPsaMOdASQTpp4FAlyFYqIACgkQaMOdASQTpp40ag//aTtxnzE88lQlKMTNNAQx1Mgslcv56pUYK/enM/wpNrd/mh/dxSOH1ESdufplOD4bmmbacSanJA+rOJ9zvgipznFssXvkDD1f2QYC12VMlGIWDsZC/v/PMlHOqVZvif926wr09mYfM2PXeeoxZwnX3YgKIxlHU9DOK0p/SsC7T3GriySNpz2UCZ8n05ocqdMnLhNDFH15wfFHKBv57NrQ2jtLD4ie8MT2UwcuBP2j03cHU5LDoDTfecrYFvzerXfeWAHaLctOSG5AIPd60fhIuVvir/kT5sTZS7PWNRMpwy9Xk3Se6phPm9E2nPo27pIQVWcFPDjap/CgLk/VnmEtxN4CpQuHz0JvKcWbxxBsngf8KrrDlG+ZWm3rZuEXP8TtEwyWTTMFA4Fjrm25pbWxmf/GxMiSHFIwQ9uao3IH9ayQvojeO4ysCDKc71RN+LSe1w4aEOpgB+oYXBb573tYbsdHJEl785MNM6hiT1pRLfQerKMNzSfPnnh4MxC5zABPV5w2wzH84jnvaX6K/+xq6xmm1ZnpuQk7XJaLbLnYPLXeXrbIy4+AUfK/ocL63GSVbm79ph+6lEt5C4whO+stCQ/eKyPqNXn0KO+gahxPiWxsiNhOHJKn2UM9P3kBGMHHDfrOlChojOkOUe0aNiSiDADZrnh6IEoRpyGJnqojrOw=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgtags Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,1 @@ +02a0807309f71884397fbb6cb79de557bed54664 v2.0.18
--- a/Makefile Thu Jun 11 22:35:08 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -# Created by: Daniel Gerzo <danger@FreeBSD.org> -# $FreeBSD: head/www/uwsgi/Makefile 518934 2019-12-03 11:48:45Z amdmi3 $ - -PORTNAME= uwsgi -PORTVERSION= 2.0.18 -CATEGORIES= www python -MASTER_SITES= http://projects.unbit.it/downloads/ - -MAINTAINER= eugene@zhegan.in -COMMENT= Developer-friendly WSGI server which uses uwsgi protocol - -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/LICENSE - -USES= pkgconfig python -USE_PYTHON= distutils concurrent optsuffix -USE_RC_SUBR= uwsgi - -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 - -SUB_LIST= PYTHON_VER=${PYTHON_VER} - -OPTIONS_DEFINE= DEBUG JSON PCRE XML SSL -OPTIONS_DEFAULT= SSL - -OPTIONS_GROUP= PLG -OPTIONS_GROUP_PLG= PSGI - -PLG_DESC= Enable plugins -PSGI_DESC= PSGI embedded plugin - -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 - -PSGI_USES= perl5 - -XML_VARS= BUILDCONF_XML=libxml2 -XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 - -SSL_VARS= BUILDCONF_SSL=true -SSL_USES= ssl -SSL_CFLAGS= -I${OPENSSLINC} -SSL_LDFLAGS= ${OPENSSL_LDFLAGS} - -post-patch: -.for var in JSON PCRE XML SSL - @${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}: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-install: - ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ - @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - ${INSTALL_DATA} ${WRKSRC}/uwsgidecorators.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - -.include <bsd.port.mk>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VERSION Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,1 @@ +2.0.18
--- a/distinfo Thu Jun 11 22:35:08 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -TIMESTAMP = 1573864256 -SHA256 (uwsgi-2.0.18.tar.gz) = 4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583 -SIZE (uwsgi-2.0.18.tar.gz) = 801555
--- a/files/uwsgi.in Thu Jun 11 22:35:08 2020 +0200 +++ /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_<profile>_<option> - -. /etc/rc.subr - -name="uwsgi" -rcvar=uwsgi_enable - -load_rc_config $name - -command=%%PREFIX%%/bin/uwsgi-%%PYTHON_VER%% - -: ${uwsgi_enable="NO"} -: ${uwsgi_socket="/tmp/${name}.sock"} -: ${uwsgi_socket_mode="660"} -: ${uwsgi_socket_owner="uwsgi:www"} -: ${uwsgi_configfile="%%PREFIX%%/etc/uwsgi/uwsgi.ini"} -: ${uwsgi_profiles=""} -: ${uwsgi_logfile="/var/log/${name}.log"} -: ${uwsgi_pidfile="/var/run/${name}.pid"} -: ${uwsgi_uid="uwsgi"} -: ${uwsgi_gid="uwsgi"} -: ${uwsgi_flags="-L"} -: ${uwsgi_emperor="NO"} -: ${uwsgi_vassals_dir="%%PREFIX%%/etc/uwsgi/vassals"} - -is_uwsgi_profile() { - local profile - - for profile in $uwsgi_profiles; do - if [ "$profile" = "$1" ]; then - return 0 - fi - done - - return 1 -} - -if [ -n "${uwsgi_profiles}" ]; then - if [ -n "$2" ]; then - profile="$2" - if ! is_uwsgi_profile $profile; then - echo "$0: no such profile defined in uwsgi_profiles." - exit 1 - fi - eval uwsgi_socket=\${uwsgi_${profile}_socket:-"/tmp/${name}-${profile}.sock"} - eval uwsgi_socket_mode=\${uwsgi_${profile}_socket_mode:-${uwsgi_socket_mode}} - eval uwsgi_socket_owner=\${uwsgi_${profile}_socket_owner:-${uwsgi_socket_owner}} - eval uwsgi_logfile=\${uwsgi_${profile}_logfile:-"/var/log/${name}-${profile}.log"} - eval uwsgi_pidfile=\${uwsgi_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"} - eval uwsgi_uid=\${uwsgi_${profile}_uid:-"${uwsgi_uid}"} - eval uwsgi_gid=\${uwsgi_${profile}_gid:-"${uwsgi_gid}"} - eval uwsgi_flags=\${uwsgi_${profile}_flags:-"${uwsgi_flags}"} - eval uwsgi_procname=\${uwsgi_${profile}_procname:-"${uwsgi_procname}"} - eval uwsgi_emperor=\${uwsgi_${profile}_emperor:-"${uwsgi_emperor}"} - eval uwsgi_vassals_dir=\${uwsgi_${profile}_vassals_dir:-"${uwsgi_vassals_dir}"} - eval uwsgi_configfile=\${uwsgi_${profile}_configfile:-"${uwsgi_configfile}"} - elif [ -n "$1" ]; then - for profile in ${uwsgi_profiles}; do - echo "Processing ${name} profile: ${profile}" - %%PREFIX%%/etc/rc.d/uwsgi $1 ${profile} - done - exit 0 - fi -fi - -pidfile=${uwsgi_pidfile} -start_precmd=start_precmd -stop_postcmd=stop_postcmd -reload_precmd=reload_precmd -brutalreload_cmd=brutalreload_cmd -sig_stop="INT" -extra_commands="reload brutalreload" -procname=${uwsgi_procname} - -start_precmd() -{ - rc_flags="" - if [ -e ${uwsgi_configfile} ]; then - rc_flags="--ini ${uwsgi_configfile} " - fi - - if checkyesno uwsgi_emperor; then - echo "Running uWSGI as Emperor. Vassals loaded from "$uwsgi_vassals_dir - required_dirs=${uwsgi_vassals_dir} - rc_flags=${rc_flags}"--emperor-pidfile ${uwsgi_pidfile} -d ${uwsgi_logfile} --emperor ${uwsgi_vassals_dir}" - rc_flags=${rc_flags}" --vassals-set uid=${uwsgi_uid} --vassals-set gid=${uwsgi_gid}" - rc_flags=${rc_flags}" --vassals-set chmod-socket=${uwsgi_socket_mode} --vassals-set chown-socket=${uwsgi_socket_owner}" - else - rc_flags=${rc_flags}"--master --uid ${uwsgi_uid} --gid ${uwsgi_gid} --pidfile ${uwsgi_pidfile} -d ${uwsgi_logfile}" - rc_flags=${rc_flags}" -s ${uwsgi_socket} --chmod-socket=${uwsgi_socket_mode} --chown-socket=${uwsgi_socket_owner}" - fi - - rc_flags=${rc_flags}" ${uwsgi_flags}" -} - -stop_postcmd() -{ - rm -f ${uwsgi_pidfile} ${uwsgi_socket} -} - -reload_precmd() -{ - echo "Gracefully reloading ${name} without closing the main sockets." -} - -brutalreload_cmd() -{ - echo "Reloading ${name} without closing the main sockets." - - reload_precmd="" - sig_reload="TERM" - run_rc_command ${rc_prefix}reload $rc_extra_args || return 1 -} - -run_rc_command "$1"
--- a/pkg-descr Thu Jun 11 22:35:08 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server, -aimed for professional python webapps deployment and development. Over -time it has evolved in a complete stack for networked/clustered python -applications, implementing message/object passing, RPC and process -management. - -WWW: http://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-gevent3/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,13 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3 gevent plugin for ${UWSGI_NAME} + +PLUGIN_NAME= gevent3 +PLUGIN_SOURCE= plugins/gevent + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-gevent3/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3 gevent plugin for uwsginl. +Links to the default Python3 version on the system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-gevent36/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3.6 gevent plugin for ${UWSGI_NAME} + +USES= python:3.6 gettext-runtime + +PLUGIN_NAME= gevent36 +PLUGIN_SOURCE= plugins/gevent + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-gevent36/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3.6 gevent plugin for uwsginl. +Links to Python 3.6. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-greenlet3/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,16 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3 greenlet plugin for ${UWSGI_NAME} + +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}greenlet>=0.4:devel/py-greenlet@${PY_FLAVOR} +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}greenlet>=0.4:devel/py-greenlet@${PY_FLAVOR} + +PLUGIN_NAME= greenlet3 +PLUGIN_SOURCE= plugins/greenlet + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-greenlet3/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3 greenlet plugin for uwsginl. +Links to the default Python3 version on the system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-greenlet36/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,18 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3.6 gevent plugin for ${UWSGI_NAME} + +USES= python:3.6 gettext-runtime + +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}greenlet>=0.4:devel/py-greenlet@${PY_FLAVOR} +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}greenlet>=0.4:devel/py-greenlet@${PY_FLAVOR} + +PLUGIN_NAME= greenlet36 +PLUGIN_SOURCE= plugins/greenlet + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-greenlet36/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3.6 greenlet plugin for uwsginl. +Links to Python 3.6. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-php71/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,29 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-lang-php71 +CATEGORIES= www lang devel + +COMMENT= Language plugin for PHP 7.1 + +LIB_DEPENDS+= libxml2.so:textproc/libxml2 \ + libpcre.so:devel/pcre + +USES= php:build,embed +USE_PHP= session:build xml:build +PHP_VER= 71 +DEFAULT_VERSIONS+= php=${PHP_VER} + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +PLUGIN_NAME= php71 +PLUGIN_SOURCE= plugins/php + +# +# Check whether uwsginl has been built with both libpcre and libxml2 +# +pre-build: + @( ${UWSGI_PATH} --no-server --cflags | ${GREP} -- '-DUWSGI_XML_LIBXML2' >/dev/null ) || ( echo "Error: ${UWSGI_PATH} needs to be built with XML support (libxml2)" && exit 1 ) + @( ${UWSGI_PATH} --no-server --cflags | ${GREP} -- '-DUWSGI_PCRE' >/dev/null ) || ( echo "Error: ${UWSGI_PATH} needs to be built with PCRE support (libpcre)" && exit 1 ) + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-php71/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,3 @@ +PHP7.1 language plugin (interpreter) for uwsginl. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py2/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-lang-py2 + +COMMENT= Language plugin for Python 2 (OS default) + +USES= python:2.7 gettext-runtime + +PLUGIN_NAME= python2 +PLUGIN_SOURCE= plugins/python + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py2/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python2 language plugin for uwsginl. +Links to the default Python2 version on the system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py27/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-lang-py27 + +COMMENT= Language plugin for Python 2.7 + +USES= python:2.7 gettext-runtime + +PLUGIN_NAME= python27 +PLUGIN_SOURCE= plugins/python + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py27/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python2.7 language plugin for uwsginl. +Links to python2.7. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py3/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,62 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME?= ${UWSGI_NAME}-plugin-lang-py3 +DISTVERSION= 2.0.18 +PORTREVISION?= 0 +CATEGORIES?= www python +MASTER_SITES= https://projects.unbit.it/downloads/ +DISTNAME= uwsgi-${DISTVERSION} + +MAINTAINER?= freebsd-dev@dom66.de +COMMENT?= Language plugin for Python 3 (OS default) + +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 + +BUILD_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl +RUN_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl + +# This specific python version is built +USES?= python:3.5+ gettext-runtime +# Some python version is needed when building +USES+= python:build pkgconfig + +PLIST_FILES= ${PLUGIN_DIR}/${PLUGIN_FILENAME} + +MAKE_ENV+= UWSGI_PROFILE_OVERRIDE="plugin_build_dir=${STAGEDIR}${PREFIX}/${PLUGIN_DIR};plugin_dir=${PREFIX}/${PLUGIN_DIR}" PYTHON=${PYTHON_CMD} + +# by default it uses the MASTERDIR's description +DESCR?= ${.CURDIR}/pkg-descr + +UWSGI_NAME= uwsginl +UWSGI_PATH= ${LOCALBASE}/bin/${UWSGI_NAME} +PLUGIN_DIR= lib/${UWSGI_NAME}/plugins + +# The name of the plugin to be created (to eventually distingush py2 and py3) +PLUGIN_NAME?= python3 +# Where to find the sources for the plugin (defaults to plugins/${PLUGIN_NAME}) +.if defined(MASTERDIR) +.if !defined(PLUGIN_SOURCE) || empty(PLUGIN_SOURCE) +PLUGIN_SOURCE= plugins/${PLUGIN_NAME} +.endif +.else +PLUGIN_SOURCE= plugins/python +.endif +# The complete basename of the plugin +PLUGIN_FILENAME= ${PLUGIN_NAME}_plugin.so + +do-configure: + @${DO_NADA} + +do-build: + @${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR} + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${UWSGI_PATH} --build-plugin "${PLUGIN_SOURCE} ${PLUGIN_NAME}") + +do-install: + ${INSTALL_LIB} ${BUILD_WRKSRC}/${PLUGIN_FILENAME} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR} + +.include <bsd.port.mk>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py3/distinfo Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,3 @@ +TIMESTAMP = 1552136313 +SHA256 (uwsgi-2.0.18.tar.gz) = 4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583 +SIZE (uwsgi-2.0.18.tar.gz) = 801555
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py3/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3 language plugin for uwsginl. +Links to the default Python3 version on the system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py34/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-lang-py34 + +COMMENT= Language plugin for Python 3.4 + +USES= python:3.4 gettext-runtime + +PLUGIN_NAME= python34 +PLUGIN_SOURCE= plugins/python + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py34/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3.4 language plugin for uwsginl. +Links to python3.4. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py36/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-lang-py36 + +COMMENT= Language plugin for Python 3.6 + +USES= python:3.6 gettext-runtime + +PLUGIN_NAME= python36 +PLUGIN_SOURCE= plugins/python + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-lang-py36/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3.6 language plugin for uwsginl. +Links to python3.6. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-pam/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,15 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-pam + +COMMENT= PAM plugin for uwsginl + +USES= + +PLUGIN_NAME= pam +PLUGIN_SOURCE= plugins/pam + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-pam/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +PAM plugin for uwsginl. +Allows uwsginl to use FreeBSD's libpam in the base system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-tornado3/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,16 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3 tornado plugin for ${UWSGI_NAME} + +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=5.0:devel/py-tornado@${PY_FLAVOR} +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=5.0:devel/py-tornado@${PY_FLAVOR} + +PLUGIN_NAME= tornado3 +PLUGIN_SOURCE= plugins/tornado + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-tornado3/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3 tornado plugin for uwsginl. +Links to the default Python3 version on the system. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-tornado36/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,18 @@ +# Created by: Franz Glasner <freebsd-dev-@dom66.de> +# $FreeBSD$ + +PORTNAME= ${UWSGI_NAME}-plugin-${PLUGIN_NAME} + +COMMENT= Python3.6 tornado plugin for ${UWSGI_NAME} + +USES= python:3.6 gettext-runtime + +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=5.0:devel/py-tornado@${PY_FLAVOR} +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=5.0:devel/py-tornado@${PY_FLAVOR} + +PLUGIN_NAME= tornado36 +PLUGIN_SOURCE= plugins/tornado + +MASTERDIR= ${.CURDIR}/../uwsginl-plugin-lang-py3 + +.include "${MASTERDIR}/Makefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl-plugin-tornado36/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,4 @@ +Python3.6 tornado plugin for uwsginl. +Links to Python 3.6. + +WWW: https://projects.unbit.it/uwsgi/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/Makefile Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,86 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ +# Based on www/uwsgi by: Daniel Gerzo <danger@FreeBSD.org> + +PORTNAME= uwsginl +DISTVERSION= 2.0.18 +CATEGORIES= www +MASTER_SITES= https://projects.unbit.it/downloads/ +DISTNAME= uwsgi-${DISTVERSION} + +MAINTAINER= freebsd-dev@dom66.de +COMMENT= WSGI server which uses the uwsgi protocol (nolang profile) + +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 + +USES= pkgconfig python:build +USE_RC_SUBR= uwsginl + +MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_PROFILE=nolang.ini UWSGI_BIN_NAME=${PORTNAME} UWSGI_EMBED_PLUGINS=cgi,clock_realtime,clock_monotonic,echo,logpipe,pty,forkptyrouter UWSGI_PROFILE_OVERRIDE="plugin_dir=${PREFIX}/${PLUGIN_DIR};${EXTRA_PROFILE_OVERRIDE:S/ /;/gW}" + +USERS= uwsgi +GROUPS= uwsgi + +PLIST_SUB= PORTNAME=${PORTNAME} PLUGIN_DIR=${PLUGIN_DIR} + +OPTIONS_DEFINE= DEBUGSYM UWSGIDEBUG JSON PCRE XML SSL +OPTIONS_DEFAULT= SSL BUILTINYAML + +OPTIONS_RADIO= YAML +OPTIONS_RADIO_YAML= BUILTINYAML LIBYAML + +DEBUGSYM_DESC= Build with debug symbols +DEBUGSYM_VARS= EXTRA_BUILDARGS+=--debug + +UWSGIDEBUG_DESC= Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG) +UWSGIDEBUG_VARS= BUILDCONF_DEBUG=true + +JSON_DESC= JSON file/format/parser support (with libjansson) +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 + +SSL_VARS= BUILDCONF_SSL=true +SSL_USES= ssl +SSL_CFLAGS= -I${OPENSSLINC} +SSL_LDFLAGS= ${OPENSSL_LDFLAGS} + +YAML_DESC= Select YAML support (or none) + +BUILTINYAML_DESC= Enable built-in basic YAML support +BUILTINYAML_VARS= BUILDCONF_YAML=true + +LIBYAML_DESC= Use external libyaml for proper YAML support +LIBYAML_VARS= BUILDCONF_YAML=libyaml +LIBYAML_CFLAGS= -I${LOCALBASE}/include +LIBYAML_LDFLAGS= -L${LOCALBASE}/lib +LIBYAML_LIB_DEPENDS= libyaml.so:textproc/libyaml + +.include <bsd.port.options.mk> + +PLUGIN_DIR= lib/${PORTNAME}/plugins + +.for bcvar in DEBUG YAML JSON PCRE XML SSL +EXTRA_PROFILE_OVERRIDE+= ${bcvar:tl}=${BUILDCONF_${bcvar}:Ufalse} +.endfor + +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}${PREFIX}/${PLUGIN_DIR} + +.include <bsd.port.mk>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/distinfo Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,3 @@ +TIMESTAMP = 1552136313 +SHA256 (uwsgi-2.0.18.tar.gz) = 4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583 +SIZE (uwsgi-2.0.18.tar.gz) = 801555
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/uwsginl.in Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,166 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: uwsginl +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable uwsgi: +# +# uwsginl_enable (bool): Set it to "YES" to enable uwsgi +# Default is "NO". +# uwsginl_emperor (bool): Set it to "YES" to run uwsgi in emperor mode +# Default is "NO". +# uwsginl_configfile (path): Set the path to the config file +# Default is %%PREFIX%%/etc/uwsginl/uwsginl.ini. +# uwsginl_vassals_dir (path): Set the path to the vassals directory +# Default is %%PREFIX%%/etc/uwsginl/vassals. +# uwsginl_logfile (path): Set the path to the uwsgi log file +# Default is /var/log/uwsginl.log. +# uwsginl_pidfile (path): Set the path to the uwsgi pid file +# Default is /var/run/uwsginl.pid. +# uwsginl_uid (int): Set the UID of the process to run with +# Default is uwsgi. +# uwsginl_gid (int): Set the GID of the process to run with +# Default is uwsgi. +# uwsginl_flags (str): Set the uwsgi command line arguments +# Default is "--disable-logging". +# +# If you would like to have multiple uWSGI instances running, you can +# define multiple profiles: +# +# uwsginl_profiles (str): Set the list of uwsgi profiles +# Default is "". +# +# For each profile you can then define different options (except for +# uwsginl_enable) using the syntax uwsginl_<profile>_<option> + +. /etc/rc.subr + +name="uwsginl" +rcvar=uwsginl_enable + +load_rc_config $name + +command=%%PREFIX%%/bin/uwsginl + +: ${uwsginl_enable:="NO"} +: ${uwsginl_profiles=""} +: ${uwsginl_configfile="%%PREFIX%%/etc/uwsginl/uwsginl.ini"} +: ${uwsginl_logfile="/var/log/${name}.log"} +: ${uwsginl_pidfile="/var/run/${name}.pid"} +: ${uwsginl_uid:="uwsgi"} +: ${uwsginl_gid:="uwsgi"} +: ${uwsginl_flags="--disable-logging"} +: ${uwsginl_emperor:="NO"} +: ${uwsginl_vassals_dir:="%%PREFIX%%/etc/uwsginl/vassals"} + +is_uwsginl_profile() { + local profile + + for profile in $uwsginl_profiles; do + if [ "$profile" = "$1" ]; then + return 0 + fi + done + return 1 +} + +# Echo name of uWSGI option for handling of configuration file with given +# extension. +get_config_filetype() +{ + case "$1" in + *.ini) + echo ini + ;; + *.json|*.js) + echo json + ;; + *.xml) + echo xml + ;; + *.yaml|*.yml) + echo yaml + ;; + *) + warn "Unknown configuration file type for \`$1'" + echo ini + return 1 + ;; + esac +} + +if [ -n "${uwsginl_profiles}" ]; then + if [ -n "$2" ]; then + profile="$2" + if ! is_uwsginl_profile $profile; then + echo "$0: no such profile defined in uwsginl_profiles." + exit 1 + fi + eval uwsginl_configfile=\${uwsginl_${profile}_configfile:-"%%PREFIX%%/etc/uwsginl/uwsginl-${profile}.ini"} + eval uwsginl_logfile=\${uwsginl_${profile}_logfile:-"/var/log/${name}-${profile}.log"} + eval uwsginl_pidfile=\${uwsginl_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"} + eval uwsginl_uid=\${uwsginl_${profile}_uid:-"${uwsginl_uid}"} + eval uwsginl_gid=\${uwsginl_${profile}_gid:-"${uwsginl_gid}"} + eval uwsginl_flags=\${uwsginl_${profile}_flags-"${uwsginl_flags}"} + eval uwsginl_emperor=\${uwsginl_${profile}_emperor:-"${uwsginl_emperor}"} + eval uwsginl_vassals_dir=\${uwsginl_${profile}_vassals_dir:-"%%PREFIX%%/etc/uwsginl/vassals-${profile}/"} + elif [ -n "$1" ]; then + for profile in ${uwsginl_profiles}; do + echo "Processing ${name} profile: ${profile}" + %%PREFIX%%/etc/rc.d/uwsginl $1 ${profile} + done + exit 0 + fi +fi + +pidfile=${uwsginl_pidfile} +start_precmd=start_precmd +stop_postcmd=stop_postcmd +reload_precmd=reload_precmd +brutalreload_cmd=brutalreload_cmd +sig_stop="INT" +extra_commands="reload brutalreload" +procname=${uwsginl_procname} + +start_precmd() +{ + if checkyesno uwsginl_emperor; then + echo "Running uWSGI as Emperor. Vassals loaded from "$uwsginl_vassals_dir + required_dirs=${uwsginl_vassals_dir} + rc_flags="--emperor-pidfile ${uwsginl_pidfile} --daemonize ${uwsginl_logfile} --emperor ${uwsginl_vassals_dir}" + rc_flags=${rc_flags}" --vassals-set uid=${uwsginl_uid} --vassals-set gid=${uwsginl_gid}" + else + rc_flags="--master --uid ${uwsginl_uid} --gid ${uwsginl_gid} --pidfile ${uwsginl_pidfile} --daemonize ${uwsginl_logfile}" + fi + + rc_flags=${rc_flags}" ${uwsginl_flags}" + + # put the configfile last so that all given options can be overwritten + if [ -e ${uwsginl_configfile} ]; then + rc_flags=${rc_flags}" --$(get_config_filetype "${uwsginl_configfile}") ${uwsginl_configfile}" + fi +} + +stop_postcmd() +{ + rm -f ${uwsginl_pidfile} +} + +reload_precmd() +{ + echo "Gracefully reloading ${name} without closing the main sockets." +} + +brutalreload_cmd() +{ + echo "Reloading ${name} without closing the main sockets." + + reload_precmd="" + sig_reload="TERM" + run_rc_command ${rc_prefix}reload $rc_extra_args || return 1 +} + +run_rc_command "$1"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/pkg-descr Thu Jun 11 22:43:41 2020 +0200 @@ -0,0 +1,99 @@ +uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server, +aimed for professional python webapps deployment and development. Over +time it has evolved in a complete stack for networked/clustered python +applications, implementing message/object passing, RPC and process +management. + +*** uWSGI loaded generic plugins *** +nagios +rrdtool +carbon +corerouter +fastrouter +http +ugreen +syslog +rsyslog +logsocket +router_uwsgi +router_redirect +router_basicauth +zergpool +redislog +mongodblog +router_rewrite +router_http +logfile +router_cache +rawrouter +router_static +sslrouter +cheaper_busyness +transformation_tofile +transformation_gzip +transformation_chunked +transformation_offload +router_memcached +router_redis +router_hash +router_expires +router_metrics +transformation_template +stats_pusher_socket +clock_realtime +clock_monotonic +logpipe +pty +forkptyrouter + +*** uWSGI loaded request plugins *** +9: cgi +17: spooler +18: symcall +100: ping +101: echo +110: signal +111: cache +173: rpc +--- end of plugins list --- + +*** uWSGI loaded clocks *** +unix +realtime +monotonic +--- end of clocks list --- + +*** uWSGI loaded loggers *** +syslog +rsyslog +socket +redislog +mongodblog +file +fd +stdio +pipe +--- end of loggers list --- + +*** uWSGI loaded alarms *** +signal +cmd +mule +log +--- end of alarms list --- + +*** uWSGI loaded cheaper algorithms *** +busyness +spare +backlog +manual +--- end of cheaper algorithms list --- + +*** uWSGI loaded loop engines *** +simple +async +--- end of loop engines list --- + +!!! no internal routing support, rebuild with pcre support !!! + +WWW: https://projects.unbit.it/uwsgi/
