Gentoo Archives: gentoo-commits

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/
Date: Fri, 02 Dec 2011 07:22:26
Message-Id: 63a1481c964d7559e76ab58e3de878b38770fbbe.dev-zero@gentoo
1 commit: 63a1481c964d7559e76ab58e3de878b38770fbbe
2 Author: Tiziano Müller <tm <AT> dev-zero <DOT> ch>
3 AuthorDate: Fri Dec 2 07:22:08 2011 +0000
4 Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 2 07:22:08 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=63a1481c
7
8 make ruby dep optional
9
10 ---
11 www-servers/uwsgi/Manifest | 4 +-
12 www-servers/uwsgi/uwsgi-1.0_rc7.ebuild | 3 +-
13 www-servers/uwsgi/uwsgi-9999.ebuild | 35 +++++++++++++++++++++++++------
14 3 files changed, 32 insertions(+), 10 deletions(-)
15
16 diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
17 index c00b589..76d1387 100644
18 --- a/www-servers/uwsgi/Manifest
19 +++ b/www-servers/uwsgi/Manifest
20 @@ -4,7 +4,7 @@ AUX uwsgi.initd 2386 RMD160 a799175f2b94eb96dc19ff9b8b4d5c18a52cbd38 SHA1 ffa187
21 DIST uwsgi-0.9.8.6.tar.gz 359620 RMD160 78b92fe3a9b272ca5a2704b0db7d1956b9149a0b SHA1 bb835c3c14310640b24ebdbcf0aa91e8ce8bd5a6 SHA256 14379c0055063dbfbc4ce9ba10dfd6eec827286a462300d98947174d9694d981
22 DIST uwsgi-1.0-rc7.tar.gz 447066 RMD160 4e2ff2bbfbafd3e0402c3a551c43af88d7d370dc SHA1 9ab26a73ba6204ae509adc129ed2acc22413ab05 SHA256 7439578f62a3bf1adcfeb58b192405a77032b6b792bef3cd54dd3ae7ec4b1df2
23 EBUILD uwsgi-0.9.8.6.ebuild 4304 RMD160 ce533908cedae761db93ae26b811ae09e12847fc SHA1 29710c3c36fe5cffb34c180f9c6a48d7ace001e5 SHA256 5bf9203180bfa41622cad1f8c414b0a00af7b901e70017784f7648be43316b28
24 -EBUILD uwsgi-1.0_rc7.ebuild 5266 RMD160 dd1dd5587cf7073ef117eafc6d55dbbb96666196 SHA1 af20ef6642e1eac12671a2b1082b8a69c158d05f SHA256 05c9b91e01014eb999eda4b8a962f15c359dffce5a7170fabe4015930930c341
25 -EBUILD uwsgi-9999.ebuild 4443 RMD160 114d797de425d0d5b3bfe23cfbc426aa9567fc99 SHA1 e26121b379a91b18edb6fcd2d94a5ef6377f0282 SHA256 37dc74d9d4d4224d419bca0f3805e7a936a303867cc94f6d26c8103a7dc3d45c
26 +EBUILD uwsgi-1.0_rc7.ebuild 5303 RMD160 657947aa39bb28ce8f2e4d8229617474c8431f50 SHA1 3a54351ee06a32fbc3b79f272a9b24bfea2313d4 SHA256 6968941db8836ddfb4bbcb1ba54c4f0f580bcc9f8ba0f52e149133c802465b5f
27 +EBUILD uwsgi-9999.ebuild 5255 RMD160 61721207ea4564268c1f2ca7239c4142e27b570c SHA1 f2c2b029e306026558b5109f92a6d2209361db27 SHA256 bb20de3da3ad5e54ae5089cb3a87e7b19c086326af8367e86b68f7acf6feae8c
28 MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb4c27ee96af8a09f1f9bbfc629384efe8c2363a9
29 MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SHA1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba74657f3a332c7427c1bd24a5609d2ff887f63901d9cd35
30
31 diff --git a/www-servers/uwsgi/uwsgi-1.0_rc7.ebuild b/www-servers/uwsgi/uwsgi-1.0_rc7.ebuild
32 index bc63942..ad2a719 100644
33 --- a/www-servers/uwsgi/uwsgi-1.0_rc7.ebuild
34 +++ b/www-servers/uwsgi/uwsgi-1.0_rc7.ebuild
35 @@ -6,6 +6,7 @@ EAPI="4"
36 PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2"
37 SUPPORT_PYTHON_ABIS="1"
38 USE_RUBY="ruby18 ree18 ruby19"
39 +RUBY_OPTIONAL="yes"
40
41 MY_P="${P/_/-}"
42
43 @@ -27,7 +28,7 @@ CDEPEND="uuid? ( sys-apps/util-linux )
44 lua? ( dev-lang/lua )
45 pcre? ( dev-libs/libpcre )
46 perl? ( dev-lang/perl )
47 - ruby? ( dev-lang/ruby )
48 + ruby? ( $(ruby_implementations_depend) )
49 sqlite? ( dev-db/sqlite:3 )
50 xml? ( dev-libs/libxml2 )
51 yaml? ( dev-libs/libyaml )
52
53 diff --git a/www-servers/uwsgi/uwsgi-9999.ebuild b/www-servers/uwsgi/uwsgi-9999.ebuild
54 index 917af91..6926a5c 100644
55 --- a/www-servers/uwsgi/uwsgi-9999.ebuild
56 +++ b/www-servers/uwsgi/uwsgi-9999.ebuild
57 @@ -5,6 +5,8 @@
58 EAPI="4"
59 PYTHON_DEPEND="python? 2:2.4:2.7 3:3.1:3.2"
60 SUPPORT_PYTHON_ABIS="1"
61 +USE_RUBY="ruby18 ree18 ruby19"
62 +RUBY_OPTIONAL="yes"
63
64 inherit apache-module python multilib mercurial
65
66 @@ -14,15 +16,17 @@ EHG_REPO_URI="http://projects.unbit.it/hg/uwsgi"
67
68 LICENSE="GPL-2"
69 SLOT="0"
70 -KEYWORDS=""
71 -IUSE="apache2 +carbon debug json ldap lua +nagios +pcre perl python ruby rrdtool sqlite +xml yaml zeromq"
72 +KEYWORDS="~amd64 ~x86"
73 +IUSE="apache2 +caps +carbon debug json ldap lua +nagios +pcre perl python ruby rrdtool sqlite +uuid +xml yaml zeromq"
74
75 -CDEPEND="json? ( dev-libs/jansson )
76 +CDEPEND="uuid? ( sys-apps/util-linux )
77 + caps? ( sys-libs/libcap )
78 + json? ( dev-libs/jansson )
79 ldap? ( net-nds/openldap )
80 lua? ( dev-lang/lua )
81 pcre? ( dev-libs/libpcre )
82 perl? ( dev-lang/perl )
83 - ruby? ( dev-lang/ruby )
84 + ruby? ( $(ruby_implementations_depend) )
85 sqlite? ( dev-db/sqlite:3 )
86 xml? ( dev-libs/libxml2 )
87 yaml? ( dev-libs/libyaml )
88 @@ -44,6 +48,10 @@ use_true_false() {
89 fi
90 }
91
92 +src_unpack() {
93 + default
94 +}
95 +
96 pkg_setup() {
97 depend.apache_pkg_setup
98 python_pkg_setup
99 @@ -114,6 +122,19 @@ paste = true
100 web3 = true
101
102 EOF
103 + use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed"
104 + use uuid || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed"
105 +}
106 +
107 +each_ruby_compile() {
108 + cd "${WORKDIR}/${MY_P}"
109 +
110 + sed -i -e "s|^NAME=.*|NAME='rack_${RUBY##*/}'|" plugins/rack/uwsgiplugin.py || die "sed failed"
111 + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo || die "building plugin for ${RUBY} failed"
112 +
113 + if [[ "${RUBY}" == *ruby19 ]] ; then
114 + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/ruby19 gentoo || die "building plugin for ${RUBY} failed"
115 + fi
116 }
117
118 src_compile() {
119 @@ -126,7 +147,7 @@ src_compile() {
120 fi
121
122 if use perl ; then
123 - python uwsgiconfig.py --plugin plugins/perl gentoo || die "building plugin for perl failed"
124 + python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl failed"
125 fi
126
127 if use python ; then
128 @@ -136,7 +157,7 @@ src_compile() {
129 fi
130
131 if use ruby ; then
132 - echo "TODO"
133 + ruby-ng_src_compile
134 fi
135
136 if use apache2 ; then
137 @@ -187,6 +208,6 @@ pkg_postinst() {
138
139 if use lua || use perl || use ruby || use python; then
140 elog "The lua, perl and ruby modules are built as plugins."
141 - elog "Use '--plugins lua', '--plugins psgi', '--plugins rack' or '--plugins python27' to load them."
142 + elog "Use '--plugins lua', '--plugins psgi', '--plugins rack_ruby18' or '--plugins python27' to load them."
143 fi
144 }