summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2010-05-03 19:24:28 +0000
committerBenedikt Boehm <hollow@gentoo.org>2010-05-03 19:24:28 +0000
commit1618f387c04ade3bb7022bd80175caccc6ed690d (patch)
treeb7a361d7cfacd53cf73cab70cef5fa0595deb050 /www-servers
parentold (diff)
downloadhistorical-1618f387c04ade3bb7022bd80175caccc6ed690d.tar.gz
historical-1618f387c04ade3bb7022bd80175caccc6ed690d.tar.bz2
historical-1618f387c04ade3bb7022bd80175caccc6ed690d.zip
initial ebuild. thanks to Arfrever Frehtes Taifersar Arahesis for sane python ABI support. closes #314931
Package-Manager: portage-2.2_rc67/cvs/Linux i686
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/uwsgi/ChangeLog12
-rw-r--r--www-servers/uwsgi/Manifest6
-rw-r--r--www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch51
-rw-r--r--www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch127
-rw-r--r--www-servers/uwsgi/metadata.xml9
-rw-r--r--www-servers/uwsgi/uwsgi-0.9.5.ebuild44
6 files changed, 249 insertions, 0 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog
new file mode 100644
index 000000000000..893166c9982e
--- /dev/null
+++ b/www-servers/uwsgi/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for www-servers/uwsgi
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.1 2010/05/03 19:24:28 hollow Exp $
+
+*uwsgi-0.9.5 (03 May 2010)
+
+ 03 May 2010; Benedikt Böhm <hollow@gentoo.org> +uwsgi-0.9.5.ebuild,
+ +files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch,
+ +files/uwsgi-0.9.5-respect_flags.patch, +metadata.xml:
+ initial ebuild. thanks to Arfrever Frehtes Taifersar Arahesis for sane
+ python ABI support. closes #314931
+
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
new file mode 100644
index 000000000000..f59695c0f92d
--- /dev/null
+++ b/www-servers/uwsgi/Manifest
@@ -0,0 +1,6 @@
+AUX uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch 1202 RMD160 9c32ba693bd7bbdd6fae90c5b43118b8e0f882bc SHA1 cab74b61086c39e9f77e217b88361197c0069b98 SHA256 3903cf208ba14578aaf5cb95306191b97ed0b973047cad02321d4416d03a47f5
+AUX uwsgi-0.9.5-respect_flags.patch 3985 RMD160 1787075a4decad7376e1772231a65e0ef5737537 SHA1 456031bc53a80ca5423a149b7c8013c3bb9338fe SHA256 5af3f880b7104b5fb4c8612d92fab9074b1d5ecc556aeea0775a82a82c4be80e
+DIST uwsgi-0.9.5.tar.gz 118203 RMD160 c6ffd2661dd623e848002604798e4a18402f7d76 SHA1 264572059254e2cca771908050d7534aaafff1a8 SHA256 49e88485b9f91693409c255738bc6a6f2a6f856a8a0f04b07dccf5ab7e3de0bd
+EBUILD uwsgi-0.9.5.ebuild 1042 RMD160 bf01c6661a01766604693af418d1b30e61cb5f54 SHA1 e1ed54cb4c9fbcdca388d0cf2ba7304e4dc0658d SHA256 8a6444418fffc1787f1a0105b5443e4a2ec5ac5668ea22f1237d5dfb2d693157
+MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb4c27ee96af8a09f1f9bbfc629384efe8c2363a9
+MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SHA1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba74657f3a332c7427c1bd24a5609d2ff887f63901d9cd35
diff --git a/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch b/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch
new file mode 100644
index 000000000000..e02f497c0eab
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch
@@ -0,0 +1,51 @@
+--- uwsgiconfig.py
++++ uwsgiconfig.py
+@@ -68,9 +68,9 @@
+ p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
+
+ if p.wait() == 0:
+- return p.stdout.read().rstrip().decode()
++ return p.stdout.read().rstrip().decode()
+ else:
+- return None
++ return None
+
+ def add_o(x):
+ if x == 'uwsgi':
+@@ -149,11 +149,11 @@
+ kvm_list = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
+
+ if uwsgi_os == 'SunOS':
+- ldflags.append('-lsendfile')
++ ldflags.append('-lsendfile')
+ ldflags.remove('-rdynamic')
+
+ if uwsgi_os in kvm_list:
+- ldflags.append('-lkvm')
++ ldflags.append('-lkvm')
+
+ if uwsgi_os == 'OpenBSD':
+ UGREEN = False
+@@ -245,8 +245,8 @@
+ gcc_list.append('erlang')
+
+ if SCTP:
+- ldflags.append("-lsctp")
+- cflags.append("-DUWSGI_SCTP")
++ ldflags.append("-lsctp")
++ cflags.append("-DUWSGI_SCTP")
+
+ if SPOOLER:
+ depends_on("SPOOLER", ['EMBEDDED'])
+@@ -294,9 +294,9 @@
+ sys.exit(1)
+
+ if cmd == '--cflags':
+- print(' '.join(cflags))
++ print(' '.join(cflags))
+ if cmd == '--ldflags':
+- print(' '.join(ldflags))
++ print(' '.join(ldflags))
+ elif cmd == '--build':
+ parse_vars()
+ build_uwsgi(UWSGI_BIN_NAME)
diff --git a/www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch b/www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch
new file mode 100644
index 000000000000..c3f740d5aa7f
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch
@@ -0,0 +1,127 @@
+--- uwsgiconfig.py
++++ uwsgiconfig.py
+@@ -20,7 +20,6 @@
+ PLUGINS = []
+ UNBIT=False
+ UWSGI_BIN_NAME = 'uwsgi'
+-GCC='gcc'
+
+ # specific compilation flags
+ # libxml2 or expat
+@@ -46,17 +45,22 @@
+
+ from distutils import sysconfig
+
++GCC = os.environ.get('CC', sysconfig.get_config_var('CC'))
++if not GCC:
++ GCC = 'gcc'
++
+ gcc_list = ['utils', 'pyutils', 'protocol', 'socket', 'logging', 'wsgi_handlers', 'wsgi_headers', 'uwsgi_handlers', 'uwsgi']
+
+ # large file support
+ try:
+- cflags = ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + sysconfig.get_config_var('CFLAGS').split()
++ cflags = ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split()
+ except:
+ print("You need python headers to build uWSGI.")
+ sys.exit(1)
+
+ cflags = cflags + ['-I' + sysconfig.get_python_inc(), '-I' + sysconfig.get_python_inc(plat_specific=True) ]
+-ldflags = ['-lpthread', '-rdynamic'] + sysconfig.get_config_var('LIBS').split() + sysconfig.get_config_var('SYSLIBS').split()
++ldflags = os.environ.get("LDFLAGS", "").split()
++libs = ['-lpthread', '-rdynamic'] + sysconfig.get_config_var('LIBS').split() + sysconfig.get_config_var('SYSLIBS').split()
+
+ def depends_on(what, dep):
+ for d in dep:
+@@ -97,7 +101,7 @@
+ print(plugin)
+
+ print("*** uWSGI linking ***")
+- ldline = "%s -o %s %s %s" % (GCC, bin_name, ' '.join(map(add_o, gcc_list)), ' '.join(ldflags))
++ ldline = "%s -o %s %s %s %s" % (GCC, bin_name, ' '.join(ldflags), ' '.join(map(add_o, gcc_list)), ' '.join(libs))
+ print(ldline)
+ ret = os.system(ldline)
+ if ret != 0:
+@@ -141,19 +145,19 @@
+ version = sys.version_info
+ uver = "%d.%d" % (version[0], version[1])
+
+- ldflags.append('-lpython' + uver)
++ libs.append('-lpython' + uver)
+
+ if str(PYLIB_PATH) != '':
+- ldflags.insert(0,'-L' + PYLIB_PATH)
++ libs.insert(0,'-L' + PYLIB_PATH)
+
+ kvm_list = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
+
+ if uwsgi_os == 'SunOS':
+- ldflags.append('-lsendfile')
+- ldflags.remove('-rdynamic')
++ libs.append('-lsendfile')
++ libs.remove('-rdynamic')
+
+ if uwsgi_os in kvm_list:
+- ldflags.append('-lkvm')
++ libs.append('-lkvm')
+
+ if uwsgi_os == 'OpenBSD':
+ UGREEN = False
+@@ -221,7 +225,7 @@
+ print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
+ sys.exit(1)
+ else:
+- ldflags.append(xmlconf)
++ libs.append(xmlconf)
+ xmlconf = spcall("xml2-config --cflags")
+ if xmlconf is None:
+ print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
+@@ -232,20 +236,20 @@
+ gcc_list.append('xmlconf')
+ elif XML_IMPLEMENTATION == 'expat':
+ cflags.append("-DUWSGI_XML -DUWSGI_XML_EXPAT")
+- ldflags.append('-lexpat')
++ libs.append('-lexpat')
+ gcc_list.append('xmlconf')
+
+
+ if ERLANG:
+ depends_on("ERLANG", ['EMBEDDED'])
+ cflags.append("-DUWSGI_ERLANG")
+- ldflags.append(ERLANG_LDFLAGS)
++ libs.append(ERLANG_LDFLAGS)
+ if str(ERLANG_CFLAGS) != '':
+ cflags.append(ERLANG_CFLAGS)
+ gcc_list.append('erlang')
+
+ if SCTP:
+- ldflags.append("-lsctp")
++ libs.append("-lsctp")
+ cflags.append("-DUWSGI_SCTP")
+
+ if SPOOLER:
+@@ -263,13 +267,13 @@
+ import uwsgiplugin as up
+
+ cflags.append(up.CFLAGS)
+- ldflags.append(up.LDFLAGS)
++ libs.append(up.LDFLAGS)
+
+ cflags.insert(0, '-I.')
+
+ plugin_base = path + '/' + up.NAME + '_plugin'
+
+- gccline = "%s -fPIC -shared -o %s.so %s %s.c %s" % (GCC, plugin_base, ' '.join(cflags), plugin_base, ' '.join(ldflags))
++ gccline = "%s -fPIC -shared -o %s.so %s %s %s.c %s" % (GCC, plugin_base, ' '.join(cflags), ' '.join(ldflags), plugin_base, ' '.join(libs))
+ print(gccline)
+
+ ret = os.system(gccline)
+@@ -297,6 +301,8 @@
+ print(' '.join(cflags))
+ if cmd == '--ldflags':
+ print(' '.join(ldflags))
++ if cmd == '--libs':
++ print(' '.join(libs))
+ elif cmd == '--build':
+ parse_vars()
+ build_uwsgi(UWSGI_BIN_NAME)
diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml
new file mode 100644
index 000000000000..18c5a8ce6539
--- /dev/null
+++ b/www-servers/uwsgi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>hollow@gentoo.org</email>
+ <name>Benedikt Böhm</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-servers/uwsgi/uwsgi-0.9.5.ebuild b/www-servers/uwsgi/uwsgi-0.9.5.ebuild
new file mode 100644
index 000000000000..ca24328e1fdc
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-0.9.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.5.ebuild,v 1.1 2010/05/03 19:24:28 hollow Exp $
+
+EAPI="3"
+PYTHON_DEPEND="*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils python toolchain-funcs
+
+DESCRIPTION="uWSGI server for Python web applications"
+HOMEPAGE="http://projects.unbit.it/uwsgi/"
+SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Python 3 requires constant indentation.
+ epatch "${FILESDIR}/${PN}-0.9.5-fix_uwsgiconfig.py_indentation.patch"
+
+ # Respect CC, CFLAGS and LDFLAGS.
+ epatch "${FILESDIR}/${PN}-0.9.5-respect_flags.patch"
+
+ python_copy_sources
+}
+
+src_compile() {
+ python_src_compile CC="$(tc-getCC)"
+}
+
+src_install() {
+ installation() {
+ newbin uwsgi uwsgi-${PYTHON_ABI}
+ }
+ python_execute_function -s installation
+
+ python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
+}