public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tiziano Müller" <dev-zero@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/files/, www-servers/uwsgi/
Date: Tue, 29 Nov 2011 18:52:50 +0000 (UTC)	[thread overview]
Message-ID: <a0481da457074bce07aebbe3cd1a2f9e10e885ed.dev-zero@gentoo> (raw)

commit:     a0481da457074bce07aebbe3cd1a2f9e10e885ed
Author:     Tiziano Müller <tm <AT> dev-zero <DOT> ch>
AuthorDate: Tue Nov 29 18:52:44 2011 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Tue Nov 29 18:52:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=a0481da4

dropped all patches, merged changes to live ebuild

---
 www-servers/uwsgi/Manifest                         |    8 +-
 .../uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch   |   13 ---
 .../uwsgi/files/uwsgi-9999-fix-destdir.patch       |   11 --
 www-servers/uwsgi/files/uwsgi.initd                |    2 +-
 www-servers/uwsgi/uwsgi-9999.ebuild                |  110 +++++++++++++-------
 5 files changed, 73 insertions(+), 71 deletions(-)

diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index d5ec9d4..579f9cc 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,14 +1,10 @@
 AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861
-AUX uwsgi-0.9.8-fix-psgi-flags.patch 640 RMD160 6556801682d2c35e30b394812bf3c695b3f234da SHA1 6e305e2d1d9c8b3f5f0d41b72bcd058a2a1d0cc1 SHA256 f27db595c0c9e9002163d978fc5f7075e1aa8fd453395ac6c43848b1a96bdb42
-AUX uwsgi-0.9.8-no-werror.patch 624 RMD160 ef3ebbfff1c6b4a49297e780b5eb5545786f8173 SHA1 a4e0923cb5ebaab19cee5b4495b1625f54c7510b SHA256 8650fe560d25d9b6facf8034bb5edfedc8aa74f22a716da702d2b97a1d298998
-AUX uwsgi-0.9.8.3-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3689c35c SHA1 44b54276acf2ea61da824bf8aab054e662cdc8aa SHA256 b9fcaf3b7a76ab7a5150b85df4a39ecf578a7f181d9880c36d1e6e876bcb0ed7
-AUX uwsgi-9999-fix-destdir.patch 385 RMD160 86e055c560079c61035107943d63c48d3689c35c SHA1 44b54276acf2ea61da824bf8aab054e662cdc8aa SHA256 b9fcaf3b7a76ab7a5150b85df4a39ecf578a7f181d9880c36d1e6e876bcb0ed7
 AUX uwsgi.confd 1247 RMD160 f3cbb0ed1e83385e917949b7df1b8953792b9464 SHA1 2cba8d1990f0138f7bea113fec924b1656d53a8c SHA256 26c52f22137ffd44ef4c094ce9cf3b55f1c418f1602e0451462103a5117174a4
-AUX uwsgi.initd 2388 RMD160 32dcbde8f29c55f3aba996396880d543fc51f97d SHA1 24276db0dd82a5b5cdd756772ed81ae5c86e6e45 SHA256 6497afcc6208d54f01ef853bff0ee33eb4f5f63e0eb3e024bc206ee78966986b
+AUX uwsgi.initd 2386 RMD160 a799175f2b94eb96dc19ff9b8b4d5c18a52cbd38 SHA1 ffa1870c2e14871764447bc97e6d7b9f24364a28 SHA256 d523238595e83b7f82001dea41ffa3298836fd0027859ed3e1bf4f84d75e1370
 DIST uwsgi-0.9.8.6.tar.gz 359620 RMD160 78b92fe3a9b272ca5a2704b0db7d1956b9149a0b SHA1 bb835c3c14310640b24ebdbcf0aa91e8ce8bd5a6 SHA256 14379c0055063dbfbc4ce9ba10dfd6eec827286a462300d98947174d9694d981
 DIST uwsgi-1.0-rc6.tar.gz 441757 RMD160 67ba49700adc523a73ce9cc49ce86d742352c32e SHA1 bc2da6d7572222bf13cb6f3423e7dd4d38b7e3ce SHA256 e3878ac5fef7a9c4e5ebffe4c79a424c2aff34ebc5f6a6b2f88f16cb515552e2
 EBUILD uwsgi-0.9.8.6.ebuild 4304 RMD160 ce533908cedae761db93ae26b811ae09e12847fc SHA1 29710c3c36fe5cffb34c180f9c6a48d7ace001e5 SHA256 5bf9203180bfa41622cad1f8c414b0a00af7b901e70017784f7648be43316b28
 EBUILD uwsgi-1.0_rc6.ebuild 4494 RMD160 7bdd37f424fe0d24595fcae20219cbdb98222006 SHA1 a0580b78bcd9a682d93ef8443f3d23f08d4dfbb1 SHA256 3022965197bf679019c3be27acbb274df31da095afeea2b06658c136bb7e86aa
-EBUILD uwsgi-9999.ebuild 3714 RMD160 eb0a5686a9620fc309649c47b1c912dcb7a2948b SHA1 c45150e52d072f8b63ebb40fa3cf5c4d8cb67b6f SHA256 74251b3da8ff0d99aa12ee0905b4b20fe3ab581afd7054a6c8fb09a2d6622c64
+EBUILD uwsgi-9999.ebuild 4443 RMD160 114d797de425d0d5b3bfe23cfbc426aa9567fc99 SHA1 e26121b379a91b18edb6fcd2d94a5ef6377f0282 SHA256 37dc74d9d4d4224d419bca0f3805e7a936a303867cc94f6d26c8103a7dc3d45c
 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.8-fix-psgi-flags.patch b/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
deleted file mode 100644
index a65e6d2..0000000
--- a/www-servers/uwsgi/files/uwsgi-0.9.8-fix-psgi-flags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
- 
- NAME='psgi'
- CFLAGS = [os.popen('perl -MExtUtils::Embed -e ccopts').read().rstrip()]
--LDFLAGS = [os.popen('perl -MExtUtils::Embed -e ldopts').read().rstrip()]
--LIBS = []
-+LDFLAGS = [os.popen('perl -MExtUtils::Embed -e ldopts |  | grep -E "\-W\S+"').read().rstrip()]
-+LIBS = [os.popen('perl -MExtUtils::Embed -e ldopts | grep -o -E "\-[L].*"').read().rstrip()]
- GCC_LIST = ['uwsgi_plmodule', 'psgi_loader', 'psgi_response', 'psgi_plugin']

diff --git a/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch b/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch
deleted file mode 100644
index a7c47b6..0000000
--- a/www-servers/uwsgi/files/uwsgi-9999-fix-destdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- uwsgiconfig.py.orig	2011-08-08 17:56:14.649325030 +0200
-+++ uwsgiconfig.py	2011-08-08 17:58:00.085329500 +0200
-@@ -670,7 +670,7 @@
-     else:
-         p_cflags.append("-D%s_plugin=%s_plugin" % (up.NAME, name))
- 
--    plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin'
-+    plugin_dest = uc.get('plugin_build_dir') + '/' + name + '_plugin'
- 
-     shared_flag = '-shared'
- 

diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/files/uwsgi.initd
index f203af4..bb3ba6d 100644
--- a/www-servers/uwsgi/files/uwsgi.initd
+++ b/www-servers/uwsgi/files/uwsgi.initd
@@ -22,7 +22,7 @@ start() {
 
 	if [ "${SVCNAME}" = "uwsgi" ]; then
 		eerror "You are not supposed to run this script directly. Create a symlink"
-		eerror "for the FastCGI application you want to run as well as a copy of the"
+		eerror "for the uwsgi 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"

diff --git a/www-servers/uwsgi/uwsgi-9999.ebuild b/www-servers/uwsgi/uwsgi-9999.ebuild
index 9a8d231..917af91 100644
--- a/www-servers/uwsgi/uwsgi-9999.ebuild
+++ b/www-servers/uwsgi/uwsgi-9999.ebuild
@@ -1,12 +1,12 @@
 # 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 $
+# $Header: $
 
-EAPI="3"
-PYTHON_DEPEND="*"
+EAPI="4"
+PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2"
 SUPPORT_PYTHON_ABIS="1"
 
-inherit eutils python toolchain-funcs apache-module multilib mercurial
+inherit apache-module python multilib mercurial
 
 DESCRIPTION="uWSGI server for Python web applications"
 HOMEPAGE="http://projects.unbit.it/uwsgi/"
@@ -15,9 +15,9 @@ EHG_REPO_URI="http://projects.unbit.it/hg/uwsgi"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="debug json ldap lua pcre perl ruby sqlite +xml yaml zeromq"
+IUSE="apache2 +carbon debug json ldap lua +nagios +pcre perl python ruby rrdtool sqlite +xml yaml zeromq"
 
-RDEPEND="json? ( dev-libs/jansson )
+CDEPEND="json? ( dev-libs/jansson )
 	ldap? ( net-nds/openldap )
 	lua? ( dev-lang/lua )
 	pcre? ( dev-libs/libpcre )
@@ -27,21 +27,15 @@ RDEPEND="json? ( dev-libs/jansson )
 	xml? ( dev-libs/libxml2 )
 	yaml? ( dev-libs/libyaml )
 	zeromq? ( net-libs/zeromq )"
-DEPEND="${RDEPEND}
+DEPEND="${CDEPEND}
 	dev-util/pkgconfig"
+RDEPEND="${CDEPEND}
+	rrdtool? ( net-analyzer/rrdtool )"
 
 APXS2_S="${S}/apache2"
 APACHE2_MOD_CONF="42_mod_${PN}"
 want_apache2_2
 
-src_prepare() {
-	epatch \
-		"${FILESDIR}"/${PN}-0.9.8-no-werror.patch \
-		"${FILESDIR}"/${P}-fix-destdir.patch
-
-	python_copy_sources
-}
-
 use_true_false() {
 	if use $1 ; then
 		echo "true"
@@ -50,15 +44,29 @@ use_true_false() {
 	fi
 }
 
+pkg_setup() {
+	depend.apache_pkg_setup
+	python_pkg_setup
+}
+
+src_prepare() {
+	sed -i \
+		-e "s|'-O2', ||" \
+		-e "s|'-Werror', ||" \
+		-e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \
+		uwsgiconfig.py || die "sed failed"
+
+	sed -i \
+		-e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \
+		plugins/python??/uwsgiplugin.py || die "sed failed"
+}
 src_configure() {
-	configure() {
-		local plugins
-		use lua && plugins+=", lua"
-		use perl && plugins+=", psgi"
-		use ruby && plugins+=", rack"
-		plugins="${plugins:1}"
-
-		cat > "buildconf/default.ini" << EOF
+	local plugins=""
+	use carbon && plugins+=", carbon"
+	use nagios && plugins+=", nagios"
+	use rrdtool && plugins+=", rrdtool"
+
+	cat > "buildconf/gentoo.ini" << EOF
 [uwsgi]
 xml = $(use_true_false xml)
 ini = true
@@ -84,12 +92,13 @@ unbit = false
 xml_implementation = libxml2
 yaml_implementation = libyaml
 malloc_implementation = libc
-plugins = ${plugins}
+plugins =
 bin_name = uwsgi
 append_version =
-plugin_build_dir = plugins
 plugin_dir = /usr/$(get_libdir)/uwsgi
-embedded_plugins =  python, ping, cache, nagios, rpc, fastrouter, http, ugreen
+plugin_build_dir = ${T}/plugins
+embedded_plugins =  ping, cache, rpc, fastrouter, http, ugreen, signal, ${plugins:1}
+as_shared_library = false
 
 locking = auto
 event = auto
@@ -105,12 +114,30 @@ paste = true
 web3 = true
 
 EOF
-	}
-	python_execute_function -s configure
 }
 
 src_compile() {
-	python_src_compile CC="$(tc-getCC)"
+	python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+
+	mkdir -p "${T}/plugins"
+
+	if use lua ; then
+		python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
+	fi
+
+	if use perl ; then
+		python uwsgiconfig.py --plugin plugins/perl gentoo || die "building plugin for perl failed"
+	fi
+
+	if use python ; then
+		for a in ${PYTHON_ABIS} ; do
+			python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "building plugin for python-${a} failed"
+		done
+	fi
+
+	if use ruby ; then
+		echo "TODO"
+	fi
 
 	if use apache2 ; then
 		for m in Ruwsgi uwsgi ; do
@@ -121,17 +148,20 @@ src_compile() {
 }
 
 src_install() {
-	installation() {
-		newbin uwsgi uwsgi-${PYTHON_ABI}
+	dobin uwsgi
+
+	insinto /usr/$(get_libdir)/uwsgi
+	doins "${T}/plugins"/*.so
+
+	use lua && dosym uwsgi /usr/bin/uwsgi_lua
 
-		if use lua || use perl || use ruby ; then
-			insinto /usr/$(get_libdir)/uwsgi
-			doins plugins/*.so
-		fi
-	}
-	python_execute_function -s installation
+	use perl && dosym uwsgi /usr/bin/uwsgi_perl
 
-	python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
+	if use python ; then
+		for a in ${PYTHON_ABIS} ; do
+			dosym uwsgi /usr/bin/uwsgi_python${a/.}
+		done
+	fi
 
 	if use apache2; then
 		for m in Ruwsgi uwsgi ; do
@@ -155,8 +185,8 @@ pkg_postinst() {
 		elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported."
 	fi
 
-	if use lua || use perl || use ruby ; then
+	if use lua || use perl || use ruby || use python; then
 		elog "The lua, perl and ruby modules are built as plugins."
-		elog "Use '--plugins lua', '--plugins psgi' or '--plugins rack' to load them."
+		elog "Use '--plugins lua', '--plugins psgi', '--plugins rack' or '--plugins python27' to load them."
 	fi
 }



             reply	other threads:[~2011-11-29 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 18:52 Tiziano Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-23  7:49 [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/files/, www-servers/uwsgi/ Tiziano Müller
2011-11-21 10:56 Tiziano Müller
2011-08-09 13:09 Tiziano Müller
2011-08-09 10:02 Tiziano Müller
2011-08-02  9:42 Tiziano Müller
2011-07-31 13:48 Tiziano Müller
2011-07-31 13:41 Tiziano Müller
2011-07-31 13:27 Tiziano Müller
2011-07-31 13:23 Tiziano Müller
2011-07-31 13:23 Tiziano Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0481da457074bce07aebbe3cd1a2f9e10e885ed.dev-zero@gentoo \
    --to=dev-zero@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox