Gentoo Archives: gentoo-commits

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