From 0cf61abf9d95f12260b752969a34e66c43a6912a Mon Sep 17 00:00:00 2001 From: Unbit Date: Wed, 8 Jan 2014 14:35:40 +0000 Subject: [PATCH] improved ruby builder --- plugins/fiber/uwsgiplugin.py | 3 +++ plugins/rack/uwsgiplugin.py | 4 +++- plugins/rbthreads/uwsgiplugin.py | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/fiber/uwsgiplugin.py b/plugins/fiber/uwsgiplugin.py index ab38a37c..ff0d4cb5 100644 --- a/plugins/fiber/uwsgiplugin.py +++ b/plugins/fiber/uwsgiplugin.py @@ -24,6 +24,9 @@ else: CFLAGS.append('-I' + archdir) CFLAGS.append('-I' + archdir + '/' + arch) CFLAGS.append('-I' + includedir + '/' + arch) + archdir2 = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['rubyarchhdrdir']\"" % rbconfig).read().rstrip() + if archdir2: + CFLAGS.append('-I' + archdir2) LDFLAGS = [] LIBS = [] diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py index 3d8ee836..210b28e9 100644 --- a/plugins/rack/uwsgiplugin.py +++ b/plugins/rack/uwsgiplugin.py @@ -30,10 +30,12 @@ else: CFLAGS.append('-I' + includedir) archdir = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['archdir']\"" % rbconfig).read().rstrip() arch = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['arch']\"" % rbconfig).read().rstrip() + archdir2 = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['rubyarchhdrdir']\"" % rbconfig).read().rstrip() CFLAGS.append('-I' + archdir) CFLAGS.append('-I' + archdir + '/' + arch) CFLAGS.append('-I' + includedir + '/' + arch) - + if archdir2: + CFLAGS.append('-I' + archdir2) LDFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LDFLAGS']\"" % rbconfig).read().rstrip().split() libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['libdir']\"" % rbconfig).read().rstrip() diff --git a/plugins/rbthreads/uwsgiplugin.py b/plugins/rbthreads/uwsgiplugin.py index 85132a66..79dfd240 100644 --- a/plugins/rbthreads/uwsgiplugin.py +++ b/plugins/rbthreads/uwsgiplugin.py @@ -24,6 +24,9 @@ else: CFLAGS.append('-I' + archdir) CFLAGS.append('-I' + archdir + '/' + arch) CFLAGS.append('-I' + includedir + '/' + arch) + archdir2 = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['rubyarchhdrdir']\"" % rbconfig).read().rstrip() + if archdir2: + CFLAGS.append('-I' + archdir2) LDFLAGS = [] LIBS = []