archrelease: copy trunk to community-any
[arch-community.git] / uwsgi / trunk / uwsgi-1.9.13-ruby2.0.patch
blobb4bf20d381b5dc0336dce0ca88e1bc1a3baa2e17
1 diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
2 index 2375bc9..b908417 100644
3 --- a/plugins/rack/uwsgiplugin.py
4 +++ b/plugins/rack/uwsgiplugin.py
5 @@ -10,13 +10,14 @@ except:
6 rbconfig = 'Config'
8 version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
9 -v = version.split('.')
11 GCC_LIST = ['rack_plugin', 'rack_api']
13 -if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
14 +if version >= '1.9':
15 CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
16 CFLAGS.append('-DRUBY19')
17 + if version >= '2.0':
18 + CFLAGS.append('-DRUBY20')
19 CFLAGS.append('-Wno-unused-parameter')
20 rbconfig = 'RbConfig'
21 else:
22 diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
23 index 4f35984..156018f 100644
24 --- a/plugins/ruby19/uwsgiplugin.py
25 +++ b/plugins/ruby19/uwsgiplugin.py
26 @@ -10,13 +10,14 @@ except:
27 rbconfig = 'Config'
29 version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
30 -v = version.split('.')
32 GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api']
34 -if v[0] == '1' and v[1] == '9':
35 +if version >= '1.9':
36 CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
37 CFLAGS.append('-DRUBY19')
38 + if version >= '2.0':
39 + CFLAGS.append('-DRUBY20')
40 CFLAGS.append('-Wno-unused-parameter')
41 rbconfig = 'RbConfig'
42 else: