summaryrefslogtreecommitdiff
path: root/www-servers
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/Manifest.gzbin4533 -> 4541 bytes
-rw-r--r--www-servers/uwsgi/Manifest6
-rw-r--r--www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch41
-rw-r--r--www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch21
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.19.1-r109.ebuild2
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.21.ebuild386
6 files changed, 454 insertions, 2 deletions
diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz
index 638bcc9a7e19..5cd97434a53b 100644
--- a/www-servers/Manifest.gz
+++ b/www-servers/Manifest.gz
Binary files differ
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 9800b7b427b3..ca011c062c1b 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -2,8 +2,12 @@ AUX gentoo.buildconf 490 BLAKE2B 320b0471c0c76ab6c8ada7b034f612fc20398eb60e1edc3
AUX uwsgi-2.0.19.1-py310-fix-2.patch 731 BLAKE2B 401b03e888b8a081cddf34ab16197fd728cfbfb5c877206c0b1f65f1b1e5ef335fa3d45bf1e7786b555fc4dbbe1a9b0fd29a4bcce0be70e605bf20ca2f0e3c3c SHA512 303b25095db88a1e84a9b212c0381f8e6025f2b9bc1913882b7e376fce300575c10ceb7666fbb9622536950ee0a0c2496fca5aea20f532d7e2f3fb299e17bbbb
AUX uwsgi-2.0.19.1-py310-fix.patch 1457 BLAKE2B 35859fabde74604a67d0fe71dbf2889465ffc4a3de7ded343c44e9accbb49daa6d45992b7b824e6fc6c0be1a84884e13ed31cc2846ccafc659ef3be06d703f62 SHA512 42fa8fd537385dcb2cf088291d249c584cce2965c4131e45ee58c7cb6d0789b5f84bc9473925700bd55a5f75667cbc361130684c28d44b597e8e66246a63b2d2
AUX uwsgi-2.0.19.1-pynode-compile.patch 3950 BLAKE2B 4ec0f5357b7b99f3365ddfbc8643ecd8c96eb227ccc8bee78948170a00d4bce89cdaeeff3de5d2be25c428e5a7e4da220d023daff8b783deea421dc0bc67e972 SHA512 de076448c43195de0ca7fd198787de60bf29d3966ff3f6c8f0b2bacc6d29a50e4b622aeba6de56489ecae808648b099cb6bfa5322aa1d30c31d607debd6f9c6b
+AUX uwsgi-2.0.21-php82.patch 1457 BLAKE2B 89a31c86050fe1c94f1077e534d75f32d191f2b6402f72488f6fa50960b9ed44b1a39f80c05d2b5bbaf387e6cb8434951fd5092b70bad1f329ce43c87c5e13c1 SHA512 35b7e0f62cf18093aa1dcb8dda6158b3f2ab73c600d95fff048ded51ae91d442620c615c60597f67133f615998331e50e4ae592c7fdf66292f8efa4932cab867
+AUX uwsgi-2.0.21-python-unicode.patch 978 BLAKE2B 8014a39e6f29e38bb88cb5fe517c8656c80cd9aaed20ecb5ab56f526355f9b3616a5ac19635abb4514613b1e5c198364f8ab339292a8f282e1bd3f15ffd35a5a SHA512 9da61901ec176423bc14db8c58fac19305c2c5a4dc68f42d858376e65ca7399ddc6fe0665c3bd1f2ba379b6dd60a39d496a4b52c61c7dcf7d48ae47cddf555df
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-r109.ebuild 11201 BLAKE2B d06737e5d042d7c291cb22353f0edeea9c115976efbadb9c2c81b096b0526899910cb00a40a4813387849be3763b160589e85bb80472daea770f15f066c8221f SHA512 a6c6d9af1dca0d0559b35cf5eb7b5424e38cc858b26a1486e42df11ef974afa22d328e3986e3f1ad5f0c67e6e8f91845d867c0ede380b72aa7563d05ccd36ecc
+DIST uwsgi-2.0.21.tar.gz 808494 BLAKE2B 3c5fc3ce3a6a7f8f915bb302c0b775a75227f859dd2b141034e8b1aa5cb867b447ed532b3e8b537db80acc908fc26121b752e35ebc0bf9a542678843fd02ff54 SHA512 36a9c1b87a4c3d08482b9045d2227f56b006acb53f38ddf1b510880ae5fc24c0177a077338ec8af3ef0b8f8e220bc4fc7f8311dab8066e13cbcbb616f736c795
+EBUILD uwsgi-2.0.19.1-r109.ebuild 11213 BLAKE2B 0355b1cf1d3db7d56dc8964bee2e1dc1018a79cc9cd6b907f667d6d6050f302d112a4e78cb1350c846ea3d2e956e23b43eadfb9ddc736c8435f9b997fb651821 SHA512 0b316e49f3dad87c8ea82124269e46c114e66b7ec1d5fe5d1599588e78f672860a2d8d7f09df8ad6f1db1114bd43ec7c0acef2d0c12eab58960119f355ec6dfb
+EBUILD uwsgi-2.0.21.ebuild 11342 BLAKE2B 8ca664b3fa19687c0e8222c80d4898e19ec9e5e9535f69c537f3c0d3cb7e99ca6295859f175b1a509cb639c15c4be64a59f796579d5fb13a1d3a3b1b372f2219 SHA512 6a6e4f1d1363b6f3d17546719828b6f9e5dc8b636f2eceb33c2d693bca20a25b7e406fa6a485fb69b35829ff3097913cd0789511744304b2da8ebe5b7a615f4c
MISC metadata.xml 1245 BLAKE2B 3254a0e0211101ad9c353f6247424bb44df9ddb56bb152414b9fac2b515fe163e5163d2119bc040da1676b4d941afedf4a331a19e4cdbf794a7816d012abd328 SHA512 4e3dc2b9c9d7386ed6f132da703af971789c73af567f5333faca65e3194567ead794a84c28b5382eadb149ae4dcc7847e07bc02e3d84391b3b6cccc11e08e232
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch
new file mode 100644
index 000000000000..8a830389b989
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch
@@ -0,0 +1,41 @@
+https://github.com/unbit/uwsgi/commit/6fba62a3ad947b656bb4379f8f903e90c7b01346
+
+From 6fba62a3ad947b656bb4379f8f903e90c7b01346 Mon Sep 17 00:00:00 2001
+From: Alexandre Rossi <alexandre.rossi@gmail.com>
+Date: Tue, 10 Jan 2023 10:01:05 +0000
+Subject: [PATCH] plugins/php: fix build with PHP >= 8.2
+
+from https://raw.githubusercontent.com/php/php-src/PHP-8.2/UPGRADING.INTERNALS:
+
+======================== 5. SAPI changes ========================
+
+* The signature of php_module_startup() has changed from
+
+int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules)
+
+to
+
+zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module)
+
+as only one additional module was ever provided.
+---
+ plugins/php/php_plugin.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+index 9bb8befad..4d3930b82 100644
+--- a/plugins/php/php_plugin.c
++++ b/plugins/php/php_plugin.c
+@@ -607,7 +607,11 @@ static void activate_user_config(const char *filename, const char *doc_root, siz
+ static int php_uwsgi_startup(sapi_module_struct *sapi_module)
+ {
+
++#if ((PHP_MAJOR_VERSION >= 8) && (PHP_MINOR_VERSION >= 2))
++ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry)==FAILURE) {
++#else
+ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry, 1)==FAILURE) {
++#endif
+ return FAILURE;
+ } else {
+ return SUCCESS;
+
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch
new file mode 100644
index 000000000000..b346c2655175
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch
@@ -0,0 +1,21 @@
+https://github.com/unbit/uwsgi/commit/509104eaff6f6ecde656c20fdd65a0b98b371c8d
+
+From 509104eaff6f6ecde656c20fdd65a0b98b371c8d Mon Sep 17 00:00:00 2001
+From: Nicolas Evrard <nicoe@openhex.org>
+Date: Thu, 17 Nov 2022 09:47:39 +0100
+Subject: [PATCH] plugins/python: Use "backslashreplace" on stderr
+ initialization
+
+Failing to use this value will result in enconding errors when logging
+unicode characters to stderr
+--- a/plugins/python/python_plugin.c
++++ b/plugins/python/python_plugin.c
+@@ -554,7 +554,7 @@ void init_uwsgi_vars() {
+ #ifdef HAS_NO_ERRORS_IN_PyFile_FromFd
+ PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, NULL, 0);
+ #else
+- PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, NULL, NULL, 0);
++ PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, "backslashreplace", NULL, 0);
+ #endif
+ PyDict_SetItemString(pysys_dict, "stdout", new_stdprint);
+ PyDict_SetItemString(pysys_dict, "__stdout__", new_stdprint);
diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r109.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r109.ebuild
index 5bdda93d9589..1b390388d3d1 100644
--- a/www-servers/uwsgi/uwsgi-2.0.19.1-r109.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.19.1-r109.ebuild
@@ -20,7 +20,7 @@ MY_P="${P/_/-}"
inherit 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/"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
diff --git a/www-servers/uwsgi/uwsgi-2.0.21.ebuild b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
new file mode 100644
index 000000000000..6283e0d78a3e
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
@@ -0,0 +1,386 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Check the upstream uwsgi-2.0 branch, not master, for backports
+
+LUA_COMPAT=( lua5-1 )
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+
+RUBY_OPTIONAL="yes"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+PHP_EXT_INI="no"
+PHP_EXT_NAME="dummy"
+PHP_EXT_OPTIONAL_USE="php"
+USE_PHP="php7-4 php8-0 php8-1 php8-2" # deps must be registered separately below
+
+POSTGRES_COMPAT=( 13 14 15 )
+
+MY_P="${P/_/-}"
+
+inherit lua-single multiprocessing pax-utils php-ext-source-r3 postgres python-r1 ruby-ng
+
+DESCRIPTION="uWSGI server for Python web applications"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
+SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~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 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_pg? ( ${POSTGRES_REQ_USE} )
+ 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 )
+ expat? ( xml )
+"
+
+# Dependency notes:
+# - util-linux is required for libuuid when requesting zeromq support
+# - sys-devel/gcc[go] is needed for libgo.so
+#
+# 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:= )
+ 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? ( ${POSTGRES_DEP} )
+ 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? (
+ php_targets_php7-4? ( dev-lang/php:7.4[embed] )
+ php_targets_php8-0? ( dev-lang/php:8.0[embed] )
+ php_targets_php8-1? ( dev-lang/php:8.1[embed] )
+ php_targets_php8-2? ( dev-lang/php:8.2[embed] )
+ )
+ python? ( ${PYTHON_DEPS} )
+ python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )
+ ruby? ( $(ruby_implementations_depend) )
+"
+DEPEND="${CDEPEND}"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-uwsgi )
+ uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-php82.patch
+ "${FILESDIR}"/${P}-python-unicode.patch
+)
+
+pkg_setup() {
+ python_setup
+ use lua && lua-single_pkg_setup
+ use ruby && ruby-ng_pkg_setup
+ use uwsgi_plugins_emperor_pg && postgres_pkg_setup
+}
+
+src_unpack() {
+ default
+}
+
+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"
+
+ local p
+ 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
+ sed -i \
+ -e "s|pg_config|${PG_CONFIG}|" \
+ 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}
+
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
+
+ if use python-asyncio ; then
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
+ ${EPYTHON} 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
+
+ export CPUCOUNT="$(makeopts_jobs)"
+
+ ${EPYTHON} uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+
+ if use go ; then
+ ${EPYTHON} 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" ${EPYTHON} 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}" ${EPYTHON} 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
+ local s
+ 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
+ elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio 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
+}