1 |
commit: d4d0100df91df00a9886f514db5f588780bdf187 |
2 |
Author: Ultrabug <ultrabug <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 31 13:58:43 2015 +0000 |
4 |
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 13:58:43 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d0100d |
7 |
|
8 |
www-servers/uwsgi: drop old |
9 |
|
10 |
Package-Manager: portage-2.2.25 |
11 |
|
12 |
www-servers/uwsgi/Manifest | 1 - |
13 |
www-servers/uwsgi/uwsgi-2.0.11.1-r1.ebuild | 400 ----------------------------- |
14 |
www-servers/uwsgi/uwsgi-2.0.11.1.ebuild | 377 --------------------------- |
15 |
www-servers/uwsgi/uwsgi-2.0.11.2.ebuild | 400 ----------------------------- |
16 |
4 files changed, 1178 deletions(-) |
17 |
|
18 |
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest |
19 |
index 80f2c74..20bc0c3 100644 |
20 |
--- a/www-servers/uwsgi/Manifest |
21 |
+++ b/www-servers/uwsgi/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
-DIST uwsgi-2.0.11.1.tar.gz 782091 SHA256 75a7d3138cfa9cd81a760c2f8a43f3d80961edc8e4f27043dc1412206c926287 SHA512 0978234bf1592b52f0e8718eb63de141e2aa9928e7efff3e4833f795ee66bcb14fa1a35a141d9b590d5fffc9fbc6bc8ed3c8095e04af27a34318f37dbac6117c WHIRLPOOL f830cf3cdbfda90dc65efbd01550644eb06e091fd91b6237f851efc71d2bcb1e811ad9e8db827abfeda76e041a5ef61711c84f0b3a93e041da598d349b788688 |
24 |
DIST uwsgi-2.0.11.2.tar.gz 782133 SHA256 0b889b0b4d2dd3f6625df28cb0b86ec44a68d074ede2d0dfad0b91e88914885c SHA512 627759ec9cccc8de74016c245b19069dc7e6970c398be95e707c2c9e36fa06438249f130d0c2bdee16f585b123094a9dd4977de5be276a065ddce30a9698da9a WHIRLPOOL 314a397bc678aefe59df8b6a87584768d19b5d52cfd894d518ebe3e9019fb74232c9139c9cc5af00da8b1bc21c369c7a84e9d424b7c5986e6ece65172f3cca27 |
25 |
DIST uwsgi-2.0.12.tar.gz 784048 SHA256 306b51db97648d6d23bb7eacd76e5a413434575f220dac1de231c8c26d33e409 SHA512 3178d140d8365d4f876002490f138c1586fdffa1dbd1a9ec2279097535fcdf5e6bac16acf5d409b51b54c003e0533b724a95a57a213b7310a624ee02bf5c1796 WHIRLPOOL 64bbd21a74ec493a3e48981988a76c9c424b406e48784244717567c3842f954229a503d41f36e651634668be5117a533c15e0e51473e99c831676e483cd7d87a |
26 |
DIST uwsgi-2.0.9.tar.gz 779244 SHA256 fe0489bca0a8b95653908be2297e35699fb9e992f728e382224587ee6b918295 SHA512 8afb6ca51aa2113e2c9fc0b90e11ce8c1aeddb38f41c7b0d5da6811d7ef93aa8b9e015abfd29b1ced35b0f6a00fd7285b8140b855fc3ee79804e2513e94a9fb5 WHIRLPOOL 362abe240b9a3f170409b850d9ae5186701b137159cd91d2e689b5f3d43dfe779f13d9e4554b60b82efd534a00751394a7982130912f7f106ac6e7c6dbde88d6 |
27 |
|
28 |
diff --git a/www-servers/uwsgi/uwsgi-2.0.11.1-r1.ebuild b/www-servers/uwsgi/uwsgi-2.0.11.1-r1.ebuild |
29 |
deleted file mode 100644 |
30 |
index f778a3b..0000000 |
31 |
--- a/www-servers/uwsgi/uwsgi-2.0.11.1-r1.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,400 +0,0 @@ |
34 |
-# Copyright 1999-2015 Gentoo Foundation |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
-# $Id$ |
37 |
- |
38 |
-EAPI="5" |
39 |
- |
40 |
-PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) |
41 |
-PYTHON_REQ_USE="threads(+)" |
42 |
- |
43 |
-RUBY_OPTIONAL="yes" |
44 |
-USE_RUBY="ruby20 ruby21" |
45 |
- |
46 |
-PHP_EXT_INI="no" |
47 |
-PHP_EXT_NAME="dummy" |
48 |
-PHP_EXT_OPTIONAL_USE="php" |
49 |
-USE_PHP="php5-4 php5-5 php5-6" # deps must be registered separately below |
50 |
- |
51 |
-MY_P="${P/_/-}" |
52 |
- |
53 |
-inherit apache-module distutils-r1 eutils flag-o-matic multilib pax-utils php-ext-source-r2 python-r1 ruby-ng versionator |
54 |
- |
55 |
-DESCRIPTION="uWSGI server for Python web applications" |
56 |
-HOMEPAGE="http://projects.unbit.it/uwsgi/" |
57 |
-SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" |
58 |
- |
59 |
-LICENSE="GPL-2" |
60 |
-SLOT="0" |
61 |
-KEYWORDS="~amd64 ~x86" |
62 |
- |
63 |
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool |
64 |
- http ugreen signal syslog rsyslog |
65 |
- router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} |
66 |
- {core,fast,raw,ssl}router |
67 |
- redislog mongodblog log{file,socket} |
68 |
- spooler cheaper_busyness symcall |
69 |
- transformation_{chunked,gzip,offload,tofile} |
70 |
- zergpool ) |
71 |
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron |
72 |
- dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter |
73 |
- geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam |
74 |
- rados router_{access,radius,spnego,xmldir} |
75 |
- sqlite ssi stats_pusher_statsd |
76 |
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) |
77 |
- |
78 |
-LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process |
79 |
-LANG_SUPPORT_EXTENDED=( lua php pypy python python_asyncio python_gevent ruby ) |
80 |
- |
81 |
-# plugins to be ignored (for now): |
82 |
-# cheaper_backlog2: example plugin |
83 |
-# coroae: TODO |
84 |
-# cplusplus: partially example code, needs explicit class |
85 |
-# dummy: no idea |
86 |
-# example: example plugin |
87 |
-# exception_log: example plugin |
88 |
-# *go*: TODO |
89 |
-# *java*: TODO |
90 |
-# v8: TODO |
91 |
-# matheval: TODO |
92 |
-IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing +ssl +xml yajl yaml zeromq" |
93 |
- |
94 |
-for plugin in ${UWSGI_PLUGINS_STD[@]} ; do IUSE="${IUSE} +uwsgi_plugins_${plugin}" ; done |
95 |
-for plugin in ${UWSGI_PLUGINS_OPT[@]} ; do IUSE="${IUSE} uwsgi_plugins_${plugin}" ; done |
96 |
-IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" |
97 |
- |
98 |
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) |
99 |
- uwsgi_plugins_logcrypto? ( ssl ) |
100 |
- uwsgi_plugins_sslrouter? ( ssl ) |
101 |
- routing? ( pcre ) |
102 |
- uwsgi_plugins_emperor_zeromq? ( zeromq ) |
103 |
- uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) |
104 |
- uwsgi_plugins_router_xmldir? ( xml ) |
105 |
- pypy? ( python_targets_python2_7 ) |
106 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
107 |
- python_asyncio? ( python_targets_python3_4 python_gevent ) |
108 |
- python_gevent? ( python ) |
109 |
- expat? ( xml )" |
110 |
- |
111 |
-# util-linux is required for libuuid when requesting zeromq support |
112 |
-# Order: |
113 |
-# 1. Unconditional |
114 |
-# 2. General features |
115 |
-# 3. Plugins |
116 |
-# 4. Language/app support |
117 |
-CDEPEND="sys-libs/zlib |
118 |
- caps? ( sys-libs/libcap ) |
119 |
- json? ( !yajl? ( dev-libs/jansson ) |
120 |
- yajl? ( dev-libs/yajl ) ) |
121 |
- pcre? ( dev-libs/libpcre:3 ) |
122 |
- ssl? ( dev-libs/openssl:= ) |
123 |
- xml? ( !expat? ( dev-libs/libxml2 ) |
124 |
- expat? ( dev-libs/expat ) ) |
125 |
- yaml? ( dev-libs/libyaml ) |
126 |
- zeromq? ( net-libs/zeromq sys-apps/util-linux ) |
127 |
- uwsgi_plugins_alarm_curl? ( net-misc/curl ) |
128 |
- uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) |
129 |
- uwsgi_plugins_curl_cron? ( net-misc/curl ) |
130 |
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) |
131 |
- uwsgi_plugins_geoip? ( dev-libs/geoip ) |
132 |
- uwsgi_plugins_ldap? ( net-nds/openldap ) |
133 |
- uwsgi_plugins_pam? ( virtual/pam ) |
134 |
- uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) |
135 |
- uwsgi_plugins_rados? ( sys-cluster/ceph ) |
136 |
- uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) |
137 |
- uwsgi_plugins_router_spnego? ( virtual/krb5 ) |
138 |
- uwsgi_plugins_rsyslog? ( app-admin/rsyslog ) |
139 |
- uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) |
140 |
- uwsgi_plugins_webdav? ( dev-libs/libxml2 ) |
141 |
- uwsgi_plugins_xslt? ( dev-libs/libxslt ) |
142 |
- lua? ( dev-lang/lua:= ) |
143 |
- mono? ( =dev-lang/mono-2* ) |
144 |
- perl? ( dev-lang/perl:= ) |
145 |
- php? ( |
146 |
- php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
147 |
- php_targets_php5-5? ( dev-lang/php:5.5[embed] ) |
148 |
- ) |
149 |
- pypy? ( virtual/pypy ) |
150 |
- python? ( ${PYTHON_DEPS} ) |
151 |
- python_gevent? ( >=dev-python/gevent-1.0.1[$(python_gen_usedep 'python2*')] ) |
152 |
- ruby? ( $(ruby_implementations_depend) )" |
153 |
-DEPEND="${CDEPEND} |
154 |
- virtual/pkgconfig" |
155 |
-RDEPEND="${CDEPEND} |
156 |
- uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" |
157 |
- |
158 |
-want_apache2 |
159 |
- |
160 |
-S="${WORKDIR}/${MY_P}" |
161 |
-APXS2_S="${S}/apache2" |
162 |
-APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" |
163 |
- |
164 |
-src_unpack() { |
165 |
- default |
166 |
-} |
167 |
- |
168 |
-pkg_setup() { |
169 |
- python_setup |
170 |
- use ruby && ruby-ng_pkg_setup |
171 |
- depend.apache_pkg_setup |
172 |
-} |
173 |
- |
174 |
-src_prepare() { |
175 |
- sed -i \ |
176 |
- -e "s|'-O2', ||" \ |
177 |
- -e "s|'-Werror', ||" \ |
178 |
- -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
179 |
- uwsgiconfig.py || die "sed failed" |
180 |
- |
181 |
- sed -i \ |
182 |
- -e "s|/lib|/$(get_libdir)|" \ |
183 |
- plugins/php/uwsgiplugin.py || die "sed failed" |
184 |
-} |
185 |
- |
186 |
-src_configure() { |
187 |
- local embedded_plugins=() |
188 |
- local plugins=() |
189 |
- local malloc_impl="libc" |
190 |
- local json="false" |
191 |
- local xml="false" |
192 |
- |
193 |
- for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do |
194 |
- use uwsgi_plugins_${p} && embedded_plugins+=("${p}") |
195 |
- done |
196 |
- for p in ${LANG_SUPPORT_SIMPLE[@]} ; do |
197 |
- use ${p} && plugins+=("${p}") |
198 |
- done |
199 |
- |
200 |
- # do not embed any plugins |
201 |
- if ! use embedded ; then |
202 |
- plugins=( ${plugins[@]} ${embedded_plugins[@]} ) |
203 |
- embedded_plugins=() |
204 |
- fi |
205 |
- |
206 |
- # flatten the arrays |
207 |
- plugins=${plugins[@]} |
208 |
- embedded_plugins=${embedded_plugins[@]} |
209 |
- |
210 |
- # rename some of the use flags, language plugins are always real plugins |
211 |
- plugins="${plugins/perl/psgi}" |
212 |
- plugins="${plugins/sqlite/sqlite3}" |
213 |
- embedded_plugins="${embedded_plugins/sqlite/sqlite3}" |
214 |
- |
215 |
- # override defaults as requested by the user |
216 |
- if use xml; then |
217 |
- use expat && xml="expat" || xml="libxml2" |
218 |
- fi |
219 |
- if use json; then |
220 |
- use yajl && json="yajl" || json="jansson" |
221 |
- fi |
222 |
- use jemalloc && malloc_impl="jemalloc" |
223 |
- |
224 |
- # prepare the buildconf for gentoo |
225 |
- cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini |
226 |
- sed -i \ |
227 |
- -e "s|VAR_XML|${xml}|" \ |
228 |
- -e "s|VAR_YAML|$(usex yaml true false)|" \ |
229 |
- -e "s|VAR_JSON|${json}|" \ |
230 |
- -e "s|VAR_SSL|$(usex ssl true false)|" \ |
231 |
- -e "s|VAR_PCRE|$(usex pcre true false)|" \ |
232 |
- -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ |
233 |
- -e "s|VAR_ROUTING|$(usex routing true false)|" \ |
234 |
- -e "s|VAR_DEBUG|$(usex debug true false)|" \ |
235 |
- -e "s|VAR_MALLOC|${malloc_impl}|" \ |
236 |
- -e "s|VAR_PLUGINS|${plugins// /, }|" \ |
237 |
- -e "s|VAR_PLUGIN_DIR|/usr/$(get_libdir)/uwsgi|" \ |
238 |
- -e "s|VAR_BUILD_DIR|${T}/plugins|" \ |
239 |
- -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ |
240 |
- buildconf/gentoo.ini |
241 |
- |
242 |
- use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
243 |
- use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
244 |
- |
245 |
- if use uwsgi_plugins_emperor_pg ; then |
246 |
- PGPV="$(best_version dev-db/postgresql)" |
247 |
- PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" |
248 |
- sed -i \ |
249 |
- -e "s|pg_config|pg_config${PGSLOT/.}|" \ |
250 |
- plugins/emperor_pg/uwsgiplugin.py || die "sed failed" |
251 |
- fi |
252 |
-} |
253 |
- |
254 |
-each_ruby_compile() { |
255 |
- cd "${WORKDIR}/${MY_P}" |
256 |
- |
257 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
258 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" |
259 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" |
260 |
-} |
261 |
- |
262 |
-python_compile_plugins() { |
263 |
- local EPYV |
264 |
- local PYV |
265 |
- EPYV=${EPYTHON/.} |
266 |
- PYV=${EPYV/python} |
267 |
- |
268 |
- if [[ ${EPYTHON} == pypy* ]] ; then |
269 |
- echo "skipping because pypy is not meant to build plugins on its own" |
270 |
- return |
271 |
- fi |
272 |
- |
273 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" |
274 |
- |
275 |
- if use python_asyncio ; then |
276 |
- if [ "${PYV}" == "34" ] ; then |
277 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" |
278 |
- fi |
279 |
- fi |
280 |
- |
281 |
- if use python_gevent ; then |
282 |
- if [ "${PYV}" == "27" ] ; then |
283 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" |
284 |
- fi |
285 |
- fi |
286 |
- |
287 |
- if use pypy ; then |
288 |
- if [ "${PYV}" == "27" ] ; then |
289 |
- # TODO: do some proper patching ? The wiki didn't help... I gave up for now. |
290 |
- # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so |
291 |
- append-ldflags -Wl,-z,noexecstack |
292 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" |
293 |
- fi |
294 |
- fi |
295 |
-} |
296 |
- |
297 |
-python_install_symlinks() { |
298 |
- dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} |
299 |
-} |
300 |
- |
301 |
-src_compile() { |
302 |
- mkdir -p "${T}/plugins" |
303 |
- |
304 |
- python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
305 |
- |
306 |
- if use lua ; then |
307 |
- # setting the name for the pkg-config file to lua, since we don't have |
308 |
- # slotted lua |
309 |
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
310 |
- fi |
311 |
- |
312 |
- if use php ; then |
313 |
- for s in $(php_get_slots); do |
314 |
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
315 |
- done |
316 |
- fi |
317 |
- |
318 |
- if use python ; then |
319 |
- python_foreach_impl python_compile_plugins |
320 |
- fi |
321 |
- |
322 |
- if use ruby ; then |
323 |
- ruby-ng_src_compile |
324 |
- fi |
325 |
- |
326 |
- if use apache2 ; then |
327 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
328 |
- APXS2_ARGS="-c mod_${m}.c" |
329 |
- apache-module_src_compile |
330 |
- done |
331 |
- fi |
332 |
-} |
333 |
- |
334 |
-src_install() { |
335 |
- dobin uwsgi |
336 |
- pax-mark m "${D}"/usr/bin/uwsgi |
337 |
- |
338 |
- insinto /usr/$(get_libdir)/uwsgi |
339 |
- doins "${T}/plugins"/*.so |
340 |
- |
341 |
- use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
342 |
- use lua && dosym uwsgi /usr/bin/uwsgi_lua |
343 |
- use mono && dosym uwsgi /usr/bin/uwsgi_mono |
344 |
- use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
345 |
- |
346 |
- if use php ; then |
347 |
- for s in $(php_get_slots); do |
348 |
- dosym uwsgi /usr/bin/uwsgi_${s/.} |
349 |
- done |
350 |
- fi |
351 |
- |
352 |
- if use python ; then |
353 |
- python_foreach_impl python_install_symlinks |
354 |
- python_foreach_impl python_domodule uwsgidecorators.py |
355 |
- fi |
356 |
- |
357 |
- if use apache2; then |
358 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
359 |
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
360 |
- apache-module_src_install |
361 |
- done |
362 |
- fi |
363 |
- |
364 |
- newinitd "${FILESDIR}"/uwsgi.initd-r6 uwsgi |
365 |
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi |
366 |
- keepdir /etc/"${PN}".d |
367 |
- use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" |
368 |
-} |
369 |
- |
370 |
-pkg_postinst() { |
371 |
- if use apache2 ; then |
372 |
- elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
373 |
- elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
374 |
- elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
375 |
- elog "Therefore you can enable only one of them at a time." |
376 |
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
377 |
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
378 |
- elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." |
379 |
- fi |
380 |
- |
381 |
- elog "Append the following options to the uwsgi call to load the respective language plugin:" |
382 |
- use cgi && elog " '--plugins cgi' for cgi" |
383 |
- use lua && elog " '--plugins lua' for lua" |
384 |
- use mono && elog " '--plugins mono' for mono" |
385 |
- use perl && elog " '--plugins psgi' for perl" |
386 |
- |
387 |
- if use php ; then |
388 |
- for s in $(php_get_slots); do |
389 |
- elog " '--plugins ${s/.}' for ${s}" |
390 |
- done |
391 |
- fi |
392 |
- |
393 |
- python_pkg_postinst() { |
394 |
- local EPYV |
395 |
- local PYV |
396 |
- EPYV=${EPYTHON/.} |
397 |
- PYV=${EPYV/python} |
398 |
- |
399 |
- if [[ ${EPYTHON} == pypy* ]] ; then |
400 |
- elog " '--plugins pypy' for pypy" |
401 |
- return |
402 |
- fi |
403 |
- |
404 |
- elog " " |
405 |
- elog " '--plugins ${EPYV}' for ${EPYTHON}" |
406 |
- if use python_asyncio ; then |
407 |
- if [[ ${EPYV} == python34 ]] ; then |
408 |
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" |
409 |
- else |
410 |
- elog " (asyncio is only supported in python3.4)" |
411 |
- fi |
412 |
- fi |
413 |
- if use python_gevent ; then |
414 |
- if [[ ${EPYTHON} == python2* ]] ; then |
415 |
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" |
416 |
- else |
417 |
- elog " (gevent is currently not supported in ${EPYTHON})" |
418 |
- fi |
419 |
- fi |
420 |
- } |
421 |
- |
422 |
- use python && python_foreach_impl python_pkg_postinst |
423 |
- |
424 |
- if use ruby ; then |
425 |
- for ruby in $USE_RUBY; do |
426 |
- if use ruby_targets_${ruby} ; then |
427 |
- elog " '--plugins rack_${ruby/.}' for ${ruby}" |
428 |
- elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" |
429 |
- elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" |
430 |
- fi |
431 |
- done |
432 |
- fi |
433 |
-} |
434 |
|
435 |
diff --git a/www-servers/uwsgi/uwsgi-2.0.11.1.ebuild b/www-servers/uwsgi/uwsgi-2.0.11.1.ebuild |
436 |
deleted file mode 100644 |
437 |
index 714b5bd..0000000 |
438 |
--- a/www-servers/uwsgi/uwsgi-2.0.11.1.ebuild |
439 |
+++ /dev/null |
440 |
@@ -1,377 +0,0 @@ |
441 |
-# Copyright 1999-2015 Gentoo Foundation |
442 |
-# Distributed under the terms of the GNU General Public License v2 |
443 |
-# $Id$ |
444 |
- |
445 |
-EAPI="5" |
446 |
- |
447 |
-PYTHON_COMPAT=( python2_7 python3_{3,4} ) |
448 |
-PYTHON_REQ_USE="threads(+)" |
449 |
- |
450 |
-RUBY_OPTIONAL="yes" |
451 |
-USE_RUBY="ruby20 ruby21" |
452 |
- |
453 |
-PHP_EXT_INI="no" |
454 |
-PHP_EXT_NAME="dummy" |
455 |
-PHP_EXT_OPTIONAL_USE="php" |
456 |
-USE_PHP="php5-4 php5-5 php5-6" # deps must be registered separately below |
457 |
- |
458 |
-MY_P="${P/_/-}" |
459 |
- |
460 |
-inherit apache-module distutils-r1 eutils multilib pax-utils php-ext-source-r2 python-r1 ruby-ng versionator |
461 |
- |
462 |
-DESCRIPTION="uWSGI server for Python web applications" |
463 |
-HOMEPAGE="http://projects.unbit.it/uwsgi/" |
464 |
-SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" |
465 |
- |
466 |
-LICENSE="GPL-2" |
467 |
-SLOT="0" |
468 |
-KEYWORDS="~amd64 ~x86" |
469 |
- |
470 |
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool |
471 |
- http ugreen signal syslog rsyslog |
472 |
- router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} |
473 |
- {core,fast,raw,ssl}router |
474 |
- redislog mongodblog log{file,socket} |
475 |
- spooler cheaper_busyness symcall |
476 |
- transformation_{chunked,gzip,offload,tofile} |
477 |
- zergpool ) |
478 |
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron |
479 |
- dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter |
480 |
- geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam |
481 |
- rados router_{access,radius,spnego,xmldir} |
482 |
- sqlite ssi stats_pusher_statsd |
483 |
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) |
484 |
- |
485 |
-LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process |
486 |
-LANG_SUPPORT_EXTENDED=( lua php python python_asyncio python_gevent ruby ) |
487 |
- |
488 |
-# plugins to be ignored (for now): |
489 |
-# cheaper_backlog2: example plugin |
490 |
-# coroae: TODO |
491 |
-# cplusplus: partially example code, needs explicit class |
492 |
-# dummy: no idea |
493 |
-# example: example plugin |
494 |
-# exception_log: example plugin |
495 |
-# *go*: TODO |
496 |
-# *java*: TODO |
497 |
-# v8: TODO |
498 |
-# matheval: TODO |
499 |
-IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing +ssl +xml yajl yaml zeromq" |
500 |
- |
501 |
-for plugin in ${UWSGI_PLUGINS_STD[@]} ; do IUSE="${IUSE} +uwsgi_plugins_${plugin}" ; done |
502 |
-for plugin in ${UWSGI_PLUGINS_OPT[@]} ; do IUSE="${IUSE} uwsgi_plugins_${plugin}" ; done |
503 |
-IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" |
504 |
- |
505 |
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) |
506 |
- uwsgi_plugins_logcrypto? ( ssl ) |
507 |
- uwsgi_plugins_sslrouter? ( ssl ) |
508 |
- routing? ( pcre ) |
509 |
- uwsgi_plugins_emperor_zeromq? ( zeromq ) |
510 |
- uwsgi_plugins_router_xmldir? ( xml ) |
511 |
- uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) |
512 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
513 |
- python_asyncio? ( python_targets_python3_4 python_gevent ) |
514 |
- python_gevent? ( python ) |
515 |
- expat? ( xml )" |
516 |
- |
517 |
-# util-linux is required for libuuid when requesting zeromq support |
518 |
-# Order: |
519 |
-# 1. Unconditional |
520 |
-# 2. General features |
521 |
-# 3. Plugins |
522 |
-# 4. Language/app support |
523 |
-CDEPEND="sys-libs/zlib |
524 |
- caps? ( sys-libs/libcap ) |
525 |
- json? ( !yajl? ( dev-libs/jansson ) |
526 |
- yajl? ( dev-libs/yajl ) ) |
527 |
- pcre? ( dev-libs/libpcre:3 ) |
528 |
- ssl? ( dev-libs/openssl:= ) |
529 |
- xml? ( !expat? ( dev-libs/libxml2 ) |
530 |
- expat? ( dev-libs/expat ) ) |
531 |
- yaml? ( dev-libs/libyaml ) |
532 |
- zeromq? ( net-libs/zeromq sys-apps/util-linux ) |
533 |
- uwsgi_plugins_alarm_curl? ( net-misc/curl ) |
534 |
- uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) |
535 |
- uwsgi_plugins_curl_cron? ( net-misc/curl ) |
536 |
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) |
537 |
- uwsgi_plugins_geoip? ( dev-libs/geoip ) |
538 |
- uwsgi_plugins_ldap? ( net-nds/openldap ) |
539 |
- uwsgi_plugins_pam? ( virtual/pam ) |
540 |
- uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) |
541 |
- uwsgi_plugins_rados? ( sys-cluster/ceph ) |
542 |
- uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) |
543 |
- uwsgi_plugins_router_spnego? ( virtual/krb5 ) |
544 |
- uwsgi_plugins_rsyslog? ( app-admin/rsyslog ) |
545 |
- uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) |
546 |
- uwsgi_plugins_webdav? ( dev-libs/libxml2 ) |
547 |
- uwsgi_plugins_xslt? ( dev-libs/libxslt ) |
548 |
- lua? ( dev-lang/lua:= ) |
549 |
- mono? ( =dev-lang/mono-2* ) |
550 |
- perl? ( dev-lang/perl:= ) |
551 |
- php? ( |
552 |
- php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
553 |
- php_targets_php5-5? ( dev-lang/php:5.5[embed] ) |
554 |
- ) |
555 |
- python? ( ${PYTHON_DEPS} ) |
556 |
- python_gevent? ( >=dev-python/gevent-1.0_beta2[$(python_gen_usedep 'python2*')] ) |
557 |
- ruby? ( $(ruby_implementations_depend) )" |
558 |
-DEPEND="${CDEPEND} |
559 |
- virtual/pkgconfig" |
560 |
-RDEPEND="${CDEPEND} |
561 |
- uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" |
562 |
- |
563 |
-want_apache2 |
564 |
- |
565 |
-S="${WORKDIR}/${MY_P}" |
566 |
-APXS2_S="${S}/apache2" |
567 |
-APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" |
568 |
- |
569 |
-src_unpack() { |
570 |
- default |
571 |
-} |
572 |
- |
573 |
-pkg_setup() { |
574 |
- python_setup |
575 |
- use ruby && ruby-ng_pkg_setup |
576 |
- depend.apache_pkg_setup |
577 |
-} |
578 |
- |
579 |
-src_prepare() { |
580 |
- sed -i \ |
581 |
- -e "s|'-O2', ||" \ |
582 |
- -e "s|'-Werror', ||" \ |
583 |
- -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
584 |
- uwsgiconfig.py || die "sed failed" |
585 |
- |
586 |
- sed -i \ |
587 |
- -e "s|/lib|/$(get_libdir)|" \ |
588 |
- plugins/php/uwsgiplugin.py || die "sed failed" |
589 |
-} |
590 |
- |
591 |
-src_configure() { |
592 |
- local embedded_plugins=() |
593 |
- local plugins=() |
594 |
- local malloc_impl="libc" |
595 |
- local json="false" |
596 |
- local xml="false" |
597 |
- |
598 |
- for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do |
599 |
- use uwsgi_plugins_${p} && embedded_plugins+=("${p}") |
600 |
- done |
601 |
- for p in ${LANG_SUPPORT_SIMPLE[@]} ; do |
602 |
- use ${p} && plugins+=("${p}") |
603 |
- done |
604 |
- |
605 |
- # do not embedded any plugins |
606 |
- if ! use embedded ; then |
607 |
- plugins=( ${plugins[@]} ${embedded_plugins[@]} ) |
608 |
- embedded_plugins=() |
609 |
- fi |
610 |
- |
611 |
- # flatten the arrays |
612 |
- plugins=${plugins[@]} |
613 |
- embedded_plugins=${embedded_plugins[@]} |
614 |
- |
615 |
- # rename some of the use flags, language plugins are always real plugins |
616 |
- plugins="${plugins/perl/psgi}" |
617 |
- plugins="${plugins/sqlite/sqlite3}" |
618 |
- embedded_plugins="${embedded_plugins/sqlite/sqlite3}" |
619 |
- |
620 |
- # override defaults as requested by the user |
621 |
- if use xml; then |
622 |
- use expat && xml="expat" || xml="libxml2" |
623 |
- fi |
624 |
- if use json; then |
625 |
- use yajl && json="yajl" || json="jansson" |
626 |
- fi |
627 |
- use jemalloc && malloc_impl="jemalloc" |
628 |
- |
629 |
- # prepare the buildconf for gentoo |
630 |
- cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini |
631 |
- sed -i \ |
632 |
- -e "s|VAR_XML|${xml}|" \ |
633 |
- -e "s|VAR_YAML|$(usex yaml true false)|" \ |
634 |
- -e "s|VAR_JSON|${json}|" \ |
635 |
- -e "s|VAR_SSL|$(usex ssl true false)|" \ |
636 |
- -e "s|VAR_PCRE|$(usex pcre true false)|" \ |
637 |
- -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ |
638 |
- -e "s|VAR_ROUTING|$(usex routing true false)|" \ |
639 |
- -e "s|VAR_DEBUG|$(usex debug true false)|" \ |
640 |
- -e "s|VAR_MALLOC|${malloc_impl}|" \ |
641 |
- -e "s|VAR_PLUGINS|${plugins// /, }|" \ |
642 |
- -e "s|VAR_PLUGIN_DIR|/usr/$(get_libdir)/uwsgi|" \ |
643 |
- -e "s|VAR_BUILD_DIR|${T}/plugins|" \ |
644 |
- -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ |
645 |
- buildconf/gentoo.ini |
646 |
- |
647 |
- use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
648 |
- use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
649 |
- |
650 |
- if use uwsgi_plugins_emperor_pg ; then |
651 |
- PGPV="$(best_version dev-db/postgresql)" |
652 |
- PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" |
653 |
- sed -i \ |
654 |
- -e "s|pg_config|pg_config${PGSLOT/.}|" \ |
655 |
- plugins/emperor_pg/uwsgiplugin.py || die "sed failed" |
656 |
- fi |
657 |
-} |
658 |
- |
659 |
-each_ruby_compile() { |
660 |
- cd "${WORKDIR}/${MY_P}" |
661 |
- |
662 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
663 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" |
664 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" |
665 |
-} |
666 |
- |
667 |
-python_compile_plugins() { |
668 |
- local EPYV |
669 |
- local PYV |
670 |
- EPYV=${EPYTHON/.} |
671 |
- PYV=${EPYV/python} |
672 |
- |
673 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" |
674 |
- |
675 |
- if use python_asyncio ; then |
676 |
- if [ "${PYV}" == "34" ] ; then |
677 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" |
678 |
- fi |
679 |
- fi |
680 |
- |
681 |
- if use python_gevent ; then |
682 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" |
683 |
- fi |
684 |
-} |
685 |
- |
686 |
-python_install_symlinks() { |
687 |
- dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} |
688 |
-} |
689 |
- |
690 |
-src_compile() { |
691 |
- mkdir -p "${T}/plugins" |
692 |
- |
693 |
- python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
694 |
- |
695 |
- if use lua ; then |
696 |
- # setting the name for the pkg-config file to lua, since we don't have |
697 |
- # slotted lua |
698 |
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
699 |
- fi |
700 |
- |
701 |
- if use php ; then |
702 |
- for s in $(php_get_slots); do |
703 |
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
704 |
- done |
705 |
- fi |
706 |
- |
707 |
- if use python ; then |
708 |
- python_foreach_impl python_compile_plugins |
709 |
- fi |
710 |
- |
711 |
- if use ruby ; then |
712 |
- ruby-ng_src_compile |
713 |
- fi |
714 |
- |
715 |
- if use apache2 ; then |
716 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
717 |
- APXS2_ARGS="-c mod_${m}.c" |
718 |
- apache-module_src_compile |
719 |
- done |
720 |
- fi |
721 |
-} |
722 |
- |
723 |
-src_install() { |
724 |
- dobin uwsgi |
725 |
- pax-mark m "${D}"/usr/bin/uwsgi |
726 |
- |
727 |
- insinto /usr/$(get_libdir)/uwsgi |
728 |
- doins "${T}/plugins"/*.so |
729 |
- |
730 |
- use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
731 |
- use lua && dosym uwsgi /usr/bin/uwsgi_lua |
732 |
- use mono && dosym uwsgi /usr/bin/uwsgi_mono |
733 |
- use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
734 |
- |
735 |
- if use php ; then |
736 |
- for s in $(php_get_slots); do |
737 |
- dosym uwsgi /usr/bin/uwsgi_${s/.} |
738 |
- done |
739 |
- fi |
740 |
- |
741 |
- if use python ; then |
742 |
- python_foreach_impl python_install_symlinks |
743 |
- python_foreach_impl python_domodule uwsgidecorators.py |
744 |
- fi |
745 |
- |
746 |
- if use apache2; then |
747 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
748 |
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
749 |
- apache-module_src_install |
750 |
- done |
751 |
- fi |
752 |
- |
753 |
- newinitd "${FILESDIR}"/uwsgi.initd-r6 uwsgi |
754 |
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi |
755 |
- keepdir /etc/"${PN}".d |
756 |
- use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" |
757 |
-} |
758 |
- |
759 |
-pkg_postinst() { |
760 |
- if use apache2 ; then |
761 |
- elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
762 |
- elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
763 |
- elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
764 |
- elog "Therefore you can enable only one of them at a time." |
765 |
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
766 |
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
767 |
- elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." |
768 |
- fi |
769 |
- |
770 |
- elog "Append the following options to the uwsgi call to load the respective language plugin:" |
771 |
- use cgi && elog " '--plugins cgi' for cgi" |
772 |
- use lua && elog " '--plugins lua' for lua" |
773 |
- use mono && elog " '--plugins mono' for mono" |
774 |
- use perl && elog " '--plugins psgi' for perl" |
775 |
- |
776 |
- if use php ; then |
777 |
- for s in $(php_get_slots); do |
778 |
- elog " '--plugins ${s/.}' for ${s}" |
779 |
- done |
780 |
- fi |
781 |
- |
782 |
- python_pkg_postinst() { |
783 |
- local EPYV |
784 |
- local PYV |
785 |
- EPYV=${EPYTHON/.} |
786 |
- PYV=${EPYV/python} |
787 |
- |
788 |
- elog " " |
789 |
- elog " '--plugins ${EPYV}' for ${EPYTHON}" |
790 |
- if use python_asyncio ; then |
791 |
- if [[ ${EPYV} == python34 ]] ; then |
792 |
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" |
793 |
- else |
794 |
- elog " (asyncio is only supported in python3.4)" |
795 |
- fi |
796 |
- fi |
797 |
- if use python_gevent ; then |
798 |
- if [[ ${EPYTHON} == python2* ]] ; then |
799 |
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" |
800 |
- else |
801 |
- elog " (gevent is currently not supported in ${EPYTHON})" |
802 |
- fi |
803 |
- fi |
804 |
- } |
805 |
- |
806 |
- use python && python_foreach_impl python_pkg_postinst |
807 |
- |
808 |
- if use ruby ; then |
809 |
- for ruby in $USE_RUBY; do |
810 |
- if use ruby_targets_${ruby} ; then |
811 |
- elog " '--plugins rack_${ruby/.}' for ${ruby}" |
812 |
- elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" |
813 |
- elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" |
814 |
- fi |
815 |
- done |
816 |
- fi |
817 |
-} |
818 |
|
819 |
diff --git a/www-servers/uwsgi/uwsgi-2.0.11.2.ebuild b/www-servers/uwsgi/uwsgi-2.0.11.2.ebuild |
820 |
deleted file mode 100644 |
821 |
index dd8dc5d..0000000 |
822 |
--- a/www-servers/uwsgi/uwsgi-2.0.11.2.ebuild |
823 |
+++ /dev/null |
824 |
@@ -1,400 +0,0 @@ |
825 |
-# Copyright 1999-2015 Gentoo Foundation |
826 |
-# Distributed under the terms of the GNU General Public License v2 |
827 |
-# $Id$ |
828 |
- |
829 |
-EAPI="5" |
830 |
- |
831 |
-PYTHON_COMPAT=( python2_7 python3_{4,5} pypy ) |
832 |
-PYTHON_REQ_USE="threads(+)" |
833 |
- |
834 |
-RUBY_OPTIONAL="yes" |
835 |
-USE_RUBY="ruby20 ruby21" |
836 |
- |
837 |
-PHP_EXT_INI="no" |
838 |
-PHP_EXT_NAME="dummy" |
839 |
-PHP_EXT_OPTIONAL_USE="php" |
840 |
-USE_PHP="php5-4 php5-5 php5-6" # deps must be registered separately below |
841 |
- |
842 |
-MY_P="${P/_/-}" |
843 |
- |
844 |
-inherit apache-module distutils-r1 eutils flag-o-matic multilib pax-utils php-ext-source-r2 python-r1 ruby-ng versionator |
845 |
- |
846 |
-DESCRIPTION="uWSGI server for Python web applications" |
847 |
-HOMEPAGE="http://projects.unbit.it/uwsgi/" |
848 |
-SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" |
849 |
- |
850 |
-LICENSE="GPL-2" |
851 |
-SLOT="0" |
852 |
-KEYWORDS="~amd64 ~x86" |
853 |
- |
854 |
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool |
855 |
- http ugreen signal syslog rsyslog |
856 |
- router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} |
857 |
- {core,fast,raw,ssl}router |
858 |
- redislog mongodblog log{file,socket} |
859 |
- spooler cheaper_busyness symcall |
860 |
- transformation_{chunked,gzip,offload,tofile} |
861 |
- zergpool ) |
862 |
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron |
863 |
- dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter |
864 |
- geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam |
865 |
- rados router_{access,radius,spnego,xmldir} |
866 |
- sqlite ssi stats_pusher_statsd |
867 |
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) |
868 |
- |
869 |
-LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process |
870 |
-LANG_SUPPORT_EXTENDED=( lua php pypy python python_asyncio python_gevent ruby ) |
871 |
- |
872 |
-# plugins to be ignored (for now): |
873 |
-# cheaper_backlog2: example plugin |
874 |
-# coroae: TODO |
875 |
-# cplusplus: partially example code, needs explicit class |
876 |
-# dummy: no idea |
877 |
-# example: example plugin |
878 |
-# exception_log: example plugin |
879 |
-# *go*: TODO |
880 |
-# *java*: TODO |
881 |
-# v8: TODO |
882 |
-# matheval: TODO |
883 |
-IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing +ssl +xml yajl yaml zeromq" |
884 |
- |
885 |
-for plugin in ${UWSGI_PLUGINS_STD[@]} ; do IUSE="${IUSE} +uwsgi_plugins_${plugin}" ; done |
886 |
-for plugin in ${UWSGI_PLUGINS_OPT[@]} ; do IUSE="${IUSE} uwsgi_plugins_${plugin}" ; done |
887 |
-IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" |
888 |
- |
889 |
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) |
890 |
- uwsgi_plugins_logcrypto? ( ssl ) |
891 |
- uwsgi_plugins_sslrouter? ( ssl ) |
892 |
- routing? ( pcre ) |
893 |
- uwsgi_plugins_emperor_zeromq? ( zeromq ) |
894 |
- uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) |
895 |
- uwsgi_plugins_router_xmldir? ( xml ) |
896 |
- pypy? ( python_targets_python2_7 ) |
897 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
898 |
- python_asyncio? ( python_targets_python3_4 python_gevent ) |
899 |
- python_gevent? ( python ) |
900 |
- expat? ( xml )" |
901 |
- |
902 |
-# util-linux is required for libuuid when requesting zeromq support |
903 |
-# Order: |
904 |
-# 1. Unconditional |
905 |
-# 2. General features |
906 |
-# 3. Plugins |
907 |
-# 4. Language/app support |
908 |
-CDEPEND="sys-libs/zlib |
909 |
- caps? ( sys-libs/libcap ) |
910 |
- json? ( !yajl? ( dev-libs/jansson ) |
911 |
- yajl? ( dev-libs/yajl ) ) |
912 |
- pcre? ( dev-libs/libpcre:3 ) |
913 |
- ssl? ( dev-libs/openssl:= ) |
914 |
- xml? ( !expat? ( dev-libs/libxml2 ) |
915 |
- expat? ( dev-libs/expat ) ) |
916 |
- yaml? ( dev-libs/libyaml ) |
917 |
- zeromq? ( net-libs/zeromq sys-apps/util-linux ) |
918 |
- uwsgi_plugins_alarm_curl? ( net-misc/curl ) |
919 |
- uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) |
920 |
- uwsgi_plugins_curl_cron? ( net-misc/curl ) |
921 |
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) |
922 |
- uwsgi_plugins_geoip? ( dev-libs/geoip ) |
923 |
- uwsgi_plugins_ldap? ( net-nds/openldap ) |
924 |
- uwsgi_plugins_pam? ( virtual/pam ) |
925 |
- uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) |
926 |
- uwsgi_plugins_rados? ( sys-cluster/ceph ) |
927 |
- uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) |
928 |
- uwsgi_plugins_router_spnego? ( virtual/krb5 ) |
929 |
- uwsgi_plugins_rsyslog? ( app-admin/rsyslog ) |
930 |
- uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) |
931 |
- uwsgi_plugins_webdav? ( dev-libs/libxml2 ) |
932 |
- uwsgi_plugins_xslt? ( dev-libs/libxslt ) |
933 |
- lua? ( dev-lang/lua:= ) |
934 |
- mono? ( =dev-lang/mono-2* ) |
935 |
- perl? ( dev-lang/perl:= ) |
936 |
- php? ( |
937 |
- php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
938 |
- php_targets_php5-5? ( dev-lang/php:5.5[embed] ) |
939 |
- ) |
940 |
- pypy? ( virtual/pypy ) |
941 |
- python? ( ${PYTHON_DEPS} ) |
942 |
- python_gevent? ( >=dev-python/gevent-1.0.1[$(python_gen_usedep 'python2*')] ) |
943 |
- ruby? ( $(ruby_implementations_depend) )" |
944 |
-DEPEND="${CDEPEND} |
945 |
- virtual/pkgconfig" |
946 |
-RDEPEND="${CDEPEND} |
947 |
- uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" |
948 |
- |
949 |
-want_apache2 |
950 |
- |
951 |
-S="${WORKDIR}/${MY_P}" |
952 |
-APXS2_S="${S}/apache2" |
953 |
-APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" |
954 |
- |
955 |
-src_unpack() { |
956 |
- default |
957 |
-} |
958 |
- |
959 |
-pkg_setup() { |
960 |
- python_setup |
961 |
- use ruby && ruby-ng_pkg_setup |
962 |
- depend.apache_pkg_setup |
963 |
-} |
964 |
- |
965 |
-src_prepare() { |
966 |
- sed -i \ |
967 |
- -e "s|'-O2', ||" \ |
968 |
- -e "s|'-Werror', ||" \ |
969 |
- -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
970 |
- uwsgiconfig.py || die "sed failed" |
971 |
- |
972 |
- sed -i \ |
973 |
- -e "s|/lib|/$(get_libdir)|" \ |
974 |
- plugins/php/uwsgiplugin.py || die "sed failed" |
975 |
-} |
976 |
- |
977 |
-src_configure() { |
978 |
- local embedded_plugins=() |
979 |
- local plugins=() |
980 |
- local malloc_impl="libc" |
981 |
- local json="false" |
982 |
- local xml="false" |
983 |
- |
984 |
- for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do |
985 |
- use uwsgi_plugins_${p} && embedded_plugins+=("${p}") |
986 |
- done |
987 |
- for p in ${LANG_SUPPORT_SIMPLE[@]} ; do |
988 |
- use ${p} && plugins+=("${p}") |
989 |
- done |
990 |
- |
991 |
- # do not embed any plugins |
992 |
- if ! use embedded ; then |
993 |
- plugins=( ${plugins[@]} ${embedded_plugins[@]} ) |
994 |
- embedded_plugins=() |
995 |
- fi |
996 |
- |
997 |
- # flatten the arrays |
998 |
- plugins=${plugins[@]} |
999 |
- embedded_plugins=${embedded_plugins[@]} |
1000 |
- |
1001 |
- # rename some of the use flags, language plugins are always real plugins |
1002 |
- plugins="${plugins/perl/psgi}" |
1003 |
- plugins="${plugins/sqlite/sqlite3}" |
1004 |
- embedded_plugins="${embedded_plugins/sqlite/sqlite3}" |
1005 |
- |
1006 |
- # override defaults as requested by the user |
1007 |
- if use xml; then |
1008 |
- use expat && xml="expat" || xml="libxml2" |
1009 |
- fi |
1010 |
- if use json; then |
1011 |
- use yajl && json="yajl" || json="jansson" |
1012 |
- fi |
1013 |
- use jemalloc && malloc_impl="jemalloc" |
1014 |
- |
1015 |
- # prepare the buildconf for gentoo |
1016 |
- cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini |
1017 |
- sed -i \ |
1018 |
- -e "s|VAR_XML|${xml}|" \ |
1019 |
- -e "s|VAR_YAML|$(usex yaml true false)|" \ |
1020 |
- -e "s|VAR_JSON|${json}|" \ |
1021 |
- -e "s|VAR_SSL|$(usex ssl true false)|" \ |
1022 |
- -e "s|VAR_PCRE|$(usex pcre true false)|" \ |
1023 |
- -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ |
1024 |
- -e "s|VAR_ROUTING|$(usex routing true false)|" \ |
1025 |
- -e "s|VAR_DEBUG|$(usex debug true false)|" \ |
1026 |
- -e "s|VAR_MALLOC|${malloc_impl}|" \ |
1027 |
- -e "s|VAR_PLUGINS|${plugins// /, }|" \ |
1028 |
- -e "s|VAR_PLUGIN_DIR|/usr/$(get_libdir)/uwsgi|" \ |
1029 |
- -e "s|VAR_BUILD_DIR|${T}/plugins|" \ |
1030 |
- -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ |
1031 |
- buildconf/gentoo.ini || die "sed failed" |
1032 |
- |
1033 |
- use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
1034 |
- use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
1035 |
- |
1036 |
- if use uwsgi_plugins_emperor_pg ; then |
1037 |
- PGPV="$(best_version dev-db/postgresql)" |
1038 |
- PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" |
1039 |
- sed -i \ |
1040 |
- -e "s|pg_config|pg_config${PGSLOT/.}|" \ |
1041 |
- plugins/emperor_pg/uwsgiplugin.py || die "sed failed" |
1042 |
- fi |
1043 |
-} |
1044 |
- |
1045 |
-each_ruby_compile() { |
1046 |
- cd "${WORKDIR}/${MY_P}" || die "sed failed" |
1047 |
- |
1048 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
1049 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" |
1050 |
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" |
1051 |
-} |
1052 |
- |
1053 |
-python_compile_plugins() { |
1054 |
- local EPYV |
1055 |
- local PYV |
1056 |
- EPYV=${EPYTHON/.} |
1057 |
- PYV=${EPYV/python} |
1058 |
- |
1059 |
- if [[ ${EPYTHON} == pypy* ]] ; then |
1060 |
- echo "skipping because pypy is not meant to build plugins on its own" |
1061 |
- return |
1062 |
- fi |
1063 |
- |
1064 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" |
1065 |
- |
1066 |
- if use python_asyncio ; then |
1067 |
- if [[ "${PYV}" == "34" || "${PYV}" == "35" ]] ; then |
1068 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" |
1069 |
- fi |
1070 |
- fi |
1071 |
- |
1072 |
- if use python_gevent ; then |
1073 |
- if [[ "${PYV}" == "27" ]] ; then |
1074 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" |
1075 |
- fi |
1076 |
- fi |
1077 |
- |
1078 |
- if use pypy ; then |
1079 |
- if [[ "${PYV}" == "27" ]] ; then |
1080 |
- # TODO: do some proper patching ? The wiki didn't help... I gave up for now. |
1081 |
- # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so |
1082 |
- append-ldflags -Wl,-z,noexecstack |
1083 |
- ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" |
1084 |
- fi |
1085 |
- fi |
1086 |
-} |
1087 |
- |
1088 |
-python_install_symlinks() { |
1089 |
- dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} |
1090 |
-} |
1091 |
- |
1092 |
-src_compile() { |
1093 |
- mkdir -p "${T}/plugins" |
1094 |
- |
1095 |
- python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
1096 |
- |
1097 |
- if use lua ; then |
1098 |
- # setting the name for the pkg-config file to lua, since we don't have |
1099 |
- # slotted lua |
1100 |
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
1101 |
- fi |
1102 |
- |
1103 |
- if use php ; then |
1104 |
- for s in $(php_get_slots); do |
1105 |
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
1106 |
- done |
1107 |
- fi |
1108 |
- |
1109 |
- if use python ; then |
1110 |
- python_foreach_impl python_compile_plugins |
1111 |
- fi |
1112 |
- |
1113 |
- if use ruby ; then |
1114 |
- ruby-ng_src_compile |
1115 |
- fi |
1116 |
- |
1117 |
- if use apache2 ; then |
1118 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
1119 |
- APXS2_ARGS="-c mod_${m}.c" |
1120 |
- apache-module_src_compile |
1121 |
- done |
1122 |
- fi |
1123 |
-} |
1124 |
- |
1125 |
-src_install() { |
1126 |
- dobin uwsgi |
1127 |
- pax-mark m "${D}"/usr/bin/uwsgi |
1128 |
- |
1129 |
- insinto /usr/$(get_libdir)/uwsgi |
1130 |
- doins "${T}/plugins"/*.so |
1131 |
- |
1132 |
- use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
1133 |
- use lua && dosym uwsgi /usr/bin/uwsgi_lua |
1134 |
- use mono && dosym uwsgi /usr/bin/uwsgi_mono |
1135 |
- use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
1136 |
- |
1137 |
- if use php ; then |
1138 |
- for s in $(php_get_slots); do |
1139 |
- dosym uwsgi /usr/bin/uwsgi_${s/.} |
1140 |
- done |
1141 |
- fi |
1142 |
- |
1143 |
- if use python ; then |
1144 |
- python_foreach_impl python_install_symlinks |
1145 |
- python_foreach_impl python_domodule uwsgidecorators.py |
1146 |
- fi |
1147 |
- |
1148 |
- if use apache2; then |
1149 |
- for m in proxy_uwsgi Ruwsgi uwsgi ; do |
1150 |
- APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
1151 |
- apache-module_src_install |
1152 |
- done |
1153 |
- fi |
1154 |
- |
1155 |
- newinitd "${FILESDIR}"/uwsgi.initd-r6 uwsgi |
1156 |
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi |
1157 |
- keepdir /etc/"${PN}".d |
1158 |
- use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" |
1159 |
-} |
1160 |
- |
1161 |
-pkg_postinst() { |
1162 |
- if use apache2 ; then |
1163 |
- elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
1164 |
- elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
1165 |
- elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
1166 |
- elog "Therefore you can enable only one of them at a time." |
1167 |
- elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
1168 |
- elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
1169 |
- elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." |
1170 |
- fi |
1171 |
- |
1172 |
- elog "Append the following options to the uwsgi call to load the respective language plugin:" |
1173 |
- use cgi && elog " '--plugins cgi' for cgi" |
1174 |
- use lua && elog " '--plugins lua' for lua" |
1175 |
- use mono && elog " '--plugins mono' for mono" |
1176 |
- use perl && elog " '--plugins psgi' for perl" |
1177 |
- |
1178 |
- if use php ; then |
1179 |
- for s in $(php_get_slots); do |
1180 |
- elog " '--plugins ${s/.}' for ${s}" |
1181 |
- done |
1182 |
- fi |
1183 |
- |
1184 |
- python_pkg_postinst() { |
1185 |
- local EPYV |
1186 |
- local PYV |
1187 |
- EPYV=${EPYTHON/.} |
1188 |
- PYV=${EPYV/python} |
1189 |
- |
1190 |
- if [[ ${EPYTHON} == pypy* ]] ; then |
1191 |
- elog " '--plugins pypy' for pypy" |
1192 |
- return |
1193 |
- fi |
1194 |
- |
1195 |
- elog " " |
1196 |
- elog " '--plugins ${EPYV}' for ${EPYTHON}" |
1197 |
- if use python_asyncio ; then |
1198 |
- if [[ ${EPYV} == python34 ]] ; then |
1199 |
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" |
1200 |
- else |
1201 |
- elog " (asyncio is only supported in python3.4)" |
1202 |
- fi |
1203 |
- fi |
1204 |
- if use python_gevent ; then |
1205 |
- if [[ ${EPYTHON} == python2* ]] ; then |
1206 |
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" |
1207 |
- else |
1208 |
- elog " (gevent is currently not supported in ${EPYTHON})" |
1209 |
- fi |
1210 |
- fi |
1211 |
- } |
1212 |
- |
1213 |
- use python && python_foreach_impl python_pkg_postinst |
1214 |
- |
1215 |
- if use ruby ; then |
1216 |
- for ruby in $USE_RUBY; do |
1217 |
- if use ruby_targets_${ruby} ; then |
1218 |
- elog " '--plugins rack_${ruby/.}' for ${ruby}" |
1219 |
- elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" |
1220 |
- elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" |
1221 |
- fi |
1222 |
- done |
1223 |
- fi |
1224 |
-} |