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