1 |
commit: 943162c8dd859c9b97d6f325f90dfcc1d61941da |
2 |
Author: Tiziano Müller <tm <AT> dev-zero <DOT> ch> |
3 |
AuthorDate: Mon Nov 21 10:56:25 2011 +0000 |
4 |
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 21 10:56:25 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=943162c8 |
7 |
|
8 |
Use upstream's way to package python plugins. Version bump. |
9 |
|
10 |
--- |
11 |
www-servers/uwsgi/Manifest | 10 +- |
12 |
.../uwsgi/files/uwsgi-0.9.8-no-werror.patch | 11 -- |
13 |
.../uwsgi/files/uwsgi-0.9.8.3-fix-destdir.patch | 11 -- |
14 |
www-servers/uwsgi/uwsgi-0.9.8.6.ebuild | 109 +++++++++++------- |
15 |
.../{uwsgi-0.9.8.6.ebuild => uwsgi-1.0_rc6.ebuild} | 119 +++++++++++++------- |
16 |
5 files changed, 151 insertions(+), 109 deletions(-) |
17 |
|
18 |
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest |
19 |
index 768001c..d5ec9d4 100644 |
20 |
--- a/www-servers/uwsgi/Manifest |
21 |
+++ b/www-servers/uwsgi/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
-MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb4c27ee96af8a09f1f9bbfc629384efe8c2363a9 |
24 |
AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861 |
25 |
AUX uwsgi-0.9.8-fix-psgi-flags.patch 640 RMD160 6556801682d2c35e30b394812bf3c695b3f234da SHA1 6e305e2d1d9c8b3f5f0d41b72bcd058a2a1d0cc1 SHA256 f27db595c0c9e9002163d978fc5f7075e1aa8fd453395ac6c43848b1a96bdb42 |
26 |
AUX uwsgi-0.9.8-no-werror.patch 624 RMD160 ef3ebbfff1c6b4a49297e780b5eb5545786f8173 SHA1 a4e0923cb5ebaab19cee5b4495b1625f54c7510b SHA256 8650fe560d25d9b6facf8034bb5edfedc8aa74f22a716da702d2b97a1d298998 |
27 |
@@ -6,7 +5,10 @@ AUX uwsgi-0.9.8.3-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3 |
28 |
AUX uwsgi-9999-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3689c35c SHA1 44b54276acf2ea61da824bf8aab054e662cdc8aa SHA256 b9fcaf3b7a76ab7a5150b85df4a39ecf578a7f181d9880c36d1e6e876bcb0ed7 |
29 |
AUX uwsgi.confd 1247 RMD160 f3cbb0ed1e83385e917949b7df1b8953792b9464 SHA1 2cba8d1990f0138f7bea113fec924b1656d53a8c SHA256 26c52f22137ffd44ef4c094ce9cf3b55f1c418f1602e0451462103a5117174a4 |
30 |
AUX uwsgi.initd 2388 RMD160 32dcbde8f29c55f3aba996396880d543fc51f97d SHA1 24276db0dd82a5b5cdd756772ed81ae5c86e6e45 SHA256 6497afcc6208d54f01ef853bff0ee33eb4f5f63e0eb3e024bc206ee78966986b |
31 |
-MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SHA1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba74657f3a332c7427c1bd24a5609d2ff887f63901d9cd35 |
32 |
-EBUILD uwsgi-0.9.8.6.ebuild 3720 RMD160 50df26197402d355939a599d2229a86e9c14bbfb SHA1 a5902c32a7a2ef598fbd1bb35bed2bceabdd0336 SHA256 198eaa5873b5a7815e8e9831d5756f7636f12ed066bf1b99adc273cc7e8e1583 |
33 |
-EBUILD uwsgi-9999.ebuild 3714 RMD160 eb0a5686a9620fc309649c47b1c912dcb7a2948b SHA1 c45150e52d072f8b63ebb40fa3cf5c4d8cb67b6f SHA256 74251b3da8ff0d99aa12ee0905b4b20fe3ab581afd7054a6c8fb09a2d6622c64 |
34 |
DIST uwsgi-0.9.8.6.tar.gz 359620 RMD160 78b92fe3a9b272ca5a2704b0db7d1956b9149a0b SHA1 bb835c3c14310640b24ebdbcf0aa91e8ce8bd5a6 SHA256 14379c0055063dbfbc4ce9ba10dfd6eec827286a462300d98947174d9694d981 |
35 |
+DIST uwsgi-1.0-rc6.tar.gz 441757 RMD160 67ba49700adc523a73ce9cc49ce86d742352c32e SHA1 bc2da6d7572222bf13cb6f3423e7dd4d38b7e3ce SHA256 e3878ac5fef7a9c4e5ebffe4c79a424c2aff34ebc5f6a6b2f88f16cb515552e2 |
36 |
+EBUILD uwsgi-0.9.8.6.ebuild 4304 RMD160 ce533908cedae761db93ae26b811ae09e12847fc SHA1 29710c3c36fe5cffb34c180f9c6a48d7ace001e5 SHA256 5bf9203180bfa41622cad1f8c414b0a00af7b901e70017784f7648be43316b28 |
37 |
+EBUILD uwsgi-1.0_rc6.ebuild 4494 RMD160 7bdd37f424fe0d24595fcae20219cbdb98222006 SHA1 a0580b78bcd9a682d93ef8443f3d23f08d4dfbb1 SHA256 3022965197bf679019c3be27acbb274df31da095afeea2b06658c136bb7e86aa |
38 |
+EBUILD uwsgi-9999.ebuild 3714 RMD160 eb0a5686a9620fc309649c47b1c912dcb7a2948b SHA1 c45150e52d072f8b63ebb40fa3cf5c4d8cb67b6f SHA256 74251b3da8ff0d99aa12ee0905b4b20fe3ab581afd7054a6c8fb09a2d6622c64 |
39 |
+MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb4c27ee96af8a09f1f9bbfc629384efe8c2363a9 |
40 |
+MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SHA1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba74657f3a332c7427c1bd24a5609d2ff887f63901d9cd35 |
41 |
|
42 |
diff --git a/www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch b/www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch |
43 |
deleted file mode 100644 |
44 |
index f55d6bb..0000000 |
45 |
--- a/www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch |
46 |
+++ /dev/null |
47 |
@@ -1,11 +0,0 @@ |
48 |
---- uwsgiconfig.py 2011-06-07 18:38:50.000000000 +0400 |
49 |
-+++ uwsgiconfig.py 2011-06-05 10:28:03.000000000 +0400 |
50 |
-@@ -176,7 +176,7 @@ |
51 |
- if uwsgi_os == 'Linux': |
52 |
- self.gcc_list.append('lib/linux_ns') |
53 |
- self.gcc_list.append('lib/netlink') |
54 |
-- self.cflags = ['-O2', '-Wall', '-Werror', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split() |
55 |
-+ self.cflags = ['-O2', '-Wall', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split() |
56 |
- try: |
57 |
- gcc_version = str(spcall("%s -dumpversion" % GCC)) |
58 |
- except: |
59 |
|
60 |
diff --git a/www-servers/uwsgi/files/uwsgi-0.9.8.3-fix-destdir.patch b/www-servers/uwsgi/files/uwsgi-0.9.8.3-fix-destdir.patch |
61 |
deleted file mode 100644 |
62 |
index a7c47b6..0000000 |
63 |
--- a/www-servers/uwsgi/files/uwsgi-0.9.8.3-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/uwsgi-0.9.8.6.ebuild b/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild |
79 |
index 7bc3bf3..04fd42a 100644 |
80 |
--- a/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild |
81 |
+++ b/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild |
82 |
@@ -1,12 +1,12 @@ |
83 |
# Copyright 1999-2011 Gentoo Foundation |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.8.ebuild,v 1.1 2011/06/08 18:00:13 maksbotan Exp $ |
86 |
+# $Header: $ |
87 |
|
88 |
-EAPI="3" |
89 |
-PYTHON_DEPEND="*" |
90 |
+EAPI="4" |
91 |
+PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2" |
92 |
SUPPORT_PYTHON_ABIS="1" |
93 |
|
94 |
-inherit eutils python toolchain-funcs apache-module |
95 |
+inherit apache-module python multilib |
96 |
|
97 |
DESCRIPTION="uWSGI server for Python web applications" |
98 |
HOMEPAGE="http://projects.unbit.it/uwsgi/" |
99 |
@@ -15,32 +15,26 @@ SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz" |
100 |
LICENSE="GPL-2" |
101 |
SLOT="0" |
102 |
KEYWORDS="~amd64 ~x86" |
103 |
-IUSE="debug json ldap lua pcre perl ruby sqlite +xml yaml zeromq" |
104 |
+IUSE="apache2 debug json ldap lua +nagios +pcre perl python rrdtool sqlite +xml yaml zeromq" |
105 |
|
106 |
-RDEPEND="json? ( dev-libs/jansson ) |
107 |
+CDEPEND="json? ( dev-libs/jansson ) |
108 |
ldap? ( net-nds/openldap ) |
109 |
lua? ( dev-lang/lua ) |
110 |
pcre? ( dev-libs/libpcre ) |
111 |
perl? ( dev-lang/perl ) |
112 |
- ruby? ( dev-lang/ruby ) |
113 |
sqlite? ( dev-db/sqlite:3 ) |
114 |
xml? ( dev-libs/libxml2 ) |
115 |
yaml? ( dev-libs/libyaml ) |
116 |
zeromq? ( net-libs/zeromq )" |
117 |
-DEPEND="${RDEPEND} |
118 |
+DEPEND="${CDEPEND} |
119 |
dev-util/pkgconfig" |
120 |
+RDEPEND="${CDEPEND} |
121 |
+ rrdtool? ( net-analyzer/rrdtool )" |
122 |
|
123 |
APXS2_S="${S}/apache2" |
124 |
APACHE2_MOD_CONF="42_mod_${PN}" |
125 |
want_apache2_2 |
126 |
|
127 |
-src_prepare() { |
128 |
- epatch \ |
129 |
- "${FILESDIR}"/${PN}-0.9.8-no-werror.patch \ |
130 |
- "${FILESDIR}"/${PN}-0.9.8.3-fix-destdir.patch |
131 |
- python_copy_sources |
132 |
-} |
133 |
- |
134 |
use_true_false() { |
135 |
if use $1 ; then |
136 |
echo "true" |
137 |
@@ -49,15 +43,29 @@ use_true_false() { |
138 |
fi |
139 |
} |
140 |
|
141 |
+pkg_setup() { |
142 |
+ depend.apache_pkg_setup |
143 |
+ python_pkg_setup |
144 |
+} |
145 |
+ |
146 |
+src_prepare() { |
147 |
+ sed -i \ |
148 |
+ -e "s|'-O2', ||" \ |
149 |
+ -e "s|'-Werror', ||" \ |
150 |
+ -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
151 |
+ uwsgiconfig.py || die "sed failed" |
152 |
+ |
153 |
+ sed -i \ |
154 |
+ -e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ |
155 |
+ plugins/python??/uwsgiplugin.py || die "sed failed" |
156 |
+} |
157 |
+ |
158 |
src_configure() { |
159 |
- configure() { |
160 |
- local plugins |
161 |
- use lua && plugins+=", lua" |
162 |
- use perl && plugins+=", psgi" |
163 |
- use ruby && plugins+=", rack" |
164 |
- plugins="${plugins:1}" |
165 |
- |
166 |
- cat > "buildconf/default.ini" << EOF |
167 |
+ local plugins="" |
168 |
+ use nagios && plugins+=", nagios" |
169 |
+ use rrdtool && plugins+=", rrdtool" |
170 |
+ |
171 |
+ cat > "buildconf/gentoo.ini" << EOF |
172 |
[uwsgi] |
173 |
xml = $(use_true_false xml) |
174 |
ini = true |
175 |
@@ -83,12 +91,13 @@ unbit = false |
176 |
xml_implementation = libxml2 |
177 |
yaml_implementation = libyaml |
178 |
malloc_implementation = libc |
179 |
-plugins = ${plugins} |
180 |
+plugins = |
181 |
bin_name = uwsgi |
182 |
append_version = |
183 |
-plugin_build_dir = plugins |
184 |
plugin_dir = /usr/$(get_libdir)/uwsgi |
185 |
-embedded_plugins = python, ping, cache, nagios, rpc, fastrouter, http, ugreen |
186 |
+plugin_build_dir = ${T}/plugins |
187 |
+embedded_plugins = ping, cache, rpc, fastrouter, http, ugreen, ${plugins:1} |
188 |
+as_shared_library = false |
189 |
|
190 |
locking = auto |
191 |
event = auto |
192 |
@@ -104,12 +113,26 @@ paste = true |
193 |
web3 = true |
194 |
|
195 |
EOF |
196 |
- } |
197 |
- python_execute_function -s configure |
198 |
} |
199 |
|
200 |
src_compile() { |
201 |
- python_src_compile CC="$(tc-getCC)" |
202 |
+ python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
203 |
+ |
204 |
+ mkdir -p "${T}/plugins" |
205 |
+ |
206 |
+ if use lua ; then |
207 |
+ python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
208 |
+ fi |
209 |
+ |
210 |
+ if use perl ; then |
211 |
+ python uwsgiconfig.py --plugin plugins/perl gentoo || die "building plugin for perl failed" |
212 |
+ fi |
213 |
+ |
214 |
+ if use python ; then |
215 |
+ for a in ${PYTHON_ABIS} ; do |
216 |
+ python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "building plugin for python-${a} failed" |
217 |
+ done |
218 |
+ fi |
219 |
|
220 |
if use apache2 ; then |
221 |
for m in Ruwsgi uwsgi ; do |
222 |
@@ -120,16 +143,20 @@ src_compile() { |
223 |
} |
224 |
|
225 |
src_install() { |
226 |
- installation() { |
227 |
- newbin uwsgi uwsgi-${PYTHON_ABI} |
228 |
- if use lua || use perl || use ruby ; then |
229 |
- insinto /usr/$(get_libdir)/uwsgi |
230 |
- doins plugins/*.so |
231 |
- fi |
232 |
- } |
233 |
- python_execute_function -s installation |
234 |
+ dobin uwsgi |
235 |
|
236 |
- python_generate_wrapper_scripts "${ED}usr/bin/uwsgi" |
237 |
+ insinto /usr/$(get_libdir)/uwsgi |
238 |
+ doins "${T}/plugins"/*.so |
239 |
+ |
240 |
+ use lua && dosym uwsgi /usr/bin/uwsgi_lua |
241 |
+ |
242 |
+ use perl && dosym uwsgi /usr/bin/uwsgi_perl |
243 |
+ |
244 |
+ if use python ; then |
245 |
+ for a in ${PYTHON_ABIS} ; do |
246 |
+ dosym uwsgi /usr/bin/uwsgi_python${a/.} |
247 |
+ done |
248 |
+ fi |
249 |
|
250 |
if use apache2; then |
251 |
for m in Ruwsgi uwsgi ; do |
252 |
@@ -152,8 +179,8 @@ pkg_postinst() { |
253 |
elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
254 |
fi |
255 |
|
256 |
- if use lua || use perl || use ruby ; then |
257 |
- elog "The lua, perl and ruby modules are built as plugins." |
258 |
- elog "Use '--plugins lua', '--plugins psgi' or '--plugins rack' to load them." |
259 |
+ if use lua || use perl || use python; then |
260 |
+ elog "The lua, perl and python modules are built as plugins." |
261 |
+ elog "Use '--plugins lua', '--plugins psgi' or '--plugins python27' to load them." |
262 |
fi |
263 |
} |
264 |
|
265 |
diff --git a/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild b/www-servers/uwsgi/uwsgi-1.0_rc6.ebuild |
266 |
similarity index 54% |
267 |
copy from www-servers/uwsgi/uwsgi-0.9.8.6.ebuild |
268 |
copy to www-servers/uwsgi/uwsgi-1.0_rc6.ebuild |
269 |
index 7bc3bf3..0641b06 100644 |
270 |
--- a/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild |
271 |
+++ b/www-servers/uwsgi/uwsgi-1.0_rc6.ebuild |
272 |
@@ -1,23 +1,25 @@ |
273 |
# Copyright 1999-2011 Gentoo Foundation |
274 |
# Distributed under the terms of the GNU General Public License v2 |
275 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.8.ebuild,v 1.1 2011/06/08 18:00:13 maksbotan Exp $ |
276 |
+# $Header: $ |
277 |
|
278 |
-EAPI="3" |
279 |
-PYTHON_DEPEND="*" |
280 |
+EAPI="4" |
281 |
+PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2" |
282 |
SUPPORT_PYTHON_ABIS="1" |
283 |
|
284 |
-inherit eutils python toolchain-funcs apache-module |
285 |
+MY_P="${P/_/-}" |
286 |
+ |
287 |
+inherit apache-module python multilib |
288 |
|
289 |
DESCRIPTION="uWSGI server for Python web applications" |
290 |
HOMEPAGE="http://projects.unbit.it/uwsgi/" |
291 |
-SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz" |
292 |
+SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz" |
293 |
|
294 |
LICENSE="GPL-2" |
295 |
SLOT="0" |
296 |
KEYWORDS="~amd64 ~x86" |
297 |
-IUSE="debug json ldap lua pcre perl ruby sqlite +xml yaml zeromq" |
298 |
+IUSE="apache2 +carbon debug json ldap lua +nagios +pcre perl python ruby rrdtool sqlite +xml yaml zeromq" |
299 |
|
300 |
-RDEPEND="json? ( dev-libs/jansson ) |
301 |
+CDEPEND="json? ( dev-libs/jansson ) |
302 |
ldap? ( net-nds/openldap ) |
303 |
lua? ( dev-lang/lua ) |
304 |
pcre? ( dev-libs/libpcre ) |
305 |
@@ -27,19 +29,16 @@ RDEPEND="json? ( dev-libs/jansson ) |
306 |
xml? ( dev-libs/libxml2 ) |
307 |
yaml? ( dev-libs/libyaml ) |
308 |
zeromq? ( net-libs/zeromq )" |
309 |
-DEPEND="${RDEPEND} |
310 |
+DEPEND="${CDEPEND} |
311 |
dev-util/pkgconfig" |
312 |
+RDEPEND="${CDEPEND} |
313 |
+ rrdtool? ( net-analyzer/rrdtool )" |
314 |
|
315 |
+S="${WORKDIR}/${MY_P}" |
316 |
APXS2_S="${S}/apache2" |
317 |
APACHE2_MOD_CONF="42_mod_${PN}" |
318 |
-want_apache2_2 |
319 |
|
320 |
-src_prepare() { |
321 |
- epatch \ |
322 |
- "${FILESDIR}"/${PN}-0.9.8-no-werror.patch \ |
323 |
- "${FILESDIR}"/${PN}-0.9.8.3-fix-destdir.patch |
324 |
- python_copy_sources |
325 |
-} |
326 |
+want_apache2_2 |
327 |
|
328 |
use_true_false() { |
329 |
if use $1 ; then |
330 |
@@ -49,15 +48,30 @@ use_true_false() { |
331 |
fi |
332 |
} |
333 |
|
334 |
+pkg_setup() { |
335 |
+ depend.apache_pkg_setup |
336 |
+ python_pkg_setup |
337 |
+} |
338 |
+ |
339 |
+src_prepare() { |
340 |
+ sed -i \ |
341 |
+ -e "s|'-O2', ||" \ |
342 |
+ -e "s|'-Werror', ||" \ |
343 |
+ -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
344 |
+ uwsgiconfig.py || die "sed failed" |
345 |
+ |
346 |
+ sed -i \ |
347 |
+ -e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ |
348 |
+ plugins/python??/uwsgiplugin.py || die "sed failed" |
349 |
+} |
350 |
+ |
351 |
src_configure() { |
352 |
- configure() { |
353 |
- local plugins |
354 |
- use lua && plugins+=", lua" |
355 |
- use perl && plugins+=", psgi" |
356 |
- use ruby && plugins+=", rack" |
357 |
- plugins="${plugins:1}" |
358 |
- |
359 |
- cat > "buildconf/default.ini" << EOF |
360 |
+ local plugins="" |
361 |
+ use carbon && plugins+=", carbon" |
362 |
+ use nagios && plugins+=", nagios" |
363 |
+ use rrdtool && plugins+=", rrdtool" |
364 |
+ |
365 |
+ cat > "buildconf/gentoo.ini" << EOF |
366 |
[uwsgi] |
367 |
xml = $(use_true_false xml) |
368 |
ini = true |
369 |
@@ -83,12 +97,13 @@ unbit = false |
370 |
xml_implementation = libxml2 |
371 |
yaml_implementation = libyaml |
372 |
malloc_implementation = libc |
373 |
-plugins = ${plugins} |
374 |
+plugins = |
375 |
bin_name = uwsgi |
376 |
append_version = |
377 |
-plugin_build_dir = plugins |
378 |
plugin_dir = /usr/$(get_libdir)/uwsgi |
379 |
-embedded_plugins = python, ping, cache, nagios, rpc, fastrouter, http, ugreen |
380 |
+plugin_build_dir = ${T}/plugins |
381 |
+embedded_plugins = ping, cache, rpc, fastrouter, http, ugreen, signal, ${plugins:1} |
382 |
+as_shared_library = false |
383 |
|
384 |
locking = auto |
385 |
event = auto |
386 |
@@ -98,18 +113,34 @@ filemonitor = auto |
387 |
embed_files = |
388 |
|
389 |
embed_config = |
390 |
- |
391 |
[python] |
392 |
paste = true |
393 |
web3 = true |
394 |
- |
395 |
EOF |
396 |
- } |
397 |
- python_execute_function -s configure |
398 |
} |
399 |
|
400 |
src_compile() { |
401 |
- python_src_compile CC="$(tc-getCC)" |
402 |
+ python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
403 |
+ |
404 |
+ mkdir -p "${T}/plugins" |
405 |
+ |
406 |
+ if use lua ; then |
407 |
+ python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
408 |
+ fi |
409 |
+ |
410 |
+ if use perl ; then |
411 |
+ python uwsgiconfig.py --plugin plugins/perl gentoo || die "building plugin for perl failed" |
412 |
+ fi |
413 |
+ |
414 |
+ if use python ; then |
415 |
+ for a in ${PYTHON_ABIS} ; do |
416 |
+ python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "building plugin for python-${a} failed" |
417 |
+ done |
418 |
+ fi |
419 |
+ |
420 |
+ if use ruby ; then |
421 |
+ echo "TODO" |
422 |
+ fi |
423 |
|
424 |
if use apache2 ; then |
425 |
for m in Ruwsgi uwsgi ; do |
426 |
@@ -120,16 +151,20 @@ src_compile() { |
427 |
} |
428 |
|
429 |
src_install() { |
430 |
- installation() { |
431 |
- newbin uwsgi uwsgi-${PYTHON_ABI} |
432 |
- if use lua || use perl || use ruby ; then |
433 |
- insinto /usr/$(get_libdir)/uwsgi |
434 |
- doins plugins/*.so |
435 |
- fi |
436 |
- } |
437 |
- python_execute_function -s installation |
438 |
+ dobin uwsgi |
439 |
+ |
440 |
+ insinto /usr/$(get_libdir)/uwsgi |
441 |
+ doins "${T}/plugins"/*.so |
442 |
+ |
443 |
+ use lua && dosym uwsgi /usr/bin/uwsgi_lua |
444 |
|
445 |
- python_generate_wrapper_scripts "${ED}usr/bin/uwsgi" |
446 |
+ use perl && dosym uwsgi /usr/bin/uwsgi_perl |
447 |
+ |
448 |
+ if use python ; then |
449 |
+ for a in ${PYTHON_ABIS} ; do |
450 |
+ dosym uwsgi /usr/bin/uwsgi_python${a/.} |
451 |
+ done |
452 |
+ fi |
453 |
|
454 |
if use apache2; then |
455 |
for m in Ruwsgi uwsgi ; do |
456 |
@@ -152,8 +187,8 @@ pkg_postinst() { |
457 |
elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
458 |
fi |
459 |
|
460 |
- if use lua || use perl || use ruby ; then |
461 |
+ if use lua || use perl || use ruby || use python; then |
462 |
elog "The lua, perl and ruby modules are built as plugins." |
463 |
- elog "Use '--plugins lua', '--plugins psgi' or '--plugins rack' to load them." |
464 |
+ elog "Use '--plugins lua', '--plugins psgi', '--plugins rack' or '--plugins python27' to load them." |
465 |
fi |
466 |
} |