summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexys Jacob <ultrabug@gentoo.org>2014-01-16 13:40:42 +0000
committerAlexys Jacob <ultrabug@gentoo.org>2014-01-16 13:40:42 +0000
commita98a4c80c83208c6d5d55eb881102ed88a17d2b1 (patch)
tree8accdc2a1031af2f39f39486b11ed236b0a1da59 /www-servers
parentVersion bump. Added multilib support (bug #496218) (diff)
downloadgentoo-2-a98a4c80c83208c6d5d55eb881102ed88a17d2b1.tar.gz
gentoo-2-a98a4c80c83208c6d5d55eb881102ed88a17d2b1.tar.bz2
gentoo-2-a98a4c80c83208c6d5d55eb881102ed88a17d2b1.zip
version bump introducing UWSGI_PLUGINS USE_EXPAND with help of @dev-zero fix #497534 #497364 #488398 #484366 #469098 #469536, drop obsolete versions, cleanup
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key B658FA13)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/uwsgi/ChangeLog15
-rw-r--r--www-servers/uwsgi/files/1.2.6-fixed-typecasting.patch21
-rw-r--r--www-servers/uwsgi/files/gentoo.buildconf30
-rw-r--r--www-servers/uwsgi/files/uwsgi-1.0.2.1-no-werror.patch11
-rw-r--r--www-servers/uwsgi/files/uwsgi.confd47
-rw-r--r--www-servers/uwsgi/files/uwsgi.initd109
-rw-r--r--www-servers/uwsgi/metadata.xml12
-rw-r--r--www-servers/uwsgi/uwsgi-1.0.2.1.ebuild72
-rw-r--r--www-servers/uwsgi/uwsgi-1.2.6.ebuild308
-rw-r--r--www-servers/uwsgi/uwsgi-1.9.6.ebuild328
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.ebuild351
11 files changed, 402 insertions, 902 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog
index b8d68d94a266..8e91c0541898 100644
--- a/www-servers/uwsgi/ChangeLog
+++ b/www-servers/uwsgi/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for www-servers/uwsgi
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.47 2013/12/26 10:40:43 ultrabug Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.48 2014/01/16 13:40:41 ultrabug Exp $
+
+*uwsgi-2.0 (16 Jan 2014)
+
+ 16 Jan 2014; Ultrabug <ultrabug@gentoo.org> -uwsgi-1.0.2.1.ebuild,
+ -uwsgi-1.2.6.ebuild, -uwsgi-1.9.6.ebuild, +uwsgi-2.0.ebuild,
+ -files/1.2.6-fixed-typecasting.patch, -files/uwsgi-1.0.2.1-no-werror.patch,
+ +files/gentoo.buildconf, -files/uwsgi.confd, -files/uwsgi.initd,
+ metadata.xml:
+ version bump introducing UWSGI_PLUGINS USE_EXPAND with help of @dev-zero fix
+ #497534 #497364 #488398 #484366 #469098 #469536, drop obsolete versions,
+ cleanup
26 Dec 2013; Ultrabug <ultrabug@gentoo.org> uwsgi-1.4.10.ebuild:
fix php5.5 support
diff --git a/www-servers/uwsgi/files/1.2.6-fixed-typecasting.patch b/www-servers/uwsgi/files/1.2.6-fixed-typecasting.patch
deleted file mode 100644
index b9dfec7e2260..000000000000
--- a/www-servers/uwsgi/files/1.2.6-fixed-typecasting.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# HG changeset patch
-# User roberto@quantal64
-# Date 1347021464 -7200
-# Node ID 4d4686fdb3ba44fd5083f61ceb27f820d7a79937
-# Parent 88dc416d99e40ddacfb7ccb4d620fe50b9d9319c
-fixed typecasting
-
-diff -r 88dc416d99e4 -r 4d4686fdb3ba plugins/router_uwsgi/router_uwsgi.c
---- a/plugins/router_uwsgi/router_uwsgi.c gio set 06 16:32:49 2012 +0200
-+++ b/plugins/router_uwsgi/router_uwsgi.c ven set 07 14:37:44 2012 +0200
-@@ -54,7 +54,7 @@
-
- int post_fd = wsgi_req->poll.fd;
- if (wsgi_req->async_post) {
-- post_fd = fileno(wsgi_req->async_post);
-+ post_fd = fileno((FILE *)wsgi_req->async_post);
- }
-
- if (uwsgi_send_message(uwsgi_fd, uh->modifier1, uh->modifier2, wsgi_req->buffer, wsgi_req->uh.pktsize, post_fd, wsgi_req->post_cl, 0) < 0) {
-
diff --git a/www-servers/uwsgi/files/gentoo.buildconf b/www-servers/uwsgi/files/gentoo.buildconf
new file mode 100644
index 000000000000..e0c60bc6a5b8
--- /dev/null
+++ b/www-servers/uwsgi/files/gentoo.buildconf
@@ -0,0 +1,30 @@
+[uwsgi]
+xml = VAR_XML
+yaml = VAR_YAML
+json = VAR_JSON
+ssl = VAR_SSL
+pcre = VAR_PCRE
+zeromq = VAR_ZMQ
+routing = VAR_ROUTING
+debug = VAR_DEBUG
+unbit = false
+malloc_implementation = VAR_MALLOC
+extras =
+plugins = VAR_PLUGINS
+bin_name = uwsgi
+append_version =
+plugin_dir = VAR_PLUGIN_DIR
+plugin_build_dir = VAR_BUILD_DIR
+embedded_plugins = VAR_EMBEDDED
+as_shared_library = false
+
+locking = auto
+event = auto
+timer = auto
+filemonitor = auto
+
+blacklist =
+whitelist =
+
+embed_files =
+embed_config =
diff --git a/www-servers/uwsgi/files/uwsgi-1.0.2.1-no-werror.patch b/www-servers/uwsgi/files/uwsgi-1.0.2.1-no-werror.patch
deleted file mode 100644
index 9786186fe5e3..000000000000
--- a/www-servers/uwsgi/files/uwsgi-1.0.2.1-no-werror.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/uwsgiconfig.py 2012-01-11 19:38:58.000000000 +0100
-+++ b/uwsgiconfig.py 2012-01-27 11:43:47.969407343 +0100
-@@ -252,7 +252,7 @@
- self.gcc_list.append('proto/fastcgi')
- self.include_path = []
-
-- self.cflags = ['-O2', '-Wall', '-Werror', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split()
-+ self.cflags = ['-O2', '-Wall', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split()
-
- if uwsgi_os == 'Linux':
- self.gcc_list.append('lib/linux_ns')
diff --git a/www-servers/uwsgi/files/uwsgi.confd b/www-servers/uwsgi/files/uwsgi.confd
deleted file mode 100644
index 11152da5dbf7..000000000000
--- a/www-servers/uwsgi/files/uwsgi.confd
+++ /dev/null
@@ -1,47 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.confd,v 1.1 2011/05/31 19:49:07 maksbotan Exp $
-
-# DO NOT MODIFY THIS FILE DIRECTLY! CREATE A COPY AND MODIFY THAT INSTEAD!
-
-# Path (or name) of UNIX/TCP socket to bind to
-#
-UWSGI_SOCKET=127.0.0.1:1234
-
-# Enable threads?
-#
-UWSGI_THREADS=1
-
-# The path to your uWSGI application.
-#
-UWSGI_PROGRAM=
-
-# The path to your uWSGI xml config file.
-#
-UWSGI_XML_CONFIG=
-
-# The number of child processes to spawn. The default is 1.
-#
-UWSGI_CHILDREN=1
-
-# The log file path. If empty logging is disabled
-#
-UWSGI_LOG_FILE=
-
-# If you want to run your application inside a chroot then specify the
-# directory here. Leave this blank otherwise.
-#
-UWSGI_CHROOT=
-
-# If you want to run your application from a specific directiory specify
-# it here. Leave this blank otherwise.
-#
-# UWSGI_DIR=
-
-# The user and group to run your application as. If you do not specify these,
-# the application will be run as root:root.
-#
-UWSGI_USER=
-
-# Additional options you might want to pass to uWSGI
-#
-#UWSGI_EXTRA_OPTIONS=
diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/files/uwsgi.initd
deleted file mode 100644
index ce0ba5724ab5..000000000000
--- a/www-servers/uwsgi/files/uwsgi.initd
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.initd,v 1.3 2012/08/27 08:34:07 ultrabug Exp $
-
-PROGNAME=${SVCNAME#*.}
-
-UWSGI_EXEC=/usr/bin/uwsgi
-PIDPATH=/var/run/uwsgi
-PIDFILE="${PIDPATH}/${PROGNAME}.pid"
-
-extra_started_commands="reload"
-
-depend() {
- need net
-}
-
-start() {
- local OPTIONS
-
- if [ "${SVCNAME}" = "uwsgi" ]; then
- eerror "You are not supposed to run this script directly. Create a symlink"
- eerror "for the FastCGI application you want to run as well as a copy of the"
- eerror "configuration file and modify it appropriately like so..."
- eerror
- eerror " ln -s uwsgi /etc/init.d/uwsgi.trac"
- eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac"
- eerror " nano /etc/conf.d/uwsgi.trac"
- eerror
- return 1
- fi
-
- if [ -z "${UWSGI_SOCKET}" ]; then
- eerror "You need to specify path (or name) of UNIX/TCP socket to bind to"
- eerror "in UWSGI_SOCKET"
- return 1
- fi
-
- if [ -z "${UWSGI_PROGRAM}" ] && [ -z "${UWSGI_XML_CONFIG}" ]; then
- eerror "You need to specify which \$UWSGI_PROGRAM or \$UWSGI_XML_CONFIG"
- eerror "you want to start."
- eerror "Please adjust /etc/conf.d/uwsgi.${PROGNAME}"
- return 1
- fi
-
- if [ -n "${UWSGI_PROGRAM}" ] && [ -n "${UWSGI_XML_CONFIG}" ]; then
- eerror "Only one of the two may be defined:"
- eerror " UWSGI_PROGRAM=${UWSGI_PROGRAM}"
- eerror " UWSGI_XML_CONFIG=${UWSGI_XML_CONFIG}"
- return 1
- fi
-
-
- OPTIONS="--master --daemonize"
-
- if [ -n "$UWSGI_LOG_FILE" ]; then
- OPTIONS="${OPTIONS} $UWSGI_LOG_FILE"
- else
- OPTIONS="${OPTIONS} /dev/null --disable-logging"
- fi
-
- if [ "${UWSGI_THREADS}" = "1" ]; then
- OPTIONS="${OPTIONS} --enable-threads"
- fi
-
- if [ -n "${UWSGI_SOCKET}" ]; then
- OPTIONS="${OPTIONS} --socket ${UWSGI_SOCKET}"
- fi
-
- if [ -n "${UWSGI_CHILDREN}" ]; then
- OPTIONS="${OPTIONS} --processes ${UWSGI_CHILDREN}"
- fi
-
- if [ -n "${UWSGI_CHROOT}" ]; then
- OPTIONS="${OPTIONS} --chroot ${UWSGI_CHROOT}"
- fi
-
- [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/"
- [ -z "${UWSGI_USER}" ] && UWSGI_USER="root"
-
- if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then
- OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}"
- fi
-
- if [ -n "${UWSGI_PROGRAM}" ]; then
- OPTIONS="${OPTIONS} --wsgi-file ${UWSGI_PROGRAM}"
- fi
-
- if [ -n "${UWSGI_XML_CONFIG}" ]; then
- OPTIONS="${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}"
- fi
-
- ebegin "Starting uWSGI application ${PROGNAME}"
- cd "${UWSGI_DIR}" && \
- start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}" -- ${OPTIONS} --pidfile "${PIDFILE}"
- eend $?
-}
-
-reload() {
- ebegin "Reloading ${SVCNAME}"
- kill -HUP `cat ${PIDFILE}` &>/dev/null
- eend $? "Failed to reload ${SVCNAME}"
-}
-
-stop() {
- ebegin "Stopping uWSGI application ${PROGNAME}"
- start-stop-daemon --stop --pidfile "${PIDFILE}" --signal 3
- eend $?
-}
diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml
index 30b2aebb453f..e0dbe55ad9e2 100644
--- a/www-servers/uwsgi/metadata.xml
+++ b/www-servers/uwsgi/metadata.xml
@@ -7,17 +7,21 @@
</maintainer>
<use>
<flag name='carbon'>Enable support for sending statistics to a carbon server (see http://projects.unbit.it/uwsgi/wiki/Carbon).</flag>
- <flag name='erlang'>Let the uWSGI server act as an Erlang C-Node and exchange messages and rpc with Erlang nodes. Together with the USE=python this enables erlang support in python (see the mappings table in http://projects.unbit.it/uwsgi/wiki/ErlangIntegration).</flag>
+ <flag name='erlang'>Let the uWSGI server as as an Erlang C-Node and exchange messages and rpc with Erlang nodes. Together with the USE=python this enables erlang support in python (see the mappings table in http://projects.unbit.it/uwsgi/wiki/ErlangIntegration).</flag>
+ <flag name='embedded'>Embed plugins instead of building them as real plugins. When disabling this USE flag make sure you specify all used plugins in your uWSGI configuration. Note: Language plugins will always be built as real plugins.</flag>
<flag name='gevent'>Use <pkg>dev-python/gevent</pkg> for async request dispatching and as LoopEngine (see http://projects.unbit.it/uwsgi/wiki/Gevent).</flag>
+ <flag name='jemalloc'>Use <pkg>dev-libs/jemalloc</pkg> instead of libc's malloc</flag>
<flag name='graylog2'>Enable logging to graylog2 (see http://graylog2.org/).</flag>
<flag name='json'>Support json as a configuration file format.</flag>
<flag name='nagios'>Add nagios-friendly logging output (see http://projects.unbit.it/uwsgi/wiki/Nagios).</flag>
- <flag name='pam'>Add the pam plugin.</flag>
<flag name='probepg'>Add the PostgreSQL probe plugin (see http://projects.unbit.it/uwsgi/wiki/DjangoDBHA).</flag>
+ <flag name='python_gevent'>Use <pkg>dev-python/gevent</pkg> for async request dispatching and as LoopEngine (see http://projects.unbit.it/uwsgi/wiki/Gevent).</flag>
+ <flag name='routing'>Enable routing support</flag>
<flag name='rrdtool'>Enable support for writing requests data in RRD files.</flag>
<flag name='rsyslog'>Support direct logging to a <pkg>app-admin/rsyslog</pkg> socket (without going through the syslog interface).</flag>
<flag name='spooler'>Build a plugin which gives a network spooler (see http://projects.unbit.it/uwsgi/wiki/Spooler).</flag>
<flag name='yaml'>Support yaml as a configuration file format.</flag>
- <flag name='zeromq'>Enable logging and deployment via ZeroMQ. Together with json-support this turns uwsgi into a Mongrel2 handler (see http://projects.unbit.it/uwsgi/wiki/Mongrel2).</flag>
+ <flag name='yajl'>Use <pkg>dev-libs/yajl</pkg> instead of <pkg>dev-libs/jansson</pkg> for parsing JSON configuration files (if USe=json is set)</flag>
+ <flag name='zeromq'>Enable logging and deployment via ZeroMQ.</flag>
</use>
-</pkgmetadata>
+</pkgmetadata> \ No newline at end of file
diff --git a/www-servers/uwsgi/uwsgi-1.0.2.1.ebuild b/www-servers/uwsgi/uwsgi-1.0.2.1.ebuild
deleted file mode 100644
index 7a37777628f9..000000000000
--- a/www-servers/uwsgi/uwsgi-1.0.2.1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.0.2.1.ebuild,v 1.2 2012/02/25 04:26:07 patrick Exp $
-
-EAPI="3"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
-
-inherit eutils python toolchain-funcs apache-module
-
-DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="http://projects.unbit.it/uwsgi/"
-SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="dev-libs/libxml2"
-DEPEND="${RDEPEND}"
-
-APXS2_S="${S}/apache2"
-APACHE2_MOD_CONF="42_mod_${PN}"
-want_apache2_2
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-no-werror.patch
- python_copy_sources
-}
-
-src_compile() {
- python_src_compile CC="$(tc-getCC)"
-
- if use apache2 ; then
- for m in Ruwsgi uwsgi ; do
- APXS2_ARGS="-c mod_${m}.c"
- apache-module_src_compile
- done
- fi
-}
-
-src_install() {
- installation() {
- newbin uwsgi uwsgi-${PYTHON_ABI}
- }
- python_execute_function -s installation
-
- python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
-
- if use apache2; then
- for m in Ruwsgi uwsgi ; do
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so"
- apache-module_src_install
- done
- fi
-
- newinitd "${FILESDIR}"/uwsgi.initd uwsgi
- newconfd "${FILESDIR}"/uwsgi.confd uwsgi
- mkdir -p "${ED}"/var/run/uwsgi
-}
-
-pkg_postinst() {
- if use apache2 ; then
- elog "Two Apache modules have been installed: mod_uwsgi and mod_Ruwsgi."
- elog "You can enable them with -DUWSGI or -DRUWSGI in /etc/conf.d/apache2."
- elog "Both have the same configuration interface and define the same symbols."
- elog "Therefore you can enable only one of them at a time."
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky."
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
- fi
-}
diff --git a/www-servers/uwsgi/uwsgi-1.2.6.ebuild b/www-servers/uwsgi/uwsgi-1.2.6.ebuild
deleted file mode 100644
index 2771d1662a6f..000000000000
--- a/www-servers/uwsgi/uwsgi-1.2.6.ebuild
+++ /dev/null
@@ -1,308 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.2.6.ebuild,v 1.1 2012/09/10 09:47:52 dev-zero Exp $
-
-EAPI="4"
-PYTHON_DEPEND="python? *"
-PYTHON_MODNAME="uwsgidecorators"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
-USE_RUBY="ruby18 ree18 ruby19"
-RUBY_OPTIONAL="yes"
-PHP_EXT_NAME="dummy"
-PHP_EXT_INI="no"
-USE_PHP="php5-3 php5-4" # deps must be registered separately below
-PHP_EXT_OPTIONAL_USE="php"
-
-MY_P="${P/_/-}"
-
-inherit apache-module eutils python multilib pax-utils php-ext-source-r2 ruby-ng
-
-DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="http://projects.unbit.it/uwsgi/"
-SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="apache2 +caps +carbon cgi debug erlang gevent graylog2 json ldap lua +nagios pam perl +pcre php +python rrdtool rsyslog ruby spooler sqlite syslog +xml yaml zeromq"
-REQUIRED_USE="|| ( cgi erlang lua perl php python ruby )"
-
-# util-linux is required for libuuid when requesting zeromq support
-CDEPEND="caps? ( sys-libs/libcap )
- json? ( dev-libs/jansson )
- erlang? ( dev-lang/erlang )
- gevent? ( >=dev-python/gevent-1.0_beta2 )
- graylog2? ( sys-libs/zlib )
- ldap? ( net-nds/openldap )
- lua? ( dev-lang/lua )
- pcre? ( dev-libs/libpcre )
- perl? ( dev-lang/perl )
- php? (
- php_targets_php5-3? ( dev-lang/php:5.3[embed] )
- php_targets_php5-4? ( dev-lang/php:5.4[embed] )
- )
- ruby? ( $(ruby_implementations_depend) )
- sqlite? ( dev-db/sqlite:3 )
- rsyslog? ( app-admin/rsyslog )
- xml? ( dev-libs/libxml2 )
- yaml? ( dev-libs/libyaml )
- zeromq? ( net-libs/zeromq sys-apps/util-linux )"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- rrdtool? ( net-analyzer/rrdtool )"
-
-S="${WORKDIR}/${MY_P}"
-APXS2_S="${S}/apache2"
-APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi"
-
-want_apache2_2
-
-use_true_false() {
- if use $1 ; then
- echo "true"
- else
- echo "false"
- fi
-}
-
-src_unpack() {
- default
-}
-
-pkg_setup() {
- depend.apache_pkg_setup
- python_pkg_setup
-}
-
-src_prepare() {
- epatch \
- "${FILESDIR}/1.1.2-threaded-php.patch" \
- "${FILESDIR}/1.2.3-pyerl.patch" \
- "${FILESDIR}/${PV}-fixed-typecasting.patch"
-
- 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|python\([0-9].[0-9]\)-config|python-config-\1|' \
- plugins/python/uwsgiplugin.py || die "sed failed"
-
- sed -i \
- -e "s|/lib|/$(get_libdir)|" \
- plugins/php/uwsgiplugin.py || die "sed failed"
-}
-
-src_configure() {
- local plugins=""
- use carbon && plugins+=", carbon"
- use graylog2 && plugins+=", graylog2"
- use nagios && plugins+=", nagios"
- use pam && plugins+=", pam"
- use rrdtool && plugins+=", rrdtool"
- use rsyslog && plugins+=", rsyslog"
- use syslog && plugins+=", syslog"
-
- cat > "buildconf/gentoo.ini" << EOF
-[uwsgi]
-xml = $(use_true_false xml)
-ini = true
-yaml = $(use_true_false yaml)
-json = $(use_true_false json)
-sqlite3 = $(use_true_false sqlite)
-zeromq = $(use_true_false zeromq)
-snmp = true
-sctp = false
-spooler = true
-embedded = true
-udp = true
-multicast = true
-threading = true
-sendfile = true
-minterpreters = true
-async = true
-evdis = false
-ldap = $(use_true_false ldap)
-pcre = $(use_true_false pcre)
-debug = $(use_true_false debug)
-unbit = false
-xml_implementation = libxml2
-yaml_implementation = libyaml
-malloc_implementation = libc
-plugins =
-bin_name = uwsgi
-append_version =
-plugin_dir = /usr/$(get_libdir)/uwsgi
-plugin_build_dir = ${T}/plugins
-embedded_plugins = ping, cache, rpc, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog ${plugins}
-as_shared_library = false
-
-locking = auto
-event = auto
-timer = auto
-filemonitor = auto
-
-embed_files =
-
-embed_config =
-[python]
-paste = true
-web3 = true
-EOF
- use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed"
- use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed"
-}
-
-each_ruby_compile() {
- cd "${WORKDIR}/${MY_P}"
-
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
-
- if [[ "${RUBY}" == *ruby19 ]] ; then
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed"
- fi
-}
-
-install_python_lib() {
- insinto $(python_get_sitedir)
- doins uwsgidecorators.py
-}
-
-src_compile() {
- python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
-
- mkdir -p "${T}/plugins"
-
- if use erlang ; then
- python uwsgiconfig.py --plugin plugins/erlang gentoo || die "building plugin for erlang failed"
- fi
-
- if use lua ; then
- python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
- fi
-
- if use perl ; then
- python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl 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
- for a in ${PYTHON_ABIS} ; do
- python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.} || die "building plugin for python-${a} failed"
-
- if use gevent ; then
- python${a} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${a/.} || die "building plugin for gevent-support in python-${a} failed"
- fi
- if use erlang ; then
- python${a} uwsgiconfig.py --plugin plugins/pyerl gentoo pyerl${a/.} || die "building plugin for erlang-support in python failed"
- fi
- done
- fi
-
- if use ruby ; then
- ruby-ng_src_compile
- fi
-
- if use spooler ; then
- python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building plugin for spooler failed"
- fi
-
- if use cgi ; then
- python uwsgiconfig.py --plugin plugins/cgi gentoo || die "building plugin for cgi failed"
- fi
-
- if use apache2 ; then
- for m in proxy_uwsgi Ruwsgi uwsgi ; do
- APXS2_ARGS="-c mod_${m}.c"
- apache-module_src_compile
- done
- 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 erlang && dosym uwsgi /usr/bin/uwsgi_erlang
- use lua && dosym uwsgi /usr/bin/uwsgi_lua
- 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_execute_function install_python_lib
- for a in ${PYTHON_ABIS} ; do
- dosym uwsgi /usr/bin/uwsgi_python${a/.}
- done
- fi
-
- if use apache2; then
- for m in proxy_uwsgi Ruwsgi uwsgi ; do
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so"
- apache-module_src_install
- done
- fi
-
- newinitd "${FILESDIR}"/uwsgi.initd-r1 uwsgi
- newconfd "${FILESDIR}"/uwsgi.confd-r1 uwsgi
- keepdir /etc/"${PN}".d
- use spooler && keepdir /var/spool/"${PN}"
-}
-
-pkg_postinst() {
- if use apache2 ; then
- elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi."
- elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2."
- elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols."
- elog "Therefore you can enable only one of them at a time."
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky."
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
- elog "mod_proxy_uwsgi is the newest and not considered ready for production yet."
- fi
-
- elog "Append the following options to the uwsgi call to load the respective language plugin:"
- use cgi && elog " '--plugins cgi' for cgi"
- use erlang && elog " '--plugins erlang' for erlang"
- use lua && elog " '--plugins lua' for lua"
- 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
-
- if use python ; then
- for a in ${PYTHON_ABIS} ; do
- elog " '--plugins python${a/.}' for python-${a}"
- use gevent && elog " '--plugins python${a/.},gevent${a/.}' for gevent support in python-${a}"
- use erlang && elog " '--plugins python${a/.},erlang,pyerl${a/.}' for erlang support in python-${a}"
- done
- fi
-
- if use ruby ; then
- for ruby in $USE_RUBY; do
- use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}"
- if [[ "${ruby}" == *ruby19 ]] ; then
- elog " '--plugins fibre' for ruby-1.9 fibres"
- fi
- done
- fi
-}
diff --git a/www-servers/uwsgi/uwsgi-1.9.6.ebuild b/www-servers/uwsgi/uwsgi-1.9.6.ebuild
deleted file mode 100644
index c8ff0f058263..000000000000
--- a/www-servers/uwsgi/uwsgi-1.9.6.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.9.6.ebuild,v 1.1 2013/04/20 00:31:37 zx2c4 Exp $
-
-EAPI="5"
-PYTHON_DEPEND="python? *"
-PYTHON_MODNAME="uwsgidecorators"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
-USE_RUBY="ruby18 ree18 ruby19"
-RUBY_OPTIONAL="yes"
-PHP_EXT_NAME="dummy"
-PHP_EXT_INI="no"
-USE_PHP="php5-3 php5-4" # deps must be registered separately below
-PHP_EXT_OPTIONAL_USE="php"
-
-MY_P="${P/_/-}"
-
-inherit apache-module eutils python multilib pax-utils php-ext-source-r2 ruby-ng versionator
-
-DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="http://projects.unbit.it/uwsgi/"
-SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS=""
-IUSE="apache2 +caps +carbon cgi debug erlang gevent graylog2 json ldap lua +nagios pam perl +pcre php probepg +python rrdtool rsyslog ruby spooler sqlite syslog +xml yaml zeromq"
-REQUIRED_USE="|| ( cgi erlang lua perl php python ruby )"
-
-# util-linux is required for libuuid when requesting zeromq support
-CDEPEND="caps? ( sys-libs/libcap )
- json? ( dev-libs/jansson )
- erlang? ( dev-lang/erlang )
- gevent? ( >=dev-python/gevent-1.0_beta2 )
- graylog2? ( sys-libs/zlib )
- ldap? ( net-nds/openldap )
- lua? ( dev-lang/lua )
- pcre? ( dev-libs/libpcre )
- perl? ( dev-lang/perl )
- php? (
- php_targets_php5-3? ( dev-lang/php:5.3[embed] )
- php_targets_php5-4? ( dev-lang/php:5.4[embed] )
- )
- probepg? ( dev-db/postgresql-base:= )
- ruby? ( $(ruby_implementations_depend) )
- sqlite? ( dev-db/sqlite:3 )
- rsyslog? ( app-admin/rsyslog )
- xml? ( dev-libs/libxml2 )
- yaml? ( dev-libs/libyaml )
- zeromq? ( net-libs/zeromq sys-apps/util-linux )"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- rrdtool? ( net-analyzer/rrdtool )"
-
-S="${WORKDIR}/${MY_P}"
-APXS2_S="${S}/apache2"
-APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi"
-
-want_apache2_2
-
-use_true_false() {
- if use $1 ; then
- echo "true"
- else
- echo "false"
- fi
-}
-
-src_unpack() {
- default
-}
-
-pkg_setup() {
- depend.apache_pkg_setup
- python_pkg_setup
-}
-
-src_prepare() {
- epatch \
- "${FILESDIR}/1.1.2-threaded-php.patch"
-
- 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|python\([0-9].[0-9]\)-config|python-config-\1|' \
- plugins/python/uwsgiplugin.py || die "sed failed"
-
- sed -i \
- -e "s|/lib|/$(get_libdir)|" \
- plugins/php/uwsgiplugin.py || die "sed failed"
-}
-
-src_configure() {
- local plugins=""
- use carbon && plugins+=", carbon"
- use graylog2 && plugins+=", graylog2"
- use nagios && plugins+=", nagios"
- use pam && plugins+=", pam"
- use rrdtool && plugins+=", rrdtool"
- use rsyslog && plugins+=", rsyslog"
- use syslog && plugins+=", syslog"
-
- # Notes:
- # * the embedded_plugins mostly follows the list of embedded_plugins
- # in buildconf/base.ini, make sure you compare the list when bumping uWSGI
- # * thus: keep the order in embedded_plugins the same as in the base.ini
- cat > "buildconf/gentoo.ini" << EOF
-[uwsgi]
-xml = $(use_true_false xml)
-ini = true
-yaml = $(use_true_false yaml)
-json = $(use_true_false json)
-sqlite3 = $(use_true_false sqlite)
-zeromq = $(use_true_false zeromq)
-snmp = true
-sctp = false
-spooler = true
-embedded = true
-ssl = auto
-udp = true
-multicast = true
-threading = true
-sendfile = true
-minterpreters = true
-async = true
-evdis = false
-ldap = $(use_true_false ldap)
-pcre = $(use_true_false pcre)
-routing = auto
-alarm = auto
-debug = $(use_true_false debug)
-unbit = false
-xml_implementation = libxml2
-yaml_implementation = libyaml
-malloc_implementation = libc
-plugins =
-bin_name = uwsgi
-append_version =
-plugin_dir = /usr/$(get_libdir)/uwsgi
-plugin_build_dir = ${T}/plugins
-embedded_plugins = ping, cache, rpc, corerouter, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter ${plugins}
-as_shared_library = false
-
-locking = auto
-event = auto
-timer = auto
-filemonitor = auto
-
-embed_files =
-
-embed_config =
-[python]
-paste = true
-web3 = true
-EOF
- use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed"
- use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed"
-
- if use probepg ; then
- PGPV="$(best_version dev-db/postgresql-base)"
- PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-base-})"
- sed -i \
- -e "s|pg_config|pg_config${PGSLOT/.}|" \
- plugins/probepg/uwsgiplugin.py || die "sed failed"
- fi
-}
-
-each_ruby_compile() {
- cd "${WORKDIR}/${MY_P}"
-
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
-
- if [[ "${RUBY}" == *ruby19 ]] ; then
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed"
- fi
-}
-
-install_python_lib() {
- insinto $(python_get_sitedir)
- doins uwsgidecorators.py
-}
-
-src_compile() {
- python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
-
- mkdir -p "${T}/plugins"
-
- if use erlang ; then
- python uwsgiconfig.py --plugin plugins/erlang gentoo || die "building plugin for erlang failed"
- fi
-
- if use lua ; then
- # setting LUALIB explicitly since lua is not slotted on Gentoo
- # and uwsgi otherwise looks for lua5.1
- UWSGICONFIG_LUALIB="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
- fi
-
- if use perl ; then
- python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl 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
- for a in ${PYTHON_ABIS} ; do
- python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.} || die "building plugin for python-${a} failed"
-
- if use gevent ; then
- python${a} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${a/.} || die "building plugin for gevent-support in python-${a} failed"
- fi
- if use erlang ; then
- python${a} uwsgiconfig.py --plugin plugins/pyerl gentoo pyerl${a/.} || die "building plugin for erlang-support in python failed"
- fi
- done
- fi
-
- if use ruby ; then
- ruby-ng_src_compile
- fi
-
- if use spooler ; then
- python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building plugin for spooler failed"
- fi
-
- if use cgi ; then
- python uwsgiconfig.py --plugin plugins/cgi gentoo || die "building plugin for cgi failed"
- fi
-
- if use probepg ; then
- python uwsgiconfig.py --plugin plugins/probepg gentoo || die "building plugin for postgresql probe failed"
- fi
-
- if use apache2 ; then
- for m in proxy_uwsgi Ruwsgi uwsgi ; do
- APXS2_ARGS="-c mod_${m}.c"
- apache-module_src_compile
- done
- 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 erlang && dosym uwsgi /usr/bin/uwsgi_erlang
- use lua && dosym uwsgi /usr/bin/uwsgi_lua
- 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_execute_function install_python_lib
- for a in ${PYTHON_ABIS} ; do
- dosym uwsgi /usr/bin/uwsgi_python${a/.}
- done
- fi
-
- if use apache2; then
- for m in proxy_uwsgi Ruwsgi uwsgi ; do
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so"
- apache-module_src_install
- done
- fi
-
- newinitd "${FILESDIR}"/uwsgi.initd-r3 uwsgi
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi
- keepdir /etc/"${PN}".d
- use spooler && keepdir /var/spool/"${PN}"
-}
-
-pkg_postinst() {
- if use apache2 ; then
- elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi."
- elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2."
- elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols."
- elog "Therefore you can enable only one of them at a time."
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky."
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
- elog "mod_proxy_uwsgi is the newest and not considered ready for production yet."
- fi
-
- elog "Append the following options to the uwsgi call to load the respective language plugin:"
- use cgi && elog " '--plugins cgi' for cgi"
- use erlang && elog " '--plugins erlang' for erlang"
- use lua && elog " '--plugins lua' for lua"
- 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
-
- if use python ; then
- for a in ${PYTHON_ABIS} ; do
- elog " '--plugins python${a/.}' for python-${a}"
- use gevent && elog " '--plugins python${a/.},gevent${a/.}' for gevent support in python-${a}"
- use erlang && elog " '--plugins python${a/.},erlang,pyerl${a/.}' for erlang support in python-${a}"
- done
- fi
-
- if use ruby ; then
- for ruby in $USE_RUBY; do
- use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}"
- if [[ "${ruby}" == *ruby19 ]] ; then
- elog " '--plugins fibre' for ruby-1.9 fibres"
- fi
- done
- fi
-}
diff --git a/www-servers/uwsgi/uwsgi-2.0.ebuild b/www-servers/uwsgi/uwsgi-2.0.ebuild
new file mode 100644
index 000000000000..e2bd273e25f4
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-2.0.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-2.0.ebuild,v 1.1 2014/01/16 13:40:41 ultrabug Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_{6,7} python3_{2,3} )
+
+RUBY_OPTIONAL="yes"
+USE_RUBY="ruby19 ruby20 ruby21"
+
+PHP_EXT_INI="no"
+PHP_EXT_NAME="dummy"
+PHP_EXT_OPTIONAL_USE="php"
+USE_PHP="php5-3 php5-4 php5-5" # deps must be registered separately below
+
+MY_P="${P/_/-}"
+
+inherit apache-module distutils-r1 eutils multilib pax-utils php-ext-source-r2 python-r1 ruby-ng versionator
+
+DESCRIPTION="uWSGI server for Python web applications"
+HOMEPAGE="http://projects.unbit.it/uwsgi/"
+SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+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
+ router_{access,radius,spnego,xmldir}
+ sqlite ssi stats_pusher_statsd
+ systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix )
+
+LANG_SUPPORT_SIMPLE=( cgi perl ) # plugins which can be built in the main build process
+LANG_SUPPORT_EXTENDED=( lua php python 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
+# *go*: TODO
+# *java*: TODO
+# *mono*: TODO
+# v8: TODO
+# matheval: TODO
+IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing +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_router_xmldir? ( xml )
+ uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ 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
+ apache2? ( www-servers/apache )
+ 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? ( dev-db/postgresql-base:= )
+ uwsgi_plugins_geoip? ( dev-libs/geoip )
+ uwsgi_plugins_ldap? ( net-nds/openldap )
+ uwsgi_plugins_pam? ( virtual/pam )
+ uwsgi_plugins_sqlite? ( dev-db/sqlite:3 )
+ uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers )
+ uwsgi_plugins_router_spnego? ( virtual/krb5 )
+ uwsgi_plugins_rsyslog? ( app-admin/rsyslog )
+ uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
+ uwsgi_plugins_webdav? ( dev-libs/libxml2 )
+ uwsgi_plugins_xslt? ( dev-libs/libxslt )
+ lua? ( dev-lang/lua )
+ perl? ( dev-lang/perl:= )
+ php? (
+ php_targets_php5-3? ( dev-lang/php:5.3[embed] )
+ php_targets_php5-4? ( dev-lang/php:5.4[embed] )
+ php_targets_php5-5? ( dev-lang/php:5.5[embed] )
+ )
+ python? ( ${PYTHON_DEPS} )
+ python_gevent? ( >=dev-python/gevent-1.0_beta2[$(python_gen_usedep 'python2*')] )
+ ruby? ( $(ruby_implementations_depend) )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )"
+
+S="${WORKDIR}/${MY_P}"
+APXS2_S="${S}/apache2"
+APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi"
+
+src_unpack() {
+ default
+}
+
+pkg_setup() {
+ python_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/1.1.2-threaded-php.patch"
+
+ 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 embedded 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
+ use xml && (use expat && xml="expat" || xml="libxml2" )
+ use json && (use yajl && xml="yajl" || xml="jansson" )
+ use jemalloc && malloc_impl="jemalloc"
+
+ # prepare the buildconf for gentoo
+ cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini
+ sed -i \
+ -e "s|VAR_XML|${xml}|" \
+ -e "s|VAR_YAML|$(usex yaml true false)|" \
+ -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|/usr/$(get_libdir)/uwsgi|" \
+ -e "s|VAR_BUILD_DIR|${T}/plugins|" \
+ -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \
+ buildconf/gentoo.ini
+
+ use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed"
+ use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed"
+
+ if use uwsgi_plugins_emperor_pg ; then
+ PGPV="$(best_version dev-db/postgresql-base)"
+ PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-base-})"
+ 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}"
+
+ UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
+
+ if [[ "${RUBY}" == *ruby19 ]] ; then
+ UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed"
+ fi
+}
+
+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_gevent ; then
+ ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed"
+ fi
+}
+
+python_install_symlinks() {
+ dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.}
+}
+
+src_compile() {
+ mkdir -p "${T}/plugins"
+
+ python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+
+ if use lua ; then
+ # setting LUALIB explicitly since lua is not slotted on Gentoo
+ # and uwsgi otherwise looks for lua5.1
+ UWSGICONFIG_LUALIB="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
+
+ if use apache2 ; then
+ for m in proxy_uwsgi Ruwsgi uwsgi ; do
+ APXS2_ARGS="-c mod_${m}.c"
+ apache-module_src_compile
+ done
+ 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 lua && dosym uwsgi /usr/bin/uwsgi_lua
+ 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
+
+ if use apache2; then
+ for m in proxy_uwsgi Ruwsgi uwsgi ; do
+ APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so"
+ apache-module_src_install
+ done
+ fi
+
+ newinitd "${FILESDIR}"/uwsgi.initd-r3 uwsgi
+ newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi
+ keepdir /etc/"${PN}".d
+ use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}"
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi."
+ elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2."
+ elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols."
+ elog "Therefore you can enable only one of them at a time."
+ elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky."
+ elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
+ elog "mod_proxy_uwsgi is the newest and not considered ready for production yet."
+ 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 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() {
+ elog " '--plugins ${EPYTHON}' for ${EPYTHON}"
+ if use python_gevent ; then
+ if [[ ${EPYTHON} == python2* ]] ; then
+ elog " '--plugins ${EPYTHON},gevent-${EPYTHON}' for gevent support in ${EPYTHON}"
+ else
+ elog " (gevent is currently not support in ${EPYTHON})"
+ fi
+ fi
+ }
+
+ use python && python_foreach_impl python_pkg_postinst
+
+ if use ruby ; then
+ for ruby in $USE_RUBY; do
+ use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}"
+ if [[ "${ruby}" == *ruby19 ]] ; then
+ elog " '--plugins fibre' for ruby-1.9 fibres"
+ fi
+ done
+ fi
+}