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