THRIFT-2602:Fix missing dist files

Client: ruby
Patch: jfarrell

fix ruby extension to use RBConfig to work with newer versions of ruby
This commit is contained in:
jfarrell 2014-07-10 09:21:25 -04:00
parent 750df2ec4c
commit ef7d56c1d6

View File

@ -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