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-368084-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QoBV2-0000oS-GY
	for garchives@archives.gentoo.org; Tue, 02 Aug 2011 09:42:56 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 8D2E021C09F;
	Tue,  2 Aug 2011 09:42:48 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 4A76021C09F
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Aug 2011 09:42:48 +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 BDC5E1B4002
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Aug 2011 09:42:47 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 06A5F3C004
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Aug 2011 09:42:47 +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: <d940aac04e7ed489deecbe75d764e53179b44041.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/uwsgi-0.9.8-fix-psgi-flags.patch 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: d940aac04e7ed489deecbe75d764e53179b44041
Date: Tue,  2 Aug 2011 09:42:47 +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: f6d6c2f737f74f062dd098360241f6d8

commit:     d940aac04e7ed489deecbe75d764e53179b44041
Author:     Tiziano Mueller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  2 09:40:57 2011 +0000
Commit:     Tiziano M=C3=BCller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Tue Aug  2 09:40:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Ddev/dev-zero.git;a=
=3Dcommit;h=3Dd940aac0

fix automagic deps, added support for ruby, perl, lua, whatnotelse

---
 www-servers/uwsgi/Manifest                         |    3 +-
 .../uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch   |   13 +++
 www-servers/uwsgi/uwsgi-0.9.8.3.ebuild             |   89 ++++++++++++++=
+++++-
 3 files changed, 100 insertions(+), 5 deletions(-)

diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 413f93c..122f081 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,8 +1,9 @@
 MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 =
80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb=
4c27ee96af8a09f1f9bbfc629384efe8c2363a9
 AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db=
7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2=
ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861
+AUX uwsgi-0.9.8-fix-psgi-flags.patch 640 RMD160 6556801682d2c35e30b39481=
2bf3c695b3f234da SHA1 6e305e2d1d9c8b3f5f0d41b72bcd058a2a1d0cc1 SHA256 f27=
db595c0c9e9002163d978fc5f7075e1aa8fd453395ac6c43848b1a96bdb42
 AUX uwsgi-0.9.8-no-werror.patch 624 RMD160 ef3ebbfff1c6b4a49297e780b5eb5=
545786f8173 SHA1 a4e0923cb5ebaab19cee5b4495b1625f54c7510b SHA256 8650fe56=
0d25d9b6facf8034bb5edfedc8aa74f22a716da702d2b97a1d298998
 AUX uwsgi.confd 1247 RMD160 f3cbb0ed1e83385e917949b7df1b8953792b9464 SHA=
1 2cba8d1990f0138f7bea113fec924b1656d53a8c SHA256 26c52f22137ffd44ef4c094=
ce9cf3b55f1c418f1602e0451462103a5117174a4
 AUX uwsgi.initd 2258 RMD160 567652a6d348494e8f74c002a4af48c361fe4202 SHA=
1 7119489ea985984735fc11e9f1414cc737d3c09e SHA256 38df43560b1a4de0bef8b34=
55bec46942917c97465da9ab167a4fc33ab1d53f8
 MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SH=
A1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba7465=
7f3a332c7427c1bd24a5609d2ff887f63901d9cd35
-EBUILD uwsgi-0.9.8.3.ebuild 1841 RMD160 efc9d251734d8c15a1108a654f49304d=
ef8e9009 SHA1 db42a0a23a42b4cbd1110ae3e2da9a6b72e86645 SHA256 d15343367da=
a297e17f81265afc19b73e793c26582d7b2cd10ff839b4c694d15
+EBUILD uwsgi-0.9.8.3.ebuild 3429 RMD160 c536eb7c5cab127332b279f2412a1475=
c348dabf SHA1 ac9a120e9a5224e48cf728c2e062111db35f1f30 SHA256 cf4bef79ec1=
dc3db05238526d22c0991f96cc7bcdebe43fa260f429ae32ec40f
 DIST uwsgi-0.9.8.3.tar.gz 351168 RMD160 8bfdaa9a503516378e834bca60dfa828=
b7bee9d2 SHA1 780a96a2c32a0f7bb7f5a63353acca2fbd23a8e6 SHA256 2b529a8408b=
b4938ebccd3c4264af5af4f17ee5bd6043376ef3909c2411f611f

diff --git a/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch b/w=
ww-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
new file mode 100644
index 0000000..a65e6d2
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
@@ -0,0 +1,13 @@
+diff --git a/plugins/psgi/uwsgiplugin.py b/plugins/psgi/uwsgiplugin.py
+index 9100824..8651fbb 100644
+--- a/plugins/psgi/uwsgiplugin.py
++++ b/plugins/psgi/uwsgiplugin.py
+@@ -2,6 +2,6 @@ import os,sys
+=20
+ NAME=3D'psgi'
+ CFLAGS =3D [os.popen('perl -MExtUtils::Embed -e ccopts').read().rstrip(=
)]
+-LDFLAGS =3D [os.popen('perl -MExtUtils::Embed -e ldopts').read().rstrip=
()]
+-LIBS =3D []
++LDFLAGS =3D [os.popen('perl -MExtUtils::Embed -e ldopts |  | grep -E "\=
-W\S+"').read().rstrip()]
++LIBS =3D [os.popen('perl -MExtUtils::Embed -e ldopts | grep -o -E "\-[L=
].*"').read().rstrip()]
+ GCC_LIST =3D ['uwsgi_plmodule', 'psgi_loader', 'psgi_response', 'psgi_p=
lugin']

diff --git a/www-servers/uwsgi/uwsgi-0.9.8.3.ebuild b/www-servers/uwsgi/u=
wsgi-0.9.8.3.ebuild
index c5b45f5..137ff2a 100644
--- a/www-servers/uwsgi/uwsgi-0.9.8.3.ebuild
+++ b/www-servers/uwsgi/uwsgi-0.9.8.3.ebuild
@@ -15,20 +15,101 @@ SRC_URI=3D"http://projects.unbit.it/downloads/${P}.t=
ar.gz"
 LICENSE=3D"GPL-2"
 SLOT=3D"0"
 KEYWORDS=3D"~amd64 ~x86"
-IUSE=3D""
+IUSE=3D"expat json ldap lua pcre perl ruby sqlite +xml yaml zeromq"
=20
-RDEPEND=3D"dev-libs/libxml2"
-DEPEND=3D"${RDEPEND}"
+RDEPEND=3D"expat? ( dev-libs/expat )
+	json? ( dev-libs/jansson )
+	ldap? ( net-nds/openldap )
+	lua? ( dev-lang/lua )
+	pcre? ( dev-libs/libpcre )
+	perl? ( dev-lang/perl )
+	ruby? ( dev-lang/ruby )
+	sqlite? ( dev-db/sqlite:3 )
+	xml? ( !expat? ( dev-libs/libxml2 ) )
+	yaml? ( dev-libs/libyaml )
+	zeromq? ( net-libs/zeromq )"
+DEPEND=3D"${RDEPEND}
+	dev-util/pkgconfig"
=20
 APXS2_S=3D"${S}/apache2"
 APACHE2_MOD_CONF=3D"42_mod_${PN}"
 want_apache2_2
=20
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.9.8-no-werror.patch
+	epatch \
+		"${FILESDIR}"/${PN}-0.9.8-no-werror.patch \
+		"${FILESDIR}"/${PN}-0.9.8-fix-psgi-flags.patch
 	python_copy_sources
 }
=20
+use_true_false() {
+	if use $1 ; then
+		echo "true"
+	else
+		echo "false"
+	fi
+}
+
+src_configure() {
+	configure() {
+		local plugins
+		use lua && plugins+=3D", lua"
+		use perl && plugins+=3D", psgi"
+		use ruby && plugins+=3D", rack"
+
+		local xmlimpl=3D"libxml2"
+		use expat && xmlimpl=3D"expat"
+
+		cat > "buildconf/default.ini" << EOF
+[uwsgi]
+xml =3D $(use_true_false xml)
+ini =3D true
+yaml =3D true
+json =3D $(use_true_false json)
+sqlite3 =3D $(use_true_false sqlite)
+zeromq =3D $(use_true_false zeromq)
+snmp =3D true
+sctp =3D false
+spooler =3D true
+embedded =3D true
+udp =3D true
+multicast =3D true
+threading =3D true
+sendfile =3D true
+minterpreters =3D true
+async =3D true
+evdis =3D false
+ldap =3D $(use_true_false ldap)
+pcre =3D $(use_true_false pcre)
+debug =3D $(use_true_false debug)
+unbit =3D false
+xml_implementation =3D ${xmlimpl}
+yaml_implementation =3D libyaml
+malloc_implementation =3D libc
+plugins =3D
+bin_name =3D uwsgi
+append_version =3D
+plugin_dir =3D .
+embedded_plugins =3D  python, ping, cache, nagios, rpc, fastrouter, http=
, ugreen${plugins}
+
+locking =3D auto
+event =3D auto
+timer =3D auto
+filemonitor =3D auto
+
+embed_files =3D
+
+embed_config =3D
+
+[python]
+paste =3D true
+web3 =3D true
+
+EOF
+	}
+	python_execute_function -s configure
+}
+
 src_compile() {
 	python_src_compile CC=3D"$(tc-getCC)"
=20