diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2014-08-08 18:09:08 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2014-08-08 18:09:08 +0000 |
commit | 7d415f15366a7fb67d882679e8449aac70d41090 (patch) | |
tree | ba5ec36aaefc585f44af618b0b87f4d4a71ad817 /www-servers | |
parent | Linux patch 3.15.9 (diff) | |
download | historical-7d415f15366a7fb67d882679e8449aac70d41090.tar.gz historical-7d415f15366a7fb67d882679e8449aac70d41090.tar.bz2 historical-7d415f15366a7fb67d882679e8449aac70d41090.zip |
Fix the Apache2 module loading configuration for the proxy module and change recommendation to the proxy module.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0x1A5D023975B0583D!
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/uwsgi/ChangeLog | 9 | ||||
-rw-r--r-- | www-servers/uwsgi/Manifest | 14 | ||||
-rw-r--r-- | www-servers/uwsgi/files/42_mod_uwsgi-r2.conf | 9 | ||||
-rw-r--r-- | www-servers/uwsgi/uwsgi-2.0.6-r1.ebuild | 379 |
4 files changed, 399 insertions, 12 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog index fc067f9bb215..53f315f13a37 100644 --- a/www-servers/uwsgi/ChangeLog +++ b/www-servers/uwsgi/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-servers/uwsgi # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.58 2014/07/01 10:34:50 ultrabug Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.59 2014/08/08 18:08:01 dev-zero Exp $ + +*uwsgi-2.0.6-r1 (08 Aug 2014) + + 08 Aug 2014; Tiziano Müller <dev-zero@gentoo.org> +files/42_mod_uwsgi-r2.conf, + +uwsgi-2.0.6-r1.ebuild: + Fix the Apache2 module loading configuration for the proxy module and change + recommendation to the proxy module. *uwsgi-2.0.6 (01 Jul 2014) diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index db94ac222778..722121e2e127 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -1,9 +1,7 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX 1.1.2-threaded-php.patch 1098 SHA256 e5f03fcdf2ebf7d2867b21e640f2c44f23da169108b2ea964e96fea44152d49b SHA512 d213c827710b75c1e4e1a1ad657515a7d2cacf02fa1f2f309d5cf986b3650ea20529077e2d2df5a22ed6edf60e43e755378ec6ea556c43c844cf534552239d75 WHIRLPOOL 1b0e42b83aa45a3bb17edaf4f9d7b260bc9dae8d7e8f06a38c97045361e64ddd9e774a1df1244e521c7973b27d27d40cbca4d8d2b16d0f9765ca2daa00cc3be8 AUX 1.2.3-pyerl.patch 1015 SHA256 1da74cb8d108f46c4faa39548f73de2f74849dde81d1012b71c7c91ab939596b SHA512 b298feccb2604b9459a15699d786c26be9d830f88a4a00beca69fba3ff0d5d78cc239e6dcce51da32121c8bb4d72af41a6e57e5594a3005cfceb4feebbffaed2 WHIRLPOOL 60ff1374e1f13c9ffaa65996a24d87d86d64d7f4edb9d1378d0b7287bfeb285d5123da4532c6e0fb022ff78d80a6b5eba9d6bb8c36536145d4a11cbdecee23f6 AUX 42_mod_uwsgi-r1.conf 248 SHA256 40ef0a3916eba8f1a87828911571e9d8bf838f38f050d67df1662aca11ba6c91 SHA512 84babaa9aa5cc1a52235f1b4febe3d9dd1a90e7e28c54499d78219727a222e2c2f4db001d898e0fdc46718ea582ce3fc98d0fbbf94b1730f4a139555225b4538 WHIRLPOOL d96ef19fce89fbb36e1bc7701b2fb7424945f5da9d7eee071de74c9975463da9ba5be0a1a855e75c39705317ce0eef5116e7733d74091bfd984d3c1f189edea3 +AUX 42_mod_uwsgi-r2.conf 254 SHA256 8b0775302d112a3f1959776e89a5cc13a325d80719281db8d3e896a95f5fb691 SHA512 de827913644ff8763d7e9f6907e5dd500bc7d25f861c9e8dd07d6f070e96b9eb39bdacc3a8e7ca0925f2a8ee1cd74bfe22da467bab39e319b7cabee36d31dc70 WHIRLPOOL 2c9238712c10e0e1b0b7fa1c7e802a5ce973d71fc5e2f8eb03831c9b49dce0e98a6ee3acf9d17fcc32de1914f4d9955a9c0a218cf24658d4df5d0449bb211744 AUX 42_mod_uwsgi.conf 159 SHA256 b759712baa7b8abab2ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861 SHA512 14eb8d58f814657da9d28215d4096373a26e5bdd9e3953bd37dc6008f42b04ca99ac5aa552bec36d1d8503e7ae54c78fcc00c1f6fe9d6daf983764bae07b802f WHIRLPOOL ec352b176c89441532378446cb909b3383054afbbee5d4f24c801eb5716d1143737c098bd25be46aa4399e54937c6b786fdca3e0343b0b4c91442456ba565f79 AUX gentoo.buildconf 490 SHA256 a82aeada480a7571181c6767ba2df40f14117e4a3070920961510eee05035a19 SHA512 d5bdc136374aed58ce206ea72cc45c72750f60117eef98960356b5cd64e2152c454af6b5aebb28f03ad46b42ea95a16fbf1e4a6f976ae78744550803ac775fe2 WHIRLPOOL f5f13dc512e470bc32a1d487176cbc82dddb280b7f0b284580f5b0106a9f03aae123b9ac2298f4e61068212cc0afde7b970ff9a4c9f18e11bffb58a4c8d993e4 AUX uwsgi.confd-r1 1438 SHA256 baa1522d488523daf67d3d480f9aa5076ae3252ab2731f4c25ef564caba8cfd2 SHA512 51e7154ced90a6a531944db8df7bdc2d502550501845ff153e05f94623d0d547180b78fe80203a272af60306b9d3d8575dc101e4069b655091a821929a6e4436 WHIRLPOOL cb12c57c5eb636941e429900ae8f932129ace89620d46d537108ba3aa15e694eb4038bca5739eefba544dc02c8ecefdb53419509ed542c40ec5803f4f0516ff5 @@ -16,13 +14,7 @@ DIST uwsgi-2.0.5.1.tar.gz 770256 SHA256 4d486a6ddc9389245790f210673f524e1eb0631f DIST uwsgi-2.0.6.tar.gz 773418 SHA256 a5cd4cf8c7dc694fd433d8492019f30d19e7c3bf233b5f28823795026864166e SHA512 21540ac40e46866d0e1f420c64da2ed1328bf3442105f9dad28cc3635ee4987bb769828e51b1e0840fd3db9e7cd36fce5ef528c70ad89feb83228b0fdbeef07f WHIRLPOOL a8e76c784ac7bd7de46eff9257537082ccc02c8d834e867d733eeb2b3b36fd7db4767262293639fe0e07490b01843e46f6296d188eff3fe5cfc4ea15fa18d44f EBUILD uwsgi-1.4.10.ebuild 9601 SHA256 55291be8816fbc9996ceb27e2126c4811bc2c14155d36dd88f159fb827e06eca SHA512 3660696d2d145d1845a79b591c89351110ef78c569b019987e09f4136b92a7ddaa6b8f931befae8768f08b8772c6e9a10297fada687e0089ec16cf4748b020a9 WHIRLPOOL 71876fc46f89b64e764d88a7e89fd617542bea2003a0c4b5b4c07ab4041fc76827862cf64c6d43d7c6d8737601c2e02b1205e51dc860092eb2c29d1559deedc1 EBUILD uwsgi-2.0.5.1.ebuild 11837 SHA256 d30f092b3d01fd7ac61fb49145eb2b25b6cc24461be0e8f20dddb66339bb0dbb SHA512 cb7cae355f8fc1f44dd27f2ae9ebcfc043bc1f911d0665923823f8abc80620fbba373a343e56f567ab60c704b35d5ec15ed97424ea9dabfb3ce4499b285e287d WHIRLPOOL 6d9706678eb11413988019330c8bf7e3d7f224268885967512f70f7ecbacf0b19c6847a30abbd37921aa0e655de252b4f0789662d96b31b9796a03eb51f6e572 +EBUILD uwsgi-2.0.6-r1.ebuild 11851 SHA256 53db2091822e02de29fcd9d679d2cfe7d19590164f96ec94bcd410c83b332bec SHA512 7b96217a2a917f90a5249a7e99210dcff43097ae9f31d9b18a92e2b7e03161839091377bfc98f712f51d4fb5b9a20f24fb5f374a8e486703dee9e82072e86243 WHIRLPOOL 2100bceab244a86bebb8b65da015c8463a97b0746441b7df008a423d6212e903d468d28e7455d011258b8b6929dff392eb2c87a4997059caebfb4112d1c8e161 EBUILD uwsgi-2.0.6.ebuild 11835 SHA256 e53e3cbd2cf2c59c78be95340b88d17596af93a1ab0f3ade9c4a01873fa10492 SHA512 4096a624efd38b06827b9d6c40553dcfccfba1d669218050312b864d10744015966aa72fc911c51c637f9caaf9ba348e9870dab09bdbe308fe6709b5dbe0976a WHIRLPOOL 77b63570927b8c3d99e6a5d7d1e2bc119148489fcc22c160b169e85380b4cfd8b2ceaafd90d2258dfcc93af3d023caef0ea435f96f80732c761bf12d3aa64fdc -MISC ChangeLog 10465 SHA256 2ab24b2a6afe1e0262de3849f97a0a528c17a2c9dc5947719c6651db97d1b5b2 SHA512 555b3f85bcdd6bdbd7cc87fcbeaf1cd585201fc92ca6e33d07f08ee16d7689d6b673d7a9388e1a9c34dffc9de609705659b1682a5314ae08fd916318baaf86c4 WHIRLPOOL 03e54a9bfd3a99503a674ec0f200df8e1763fcdac0ad70dece9d3debddbf45e124b6a33182b6a7d426f5301c8b8762c1ca2a9eb05eb0ff80270f1bcb7c2bb643 +MISC ChangeLog 10722 SHA256 58817347f810b3f3f690f51b0145478ee088440970d446d4fbdac6081db972f3 SHA512 12e77882da2c2848685e75a061ffa6d57ff2567b080b05f5d619a7873008efc57246c80fe736e622f8facff93171a91aa70da2a7571b56e12a029f4e9e1c3794 WHIRLPOOL 5d91d05c152fffb74e82db4f5b390f0d44b30d78be6c4d863aad2845c0d951958dabe87bf1fdf6291779b4db65d2457bcd18ad1d6bf6726441cf70a3c406974f MISC metadata.xml 2594 SHA256 6e77fb15045b2feda8587315d54f7791c9c9af4b0e0f13d72a371646e32216e3 SHA512 89ac61cbfc089ff5452bc909f429431377c67aedc828098ffb33463a90f4a66524729a41fb83460df772218354d564529b7c3c206d3262c1025da1a6b1dd038a WHIRLPOOL 53c09c69fdc10762171891aeff5b731471cdd135ddb90896bfb2a2b1a0e1b841d6db97f9c217c44aed5c4e56d50f6eaff540646a2d05a7e8ce5f20bef9b326dd ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iF4EAREIAAYFAlOyjtAACgkQKiQSS7ZY+hPkzgEA5fYpPVlze/L4P5Hvz4kPz1cy -Wo668sCuzAFDhWJZQTQA/1R0gOrWENENCjbeV+G7Wtt0/Lk6rYVL31/fbPVp39KL -=jXEl ------END PGP SIGNATURE----- diff --git a/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf b/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf new file mode 100644 index 000000000000..85ede87b037b --- /dev/null +++ b/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf @@ -0,0 +1,9 @@ +<IfDefine PROXY_UWSGI> + LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so +</IfDefine> +<IfDefine RUWSGI> + LoadModule uwsgi_module modules/mod_Ruwsgi.so +</IfDefine> +<IfDefine UWSGI> + LoadModule uwsgi_module modules/mod_uwsgi.so +</IfDefine> diff --git a/www-servers/uwsgi/uwsgi-2.0.6-r1.ebuild b/www-servers/uwsgi/uwsgi-2.0.6-r1.ebuild new file mode 100644 index 000000000000..792dfe6ba937 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.6-r1.ebuild @@ -0,0 +1,379 @@ +# 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.6-r1.ebuild,v 1.1 2014/08/08 18:08:01 dev-zero Exp $ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 python3_{2,3,4} ) + +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 mono perl ) # plugins which can be built in the main build process +LANG_SUPPORT_EXTENDED=( 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 +# *go*: TODO +# *java*: 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_asyncio? ( python_targets_python3_4 python_gevent ) + 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 ) + 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 ) + mono? ( =dev-lang/mono-2* ) + 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 )" + +want_apache2 + +S="${WORKDIR}/${MY_P}" +APXS2_S="${S}/apache2" +APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" + +src_unpack() { + default +} + +pkg_setup() { + python_setup + use ruby && ruby-ng_pkg_setup + depend.apache_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|/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 + 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 + 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" + 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}" == "34" ] ; 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 +} + +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 the name for the pkg-config file to lua, since we don't have + # slotted lua + 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 + + 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 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 + + 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 a proxy module, considered stable and is now the recommended module." + 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 + if [[ ${EPYTHON} == python2* ]] ; then + elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" + else + elog " (gevent is currently not supported in ${EPYTHON})" + fi + fi + } + + use python && python_foreach_impl python_pkg_postinst + + if use ruby ; then + for ruby in $USE_RUBY; do + if use ruby_targets_${ruby} ; then + elog " '--plugins rack_${ruby/.}' for ${ruby}" + elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" + elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" + fi + done + fi +} |