This commit is contained in:
parent
6298acfe5b
commit
5249bc55f0
@ -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@redhat.com> - 1.2.6-10
|
||||
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
||||
|
||||
* Sat Mar 23 2013 Remi Collet <rcollet@redhat.com> - 1.2.6-9
|
||||
- rebuild for http://fedoraproject.org/wiki/Features/Php55
|
||||
|
||||
|
50
uwsgi_ruby20_compatibility.patch
Normal file
50
uwsgi_ruby20_compatibility.patch
Normal file
@ -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) {
|
Loading…
Reference in New Issue
Block a user