From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-367704-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QnWbn-0004j2-MC
	for garchives@archives.gentoo.org; Sun, 31 Jul 2011 14:03:12 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4A31C21C2DF
	for <garchives@archives.gentoo.org>; Sun, 31 Jul 2011 14:03:11 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id EC0A621C255
	for <gentoo-commits@lists.gentoo.org>; Sun, 31 Jul 2011 13:23:26 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 620811BC017
	for <gentoo-commits@lists.gentoo.org>; Sun, 31 Jul 2011 13:23:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 728A13C004
	for <gentoo-commits@lists.gentoo.org>; Sun, 31 Jul 2011 13:23:25 +0000 (UTC)
From: "Tiziano Müller" <dev-zero@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Tiziano Müller" <dev-zero@gentoo.org>
Message-ID: <57806610d17ef4ddeb092bf207fef5938510a329.dev-zero@gentoo>
Subject: [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/files/, www-servers/uwsgi/
X-VCS-Repository: dev/dev-zero
X-VCS-Files: www-servers/uwsgi/Manifest www-servers/uwsgi/files/0.9.6.5-gentoo-gcc.patch www-servers/uwsgi/files/42_mod_uwsgi.conf www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch www-servers/uwsgi/files/uwsgi.confd www-servers/uwsgi/files/uwsgi.initd www-servers/uwsgi/uwsgi-0.9.6.5.ebuild www-servers/uwsgi/uwsgi-0.9.8.3.ebuild
X-VCS-Directories: www-servers/uwsgi/files/ www-servers/uwsgi/
X-VCS-Committer: dev-zero
X-VCS-Committer-Name: Tiziano Müller
X-VCS-Revision: 57806610d17ef4ddeb092bf207fef5938510a329
Date: Sun, 31 Jul 2011 13:23:25 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 1ad0180e47c29120cf2bf6c8b4fc9074

commit:     57806610d17ef4ddeb092bf207fef5938510a329
Author:     Tiziano Mueller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 31 12:14:53 2011 +0000
Commit:     Tiziano M=C3=BCller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 12:14:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Ddev/dev-zero.git;a=
=3Dcommit;h=3D57806610

Added version bump.

---
 www-servers/uwsgi/Manifest                         |   11 +-
 www-servers/uwsgi/files/0.9.6.5-gentoo-gcc.patch   |   13 --
 www-servers/uwsgi/files/42_mod_uwsgi.conf          |    7 +
 ...wsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch |   51 --------
 .../uwsgi/files/uwsgi-0.9.5-respect_flags.patch    |  127 --------------=
------
 .../uwsgi/files/uwsgi-0.9.8-no-werror.patch        |   11 ++
 www-servers/uwsgi/files/uwsgi.confd                |   47 +++++++
 www-servers/uwsgi/files/uwsgi.initd                |  101 ++++++++++++++=
++
 www-servers/uwsgi/uwsgi-0.9.6.5.ebuild             |   46 -------
 www-servers/uwsgi/uwsgi-0.9.8.3.ebuild             |   72 +++++++++++
 10 files changed, 244 insertions(+), 242 deletions(-)

diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 79e693c..e44697a 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,7 +1,8 @@
 MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 =
80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb=
4c27ee96af8a09f1f9bbfc629384efe8c2363a9
-AUX 0.9.6.5-gentoo-gcc.patch 408 RMD160 d437d759d571724da35e0010c7e18282=
469e9bff SHA1 dd32829dc95ca77bb00aaa542b979ec7df917487 SHA256 a4b91449527=
946744c30974bd2dad75c34030da71ecdf15d3486a89eb2617f51
-AUX uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch 1202 RMD160 9c32ba6=
93bd7bbdd6fae90c5b43118b8e0f882bc SHA1 cab74b61086c39e9f77e217b88361197c0=
069b98 SHA256 3903cf208ba14578aaf5cb95306191b97ed0b973047cad02321d4416d03=
a47f5
-AUX uwsgi-0.9.5-respect_flags.patch 3985 RMD160 1787075a4decad7376e17722=
31a65e0ef5737537 SHA1 456031bc53a80ca5423a149b7c8013c3bb9338fe SHA256 5af=
3f880b7104b5fb4c8612d92fab9074b1d5ecc556aeea0775a82a82c4be80e
+AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db=
7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2=
ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861
+AUX uwsgi-0.9.8-no-werror.patch 624 RMD160 ef3ebbfff1c6b4a49297e780b5eb5=
545786f8173 SHA1 a4e0923cb5ebaab19cee5b4495b1625f54c7510b SHA256 8650fe56=
0d25d9b6facf8034bb5edfedc8aa74f22a716da702d2b97a1d298998
+AUX uwsgi.confd 1116 RMD160 e13ddecb06cf4efaf75216ec657db99a4abbbddf SHA=
1 9df38c84bc2d612803629a6a2e6bd9a3a5568d33 SHA256 3c238b934f8db9eae87f77d=
c3d131499e442526d5e45438b5461c0d7590b772f
+AUX uwsgi.initd 2705 RMD160 96ee8102823eddfcfc17da14882aed17c7ca5249 SHA=
1 35365c5ca755cd650424c826488ac85b067e4575 SHA256 328087fe8a36e91155c1173=
cfddc257f4479b1588bc56689b42a0fc74707bed4
 MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SH=
A1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba7465=
7f3a332c7427c1bd24a5609d2ff887f63901d9cd35
-EBUILD uwsgi-0.9.6.5.ebuild 1090 RMD160 4010f9f335772176930bd82297ffdcd8=
843368e9 SHA1 1c3fd2eadfcd1e0f14e2dd97c4cd0eb4020caaca SHA256 25598b27206=
aaef170e4adcdab1040493a93bb2f945fbe7a3d45cf5994afd1b2
-DIST uwsgi-0.9.6.5.tar.gz 152165 RMD160 0c33445aec79778bf663e3cead7c5749=
56032c43 SHA1 ba05b3f6fa5019253ad4d09dae04654e8e36205d SHA256 8f4099be19c=
36ed484a4f1508e83e4170ce3ca1c32f3dd5591cd191223904bca
+EBUILD uwsgi-0.9.8.3.ebuild 1870 RMD160 53ae8621ac13e000fc29e1ab6e37fcfa=
b87f8434 SHA1 a1a3ad0e9cd8db43aae9f07ee2077b3c3e9cab56 SHA256 08a663229cd=
0510fa3eb4ccc16aa68343b7097f7436c7c37e4f6880b4b00c698
+DIST uwsgi-0.9.8.3.tar.gz 351168 RMD160 8bfdaa9a503516378e834bca60dfa828=
b7bee9d2 SHA1 780a96a2c32a0f7bb7f5a63353acca2fbd23a8e6 SHA256 2b529a8408b=
b4938ebccd3c4264af5af4f17ee5bd6043376ef3909c2411f611f

diff --git a/www-servers/uwsgi/files/0.9.6.5-gentoo-gcc.patch b/www-serve=
rs/uwsgi/files/0.9.6.5-gentoo-gcc.patch
deleted file mode 100644
index ae196b1..0000000
--- a/www-servers/uwsgi/files/0.9.6.5-gentoo-gcc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/uwsgiconfig.py b/uwsgiconfig.py
-index c06882c..2efc46c 100644
---- a/uwsgiconfig.py
-+++ b/uwsgiconfig.py
-@@ -84,7 +84,7 @@ def spcall2(cmd):
- 	else:
- 		return None
-=20
--gcc_version =3D str(spcall2("%s -v" % GCC)).split('\n')[-1].split()[2]
-+gcc_version =3D str(spcall2("%s -v" % GCC)).split('\n')[-1].split()[4]
-=20
- gcc_major =3D int(gcc_version.split('.')[0])
- gcc_minor =3D int(gcc_version.split('.')[1])

diff --git a/www-servers/uwsgi/files/42_mod_uwsgi.conf b/www-servers/uwsg=
i/files/42_mod_uwsgi.conf
new file mode 100644
index 0000000..a619bae
--- /dev/null
+++ b/www-servers/uwsgi/files/42_mod_uwsgi.conf
@@ -0,0 +1,7 @@
+<IfDefine UWSGI>
+    LoadModule uwsgi_module modules/mod_uwsgi.so
+</IfDefine>
+<IfDefine RUWSGI>
+    LoadModule uwsgi_module modules/mod_Ruwsgi.so
+</IfDefine>
+

diff --git a/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_inden=
tation.patch b/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_ind=
entation.patch
deleted file mode 100644
index e02f497..0000000
--- a/www-servers/uwsgi/files/uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.=
patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- uwsgiconfig.py
-+++ uwsgiconfig.py
-@@ -68,9 +68,9 @@
- 	p =3D subprocess.Popen(cmd, shell=3DTrue, stdout=3Dsubprocess.PIPE)
-=20
- 	if p.wait() =3D=3D 0:
--        	return p.stdout.read().rstrip().decode()
-+		return p.stdout.read().rstrip().decode()
- 	else:
--        	return None
-+		return None
-=20
- def add_o(x):
- 	if x =3D=3D 'uwsgi':
-@@ -149,11 +149,11 @@
- 	kvm_list =3D ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
-=20
- 	if uwsgi_os =3D=3D 'SunOS':
--        	ldflags.append('-lsendfile')
-+		ldflags.append('-lsendfile')
- 		ldflags.remove('-rdynamic')
-=20
- 	if uwsgi_os in kvm_list:
--        	ldflags.append('-lkvm')
-+		ldflags.append('-lkvm')
-=20
- 	if uwsgi_os =3D=3D 'OpenBSD':
- 		UGREEN =3D False
-@@ -245,8 +245,8 @@
- 		gcc_list.append('erlang')
-=20
- 	if SCTP:
--        	ldflags.append("-lsctp")
--        	cflags.append("-DUWSGI_SCTP")
-+		ldflags.append("-lsctp")
-+		cflags.append("-DUWSGI_SCTP")
-=20
- 	if SPOOLER:
- 		depends_on("SPOOLER", ['EMBEDDED'])
-@@ -294,9 +294,9 @@
- 		sys.exit(1)
-=20
- 	if cmd =3D=3D '--cflags':
--        	print(' '.join(cflags))
-+		print(' '.join(cflags))
- 	if cmd =3D=3D '--ldflags':
--        	print(' '.join(ldflags))
-+		print(' '.join(ldflags))
- 	elif cmd =3D=3D '--build':
- 		parse_vars()
- 		build_uwsgi(UWSGI_BIN_NAME)

diff --git a/www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch b/ww=
w-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch
deleted file mode 100644
index c3f740d..0000000
--- a/www-servers/uwsgi/files/uwsgi-0.9.5-respect_flags.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- uwsgiconfig.py
-+++ uwsgiconfig.py
-@@ -20,7 +20,6 @@
- PLUGINS =3D []
- UNBIT=3DFalse
- UWSGI_BIN_NAME =3D 'uwsgi'
--GCC=3D'gcc'
-=20
- # specific compilation flags
- # libxml2 or expat
-@@ -46,17 +45,22 @@
-=20
- from distutils import sysconfig
-=20
-+GCC =3D os.environ.get('CC', sysconfig.get_config_var('CC'))
-+if not GCC:
-+	GCC =3D 'gcc'
-+
- gcc_list =3D ['utils', 'pyutils', 'protocol', 'socket', 'logging', 'wsg=
i_handlers', 'wsgi_headers', 'uwsgi_handlers', 'uwsgi']
-=20
- # large file support
- try:
--	cflags =3D ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=3D64'] + sysco=
nfig.get_config_var('CFLAGS').split()
-+	cflags =3D ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=3D64'] + os.en=
viron.get("CFLAGS", "").split()
- except:
- 	print("You need python headers to build uWSGI.")
- 	sys.exit(1)
-=20
- cflags =3D cflags + ['-I' + sysconfig.get_python_inc(), '-I' + sysconfi=
g.get_python_inc(plat_specific=3DTrue) ]
--ldflags =3D ['-lpthread', '-rdynamic'] + sysconfig.get_config_var('LIBS=
').split() + sysconfig.get_config_var('SYSLIBS').split()
-+ldflags =3D os.environ.get("LDFLAGS", "").split()
-+libs =3D ['-lpthread', '-rdynamic'] + sysconfig.get_config_var('LIBS').=
split() + sysconfig.get_config_var('SYSLIBS').split()
-=20
- def depends_on(what, dep):
- 	for d in dep:
-@@ -97,7 +101,7 @@
- 			print(plugin)
-=20
- 	print("*** uWSGI linking ***")
--	ldline =3D "%s -o %s %s %s" % (GCC, bin_name, ' '.join(map(add_o, gcc_=
list)), ' '.join(ldflags))
-+	ldline =3D "%s -o %s %s %s %s" % (GCC, bin_name, ' '.join(ldflags), ' =
'.join(map(add_o, gcc_list)), ' '.join(libs))
- 	print(ldline)
- 	ret =3D os.system(ldline)
- 	if ret !=3D 0:
-@@ -141,19 +145,19 @@
- 	version =3D sys.version_info
- 	uver =3D "%d.%d" % (version[0], version[1])
-=20
--	ldflags.append('-lpython' + uver)
-+	libs.append('-lpython' + uver)
-=20
- 	if str(PYLIB_PATH) !=3D '':
--		ldflags.insert(0,'-L' + PYLIB_PATH)
-+		libs.insert(0,'-L' + PYLIB_PATH)
-=20
- 	kvm_list =3D ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
-=20
- 	if uwsgi_os =3D=3D 'SunOS':
--		ldflags.append('-lsendfile')
--		ldflags.remove('-rdynamic')
-+		libs.append('-lsendfile')
-+		libs.remove('-rdynamic')
-=20
- 	if uwsgi_os in kvm_list:
--		ldflags.append('-lkvm')
-+		libs.append('-lkvm')
-=20
- 	if uwsgi_os =3D=3D 'OpenBSD':
- 		UGREEN =3D False
-@@ -221,7 +225,7 @@
- 				print("*** libxml2 headers unavailable. uWSGI build is interrupted.=
 You have to install libxml2 development package or use libexpat or disab=
le XML")
- 				sys.exit(1)
- 			else:
--				ldflags.append(xmlconf)
-+				libs.append(xmlconf)
- 				xmlconf =3D 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 disa=
ble XML")
-@@ -232,20 +236,20 @@
- 					gcc_list.append('xmlconf')
- 		elif XML_IMPLEMENTATION =3D=3D 'expat':
- 			cflags.append("-DUWSGI_XML -DUWSGI_XML_EXPAT")
--			ldflags.append('-lexpat')
-+			libs.append('-lexpat')
- 			gcc_list.append('xmlconf')
- 		=09
-=20
- 	if ERLANG:
- 		depends_on("ERLANG", ['EMBEDDED'])
- 		cflags.append("-DUWSGI_ERLANG")
--		ldflags.append(ERLANG_LDFLAGS)
-+		libs.append(ERLANG_LDFLAGS)
- 		if str(ERLANG_CFLAGS) !=3D '':
- 			cflags.append(ERLANG_CFLAGS)
- 		gcc_list.append('erlang')
-=20
- 	if SCTP:
--		ldflags.append("-lsctp")
-+		libs.append("-lsctp")
- 		cflags.append("-DUWSGI_SCTP")
-=20
- 	if SPOOLER:
-@@ -263,13 +267,13 @@
- 	import uwsgiplugin as up
-=20
- 	cflags.append(up.CFLAGS)
--	ldflags.append(up.LDFLAGS)
-+	libs.append(up.LDFLAGS)
-=20
- 	cflags.insert(0, '-I.')
-=20
- 	plugin_base =3D path + '/' + up.NAME + '_plugin'
-=20
--	gccline =3D "%s -fPIC -shared -o %s.so %s %s.c %s" % (GCC, plugin_base=
, ' '.join(cflags), plugin_base, ' '.join(ldflags))
-+	gccline =3D "%s -fPIC -shared -o %s.so %s %s %s.c %s" % (GCC, plugin_b=
ase, ' '.join(cflags), ' '.join(ldflags), plugin_base, ' '.join(libs))
- 	print(gccline)
-=20
- 	ret =3D os.system(gccline)
-@@ -297,6 +301,8 @@
- 		print(' '.join(cflags))
- 	if cmd =3D=3D '--ldflags':
- 		print(' '.join(ldflags))
-+	if cmd =3D=3D '--libs':
-+		print(' '.join(libs))
- 	elif cmd =3D=3D '--build':
- 		parse_vars()
- 		build_uwsgi(UWSGI_BIN_NAME)

diff --git a/www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch b/www-se=
rvers/uwsgi/files/uwsgi-0.9.8-no-werror.patch
new file mode 100644
index 0000000..f55d6bb
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-0.9.8-no-werror.patch
@@ -0,0 +1,11 @@
+--- uwsgiconfig.py	2011-06-07 18:38:50.000000000 +0400
++++ uwsgiconfig.py	2011-06-05 10:28:03.000000000 +0400
+@@ -176,7 +176,7 @@
+         if uwsgi_os =3D=3D 'Linux':
+             self.gcc_list.append('lib/linux_ns')
+             self.gcc_list.append('lib/netlink')
+-        self.cflags =3D ['-O2', '-Wall', '-Werror', '-D_LARGEFILE_SOURC=
E', '-D_FILE_OFFSET_BITS=3D64'] + os.environ.get("CFLAGS", "").split()
++        self.cflags =3D ['-O2', '-Wall', '-D_LARGEFILE_SOURCE', '-D_FIL=
E_OFFSET_BITS=3D64'] + os.environ.get("CFLAGS", "").split()
+         try:
+             gcc_version =3D str(spcall("%s -dumpversion" % GCC))
+         except:

diff --git a/www-servers/uwsgi/files/uwsgi.confd b/www-servers/uwsgi/file=
s/uwsgi.confd
new file mode 100644
index 0000000..11152da
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.confd
@@ -0,0 +1,47 @@
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.confd,v=
 1.1 2011/05/31 19:49:07 maksbotan Exp $
+
+# DO NOT MODIFY THIS FILE DIRECTLY! CREATE A COPY AND MODIFY THAT INSTEA=
D!
+
+# Path (or name) of UNIX/TCP socket to bind to
+#
+UWSGI_SOCKET=3D127.0.0.1:1234
+
+# Enable threads?
+#
+UWSGI_THREADS=3D1
+
+# The path to your uWSGI application.
+#
+UWSGI_PROGRAM=3D
+
+# The path to your uWSGI xml config file.
+#
+UWSGI_XML_CONFIG=3D
+
+# The number of child processes to spawn. The default is 1.
+#
+UWSGI_CHILDREN=3D1
+
+# The log file path. If empty logging is disabled
+#
+UWSGI_LOG_FILE=3D
+
+# If you want to run your application inside a chroot then specify the
+# directory here. Leave this blank otherwise.
+#
+UWSGI_CHROOT=3D
+
+# If you want to run your application from a specific directiory specify
+# it here. Leave this blank otherwise.
+#
+# UWSGI_DIR=3D
+
+# The user and group to run your application as. If you do not specify t=
hese,
+# the application will be run as root:root.
+#
+UWSGI_USER=3D
+
+# Additional options you might want to pass to uWSGI
+#
+#UWSGI_EXTRA_OPTIONS=3D

diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/file=
s/uwsgi.initd
new file mode 100644
index 0000000..3fedecc
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.initd
@@ -0,0 +1,101 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.initd,v=
 1.1 2011/05/31 19:49:07 maksbotan Exp $
+
+PROGNAME=3D${SVCNAME#*.}
+
+UWSGI_EXEC=3D/usr/bin/uwsgi
+PIDPATH=3D/var/run/uwsgi
+PIDFILE=3D"${PIDPATH}/${PROGNAME}.pid"
+
+depend() {
+	need net
+}
+
+start() {
+	local OPTIONS
+
+	if [ "${SVCNAME}" =3D "uwsgi" ]; then
+		eerror "You are not supposed to run this script directly. Create a sym=
link"
+		eerror "for the FastCGI application you want to run as well as a copy =
of the"
+		eerror "configuration file and modify it appropriately like so..."
+		eerror
+		eerror "  ln -s uwsgi /etc/init.d/uwsgi.trac"
+		eerror "  cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac"
+		eerror "  `basename "${EDITOR}"` /etc/conf.d/uwsgi.trac"
+		eerror
+		return 1
+	fi
+
+	if [ -z "${UWSGI_SOCKET}" ]; then
+		eerror "You need to specify path (or name) of UNIX/TCP socket to bind =
to"
+		eerror "in UWSGI_SOCKET"
+		return 1
+	fi
+
+	if [ -z "${UWSGI_PROGRAM}" ] && [ -z "${UWSGI_XML_CONFIG}" ]; then
+		eerror "You need to specify which \$UWSGI_PROGRAM or \$UWSGI_XML_CONFI=
G"
+		eerror "you want to start."
+		eerror "Please adjust /etc/conf.d/uwsgi.${PROGNAME}"
+		return 1
+	fi
+
+	if [ -n "${UWSGI_PROGRAM}" ] && [ -n "${UWSGI_XML_CONFIG}" ]; then
+		eerror "Only one of the two may be defined:"
+		eerror "  UWSGI_PROGRAM=3D${UWSGI_PROGRAM}"
+		eerror "  UWSGI_XML_CONFIG=3D${UWSGI_XML_CONFIG}"
+		return 1
+	fi
+
+
+	OPTIONS=3D"--master --daemonize"
+
+	if [ -n "$UWSGI_LOG_FILE" ]; then
+		OPTIONS=3D"${OPTIONS} $UWSGI_LOG_FILE"
+	else
+		OPTIONS=3D"${OPTIONS} /dev/null --disable-logging"
+	fi
+
+	if [ "${UWSGI_THREADS}" =3D "1" ]; then
+		OPTIONS=3D"${OPTIONS} --enable-threads"
+	fi
+
+	if [ -n "${UWSGI_SOCKET}" ]; then
+		OPTIONS=3D"${OPTIONS} --socket ${UWSGI_SOCKET}"
+	fi
+
+	if [ -n "${UWSGI_CHILDREN}" ]; then
+		OPTIONS=3D"${OPTIONS} --processes ${UWSGI_CHILDREN}"
+	fi
+
+	if [ -n "${UWSGI_CHROOT}" ]; then
+		OPTIONS=3D"${OPTIONS} --chroot ${UWSGI_CHROOT}"
+	fi
+
+	[ -z "${UWSGI_DIR}" ] && UWSGI_DIR=3D"/"
+	[ -z "${UWSGI_USER}" ] && UWSGI_USER=3D"root"
+
+	if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then
+		OPTIONS=3D"${OPTIONS} ${UWSGI_EXTRA_OPTIONS}"
+	fi
+
+	if [ -n "${UWSGI_PROGRAM}" ]; then
+		OPTIONS=3D"${OPTIONS} --wsgi-file ${UWSGI_PROGRAM}"
+	fi
+
+	if [ -n "${UWSGI_XML_CONFIG}" ]; then
+		OPTIONS=3D"${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}"
+	fi
+
+	ebegin "Starting uWSGI application ${PROGNAME}"
+	cd "${UWSGI_DIR}" && \
+	start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}"=
 -- ${OPTIONS} --pidfile "${PIDFILE}"
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping uWSGI application ${PROGNAME}"
+	start-stop-daemon --stop --pidfile "${PIDFILE}" --signal 3
+	eend $?
+}

diff --git a/www-servers/uwsgi/uwsgi-0.9.6.5.ebuild b/www-servers/uwsgi/u=
wsgi-0.9.6.5.ebuild
deleted file mode 100644
index 951eb8a..0000000
--- a/www-servers/uwsgi/uwsgi-0.9.6.5.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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=3D"3"
-PYTHON_DEPEND=3D"*"
-SUPPORT_PYTHON_ABIS=3D"1"
-
-inherit eutils python toolchain-funcs
-
-DESCRIPTION=3D"uWSGI server for Python web applications"
-HOMEPAGE=3D"http://projects.unbit.it/uwsgi/"
-SRC_URI=3D"http://projects.unbit.it/downloads/${P}.tar.gz"
-
-LICENSE=3D"GPL-2"
-SLOT=3D"0"
-KEYWORDS=3D"~amd64 ~x86"
-IUSE=3D""
-
-RDEPEND=3D"dev-libs/libxml2"
-DEPEND=3D"${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"
-
-	epatch "${FILESDIR}/${PV}-gentoo-gcc.patch"
-
-	python_copy_sources
-}
-
-src_compile() {
-	python_src_compile CC=3D"$(tc-getCC)"
-}
-
-src_install() {
-	installation() {
-		newbin uwsgi uwsgi-${PYTHON_ABI}
-	}
-	python_execute_function -s installation
-
-	python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
-}

diff --git a/www-servers/uwsgi/uwsgi-0.9.8.3.ebuild b/www-servers/uwsgi/u=
wsgi-0.9.8.3.ebuild
new file mode 100644
index 0000000..10c82a8
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-0.9.8.3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.8.ebuild,=
v 1.1 2011/06/08 18:00:13 maksbotan Exp $
+
+EAPI=3D"3"
+PYTHON_DEPEND=3D"*"
+SUPPORT_PYTHON_ABIS=3D"1"
+
+inherit eutils python toolchain-funcs apache-module
+
+DESCRIPTION=3D"uWSGI server for Python web applications"
+HOMEPAGE=3D"http://projects.unbit.it/uwsgi/"
+SRC_URI=3D"http://projects.unbit.it/downloads/${P}.tar.gz"
+
+LICENSE=3D"GPL-2"
+SLOT=3D"0"
+KEYWORDS=3D"~amd64 ~x86"
+IUSE=3D""
+
+RDEPEND=3D"dev-libs/libxml2"
+DEPEND=3D"${RDEPEND}"
+
+APXS2_S=3D"${S}/apache2"
+APACHE2_MOD_CONF=3D"42_mod_${PN}"
+want_apache2_2
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-0.9.8-no-werror.patch
+	python_copy_sources
+}
+
+src_compile() {
+	python_src_compile CC=3D"$(tc-getCC)"
+
+	if use apache2 ; then
+		for m in Ruwsgi uwsgi ; do
+			APXS2_ARGS=3D"-c mod_${m}.c"
+			apache-module_src_compile
+		done
+	fi
+}
+
+src_install() {
+	installation() {
+		newbin uwsgi uwsgi-${PYTHON_ABI}
+	}
+	python_execute_function -s installation
+
+	python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
+
+	if use apache2; then
+		for m in Ruwsgi uwsgi ; do
+			APACHE2_MOD_FILE=3D"${APXS2_S}/.libs/mod_${m}.so"
+			apache-module_src_install
+		done
+	fi
+
+	newinitd "${FILESDIR}"/uwsgi.initd uwsgi
+	newconfd "${FILESDIR}"/uwsgi.confd uwsgi
+	mkdir "${ED}"/var/run/uwsgi
+}
+
+pkg_postinst() {
+	if use apache2 ; then
+		elog "Two Apache modules have been installed: mod_uwsgi and mod_Ruwsgi=
."
+		elog "You can enable them with -DUWSGI or -DRUWSGI in /etc/conf.d/apac=
he2."
+		elog "Both have the same configuration interface and define the same s=
ymbols."
+		elog "Therefore you can enable only one of them at a time."
+		elog "mod_uwsgi is commercially supported by Unbit and stable but a bi=
t hacky."
+		elog "mod_Ruwsgi is newer and more Apache-API friendly but not commerc=
ially supported."
+	fi
+}