1 |
ultrabug 12/11/28 11:12:27 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: uwsgi-1.4.2.ebuild |
5 |
Log: |
6 |
version bump |
7 |
|
8 |
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key B658FA13) |
9 |
|
10 |
Revision Changes Path |
11 |
1.34 www-servers/uwsgi/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.34&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.34&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?r1=1.33&r2=1.34 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v |
20 |
retrieving revision 1.33 |
21 |
retrieving revision 1.34 |
22 |
diff -u -r1.33 -r1.34 |
23 |
--- ChangeLog 22 Nov 2012 07:49:13 -0000 1.33 |
24 |
+++ ChangeLog 28 Nov 2012 11:12:27 -0000 1.34 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for www-servers/uwsgi |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.33 2012/11/22 07:49:13 dev-zero Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.34 2012/11/28 11:12:27 ultrabug Exp $ |
30 |
+ |
31 |
+*uwsgi-1.4.2 (28 Nov 2012) |
32 |
+ |
33 |
+ 28 Nov 2012; Ultrabug <ultrabug@g.o> +uwsgi-1.4.2.ebuild: |
34 |
+ Version bump |
35 |
|
36 |
*uwsgi-1.4.1-r2 (22 Nov 2012) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 www-servers/uwsgi/uwsgi-1.4.2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: uwsgi-1.4.2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.2.ebuild,v 1.1 2012/11/28 11:12:27 ultrabug Exp $ |
51 |
|
52 |
EAPI="5" |
53 |
PYTHON_DEPEND="python? *" |
54 |
PYTHON_MODNAME="uwsgidecorators" |
55 |
SUPPORT_PYTHON_ABIS="1" |
56 |
RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*" |
57 |
USE_RUBY="ruby18 ree18 ruby19" |
58 |
RUBY_OPTIONAL="yes" |
59 |
PHP_EXT_NAME="dummy" |
60 |
PHP_EXT_INI="no" |
61 |
USE_PHP="php5-3 php5-4" # deps must be registered separately below |
62 |
PHP_EXT_OPTIONAL_USE="php" |
63 |
|
64 |
MY_P="${P/_/-}" |
65 |
|
66 |
inherit apache-module eutils python multilib pax-utils php-ext-source-r2 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 |
IUSE="apache2 +caps +carbon cgi debug erlang gevent graylog2 json ldap lua +nagios pam perl +pcre php probepg +python rrdtool rsyslog ruby spooler sqlite syslog +xml yaml zeromq" |
76 |
REQUIRED_USE="|| ( cgi erlang lua perl php python ruby )" |
77 |
|
78 |
# util-linux is required for libuuid when requesting zeromq support |
79 |
CDEPEND="caps? ( sys-libs/libcap ) |
80 |
json? ( dev-libs/jansson ) |
81 |
erlang? ( dev-lang/erlang ) |
82 |
gevent? ( >=dev-python/gevent-1.0_beta2 ) |
83 |
graylog2? ( sys-libs/zlib ) |
84 |
ldap? ( net-nds/openldap ) |
85 |
lua? ( dev-lang/lua ) |
86 |
pcre? ( dev-libs/libpcre ) |
87 |
perl? ( dev-lang/perl ) |
88 |
php? ( |
89 |
php_targets_php5-3? ( dev-lang/php:5.3[embed] ) |
90 |
php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
91 |
) |
92 |
probepg? ( dev-db/postgresql-base:= ) |
93 |
ruby? ( $(ruby_implementations_depend) ) |
94 |
sqlite? ( dev-db/sqlite:3 ) |
95 |
rsyslog? ( app-admin/rsyslog ) |
96 |
xml? ( dev-libs/libxml2 ) |
97 |
yaml? ( dev-libs/libyaml ) |
98 |
zeromq? ( net-libs/zeromq sys-apps/util-linux )" |
99 |
DEPEND="${CDEPEND} |
100 |
virtual/pkgconfig" |
101 |
RDEPEND="${CDEPEND} |
102 |
rrdtool? ( net-analyzer/rrdtool )" |
103 |
|
104 |
S="${WORKDIR}/${MY_P}" |
105 |
APXS2_S="${S}/apache2" |
106 |
APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi" |
107 |
|
108 |
want_apache2_2 |
109 |
|
110 |
use_true_false() { |
111 |
if use $1 ; then |
112 |
echo "true" |
113 |
else |
114 |
echo "false" |
115 |
fi |
116 |
} |
117 |
|
118 |
src_unpack() { |
119 |
default |
120 |
} |
121 |
|
122 |
pkg_setup() { |
123 |
depend.apache_pkg_setup |
124 |
python_pkg_setup |
125 |
} |
126 |
|
127 |
src_prepare() { |
128 |
epatch \ |
129 |
"${FILESDIR}/1.1.2-threaded-php.patch" \ |
130 |
"${FILESDIR}/1.2.3-pyerl.patch" |
131 |
|
132 |
sed -i \ |
133 |
-e "s|'-O2', ||" \ |
134 |
-e "s|'-Werror', ||" \ |
135 |
-e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
136 |
uwsgiconfig.py || die "sed failed" |
137 |
|
138 |
sed -i \ |
139 |
-e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ |
140 |
plugins/python/uwsgiplugin.py || die "sed failed" |
141 |
|
142 |
sed -i \ |
143 |
-e "s|/lib|/$(get_libdir)|" \ |
144 |
plugins/php/uwsgiplugin.py || die "sed failed" |
145 |
} |
146 |
|
147 |
src_configure() { |
148 |
local plugins="" |
149 |
use carbon && plugins+=", carbon" |
150 |
use graylog2 && plugins+=", graylog2" |
151 |
use nagios && plugins+=", nagios" |
152 |
use pam && plugins+=", pam" |
153 |
use rrdtool && plugins+=", rrdtool" |
154 |
use rsyslog && plugins+=", rsyslog" |
155 |
use syslog && plugins+=", syslog" |
156 |
|
157 |
# Notes: |
158 |
# * the embedded_plugins mostly follows the list of embedded_plugins |
159 |
# in buildconf/base.ini, make sure you compare the list when bumping uWSGI |
160 |
# * thus: keep the order in embedded_plugins the same as in the base.ini |
161 |
cat > "buildconf/gentoo.ini" << EOF |
162 |
[uwsgi] |
163 |
xml = $(use_true_false xml) |
164 |
ini = true |
165 |
yaml = $(use_true_false yaml) |
166 |
json = $(use_true_false json) |
167 |
sqlite3 = $(use_true_false sqlite) |
168 |
zeromq = $(use_true_false zeromq) |
169 |
snmp = true |
170 |
sctp = false |
171 |
spooler = true |
172 |
embedded = true |
173 |
ssl = auto |
174 |
udp = true |
175 |
multicast = true |
176 |
threading = true |
177 |
sendfile = true |
178 |
minterpreters = true |
179 |
async = true |
180 |
evdis = false |
181 |
ldap = $(use_true_false ldap) |
182 |
pcre = $(use_true_false pcre) |
183 |
routing = auto |
184 |
alarm = auto |
185 |
debug = $(use_true_false debug) |
186 |
unbit = false |
187 |
xml_implementation = libxml2 |
188 |
yaml_implementation = libyaml |
189 |
malloc_implementation = libc |
190 |
plugins = |
191 |
bin_name = uwsgi |
192 |
append_version = |
193 |
plugin_dir = /usr/$(get_libdir)/uwsgi |
194 |
plugin_build_dir = ${T}/plugins |
195 |
embedded_plugins = ping, cache, rpc, corerouter, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter ${plugins} |
196 |
as_shared_library = false |
197 |
|
198 |
locking = auto |
199 |
event = auto |
200 |
timer = auto |
201 |
filemonitor = auto |
202 |
|
203 |
embed_files = |
204 |
|
205 |
embed_config = |
206 |
[python] |
207 |
paste = true |
208 |
web3 = true |
209 |
EOF |
210 |
use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
211 |
use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
212 |
|
213 |
if use probepg ; then |
214 |
PGPV="$(best_version dev-db/postgresql-base)" |
215 |
PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-base-})" |
216 |
sed -i \ |
217 |
-e "s|pg_config|pg_config${PGSLOT/.}|" \ |
218 |
plugins/probepg/uwsgiplugin.py || die "sed failed" |
219 |
fi |
220 |
} |
221 |
|
222 |
each_ruby_compile() { |
223 |
cd "${WORKDIR}/${MY_P}" |
224 |
|
225 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
226 |
|
227 |
if [[ "${RUBY}" == *ruby19 ]] ; then |
228 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed" |
229 |
fi |
230 |
} |
231 |
|
232 |
install_python_lib() { |
233 |
insinto $(python_get_sitedir) |
234 |
doins uwsgidecorators.py |
235 |
} |
236 |
|
237 |
src_compile() { |
238 |
python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
239 |
|
240 |
mkdir -p "${T}/plugins" |
241 |
|
242 |
if use erlang ; then |
243 |
python uwsgiconfig.py --plugin plugins/erlang gentoo || die "building plugin for erlang failed" |
244 |
fi |
245 |
|
246 |
if use lua ; then |
247 |
# setting LUALIB explicitly since lua is not slotted on Gentoo |
248 |
# and uwsgi otherwise looks for lua5.1 |
249 |
UWSGICONFIG_LUALIB="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
250 |
fi |
251 |
|
252 |
if use perl ; then |
253 |
python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl failed" |
254 |
fi |
255 |
|
256 |
if use php ; then |
257 |
for s in $(php_get_slots); do |
258 |
UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
259 |
done |
260 |
fi |
261 |
|
262 |
if use python ; then |
263 |
for a in ${PYTHON_ABIS} ; do |
264 |
python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.} || die "building plugin for python-${a} failed" |
265 |
|
266 |
if use gevent ; then |
267 |
python${a} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${a/.} || die "building plugin for gevent-support in python-${a} failed" |
268 |
fi |
269 |
if use erlang ; then |
270 |
python${a} uwsgiconfig.py --plugin plugins/pyerl gentoo pyerl${a/.} || die "building plugin for erlang-support in python failed" |
271 |
fi |
272 |
done |
273 |
fi |
274 |
|
275 |
if use ruby ; then |
276 |
ruby-ng_src_compile |
277 |
fi |
278 |
|
279 |
if use spooler ; then |
280 |
python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building plugin for spooler failed" |
281 |
fi |
282 |
|
283 |
if use cgi ; then |
284 |
python uwsgiconfig.py --plugin plugins/cgi gentoo || die "building plugin for cgi failed" |
285 |
fi |
286 |
|
287 |
if use probepg ; then |
288 |
python uwsgiconfig.py --plugin plugins/probepg gentoo || die "building plugin for postgresql probe failed" |
289 |
fi |
290 |
|
291 |
if use apache2 ; then |
292 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
293 |
APXS2_ARGS="-c mod_${m}.c" |
294 |
apache-module_src_compile |
295 |
done |
296 |
fi |
297 |
} |
298 |
|
299 |
src_install() { |
300 |
dobin uwsgi |
301 |
pax-mark m "${D}"/usr/bin/uwsgi |
302 |
|
303 |
insinto /usr/$(get_libdir)/uwsgi |
304 |
doins "${T}/plugins"/*.so |
305 |
|
306 |
use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
307 |
use erlang && dosym uwsgi /usr/bin/uwsgi_erlang |
308 |
use lua && dosym uwsgi /usr/bin/uwsgi_lua |
309 |
use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
310 |
|
311 |
if use php ; then |
312 |
for s in $(php_get_slots); do |
313 |
dosym uwsgi /usr/bin/uwsgi_${s/.} |
314 |
done |
315 |
fi |
316 |
|
317 |
if use python ; then |
318 |
python_execute_function install_python_lib |
319 |
for a in ${PYTHON_ABIS} ; do |
320 |
dosym uwsgi /usr/bin/uwsgi_python${a/.} |
321 |
done |
322 |
fi |
323 |
|
324 |
if use apache2; then |
325 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
326 |
APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
327 |
apache-module_src_install |
328 |
done |
329 |
fi |
330 |
|
331 |
newinitd "${FILESDIR}"/uwsgi.initd-r1 uwsgi |
332 |
newconfd "${FILESDIR}"/uwsgi.confd-r1 uwsgi |
333 |
keepdir /etc/"${PN}".d |
334 |
use spooler && keepdir /var/spool/"${PN}" |
335 |
} |
336 |
|
337 |
pkg_postinst() { |
338 |
if use apache2 ; then |
339 |
elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
340 |
elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
341 |
elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
342 |
elog "Therefore you can enable only one of them at a time." |
343 |
elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
344 |
elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
345 |
elog "mod_proxy_uwsgi is the newest and not considered ready for production yet." |
346 |
fi |
347 |
|
348 |
elog "Append the following options to the uwsgi call to load the respective language plugin:" |
349 |
use cgi && elog " '--plugins cgi' for cgi" |
350 |
use erlang && elog " '--plugins erlang' for erlang" |
351 |
use lua && elog " '--plugins lua' for lua" |
352 |
use perl && elog " '--plugins psgi' for perl" |
353 |
|
354 |
if use php ; then |
355 |
for s in $(php_get_slots); do |
356 |
elog " '--plugins ${s/.}' for ${s}" |
357 |
done |
358 |
fi |
359 |
|
360 |
if use python ; then |
361 |
for a in ${PYTHON_ABIS} ; do |
362 |
elog " '--plugins python${a/.}' for python-${a}" |
363 |
use gevent && elog " '--plugins python${a/.},gevent${a/.}' for gevent support in python-${a}" |
364 |
use erlang && elog " '--plugins python${a/.},erlang,pyerl${a/.}' for erlang support in python-${a}" |
365 |
done |
366 |
fi |
367 |
|
368 |
if use ruby ; then |
369 |
for ruby in $USE_RUBY; do |
370 |
use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}" |
371 |
if [[ "${ruby}" == *ruby19 ]] ; then |
372 |
elog " '--plugins fibre' for ruby-1.9 fibres" |
373 |
fi |
374 |
done |
375 |
fi |
376 |
} |