1 |
ultrabug 14/12/31 14:32:28 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: uwsgi-2.0.9.ebuild |
5 |
Removed: uwsgi-2.0.8-r2.ebuild uwsgi-2.0.7-r1.ebuild |
6 |
uwsgi-2.0.8.ebuild |
7 |
Log: |
8 |
version bump, drop old |
9 |
|
10 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key B658FA13) |
11 |
|
12 |
Revision Changes Path |
13 |
1.70 www-servers/uwsgi/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.70&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.70&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?r1=1.69&r2=1.70 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v |
22 |
retrieving revision 1.69 |
23 |
retrieving revision 1.70 |
24 |
diff -u -r1.69 -r1.70 |
25 |
--- ChangeLog 28 Dec 2014 17:01:45 -0000 1.69 |
26 |
+++ ChangeLog 31 Dec 2014 14:32:28 -0000 1.70 |
27 |
@@ -1,6 +1,12 @@ |
28 |
# ChangeLog for www-servers/uwsgi |
29 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.69 2014/12/28 17:01:45 titanofold Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.70 2014/12/31 14:32:28 ultrabug Exp $ |
32 |
+ |
33 |
+*uwsgi-2.0.9 (31 Dec 2014) |
34 |
+ |
35 |
+ 31 Dec 2014; Ultrabug <ultrabug@g.o> -uwsgi-2.0.7-r1.ebuild, |
36 |
+ -uwsgi-2.0.8.ebuild, -uwsgi-2.0.8-r2.ebuild, +uwsgi-2.0.9.ebuild: |
37 |
+ version bump, drop old |
38 |
|
39 |
28 Dec 2014; Aaron W. Swenson <titanofold@g.o> uwsgi-1.4.10-r1.ebuild, |
40 |
uwsgi-2.0.7-r1.ebuild, uwsgi-2.0.8.ebuild, uwsgi-2.0.8-r1.ebuild, |
41 |
|
42 |
|
43 |
|
44 |
1.1 www-servers/uwsgi/uwsgi-2.0.9.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-2.0.9.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-2.0.9.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: uwsgi-2.0.9.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-2.0.9.ebuild,v 1.1 2014/12/31 14:32:28 ultrabug Exp $ |
54 |
|
55 |
EAPI="5" |
56 |
|
57 |
PYTHON_COMPAT=( python2_7 python3_{2,3,4} ) |
58 |
|
59 |
RUBY_OPTIONAL="yes" |
60 |
USE_RUBY="ruby19 ruby20 ruby21" |
61 |
|
62 |
PHP_EXT_INI="no" |
63 |
PHP_EXT_NAME="dummy" |
64 |
PHP_EXT_OPTIONAL_USE="php" |
65 |
USE_PHP="php5-4 php5-5" # deps must be registered separately below |
66 |
|
67 |
MY_P="${P/_/-}" |
68 |
|
69 |
inherit apache-module distutils-r1 eutils multilib pax-utils php-ext-source-r2 python-r1 ruby-ng versionator |
70 |
|
71 |
DESCRIPTION="uWSGI server for Python web applications" |
72 |
HOMEPAGE="http://projects.unbit.it/uwsgi/" |
73 |
SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" |
74 |
|
75 |
LICENSE="GPL-2" |
76 |
SLOT="0" |
77 |
KEYWORDS="~amd64 ~x86" |
78 |
|
79 |
UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool |
80 |
http ugreen signal syslog rsyslog |
81 |
router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} |
82 |
{core,fast,raw,ssl}router |
83 |
redislog mongodblog log{file,socket} |
84 |
spooler cheaper_busyness symcall |
85 |
transformation_{chunked,gzip,offload,tofile} |
86 |
zergpool ) |
87 |
UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron |
88 |
dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter |
89 |
geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam |
90 |
rados router_{access,radius,spnego,xmldir} |
91 |
sqlite ssi stats_pusher_statsd |
92 |
systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) |
93 |
|
94 |
LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process |
95 |
LANG_SUPPORT_EXTENDED=( lua php python python_asyncio python_gevent ruby ) |
96 |
|
97 |
# plugins to be ignored (for now): |
98 |
# cheaper_backlog2: example plugin |
99 |
# coroae: TODO |
100 |
# cplusplus: partially example code, needs explicit class |
101 |
# dummy: no idea |
102 |
# example: example plugin |
103 |
# exception_log: example plugin |
104 |
# *go*: TODO |
105 |
# *java*: TODO |
106 |
# v8: TODO |
107 |
# matheval: TODO |
108 |
IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing +ssl +xml yajl yaml zeromq" |
109 |
|
110 |
for plugin in ${UWSGI_PLUGINS_STD[@]} ; do IUSE="${IUSE} +uwsgi_plugins_${plugin}" ; done |
111 |
for plugin in ${UWSGI_PLUGINS_OPT[@]} ; do IUSE="${IUSE} uwsgi_plugins_${plugin}" ; done |
112 |
IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" |
113 |
|
114 |
REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) |
115 |
uwsgi_plugins_logcrypto? ( ssl ) |
116 |
uwsgi_plugins_sslrouter? ( ssl ) |
117 |
routing? ( pcre ) |
118 |
uwsgi_plugins_emperor_zeromq? ( zeromq ) |
119 |
uwsgi_plugins_router_xmldir? ( xml ) |
120 |
uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) |
121 |
python? ( ${PYTHON_REQUIRED_USE} ) |
122 |
python_asyncio? ( python_targets_python3_4 python_gevent ) |
123 |
python_gevent? ( python ) |
124 |
expat? ( xml )" |
125 |
|
126 |
# util-linux is required for libuuid when requesting zeromq support |
127 |
# Order: |
128 |
# 1. Unconditional |
129 |
# 2. General features |
130 |
# 3. Plugins |
131 |
# 4. Language/app support |
132 |
CDEPEND="sys-libs/zlib |
133 |
caps? ( sys-libs/libcap ) |
134 |
json? ( !yajl? ( dev-libs/jansson ) |
135 |
yajl? ( dev-libs/yajl ) ) |
136 |
pcre? ( dev-libs/libpcre:3 ) |
137 |
ssl? ( dev-libs/openssl ) |
138 |
xml? ( !expat? ( dev-libs/libxml2 ) |
139 |
expat? ( dev-libs/expat ) ) |
140 |
yaml? ( dev-libs/libyaml ) |
141 |
zeromq? ( net-libs/zeromq sys-apps/util-linux ) |
142 |
uwsgi_plugins_alarm_curl? ( net-misc/curl ) |
143 |
uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) |
144 |
uwsgi_plugins_curl_cron? ( net-misc/curl ) |
145 |
uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) |
146 |
uwsgi_plugins_geoip? ( dev-libs/geoip ) |
147 |
uwsgi_plugins_ldap? ( net-nds/openldap ) |
148 |
uwsgi_plugins_pam? ( virtual/pam ) |
149 |
uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) |
150 |
uwsgi_plugins_rados? ( sys-cluster/ceph ) |
151 |
uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) |
152 |
uwsgi_plugins_router_spnego? ( virtual/krb5 ) |
153 |
uwsgi_plugins_rsyslog? ( app-admin/rsyslog ) |
154 |
uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) |
155 |
uwsgi_plugins_webdav? ( dev-libs/libxml2 ) |
156 |
uwsgi_plugins_xslt? ( dev-libs/libxslt ) |
157 |
lua? ( dev-lang/lua ) |
158 |
mono? ( =dev-lang/mono-2* ) |
159 |
perl? ( dev-lang/perl:= ) |
160 |
php? ( |
161 |
php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
162 |
php_targets_php5-5? ( dev-lang/php:5.5[embed] ) |
163 |
) |
164 |
python? ( ${PYTHON_DEPS} ) |
165 |
python_gevent? ( >=dev-python/gevent-1.0_beta2[$(python_gen_usedep 'python2*')] ) |
166 |
ruby? ( $(ruby_implementations_depend) )" |
167 |
DEPEND="${CDEPEND} |
168 |
virtual/pkgconfig" |
169 |
RDEPEND="${CDEPEND} |
170 |
uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" |
171 |
|
172 |
want_apache2 |
173 |
|
174 |
S="${WORKDIR}/${MY_P}" |
175 |
APXS2_S="${S}/apache2" |
176 |
APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" |
177 |
|
178 |
src_unpack() { |
179 |
default |
180 |
} |
181 |
|
182 |
pkg_setup() { |
183 |
python_setup |
184 |
use ruby && ruby-ng_pkg_setup |
185 |
depend.apache_pkg_setup |
186 |
} |
187 |
|
188 |
src_prepare() { |
189 |
sed -i \ |
190 |
-e "s|'-O2', ||" \ |
191 |
-e "s|'-Werror', ||" \ |
192 |
-e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
193 |
uwsgiconfig.py || die "sed failed" |
194 |
|
195 |
sed -i \ |
196 |
-e "s|/lib|/$(get_libdir)|" \ |
197 |
plugins/php/uwsgiplugin.py || die "sed failed" |
198 |
} |
199 |
|
200 |
src_configure() { |
201 |
local embedded_plugins=() |
202 |
local plugins=() |
203 |
local malloc_impl="libc" |
204 |
local json="false" |
205 |
local xml="false" |
206 |
|
207 |
for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do |
208 |
use uwsgi_plugins_${p} && embedded_plugins+=("${p}") |
209 |
done |
210 |
for p in ${LANG_SUPPORT_SIMPLE[@]} ; do |
211 |
use ${p} && plugins+=("${p}") |
212 |
done |
213 |
|
214 |
# do not embedded any plugins |
215 |
if ! use embedded ; then |
216 |
plugins=( ${plugins[@]} ${embedded_plugins[@]} ) |
217 |
embedded_plugins=() |
218 |
fi |
219 |
|
220 |
# flatten the arrays |
221 |
plugins=${plugins[@]} |
222 |
embedded_plugins=${embedded_plugins[@]} |
223 |
|
224 |
# rename some of the use flags, language plugins are always real plugins |
225 |
plugins="${plugins/perl/psgi}" |
226 |
plugins="${plugins/sqlite/sqlite3}" |
227 |
embedded_plugins="${embedded_plugins/sqlite/sqlite3}" |
228 |
|
229 |
# override defaults as requested by the user |
230 |
if use xml; then |
231 |
use expat && xml="expat" || xml="libxml2" |
232 |
fi |
233 |
if use json; then |
234 |
use yajl && json="yajl" || json="jansson" |
235 |
fi |
236 |
use jemalloc && malloc_impl="jemalloc" |
237 |
|
238 |
# prepare the buildconf for gentoo |
239 |
cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini |
240 |
sed -i \ |
241 |
-e "s|VAR_XML|${xml}|" \ |
242 |
-e "s|VAR_YAML|$(usex yaml true false)|" \ |
243 |
-e "s|VAR_JSON|${json}|" \ |
244 |
-e "s|VAR_SSL|$(usex ssl true false)|" \ |
245 |
-e "s|VAR_PCRE|$(usex pcre true false)|" \ |
246 |
-e "s|VAR_ZMQ|$(usex zeromq true false)|" \ |
247 |
-e "s|VAR_ROUTING|$(usex routing true false)|" \ |
248 |
-e "s|VAR_DEBUG|$(usex debug true false)|" \ |
249 |
-e "s|VAR_MALLOC|${malloc_impl}|" \ |
250 |
-e "s|VAR_PLUGINS|${plugins// /, }|" \ |
251 |
-e "s|VAR_PLUGIN_DIR|/usr/$(get_libdir)/uwsgi|" \ |
252 |
-e "s|VAR_BUILD_DIR|${T}/plugins|" \ |
253 |
-e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ |
254 |
buildconf/gentoo.ini |
255 |
|
256 |
use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
257 |
use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
258 |
|
259 |
if use uwsgi_plugins_emperor_pg ; then |
260 |
PGPV="$(best_version dev-db/postgresql)" |
261 |
PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" |
262 |
sed -i \ |
263 |
-e "s|pg_config|pg_config${PGSLOT/.}|" \ |
264 |
plugins/emperor_pg/uwsgiplugin.py || die "sed failed" |
265 |
fi |
266 |
} |
267 |
|
268 |
each_ruby_compile() { |
269 |
cd "${WORKDIR}/${MY_P}" |
270 |
|
271 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
272 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" |
273 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" |
274 |
} |
275 |
|
276 |
python_compile_plugins() { |
277 |
local EPYV |
278 |
local PYV |
279 |
EPYV=${EPYTHON/.} |
280 |
PYV=${EPYV/python} |
281 |
|
282 |
${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" |
283 |
|
284 |
if use python_asyncio ; then |
285 |
if [ "${PYV}" == "34" ] ; then |
286 |
${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" |
287 |
fi |
288 |
fi |
289 |
|
290 |
if use python_gevent ; then |
291 |
${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" |
292 |
fi |
293 |
} |
294 |
|
295 |
python_install_symlinks() { |
296 |
dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} |
297 |
} |
298 |
|
299 |
src_compile() { |
300 |
mkdir -p "${T}/plugins" |
301 |
|
302 |
python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
303 |
|
304 |
if use lua ; then |
305 |
# setting the name for the pkg-config file to lua, since we don't have |
306 |
# slotted lua |
307 |
UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
308 |
fi |
309 |
|
310 |
if use php ; then |
311 |
for s in $(php_get_slots); do |
312 |
UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
313 |
done |
314 |
fi |
315 |
|
316 |
if use python ; then |
317 |
python_foreach_impl python_compile_plugins |
318 |
fi |
319 |
|
320 |
if use ruby ; then |
321 |
ruby-ng_src_compile |
322 |
fi |
323 |
|
324 |
if use apache2 ; then |
325 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
326 |
APXS2_ARGS="-c mod_${m}.c" |
327 |
apache-module_src_compile |
328 |
done |
329 |
fi |
330 |
} |
331 |
|
332 |
src_install() { |
333 |
dobin uwsgi |
334 |
pax-mark m "${D}"/usr/bin/uwsgi |
335 |
|
336 |
insinto /usr/$(get_libdir)/uwsgi |
337 |
doins "${T}/plugins"/*.so |
338 |
|
339 |
use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
340 |
use lua && dosym uwsgi /usr/bin/uwsgi_lua |
341 |
use mono && dosym uwsgi /usr/bin/uwsgi_mono |
342 |
use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
343 |
|
344 |
if use php ; then |
345 |
for s in $(php_get_slots); do |
346 |
dosym uwsgi /usr/bin/uwsgi_${s/.} |
347 |
done |
348 |
fi |
349 |
|
350 |
if use python ; then |
351 |
python_foreach_impl python_install_symlinks |
352 |
python_foreach_impl python_domodule uwsgidecorators.py |
353 |
fi |
354 |
|
355 |
if use apache2; then |
356 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
357 |
APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
358 |
apache-module_src_install |
359 |
done |
360 |
fi |
361 |
|
362 |
newinitd "${FILESDIR}"/uwsgi.initd-r5 uwsgi |
363 |
newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi |
364 |
keepdir /etc/"${PN}".d |
365 |
use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" |
366 |
} |
367 |
|
368 |
pkg_postinst() { |
369 |
if use apache2 ; then |
370 |
elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
371 |
elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
372 |
elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
373 |
elog "Therefore you can enable only one of them at a time." |
374 |
elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
375 |
elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
376 |
elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." |
377 |
fi |
378 |
|
379 |
elog "Append the following options to the uwsgi call to load the respective language plugin:" |
380 |
use cgi && elog " '--plugins cgi' for cgi" |
381 |
use lua && elog " '--plugins lua' for lua" |
382 |
use mono && elog " '--plugins mono' for mono" |
383 |
use perl && elog " '--plugins psgi' for perl" |
384 |
|
385 |
if use php ; then |
386 |
for s in $(php_get_slots); do |
387 |
elog " '--plugins ${s/.}' for ${s}" |
388 |
done |
389 |
fi |
390 |
|
391 |
python_pkg_postinst() { |
392 |
local EPYV |
393 |
local PYV |
394 |
EPYV=${EPYTHON/.} |
395 |
PYV=${EPYV/python} |
396 |
|
397 |
elog " " |
398 |
elog " '--plugins ${EPYV}' for ${EPYTHON}" |
399 |
if use python_asyncio ; then |
400 |
if [[ ${EPYV} == python34 ]] ; then |
401 |
elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" |
402 |
else |
403 |
elog " (asyncio is only supported in python3.4)" |
404 |
fi |
405 |
fi |
406 |
if use python_gevent ; then |
407 |
if [[ ${EPYTHON} == python2* ]] ; then |
408 |
elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" |
409 |
else |
410 |
elog " (gevent is currently not supported in ${EPYTHON})" |
411 |
fi |
412 |
fi |
413 |
} |
414 |
|
415 |
use python && python_foreach_impl python_pkg_postinst |
416 |
|
417 |
if use ruby ; then |
418 |
for ruby in $USE_RUBY; do |
419 |
if use ruby_targets_${ruby} ; then |
420 |
elog " '--plugins rack_${ruby/.}' for ${ruby}" |
421 |
elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" |
422 |
elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" |
423 |
fi |
424 |
done |
425 |
fi |
426 |
} |