[uwsgi] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
Vít Ondruch
vondruch at fedoraproject.org
Wed Apr 3 14:02:59 UTC 2013
commit 5249bc55f03d1bd93c38959065572f934f84142d
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Apr 2 14:45:42 2013 +0200
Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
uwsgi.spec | 7 ++++-
uwsgi_ruby20_compatibility.patch | 50 ++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/uwsgi.spec b/uwsgi.spec
index 847a8c5..1601b0d 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -2,7 +2,7 @@
Name: uwsgi
Version: 1.2.6
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Fast, self-healing, application container server
Group: System Environment/Daemons
License: GPLv2
@@ -15,6 +15,7 @@ Source3: uwsgi.service
Source4: emperor.ini
Patch0: uwsgi_trick_chroot_rpmbuild.patch
Patch1: uwsgi_fix_rpath.patch
+Patch2: uwsgi_ruby20_compatibility.patch
BuildRequires: curl, python2-devel, libxml2-devel, libuuid-devel, jansson-devel
BuildRequires: libyaml-devel, perl-devel, ruby-devel, perl-ExtUtils-Embed
BuildRequires: python3-devel, python-greenlet-devel, lua-devel, ruby, pcre-devel
@@ -188,6 +189,7 @@ sed -i 's/\r//' uwsgi-wiki-doc-v%{wikiversion}.txt
echo "plugin_dir = %{_libdir}/%{name}" >> buildconf/$(basename %{SOURCE1})
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
CFLAGS="%{optflags} -Wno-unused-but-set-variable" python uwsgiconfig.py --build fedora.ini
@@ -313,6 +315,9 @@ exit 0
%changelog
+* Tue Apr 02 2013 Vít Ondruch <vondruch at redhat.com> - 1.2.6-10
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
* Sat Mar 23 2013 Remi Collet <rcollet at redhat.com> - 1.2.6-9
- rebuild for http://fedoraproject.org/wiki/Features/Php55
diff --git a/uwsgi_ruby20_compatibility.patch b/uwsgi_ruby20_compatibility.patch
new file mode 100644
index 0000000..0a96494
--- /dev/null
+++ b/uwsgi_ruby20_compatibility.patch
@@ -0,0 +1,50 @@
+--- a/plugins/rack/uwsgiplugin.py
++++ b/plugins/rack/uwsgiplugin.py
+@@ -10,13 +10,14 @@
+ rbconfig = 'Config'
+
+ version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
+-v = version.split('.')
+
+ GCC_LIST = ['rack_plugin', 'rack_api']
+
+-if v[0] == '1' and v[1] == '9':
++if version >= '1.9':
+ CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
+ CFLAGS.append('-DRUBY19')
++ if version >= '2.0':
++ CFLAGS.append('-DRUBY20')
+ CFLAGS.append('-Wno-unused-parameter')
+ rbconfig = 'RbConfig'
+ else:
+--- a/plugins/ruby19/uwsgiplugin.py
++++ b/plugins/ruby19/uwsgiplugin.py
+@@ -10,13 +10,14 @@
+ rbconfig = 'Config'
+
+ version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
+-v = version.split('.')
+
+ GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api']
+
+-if v[0] == '1' and v[1] == '9':
++if version >= '1.9':
+ CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
+ CFLAGS.append('-DRUBY19')
++ if version >= '2.0':
++ CFLAGS.append('-DRUBY20')
+ CFLAGS.append('-Wno-unused-parameter')
+ rbconfig = 'RbConfig'
+ else:
+--- a/plugins/rack/rack_plugin.c
++++ b/plugins/rack/rack_plugin.c
+@@ -163,7 +163,9 @@
+ }
+
+ #ifdef RUBY19
++#ifndef RUBY20
+ RUBY_GLOBAL_SETUP
++#endif
+ #endif
+
+ VALUE uwsgi_require_file(VALUE arg) {
More information about the scm-commits
mailing list