From 9aa80713372911cec499b3adb2cd746790920916 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 29 Jun 2021 10:15:54 +0100 Subject: gentoo resync : 29.06.2021 --- www-servers/uwsgi/Manifest | 4 +- www-servers/uwsgi/uwsgi-2.0.19.1-r100.ebuild | 376 -------------------------- www-servers/uwsgi/uwsgi-2.0.19.1-r101.ebuild | 376 -------------------------- www-servers/uwsgi/uwsgi-2.0.19.1-r102.ebuild | 377 +++++++++++++++++++++++++++ www-servers/uwsgi/uwsgi-2.0.19.1-r103.ebuild | 377 +++++++++++++++++++++++++++ 5 files changed, 756 insertions(+), 754 deletions(-) delete mode 100644 www-servers/uwsgi/uwsgi-2.0.19.1-r100.ebuild delete mode 100644 www-servers/uwsgi/uwsgi-2.0.19.1-r101.ebuild create mode 100644 www-servers/uwsgi/uwsgi-2.0.19.1-r102.ebuild create mode 100644 www-servers/uwsgi/uwsgi-2.0.19.1-r103.ebuild (limited to 'www-servers/uwsgi') diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index 5f6ac432d264..7e25c95a7f2c 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -2,6 +2,6 @@ AUX gentoo.buildconf 490 BLAKE2B 320b0471c0c76ab6c8ada7b034f612fc20398eb60e1edc3 AUX uwsgi.confd-r4 1849 BLAKE2B 80afdf7a5ebc520d887061aba9f7cd64b1bca06d3da478d8d1090a8b9cba973ac2d3dbcbc2ceb980415e98317bc55b07a9a7e6641fac593dc4dd5466bd8d67c9 SHA512 041d1bd694fad6f7c5e28944aab6d7ba53b3c7fc990ce6b7c2d97b9f3d6650c46dda8069e545c252a7400e1d825c8e46d7393a289757b1bd665e64241ca3789a AUX uwsgi.initd-r7 3746 BLAKE2B a56c5f4e32ccb415fab10f357e2a7404179285e656d9f886809da281b214e2110c76e2cf8826d8fd90aba01262a5edc7a941522ff59348972c5a4325c784b9b9 SHA512 81ed974fb2957e05c890cab29f5b5a75845e6b7de899d2695fb2fa5f49b4545daa437c81c8dc5c735b24a45655cf6320c9256bc8faa7e32ffd7a2d981922def5 DIST uwsgi-2.0.19.1.tar.gz 804398 BLAKE2B 73fc19990866eb1058a742b34a817b3bd87e00c838da055bece2bff5e13c161f53c642866ed591aa4afeb23ef924205502f2cb0a4cf9d303b5b63fb9a53f57e2 SHA512 34b55f7c7a77dc0b0dab34d1a9ca9a4cba8a9261969656c88435e7f32fe8a0c5654e1562706775f77e2f60c4ad0f5c6055257a23ab7d387c1579639e054807b5 -EBUILD uwsgi-2.0.19.1-r100.ebuild 11507 BLAKE2B 20cbadf8cf896cab2f925fe2623d6bd95e7d28b2fdacc48f3aa8313b53dd0a40edfc533bc0d611c5338ffcf06c60cb7d8f6eafe37a8d5e4abf0e499c95d947c9 SHA512 9be90e49244c22086acd8e9a205efb2a4d5f51b0e22f57b27194dac8f7f039a69473fa7371454076fddbc51da576288378dd5c5454297a8fe4e23b27f84a1a93 -EBUILD uwsgi-2.0.19.1-r101.ebuild 11512 BLAKE2B e7ec6f725dce1d704c981143b661f0efba8c8e6d6e8502f3a432ce3ea8b5ad93f50c69e49c49dfadaf7aa979b517bb6dd493123db2dc27b7703e9915259bb581 SHA512 c14f201d81e5e47b22e0f7fc36203fffe5f8c8d79ef6d37beb1d9b7274ebcf911d7de980d305fa079c1a5dd7d04edee2035e3ad772be1b2aec7bcf21ddb9fa09 +EBUILD uwsgi-2.0.19.1-r102.ebuild 11527 BLAKE2B 9fc8b239c913b4bb7cdbf389549d5a70c8ec1433b188787fb5d0260d6766f1afee6bead57da94ea1b40b3db8bba93622cb0d34deab2cc283babf940344ec6355 SHA512 8b76bda9d5db446f7376201a0f6d639bb3e3534701b9d45ba91c0a22f76cc290dd2b9ffd1dd9d57905f0d5ce59a9c8c1a6cbd3034e292c5f45d91ff5d38e4875 +EBUILD uwsgi-2.0.19.1-r103.ebuild 11532 BLAKE2B 004ad73787d234871451c483a14130caa86207c4b0c344b794df3dfc42e7340f18eb00e5cd8e250ac77b3c93c7d5820a059ae58e110e0204ef811bda32ecbdf9 SHA512 ce089a6e7f5bfe62fc170e7c4031f6fc7fcdb2892e069f963a422caf791b468c5f899fc6cd22e85cec6a1c65162a0273a3166ad6efb47e536f46866786d0fecf MISC metadata.xml 1411 BLAKE2B 89114f75b2150f4340e30cd106115f0e9aa1a00389558f6f75aa86c0bf5a11d5df5ecb794c12f7bb39791d8edef40415cbca4403f8f2b65bd642ce52e95357a3 SHA512 33d3767a25dfca633e5149a20900d56998c40204a4c55e3814248574d0c8525883a842222ed5f8ac739a06cd09d806c189ff6f742d1277bcd3f8e8afdea84445 diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r100.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r100.ebuild deleted file mode 100644 index 43900ea36303..000000000000 --- a/www-servers/uwsgi/uwsgi-2.0.19.1-r100.ebuild +++ /dev/null @@ -1,376 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LUA_COMPAT=( lua5-1 ) -PYTHON_COMPAT=( python3_{7,8} ) -PYTHON_REQ_USE="threads(+)" - -RUBY_OPTIONAL="yes" -USE_RUBY="ruby23 ruby24 ruby25 ruby26" - -PHP_EXT_INI="no" -PHP_EXT_NAME="dummy" -PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php7-3 php7-4" # deps must be registered separately below - -MY_P="${P/_/-}" - -inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng - -DESCRIPTION="uWSGI server for Python web applications" -HOMEPAGE="https://projects.unbit.it/uwsgi/" -SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm x86 ~amd64-linux" - -UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool - http ugreen signal syslog rsyslog - router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} - {core,fast,raw,ssl}router - redislog mongodblog log{file,socket} - spooler cheaper_busyness symcall - transformation_{chunked,gzip,offload,tofile} - zergpool ) -UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron - dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter - geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam - rados router_{access,radius,spnego,xmldir} - sqlite ssi stats_pusher_statsd - systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) - -LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby ) - -# plugins to be ignored (for now): -# cheaper_backlog2: example plugin -# coroae: TODO -# cplusplus: partially example code, needs explicit class -# dummy: no idea -# example: example plugin -# exception_log: example plugin -# *java*: TODO -# v8: TODO -# matheval: TODO -IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq" - -for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done -for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done -IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" - -REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) - uwsgi_plugins_logcrypto? ( ssl ) - uwsgi_plugins_sslrouter? ( ssl ) - routing? ( pcre ) - uwsgi_plugins_emperor_zeromq? ( zeromq ) - uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) - uwsgi_plugins_router_xmldir? ( xml !expat ) - lua? ( ${LUA_REQUIRED_USE} ) - python? ( ${PYTHON_REQUIRED_USE} ) - python-asyncio? ( || ( $(python_gen_useflags -3) ) ) - python-gevent? ( python ) - expat? ( xml )" - -# util-linux is required for libuuid when requesting zeromq support -# Order: -# 1. Unconditional -# 2. General features -# 3. Plugins -# 4. Language/app support -CDEPEND=" - sys-libs/zlib - caps? ( sys-libs/libcap ) - json? ( - !yajl? ( dev-libs/jansson ) - yajl? ( dev-libs/yajl ) - ) - pcre? ( dev-libs/libpcre:3 ) - ssl? ( dev-libs/openssl:0= ) - xml? ( - !expat? ( dev-libs/libxml2 ) - expat? ( dev-libs/expat ) - ) - yaml? ( dev-libs/libyaml ) - zeromq? ( net-libs/zeromq sys-apps/util-linux ) - uwsgi_plugins_alarm_curl? ( net-misc/curl ) - uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) - uwsgi_plugins_curl_cron? ( net-misc/curl ) - uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) - uwsgi_plugins_geoip? ( dev-libs/geoip ) - uwsgi_plugins_ldap? ( net-nds/openldap ) - uwsgi_plugins_pam? ( sys-libs/pam ) - uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) - uwsgi_plugins_rados? ( sys-cluster/ceph ) - uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) - uwsgi_plugins_router_spnego? ( virtual/krb5 ) - uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) - uwsgi_plugins_webdav? ( dev-libs/libxml2 ) - uwsgi_plugins_xslt? ( dev-libs/libxslt ) - go? ( sys-devel/gcc:=[go] ) - lua? ( ${LUA_DEPS} ) - mono? ( dev-lang/mono:= ) - perl? ( dev-lang/perl:= ) - php? ( - net-libs/libnsl - php_targets_php7-3? ( dev-lang/php:7.3[embed] ) - php_targets_php7-4? ( dev-lang/php:7.4[embed] ) - ) - python? ( ${PYTHON_DEPS} ) - python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) - python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) - ruby? ( $(ruby_implementations_depend) )" -DEPEND="${CDEPEND}" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-uwsgi ) - uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" -BDEPEND="virtual/pkgconfig" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - echo ${PYTHON_USEDEP} - default -} - -pkg_setup() { - python_setup - use lua && lua-single_pkg_setup - use ruby && ruby-ng_pkg_setup -} - -src_prepare() { - default - - sed -i \ - -e "s|'-O2', ||" \ - -e "s|'-Werror', ||" \ - -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ - uwsgiconfig.py || die "sed failed" - - sed -i \ - -e "s|/lib|/$(get_libdir)|" \ - plugins/php/uwsgiplugin.py || die "sed failed" -} - -src_configure() { - local embedded_plugins=() - local plugins=() - local malloc_impl="libc" - local json="false" - local xml="false" - - for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do - use uwsgi_plugins_${p} && embedded_plugins+=("${p}") - done - for p in ${LANG_SUPPORT_SIMPLE[@]} ; do - use ${p} && plugins+=("${p}") - done - - # do not embed any plugins - if ! use embedded; then - plugins=( ${plugins[@]} ${embedded_plugins[@]} ) - embedded_plugins=() - fi - - # flatten the arrays - plugins=${plugins[@]} - embedded_plugins=${embedded_plugins[@]} - - # rename some of the use flags, language plugins are always real plugins - plugins="${plugins/perl/psgi}" - plugins="${plugins/sqlite/sqlite3}" - embedded_plugins="${embedded_plugins/sqlite/sqlite3}" - - # override defaults as requested by the user - if use xml; then - use expat && xml="expat" || xml="libxml2" - fi - if use json; then - use yajl && json="yajl" || json="jansson" - fi - use jemalloc && malloc_impl="jemalloc" - - # prepare the buildconf for gentoo - cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die - sed -i \ - -e "s|VAR_XML|${xml}|" \ - -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ - -e "s|VAR_JSON|${json}|" \ - -e "s|VAR_SSL|$(usex ssl true false)|" \ - -e "s|VAR_PCRE|$(usex pcre true false)|" \ - -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ - -e "s|VAR_ROUTING|$(usex routing true false)|" \ - -e "s|VAR_DEBUG|$(usex debug true false)|" \ - -e "s|VAR_MALLOC|${malloc_impl}|" \ - -e "s|VAR_PLUGINS|${plugins// /, }|" \ - -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ - -e "s|VAR_BUILD_DIR|${T}/plugins|" \ - -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ - buildconf/gentoo.ini || die "sed failed" - - if ! use caps; then - sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if ! use zeromq; then - sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if use uwsgi_plugins_emperor_pg ; then - PGPV="$(best_version dev-db/postgresql)" - PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})" - sed -i \ - -e "s|pg_config|pg_config${PGSLOT/.}|" \ - plugins/emperor_pg/uwsgiplugin.py || die "sed failed" - fi -} - -each_ruby_compile() { - cd "${WORKDIR}/${MY_P}" || die "sed failed" - - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" -} - -python_compile_plugins() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" - - if use python-asyncio ; then - if [[ "${PYV}" != "27" ]] ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" - fi - fi - - if use python-gevent ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" - fi - - if use python-gevent || use python-asyncio; then - ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" - fi -} - -python_install_symlinks() { - dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} -} - -src_compile() { - mkdir -p "${T}/plugins" || die - - CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed" - - if use go ; then - python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" - fi - - if use lua ; then - # setting the name for the pkg-config file to lua, since that is the name - # provided by the wrapper from Lua eclasses - UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" - fi - - if use php ; then - for s in $(php_get_slots); do - UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" - done - fi - - if use python ; then - python_foreach_impl python_compile_plugins - fi - - if use ruby ; then - ruby-ng_src_compile - fi -} - -src_install() { - dobin uwsgi - pax-mark m "${D}"/usr/bin/uwsgi - - insinto /usr/$(get_libdir)/uwsgi - doins "${T}/plugins"/*.so - - use cgi && dosym uwsgi /usr/bin/uwsgi_cgi - use go && dosym uwsgi /usr/bin/uwsgi_go - use lua && dosym uwsgi /usr/bin/uwsgi_lua - use mono && dosym uwsgi /usr/bin/uwsgi_mono - use perl && dosym uwsgi /usr/bin/uwsgi_psgi - - if use php ; then - for s in $(php_get_slots); do - dosym uwsgi /usr/bin/uwsgi_${s/.} - done - fi - - if use python ; then - python_foreach_impl python_install_symlinks - python_foreach_impl python_domodule uwsgidecorators.py - fi - - newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi - newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi - keepdir /etc/"${PN}".d - use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" -} - -pkg_postinst() { - if use apache2 ; then - ewarn "As reported on bug #650776 [1], Apache module mod_proxy_uwsgi" - ewarn "is being transferred to upstream Apache since 2.4.30, see [2]." - ewarn "We therefore do not build them any more." - ewarn " [1] https://bugs.gentoo.org/650776" - ewarn " [2] https://github.com/unbit/uwsgi/issues/1636" - fi - - elog "Append the following options to the uwsgi call to load the respective language plugin:" - use cgi && elog " '--plugins cgi' for cgi" - use lua && elog " '--plugins lua' for lua" - use mono && elog " '--plugins mono' for mono" - use perl && elog " '--plugins psgi' for perl" - - if use php ; then - for s in $(php_get_slots); do - elog " '--plugins ${s/.}' for ${s}" - done - fi - - python_pkg_postinst() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - elog " " - elog " '--plugins ${EPYV}' for ${EPYTHON}" - if use python-asyncio ; then - if [[ ${EPYV} == python34 ]] ; then - elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" - else - elog " (asyncio is only supported in python3.4)" - fi - fi - if use python-gevent ; then - elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" - fi - } - - use python && python_foreach_impl python_pkg_postinst - - if use ruby ; then - for ruby in $(ruby_get_use_implementations) ; do - elog " '--plugins rack_${ruby/.}' for ${ruby}" - elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" - elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" - done - fi -} diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r101.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r101.ebuild deleted file mode 100644 index dd1318cdc24e..000000000000 --- a/www-servers/uwsgi/uwsgi-2.0.19.1-r101.ebuild +++ /dev/null @@ -1,376 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LUA_COMPAT=( lua5-1 ) -PYTHON_COMPAT=( python3_{7,8,9} ) -PYTHON_REQ_USE="threads(+)" - -RUBY_OPTIONAL="yes" -USE_RUBY="ruby23 ruby24 ruby25 ruby26" - -PHP_EXT_INI="no" -PHP_EXT_NAME="dummy" -PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php7-3 php7-4" # deps must be registered separately below - -MY_P="${P/_/-}" - -inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng - -DESCRIPTION="uWSGI server for Python web applications" -HOMEPAGE="https://projects.unbit.it/uwsgi/" -SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux" - -UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool - http ugreen signal syslog rsyslog - router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} - {core,fast,raw,ssl}router - redislog mongodblog log{file,socket} - spooler cheaper_busyness symcall - transformation_{chunked,gzip,offload,tofile} - zergpool ) -UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron - dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter - geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam - rados router_{access,radius,spnego,xmldir} - sqlite ssi stats_pusher_statsd - systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) - -LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby ) - -# plugins to be ignored (for now): -# cheaper_backlog2: example plugin -# coroae: TODO -# cplusplus: partially example code, needs explicit class -# dummy: no idea -# example: example plugin -# exception_log: example plugin -# *java*: TODO -# v8: TODO -# matheval: TODO -IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq" - -for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done -for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done -IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" - -REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) - uwsgi_plugins_logcrypto? ( ssl ) - uwsgi_plugins_sslrouter? ( ssl ) - routing? ( pcre ) - uwsgi_plugins_emperor_zeromq? ( zeromq ) - uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) - uwsgi_plugins_router_xmldir? ( xml !expat ) - lua? ( ${LUA_REQUIRED_USE} ) - python? ( ${PYTHON_REQUIRED_USE} ) - python-asyncio? ( || ( $(python_gen_useflags -3) ) ) - python-gevent? ( python ) - expat? ( xml )" - -# util-linux is required for libuuid when requesting zeromq support -# Order: -# 1. Unconditional -# 2. General features -# 3. Plugins -# 4. Language/app support -CDEPEND=" - sys-libs/zlib - caps? ( sys-libs/libcap ) - json? ( - !yajl? ( dev-libs/jansson ) - yajl? ( dev-libs/yajl ) - ) - pcre? ( dev-libs/libpcre:3 ) - ssl? ( dev-libs/openssl:0= ) - xml? ( - !expat? ( dev-libs/libxml2 ) - expat? ( dev-libs/expat ) - ) - yaml? ( dev-libs/libyaml ) - zeromq? ( net-libs/zeromq sys-apps/util-linux ) - uwsgi_plugins_alarm_curl? ( net-misc/curl ) - uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) - uwsgi_plugins_curl_cron? ( net-misc/curl ) - uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) - uwsgi_plugins_geoip? ( dev-libs/geoip ) - uwsgi_plugins_ldap? ( net-nds/openldap ) - uwsgi_plugins_pam? ( sys-libs/pam ) - uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) - uwsgi_plugins_rados? ( sys-cluster/ceph ) - uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) - uwsgi_plugins_router_spnego? ( virtual/krb5 ) - uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) - uwsgi_plugins_webdav? ( dev-libs/libxml2 ) - uwsgi_plugins_xslt? ( dev-libs/libxslt ) - go? ( sys-devel/gcc:=[go] ) - lua? ( ${LUA_DEPS} ) - mono? ( dev-lang/mono:= ) - perl? ( dev-lang/perl:= ) - php? ( - net-libs/libnsl - php_targets_php7-3? ( dev-lang/php:7.3[embed] ) - php_targets_php7-4? ( dev-lang/php:7.4[embed] ) - ) - python? ( ${PYTHON_DEPS} ) - python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) - python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) - ruby? ( $(ruby_implementations_depend) )" -DEPEND="${CDEPEND}" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-uwsgi ) - uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" -BDEPEND="virtual/pkgconfig" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - echo ${PYTHON_USEDEP} - default -} - -pkg_setup() { - python_setup - use lua && lua-single_pkg_setup - use ruby && ruby-ng_pkg_setup -} - -src_prepare() { - default - - sed -i \ - -e "s|'-O2', ||" \ - -e "s|'-Werror', ||" \ - -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ - uwsgiconfig.py || die "sed failed" - - sed -i \ - -e "s|/lib|/$(get_libdir)|" \ - plugins/php/uwsgiplugin.py || die "sed failed" -} - -src_configure() { - local embedded_plugins=() - local plugins=() - local malloc_impl="libc" - local json="false" - local xml="false" - - for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do - use uwsgi_plugins_${p} && embedded_plugins+=("${p}") - done - for p in ${LANG_SUPPORT_SIMPLE[@]} ; do - use ${p} && plugins+=("${p}") - done - - # do not embed any plugins - if ! use embedded; then - plugins=( ${plugins[@]} ${embedded_plugins[@]} ) - embedded_plugins=() - fi - - # flatten the arrays - plugins=${plugins[@]} - embedded_plugins=${embedded_plugins[@]} - - # rename some of the use flags, language plugins are always real plugins - plugins="${plugins/perl/psgi}" - plugins="${plugins/sqlite/sqlite3}" - embedded_plugins="${embedded_plugins/sqlite/sqlite3}" - - # override defaults as requested by the user - if use xml; then - use expat && xml="expat" || xml="libxml2" - fi - if use json; then - use yajl && json="yajl" || json="jansson" - fi - use jemalloc && malloc_impl="jemalloc" - - # prepare the buildconf for gentoo - cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die - sed -i \ - -e "s|VAR_XML|${xml}|" \ - -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ - -e "s|VAR_JSON|${json}|" \ - -e "s|VAR_SSL|$(usex ssl true false)|" \ - -e "s|VAR_PCRE|$(usex pcre true false)|" \ - -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ - -e "s|VAR_ROUTING|$(usex routing true false)|" \ - -e "s|VAR_DEBUG|$(usex debug true false)|" \ - -e "s|VAR_MALLOC|${malloc_impl}|" \ - -e "s|VAR_PLUGINS|${plugins// /, }|" \ - -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ - -e "s|VAR_BUILD_DIR|${T}/plugins|" \ - -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ - buildconf/gentoo.ini || die "sed failed" - - if ! use caps; then - sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if ! use zeromq; then - sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if use uwsgi_plugins_emperor_pg ; then - PGPV="$(best_version dev-db/postgresql)" - PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})" - sed -i \ - -e "s|pg_config|pg_config${PGSLOT/.}|" \ - plugins/emperor_pg/uwsgiplugin.py || die "sed failed" - fi -} - -each_ruby_compile() { - cd "${WORKDIR}/${MY_P}" || die "sed failed" - - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" -} - -python_compile_plugins() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" - - if use python-asyncio ; then - if [[ "${PYV}" != "27" ]] ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" - fi - fi - - if use python-gevent ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" - fi - - if use python-gevent || use python-asyncio; then - ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" - fi -} - -python_install_symlinks() { - dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} -} - -src_compile() { - mkdir -p "${T}/plugins" || die - - CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed" - - if use go ; then - python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" - fi - - if use lua ; then - # setting the name for the pkg-config file to lua, since that is the name - # provided by the wrapper from Lua eclasses - UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" - fi - - if use php ; then - for s in $(php_get_slots); do - UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" - done - fi - - if use python ; then - python_foreach_impl python_compile_plugins - fi - - if use ruby ; then - ruby-ng_src_compile - fi -} - -src_install() { - dobin uwsgi - pax-mark m "${D}"/usr/bin/uwsgi - - insinto /usr/$(get_libdir)/uwsgi - doins "${T}/plugins"/*.so - - use cgi && dosym uwsgi /usr/bin/uwsgi_cgi - use go && dosym uwsgi /usr/bin/uwsgi_go - use lua && dosym uwsgi /usr/bin/uwsgi_lua - use mono && dosym uwsgi /usr/bin/uwsgi_mono - use perl && dosym uwsgi /usr/bin/uwsgi_psgi - - if use php ; then - for s in $(php_get_slots); do - dosym uwsgi /usr/bin/uwsgi_${s/.} - done - fi - - if use python ; then - python_foreach_impl python_install_symlinks - python_foreach_impl python_domodule uwsgidecorators.py - fi - - newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi - newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi - keepdir /etc/"${PN}".d - use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" -} - -pkg_postinst() { - if use apache2 ; then - ewarn "As reported on bug #650776 [1], Apache module mod_proxy_uwsgi" - ewarn "is being transferred to upstream Apache since 2.4.30, see [2]." - ewarn "We therefore do not build them any more." - ewarn " [1] https://bugs.gentoo.org/650776" - ewarn " [2] https://github.com/unbit/uwsgi/issues/1636" - fi - - elog "Append the following options to the uwsgi call to load the respective language plugin:" - use cgi && elog " '--plugins cgi' for cgi" - use lua && elog " '--plugins lua' for lua" - use mono && elog " '--plugins mono' for mono" - use perl && elog " '--plugins psgi' for perl" - - if use php ; then - for s in $(php_get_slots); do - elog " '--plugins ${s/.}' for ${s}" - done - fi - - python_pkg_postinst() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - elog " " - elog " '--plugins ${EPYV}' for ${EPYTHON}" - if use python-asyncio ; then - if [[ ${EPYV} == python34 ]] ; then - elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" - else - elog " (asyncio is only supported in python3.4)" - fi - fi - if use python-gevent ; then - elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" - fi - } - - use python && python_foreach_impl python_pkg_postinst - - if use ruby ; then - for ruby in $(ruby_get_use_implementations) ; do - elog " '--plugins rack_${ruby/.}' for ${ruby}" - elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" - elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" - done - fi -} diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r102.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r102.ebuild new file mode 100644 index 000000000000..d7889d7ebc26 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.19.1-r102.ebuild @@ -0,0 +1,377 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-1 ) +PYTHON_COMPAT=( python3_{7,8} ) +PYTHON_REQ_USE="threads(+)" + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby23 ruby24 ruby25 ruby26" + +PHP_EXT_INI="no" +PHP_EXT_NAME="dummy" +PHP_EXT_OPTIONAL_USE="php" +USE_PHP="php7-3 php7-4" # deps must be registered separately below + +MY_P="${P/_/-}" + +inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng + +DESCRIPTION="uWSGI server for Python web applications" +HOMEPAGE="https://projects.unbit.it/uwsgi/" +SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm x86 ~amd64-linux" + +UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool + http ugreen signal syslog rsyslog + router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} + {core,fast,raw,ssl}router + redislog mongodblog log{file,socket} + spooler cheaper_busyness symcall + transformation_{chunked,gzip,offload,tofile} + zergpool ) +UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron + dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter + geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam + rados router_{access,radius,spnego,xmldir} + sqlite ssi stats_pusher_statsd + systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) + +LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process +LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby ) + +# plugins to be ignored (for now): +# cheaper_backlog2: example plugin +# coroae: TODO +# cplusplus: partially example code, needs explicit class +# dummy: no idea +# example: example plugin +# exception_log: example plugin +# *java*: TODO +# v8: TODO +# matheval: TODO +IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq" + +for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done +for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done +IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" + +REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) + uwsgi_plugins_logcrypto? ( ssl ) + uwsgi_plugins_sslrouter? ( ssl ) + routing? ( pcre ) + uwsgi_plugins_emperor_zeromq? ( zeromq ) + uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) + uwsgi_plugins_router_xmldir? ( xml !expat ) + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + python-asyncio? ( || ( $(python_gen_useflags -3) ) ) + python-gevent? ( python ) + expat? ( xml )" + +# util-linux is required for libuuid when requesting zeromq support +# Order: +# 1. Unconditional +# 2. General features +# 3. Plugins +# 4. Language/app support +CDEPEND=" + sys-libs/zlib + virtual/libcrypt:= + caps? ( sys-libs/libcap ) + json? ( + !yajl? ( dev-libs/jansson ) + yajl? ( dev-libs/yajl ) + ) + pcre? ( dev-libs/libpcre:3 ) + ssl? ( dev-libs/openssl:0= ) + xml? ( + !expat? ( dev-libs/libxml2 ) + expat? ( dev-libs/expat ) + ) + yaml? ( dev-libs/libyaml ) + zeromq? ( net-libs/zeromq sys-apps/util-linux ) + uwsgi_plugins_alarm_curl? ( net-misc/curl ) + uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) + uwsgi_plugins_curl_cron? ( net-misc/curl ) + uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) + uwsgi_plugins_geoip? ( dev-libs/geoip ) + uwsgi_plugins_ldap? ( net-nds/openldap ) + uwsgi_plugins_pam? ( sys-libs/pam ) + uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) + uwsgi_plugins_rados? ( sys-cluster/ceph ) + uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) + uwsgi_plugins_router_spnego? ( virtual/krb5 ) + uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) + uwsgi_plugins_webdav? ( dev-libs/libxml2 ) + uwsgi_plugins_xslt? ( dev-libs/libxslt ) + go? ( sys-devel/gcc:=[go] ) + lua? ( ${LUA_DEPS} ) + mono? ( dev-lang/mono:= ) + perl? ( dev-lang/perl:= ) + php? ( + net-libs/libnsl + php_targets_php7-3? ( dev-lang/php:7.3[embed] ) + php_targets_php7-4? ( dev-lang/php:7.4[embed] ) + ) + python? ( ${PYTHON_DEPS} ) + python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) + python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) + ruby? ( $(ruby_implementations_depend) )" +DEPEND="${CDEPEND}" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-uwsgi ) + uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" +BDEPEND="virtual/pkgconfig" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + echo ${PYTHON_USEDEP} + default +} + +pkg_setup() { + python_setup + use lua && lua-single_pkg_setup + use ruby && ruby-ng_pkg_setup +} + +src_prepare() { + default + + sed -i \ + -e "s|'-O2', ||" \ + -e "s|'-Werror', ||" \ + -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ + uwsgiconfig.py || die "sed failed" + + sed -i \ + -e "s|/lib|/$(get_libdir)|" \ + plugins/php/uwsgiplugin.py || die "sed failed" +} + +src_configure() { + local embedded_plugins=() + local plugins=() + local malloc_impl="libc" + local json="false" + local xml="false" + + for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do + use uwsgi_plugins_${p} && embedded_plugins+=("${p}") + done + for p in ${LANG_SUPPORT_SIMPLE[@]} ; do + use ${p} && plugins+=("${p}") + done + + # do not embed any plugins + if ! use embedded; then + plugins=( ${plugins[@]} ${embedded_plugins[@]} ) + embedded_plugins=() + fi + + # flatten the arrays + plugins=${plugins[@]} + embedded_plugins=${embedded_plugins[@]} + + # rename some of the use flags, language plugins are always real plugins + plugins="${plugins/perl/psgi}" + plugins="${plugins/sqlite/sqlite3}" + embedded_plugins="${embedded_plugins/sqlite/sqlite3}" + + # override defaults as requested by the user + if use xml; then + use expat && xml="expat" || xml="libxml2" + fi + if use json; then + use yajl && json="yajl" || json="jansson" + fi + use jemalloc && malloc_impl="jemalloc" + + # prepare the buildconf for gentoo + cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die + sed -i \ + -e "s|VAR_XML|${xml}|" \ + -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ + -e "s|VAR_JSON|${json}|" \ + -e "s|VAR_SSL|$(usex ssl true false)|" \ + -e "s|VAR_PCRE|$(usex pcre true false)|" \ + -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ + -e "s|VAR_ROUTING|$(usex routing true false)|" \ + -e "s|VAR_DEBUG|$(usex debug true false)|" \ + -e "s|VAR_MALLOC|${malloc_impl}|" \ + -e "s|VAR_PLUGINS|${plugins// /, }|" \ + -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ + -e "s|VAR_BUILD_DIR|${T}/plugins|" \ + -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ + buildconf/gentoo.ini || die "sed failed" + + if ! use caps; then + sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if ! use zeromq; then + sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if use uwsgi_plugins_emperor_pg ; then + PGPV="$(best_version dev-db/postgresql)" + PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})" + sed -i \ + -e "s|pg_config|pg_config${PGSLOT/.}|" \ + plugins/emperor_pg/uwsgiplugin.py || die "sed failed" + fi +} + +each_ruby_compile() { + cd "${WORKDIR}/${MY_P}" || die "sed failed" + + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" +} + +python_compile_plugins() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" + + if use python-asyncio ; then + if [[ "${PYV}" != "27" ]] ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" + fi + fi + + if use python-gevent ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" + fi + + if use python-gevent || use python-asyncio; then + ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" + fi +} + +python_install_symlinks() { + dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} +} + +src_compile() { + mkdir -p "${T}/plugins" || die + + CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed" + + if use go ; then + python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" + fi + + if use lua ; then + # setting the name for the pkg-config file to lua, since that is the name + # provided by the wrapper from Lua eclasses + UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" + fi + + if use php ; then + for s in $(php_get_slots); do + UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" + done + fi + + if use python ; then + python_foreach_impl python_compile_plugins + fi + + if use ruby ; then + ruby-ng_src_compile + fi +} + +src_install() { + dobin uwsgi + pax-mark m "${D}"/usr/bin/uwsgi + + insinto /usr/$(get_libdir)/uwsgi + doins "${T}/plugins"/*.so + + use cgi && dosym uwsgi /usr/bin/uwsgi_cgi + use go && dosym uwsgi /usr/bin/uwsgi_go + use lua && dosym uwsgi /usr/bin/uwsgi_lua + use mono && dosym uwsgi /usr/bin/uwsgi_mono + use perl && dosym uwsgi /usr/bin/uwsgi_psgi + + if use php ; then + for s in $(php_get_slots); do + dosym uwsgi /usr/bin/uwsgi_${s/.} + done + fi + + if use python ; then + python_foreach_impl python_install_symlinks + python_foreach_impl python_domodule uwsgidecorators.py + fi + + newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi + newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi + keepdir /etc/"${PN}".d + use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" +} + +pkg_postinst() { + if use apache2 ; then + ewarn "As reported on bug #650776 [1], Apache module mod_proxy_uwsgi" + ewarn "is being transferred to upstream Apache since 2.4.30, see [2]." + ewarn "We therefore do not build them any more." + ewarn " [1] https://bugs.gentoo.org/650776" + ewarn " [2] https://github.com/unbit/uwsgi/issues/1636" + fi + + elog "Append the following options to the uwsgi call to load the respective language plugin:" + use cgi && elog " '--plugins cgi' for cgi" + use lua && elog " '--plugins lua' for lua" + use mono && elog " '--plugins mono' for mono" + use perl && elog " '--plugins psgi' for perl" + + if use php ; then + for s in $(php_get_slots); do + elog " '--plugins ${s/.}' for ${s}" + done + fi + + python_pkg_postinst() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + elog " " + elog " '--plugins ${EPYV}' for ${EPYTHON}" + if use python-asyncio ; then + if [[ ${EPYV} == python34 ]] ; then + elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" + else + elog " (asyncio is only supported in python3.4)" + fi + fi + if use python-gevent ; then + elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" + fi + } + + use python && python_foreach_impl python_pkg_postinst + + if use ruby ; then + for ruby in $(ruby_get_use_implementations) ; do + elog " '--plugins rack_${ruby/.}' for ${ruby}" + elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" + elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" + done + fi +} diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r103.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r103.ebuild new file mode 100644 index 000000000000..5fad70e2a7c8 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.19.1-r103.ebuild @@ -0,0 +1,377 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-1 ) +PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_REQ_USE="threads(+)" + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby23 ruby24 ruby25 ruby26" + +PHP_EXT_INI="no" +PHP_EXT_NAME="dummy" +PHP_EXT_OPTIONAL_USE="php" +USE_PHP="php7-3 php7-4" # deps must be registered separately below + +MY_P="${P/_/-}" + +inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng + +DESCRIPTION="uWSGI server for Python web applications" +HOMEPAGE="https://projects.unbit.it/uwsgi/" +SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux" + +UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool + http ugreen signal syslog rsyslog + router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} + {core,fast,raw,ssl}router + redislog mongodblog log{file,socket} + spooler cheaper_busyness symcall + transformation_{chunked,gzip,offload,tofile} + zergpool ) +UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron + dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter + geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam + rados router_{access,radius,spnego,xmldir} + sqlite ssi stats_pusher_statsd + systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) + +LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process +LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby ) + +# plugins to be ignored (for now): +# cheaper_backlog2: example plugin +# coroae: TODO +# cplusplus: partially example code, needs explicit class +# dummy: no idea +# example: example plugin +# exception_log: example plugin +# *java*: TODO +# v8: TODO +# matheval: TODO +IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq" + +for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done +for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done +IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" + +REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) + uwsgi_plugins_logcrypto? ( ssl ) + uwsgi_plugins_sslrouter? ( ssl ) + routing? ( pcre ) + uwsgi_plugins_emperor_zeromq? ( zeromq ) + uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) + uwsgi_plugins_router_xmldir? ( xml !expat ) + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + python-asyncio? ( || ( $(python_gen_useflags -3) ) ) + python-gevent? ( python ) + expat? ( xml )" + +# util-linux is required for libuuid when requesting zeromq support +# Order: +# 1. Unconditional +# 2. General features +# 3. Plugins +# 4. Language/app support +CDEPEND=" + sys-libs/zlib + virtual/libcrypt:= + caps? ( sys-libs/libcap ) + json? ( + !yajl? ( dev-libs/jansson ) + yajl? ( dev-libs/yajl ) + ) + pcre? ( dev-libs/libpcre:3 ) + ssl? ( dev-libs/openssl:0= ) + xml? ( + !expat? ( dev-libs/libxml2 ) + expat? ( dev-libs/expat ) + ) + yaml? ( dev-libs/libyaml ) + zeromq? ( net-libs/zeromq sys-apps/util-linux ) + uwsgi_plugins_alarm_curl? ( net-misc/curl ) + uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) + uwsgi_plugins_curl_cron? ( net-misc/curl ) + uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) + uwsgi_plugins_geoip? ( dev-libs/geoip ) + uwsgi_plugins_ldap? ( net-nds/openldap ) + uwsgi_plugins_pam? ( sys-libs/pam ) + uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) + uwsgi_plugins_rados? ( sys-cluster/ceph ) + uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) + uwsgi_plugins_router_spnego? ( virtual/krb5 ) + uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) + uwsgi_plugins_webdav? ( dev-libs/libxml2 ) + uwsgi_plugins_xslt? ( dev-libs/libxslt ) + go? ( sys-devel/gcc:=[go] ) + lua? ( ${LUA_DEPS} ) + mono? ( dev-lang/mono:= ) + perl? ( dev-lang/perl:= ) + php? ( + net-libs/libnsl + php_targets_php7-3? ( dev-lang/php:7.3[embed] ) + php_targets_php7-4? ( dev-lang/php:7.4[embed] ) + ) + python? ( ${PYTHON_DEPS} ) + python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) + python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) + ruby? ( $(ruby_implementations_depend) )" +DEPEND="${CDEPEND}" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-uwsgi ) + uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" +BDEPEND="virtual/pkgconfig" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + echo ${PYTHON_USEDEP} + default +} + +pkg_setup() { + python_setup + use lua && lua-single_pkg_setup + use ruby && ruby-ng_pkg_setup +} + +src_prepare() { + default + + sed -i \ + -e "s|'-O2', ||" \ + -e "s|'-Werror', ||" \ + -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ + uwsgiconfig.py || die "sed failed" + + sed -i \ + -e "s|/lib|/$(get_libdir)|" \ + plugins/php/uwsgiplugin.py || die "sed failed" +} + +src_configure() { + local embedded_plugins=() + local plugins=() + local malloc_impl="libc" + local json="false" + local xml="false" + + for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do + use uwsgi_plugins_${p} && embedded_plugins+=("${p}") + done + for p in ${LANG_SUPPORT_SIMPLE[@]} ; do + use ${p} && plugins+=("${p}") + done + + # do not embed any plugins + if ! use embedded; then + plugins=( ${plugins[@]} ${embedded_plugins[@]} ) + embedded_plugins=() + fi + + # flatten the arrays + plugins=${plugins[@]} + embedded_plugins=${embedded_plugins[@]} + + # rename some of the use flags, language plugins are always real plugins + plugins="${plugins/perl/psgi}" + plugins="${plugins/sqlite/sqlite3}" + embedded_plugins="${embedded_plugins/sqlite/sqlite3}" + + # override defaults as requested by the user + if use xml; then + use expat && xml="expat" || xml="libxml2" + fi + if use json; then + use yajl && json="yajl" || json="jansson" + fi + use jemalloc && malloc_impl="jemalloc" + + # prepare the buildconf for gentoo + cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die + sed -i \ + -e "s|VAR_XML|${xml}|" \ + -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ + -e "s|VAR_JSON|${json}|" \ + -e "s|VAR_SSL|$(usex ssl true false)|" \ + -e "s|VAR_PCRE|$(usex pcre true false)|" \ + -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ + -e "s|VAR_ROUTING|$(usex routing true false)|" \ + -e "s|VAR_DEBUG|$(usex debug true false)|" \ + -e "s|VAR_MALLOC|${malloc_impl}|" \ + -e "s|VAR_PLUGINS|${plugins// /, }|" \ + -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ + -e "s|VAR_BUILD_DIR|${T}/plugins|" \ + -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ + buildconf/gentoo.ini || die "sed failed" + + if ! use caps; then + sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if ! use zeromq; then + sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if use uwsgi_plugins_emperor_pg ; then + PGPV="$(best_version dev-db/postgresql)" + PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})" + sed -i \ + -e "s|pg_config|pg_config${PGSLOT/.}|" \ + plugins/emperor_pg/uwsgiplugin.py || die "sed failed" + fi +} + +each_ruby_compile() { + cd "${WORKDIR}/${MY_P}" || die "sed failed" + + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" +} + +python_compile_plugins() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" + + if use python-asyncio ; then + if [[ "${PYV}" != "27" ]] ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" + fi + fi + + if use python-gevent ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" + fi + + if use python-gevent || use python-asyncio; then + ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" + fi +} + +python_install_symlinks() { + dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} +} + +src_compile() { + mkdir -p "${T}/plugins" || die + + CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed" + + if use go ; then + python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" + fi + + if use lua ; then + # setting the name for the pkg-config file to lua, since that is the name + # provided by the wrapper from Lua eclasses + UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" + fi + + if use php ; then + for s in $(php_get_slots); do + UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" + done + fi + + if use python ; then + python_foreach_impl python_compile_plugins + fi + + if use ruby ; then + ruby-ng_src_compile + fi +} + +src_install() { + dobin uwsgi + pax-mark m "${D}"/usr/bin/uwsgi + + insinto /usr/$(get_libdir)/uwsgi + doins "${T}/plugins"/*.so + + use cgi && dosym uwsgi /usr/bin/uwsgi_cgi + use go && dosym uwsgi /usr/bin/uwsgi_go + use lua && dosym uwsgi /usr/bin/uwsgi_lua + use mono && dosym uwsgi /usr/bin/uwsgi_mono + use perl && dosym uwsgi /usr/bin/uwsgi_psgi + + if use php ; then + for s in $(php_get_slots); do + dosym uwsgi /usr/bin/uwsgi_${s/.} + done + fi + + if use python ; then + python_foreach_impl python_install_symlinks + python_foreach_impl python_domodule uwsgidecorators.py + fi + + newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi + newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi + keepdir /etc/"${PN}".d + use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" +} + +pkg_postinst() { + if use apache2 ; then + ewarn "As reported on bug #650776 [1], Apache module mod_proxy_uwsgi" + ewarn "is being transferred to upstream Apache since 2.4.30, see [2]." + ewarn "We therefore do not build them any more." + ewarn " [1] https://bugs.gentoo.org/650776" + ewarn " [2] https://github.com/unbit/uwsgi/issues/1636" + fi + + elog "Append the following options to the uwsgi call to load the respective language plugin:" + use cgi && elog " '--plugins cgi' for cgi" + use lua && elog " '--plugins lua' for lua" + use mono && elog " '--plugins mono' for mono" + use perl && elog " '--plugins psgi' for perl" + + if use php ; then + for s in $(php_get_slots); do + elog " '--plugins ${s/.}' for ${s}" + done + fi + + python_pkg_postinst() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + elog " " + elog " '--plugins ${EPYV}' for ${EPYTHON}" + if use python-asyncio ; then + if [[ ${EPYV} == python34 ]] ; then + elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" + else + elog " (asyncio is only supported in python3.4)" + fi + fi + if use python-gevent ; then + elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" + fi + } + + use python && python_foreach_impl python_pkg_postinst + + if use ruby ; then + for ruby in $(ruby_get_use_implementations) ; do + elog " '--plugins rack_${ruby/.}' for ${ruby}" + elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" + elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" + done + fi +} -- cgit v1.2.3