Gentoo Archives: gentoo-commits

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/files/, www-servers/uwsgi/
Date: Tue, 29 Nov 2011 18:53:14
Message-Id: a0481da457074bce07aebbe3cd1a2f9e10e885ed.dev-zero@gentoo
1 commit: a0481da457074bce07aebbe3cd1a2f9e10e885ed
2 Author: Tiziano Müller <tm <AT> dev-zero <DOT> ch>
3 AuthorDate: Tue Nov 29 18:52:44 2011 +0000
4 Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 29 18:52:44 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=a0481da4
7
8 dropped all patches, merged changes to live ebuild
9
10 ---
11 www-servers/uwsgi/Manifest | 8 +-
12 .../uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch | 13 ---
13 .../uwsgi/files/uwsgi-9999-fix-destdir.patch | 11 --
14 www-servers/uwsgi/files/uwsgi.initd | 2 +-
15 www-servers/uwsgi/uwsgi-9999.ebuild | 110 +++++++++++++-------
16 5 files changed, 73 insertions(+), 71 deletions(-)
17
18 diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
19 index d5ec9d4..579f9cc 100644
20 --- a/www-servers/uwsgi/Manifest
21 +++ b/www-servers/uwsgi/Manifest
22 @@ -1,14 +1,10 @@
23 AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861
24 -AUX uwsgi-0.9.8-fix-psgi-flags.patch 640 RMD160 6556801682d2c35e30b394812bf3c695b3f234da SHA1 6e305e2d1d9c8b3f5f0d41b72bcd058a2a1d0cc1 SHA256 f27db595c0c9e9002163d978fc5f7075e1aa8fd453395ac6c43848b1a96bdb42
25 -AUX uwsgi-0.9.8-no-werror.patch 624 RMD160 ef3ebbfff1c6b4a49297e780b5eb5545786f8173 SHA1 a4e0923cb5ebaab19cee5b4495b1625f54c7510b SHA256 8650fe560d25d9b6facf8034bb5edfedc8aa74f22a716da702d2b97a1d298998
26 -AUX uwsgi-0.9.8.3-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3689c35c SHA1 44b54276acf2ea61da824bf8aab054e662cdc8aa SHA256 b9fcaf3b7a76ab7a5150b85df4a39ecf578a7f181d9880c36d1e6e876bcb0ed7
27 -AUX uwsgi-9999-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3689c35c SHA1 44b54276acf2ea61da824bf8aab054e662cdc8aa SHA256 b9fcaf3b7a76ab7a5150b85df4a39ecf578a7f181d9880c36d1e6e876bcb0ed7
28 AUX uwsgi.confd 1247 RMD160 f3cbb0ed1e83385e917949b7df1b8953792b9464 SHA1 2cba8d1990f0138f7bea113fec924b1656d53a8c SHA256 26c52f22137ffd44ef4c094ce9cf3b55f1c418f1602e0451462103a5117174a4
29 -AUX uwsgi.initd 2388 RMD160 32dcbde8f29c55f3aba996396880d543fc51f97d SHA1 24276db0dd82a5b5cdd756772ed81ae5c86e6e45 SHA256 6497afcc6208d54f01ef853bff0ee33eb4f5f63e0eb3e024bc206ee78966986b
30 +AUX uwsgi.initd 2386 RMD160 a799175f2b94eb96dc19ff9b8b4d5c18a52cbd38 SHA1 ffa1870c2e14871764447bc97e6d7b9f24364a28 SHA256 d523238595e83b7f82001dea41ffa3298836fd0027859ed3e1bf4f84d75e1370
31 DIST uwsgi-0.9.8.6.tar.gz 359620 RMD160 78b92fe3a9b272ca5a2704b0db7d1956b9149a0b SHA1 bb835c3c14310640b24ebdbcf0aa91e8ce8bd5a6 SHA256 14379c0055063dbfbc4ce9ba10dfd6eec827286a462300d98947174d9694d981
32 DIST uwsgi-1.0-rc6.tar.gz 441757 RMD160 67ba49700adc523a73ce9cc49ce86d742352c32e SHA1 bc2da6d7572222bf13cb6f3423e7dd4d38b7e3ce SHA256 e3878ac5fef7a9c4e5ebffe4c79a424c2aff34ebc5f6a6b2f88f16cb515552e2
33 EBUILD uwsgi-0.9.8.6.ebuild 4304 RMD160 ce533908cedae761db93ae26b811ae09e12847fc SHA1 29710c3c36fe5cffb34c180f9c6a48d7ace001e5 SHA256 5bf9203180bfa41622cad1f8c414b0a00af7b901e70017784f7648be43316b28
34 EBUILD uwsgi-1.0_rc6.ebuild 4494 RMD160 7bdd37f424fe0d24595fcae20219cbdb98222006 SHA1 a0580b78bcd9a682d93ef8443f3d23f08d4dfbb1 SHA256 3022965197bf679019c3be27acbb274df31da095afeea2b06658c136bb7e86aa
35 -EBUILD uwsgi-9999.ebuild 3714 RMD160 eb0a5686a9620fc309649c47b1c912dcb7a2948b SHA1 c45150e52d072f8b63ebb40fa3cf5c4d8cb67b6f SHA256 74251b3da8ff0d99aa12ee0905b4b20fe3ab581afd7054a6c8fb09a2d6622c64
36 +EBUILD uwsgi-9999.ebuild 4443 RMD160 114d797de425d0d5b3bfe23cfbc426aa9567fc99 SHA1 e26121b379a91b18edb6fcd2d94a5ef6377f0282 SHA256 37dc74d9d4d4224d419bca0f3805e7a936a303867cc94f6d26c8103a7dc3d45c
37 MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb4c27ee96af8a09f1f9bbfc629384efe8c2363a9
38 MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SHA1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba74657f3a332c7427c1bd24a5609d2ff887f63901d9cd35
39
40 diff --git a/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch b/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
41 deleted file mode 100644
42 index a65e6d2..0000000
43 --- a/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
44 +++ /dev/null
45 @@ -1,13 +0,0 @@
46 -diff --git a/plugins/psgi/uwsgiplugin.py b/plugins/psgi/uwsgiplugin.py
47 -index 9100824..8651fbb 100644
48 ---- a/plugins/psgi/uwsgiplugin.py
49 -+++ b/plugins/psgi/uwsgiplugin.py
50 -@@ -2,6 +2,6 @@ import os,sys
51 -
52 - NAME='psgi'
53 - CFLAGS = [os.popen('perl -MExtUtils::Embed -e ccopts').read().rstrip()]
54 --LDFLAGS = [os.popen('perl -MExtUtils::Embed -e ldopts').read().rstrip()]
55 --LIBS = []
56 -+LDFLAGS = [os.popen('perl -MExtUtils::Embed -e ldopts | | grep -E "\-W\S+"').read().rstrip()]
57 -+LIBS = [os.popen('perl -MExtUtils::Embed -e ldopts | grep -o -E "\-[L].*"').read().rstrip()]
58 - GCC_LIST = ['uwsgi_plmodule', 'psgi_loader', 'psgi_response', 'psgi_plugin']
59
60 diff --git a/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch b/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch
61 deleted file mode 100644
62 index a7c47b6..0000000
63 --- a/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch
64 +++ /dev/null
65 @@ -1,11 +0,0 @@
66 ---- uwsgiconfig.py.orig 2011-08-08 17:56:14.649325030 +0200
67 -+++ uwsgiconfig.py 2011-08-08 17:58:00.085329500 +0200
68 -@@ -670,7 +670,7 @@
69 - else:
70 - p_cflags.append("-D%s_plugin=%s_plugin" % (up.NAME, name))
71 -
72 -- plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin'
73 -+ plugin_dest = uc.get('plugin_build_dir') + '/' + name + '_plugin'
74 -
75 - shared_flag = '-shared'
76 -
77
78 diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/files/uwsgi.initd
79 index f203af4..bb3ba6d 100644
80 --- a/www-servers/uwsgi/files/uwsgi.initd
81 +++ b/www-servers/uwsgi/files/uwsgi.initd
82 @@ -22,7 +22,7 @@ start() {
83
84 if [ "${SVCNAME}" = "uwsgi" ]; then
85 eerror "You are not supposed to run this script directly. Create a symlink"
86 - eerror "for the FastCGI application you want to run as well as a copy of the"
87 + eerror "for the uwsgi application you want to run as well as a copy of the"
88 eerror "configuration file and modify it appropriately like so..."
89 eerror
90 eerror " ln -s uwsgi /etc/init.d/uwsgi.trac"
91
92 diff --git a/www-servers/uwsgi/uwsgi-9999.ebuild b/www-servers/uwsgi/uwsgi-9999.ebuild
93 index 9a8d231..917af91 100644
94 --- a/www-servers/uwsgi/uwsgi-9999.ebuild
95 +++ b/www-servers/uwsgi/uwsgi-9999.ebuild
96 @@ -1,12 +1,12 @@
97 # Copyright 1999-2011 Gentoo Foundation
98 # Distributed under the terms of the GNU General Public License v2
99 -# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.8.ebuild,v 1.1 2011/06/08 18:00:13 maksbotan Exp $
100 +# $Header: $
101
102 -EAPI="3"
103 -PYTHON_DEPEND="*"
104 +EAPI="4"
105 +PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2"
106 SUPPORT_PYTHON_ABIS="1"
107
108 -inherit eutils python toolchain-funcs apache-module multilib mercurial
109 +inherit apache-module python multilib mercurial
110
111 DESCRIPTION="uWSGI server for Python web applications"
112 HOMEPAGE="http://projects.unbit.it/uwsgi/"
113 @@ -15,9 +15,9 @@ EHG_REPO_URI="http://projects.unbit.it/hg/uwsgi"
114 LICENSE="GPL-2"
115 SLOT="0"
116 KEYWORDS=""
117 -IUSE="debug json ldap lua pcre perl ruby sqlite +xml yaml zeromq"
118 +IUSE="apache2 +carbon debug json ldap lua +nagios +pcre perl python ruby rrdtool sqlite +xml yaml zeromq"
119
120 -RDEPEND="json? ( dev-libs/jansson )
121 +CDEPEND="json? ( dev-libs/jansson )
122 ldap? ( net-nds/openldap )
123 lua? ( dev-lang/lua )
124 pcre? ( dev-libs/libpcre )
125 @@ -27,21 +27,15 @@ RDEPEND="json? ( dev-libs/jansson )
126 xml? ( dev-libs/libxml2 )
127 yaml? ( dev-libs/libyaml )
128 zeromq? ( net-libs/zeromq )"
129 -DEPEND="${RDEPEND}
130 +DEPEND="${CDEPEND}
131 dev-util/pkgconfig"
132 +RDEPEND="${CDEPEND}
133 + rrdtool? ( net-analyzer/rrdtool )"
134
135 APXS2_S="${S}/apache2"
136 APACHE2_MOD_CONF="42_mod_${PN}"
137 want_apache2_2
138
139 -src_prepare() {
140 - epatch \
141 - "${FILESDIR}"/${PN}-0.9.8-no-werror.patch \
142 - "${FILESDIR}"/${P}-fix-destdir.patch
143 -
144 - python_copy_sources
145 -}
146 -
147 use_true_false() {
148 if use $1 ; then
149 echo "true"
150 @@ -50,15 +44,29 @@ use_true_false() {
151 fi
152 }
153
154 +pkg_setup() {
155 + depend.apache_pkg_setup
156 + python_pkg_setup
157 +}
158 +
159 +src_prepare() {
160 + sed -i \
161 + -e "s|'-O2', ||" \
162 + -e "s|'-Werror', ||" \
163 + -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \
164 + uwsgiconfig.py || die "sed failed"
165 +
166 + sed -i \
167 + -e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \
168 + plugins/python??/uwsgiplugin.py || die "sed failed"
169 +}
170 src_configure() {
171 - configure() {
172 - local plugins
173 - use lua && plugins+=", lua"
174 - use perl && plugins+=", psgi"
175 - use ruby && plugins+=", rack"
176 - plugins="${plugins:1}"
177 -
178 - cat > "buildconf/default.ini" << EOF
179 + local plugins=""
180 + use carbon && plugins+=", carbon"
181 + use nagios && plugins+=", nagios"
182 + use rrdtool && plugins+=", rrdtool"
183 +
184 + cat > "buildconf/gentoo.ini" << EOF
185 [uwsgi]
186 xml = $(use_true_false xml)
187 ini = true
188 @@ -84,12 +92,13 @@ unbit = false
189 xml_implementation = libxml2
190 yaml_implementation = libyaml
191 malloc_implementation = libc
192 -plugins = ${plugins}
193 +plugins =
194 bin_name = uwsgi
195 append_version =
196 -plugin_build_dir = plugins
197 plugin_dir = /usr/$(get_libdir)/uwsgi
198 -embedded_plugins = python, ping, cache, nagios, rpc, fastrouter, http, ugreen
199 +plugin_build_dir = ${T}/plugins
200 +embedded_plugins = ping, cache, rpc, fastrouter, http, ugreen, signal, ${plugins:1}
201 +as_shared_library = false
202
203 locking = auto
204 event = auto
205 @@ -105,12 +114,30 @@ paste = true
206 web3 = true
207
208 EOF
209 - }
210 - python_execute_function -s configure
211 }
212
213 src_compile() {
214 - python_src_compile CC="$(tc-getCC)"
215 + python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
216 +
217 + mkdir -p "${T}/plugins"
218 +
219 + if use lua ; then
220 + python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
221 + fi
222 +
223 + if use perl ; then
224 + python uwsgiconfig.py --plugin plugins/perl gentoo || die "building plugin for perl failed"
225 + fi
226 +
227 + if use python ; then
228 + for a in ${PYTHON_ABIS} ; do
229 + python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "building plugin for python-${a} failed"
230 + done
231 + fi
232 +
233 + if use ruby ; then
234 + echo "TODO"
235 + fi
236
237 if use apache2 ; then
238 for m in Ruwsgi uwsgi ; do
239 @@ -121,17 +148,20 @@ src_compile() {
240 }
241
242 src_install() {
243 - installation() {
244 - newbin uwsgi uwsgi-${PYTHON_ABI}
245 + dobin uwsgi
246 +
247 + insinto /usr/$(get_libdir)/uwsgi
248 + doins "${T}/plugins"/*.so
249 +
250 + use lua && dosym uwsgi /usr/bin/uwsgi_lua
251
252 - if use lua || use perl || use ruby ; then
253 - insinto /usr/$(get_libdir)/uwsgi
254 - doins plugins/*.so
255 - fi
256 - }
257 - python_execute_function -s installation
258 + use perl && dosym uwsgi /usr/bin/uwsgi_perl
259
260 - python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
261 + if use python ; then
262 + for a in ${PYTHON_ABIS} ; do
263 + dosym uwsgi /usr/bin/uwsgi_python${a/.}
264 + done
265 + fi
266
267 if use apache2; then
268 for m in Ruwsgi uwsgi ; do
269 @@ -155,8 +185,8 @@ pkg_postinst() {
270 elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
271 fi
272
273 - if use lua || use perl || use ruby ; then
274 + if use lua || use perl || use ruby || use python; then
275 elog "The lua, perl and ruby modules are built as plugins."
276 - elog "Use '--plugins lua', '--plugins psgi' or '--plugins rack' to load them."
277 + elog "Use '--plugins lua', '--plugins psgi', '--plugins rack' or '--plugins python27' to load them."
278 fi
279 }