summaryrefslogtreecommitdiff
path: root/community/uwsgi/uwsgi_ruby20_compatibility.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-01 02:03:26 -0700
committerroot <root@rshg054.dnsready.net>2013-08-01 02:03:26 -0700
commit3391ef078ab86d3160b5e2fb3cfb794b75ce2a76 (patch)
tree3dece49302a2f07d08d6cf95ebebf467d61ff70a /community/uwsgi/uwsgi_ruby20_compatibility.patch
parentb73aa81c21acc75e383d0e73e0fbf553d2b68232 (diff)
Thu Aug 1 02:01:53 PDT 2013
Diffstat (limited to 'community/uwsgi/uwsgi_ruby20_compatibility.patch')
-rw-r--r--community/uwsgi/uwsgi_ruby20_compatibility.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/community/uwsgi/uwsgi_ruby20_compatibility.patch b/community/uwsgi/uwsgi_ruby20_compatibility.patch
new file mode 100644
index 000000000..b4bf20d38
--- /dev/null
+++ b/community/uwsgi/uwsgi_ruby20_compatibility.patch
@@ -0,0 +1,42 @@
+diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
+index 2375bc9..b908417 100644
+--- a/plugins/rack/uwsgiplugin.py
++++ b/plugins/rack/uwsgiplugin.py
+@@ -10,13 +10,14 @@ except:
+ 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') or v[0] >= '2':
++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:
+diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
+index 4f35984..156018f 100644
+--- a/plugins/ruby19/uwsgiplugin.py
++++ b/plugins/ruby19/uwsgiplugin.py
+@@ -10,13 +10,14 @@ except:
+ 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: