You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2014/07/10 15:22:18 UTC

git commit: THRIFT-2602:Fix missing dist files Client: ruby Patch: jfarrell

Repository: thrift
Updated Branches:
  refs/heads/master 750df2ec4 -> ef7d56c1d


THRIFT-2602:Fix missing dist files
Client: ruby
Patch: jfarrell

fix ruby extension to use RBConfig to work with newer versions of ruby


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/ef7d56c1
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/ef7d56c1
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/ef7d56c1

Branch: refs/heads/master
Commit: ef7d56c1d6e24cdd0a24d3ee825c499b917d7dda
Parents: 750df2e
Author: jfarrell <jf...@apache.org>
Authored: Thu Jul 10 09:21:25 2014 -0400
Committer: jfarrell <jf...@apache.org>
Committed: Thu Jul 10 09:21:25 2014 -0400

----------------------------------------------------------------------
 lib/rb/ext/extconf.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/ef7d56c1/lib/rb/ext/extconf.rb
----------------------------------------------------------------------
diff --git a/lib/rb/ext/extconf.rb b/lib/rb/ext/extconf.rb
index 96f6b43..b35f60b 100644
--- a/lib/rb/ext/extconf.rb
+++ b/lib/rb/ext/extconf.rb
@@ -21,8 +21,10 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
   File.open('Makefile', 'w'){|f| f.puts "all:\n\ninstall:\n" }
 else
   require 'mkmf'
+  require 'rbconfig'
+
+  $ARCH_FLAGS = RbConfig::CONFIG['CFLAGS'].scan( /(-arch )(\S+)/ ).map{|x,y| x + y + ' ' }.join('')
 
-  $ARCH_FLAGS = Config::CONFIG['CFLAGS'].scan( /(-arch )(\S+)/ ).map{|x,y| x + y + ' ' }.join('')
 
   $CFLAGS = "-fsigned-char -g -O2 -Wall -Werror " + $ARCH_FLAGS