Permalink
Browse files

use rvm to build cross compiled versions

  • Loading branch information...
copiousfreetime committed Jul 21, 2010
1 parent b21b923 commit a38e5d2e8f3f7b4ad1d46470fd7065ddc9a32558
Showing with 5 additions and 6 deletions.
  1. +5 −6 tasks/extension.rake
View
@@ -30,21 +30,20 @@ if ext_config = Configuration.for_if_exist?('extension') then
ext_config = Configuration.for("extension")
rbconfig = ext_config.cross_rbconfig["rbconfig-#{version}"]
raise ArgumentError, "No cross compiler for version #{version}, we have #{ext_config.cross_rbconfig.keys.join(",")}" unless rbconfig
- ruby_exe = if version =~ /1\.8/ then
- "ruby"
- else
- "ruby1.9"
- end
Hitimes::GEM_SPEC.extensions.each do |extension|
path = Pathname.new(extension)
parts = path.split
conf = parts.last
+ rvm = %x[ which rvm ].strip
Dir.chdir(path.dirname) do |d|
if File.exist?( "Makefile" ) then
sh "make clean distclean"
end
cp "#{rbconfig}", "rbconfig.rb"
- sh "#{ruby_exe} -I. extconf.rb"
+ rubylib = ENV['RUBYLIB']
+ ENV['RUBYLIB'] = "."
+ sh %[#{rvm} #{version} -S extconf.rb]
+ ENV['RUBYLIB'] = rubylib
sh "make"
end
end

0 comments on commit a38e5d2

Please sign in to comment.