2 # scripts/Makefiles can read and eval the output of this script and
6 fp
= File
.open(__FILE__
, "rb")
7 fp
.flock(File
::LOCK_EX)
9 ruby_engine
= defined?(RUBY_ENGINE
) ? RUBY_ENGINE
: 'ruby'
12 # we want "ruby-1.8.7" and not "ruby-1.8", so disable :multiruby
14 :path => "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}",
19 if RUBY_VERSION.to_f
< 2.0
20 gem
'sqlite3-ruby', '1.2.5'
22 gem
'raindrops', '0.8.0'
23 gem
'kgio-monkey', '0.3.0'
28 _
, status
= Process
.waitpid2(pid
)
29 status
.success
? or abort status
.inspect
30 lib_paths
= Dir
["#{opts[:path]}/gems/*-*/lib"].map
{ |x
| File
.expand_path(x
) }
31 dst
= "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}.mk"
32 File
.open("#{dst}.#$$", "w") do |fp
|
33 fp
.puts
"ISOLATE_LIBS=#{lib_paths.join(':')}"
35 File
.rename("#{dst}.#$$", dst
)
37 # pure Ruby gems can be shared across all Rubies
38 %w(3.0.0).each
do |rails_ver
|
39 opts
[:path] = "tmp/isolate/rails-#{rails_ver}"
43 gem
'rails', rails_ver
46 _
, status
= Process
.waitpid2(pid
)
47 status
.success
? or abort status
.inspect
48 more
= Dir
["#{opts[:path]}/gems/*-*/lib"].map
{ |x
| File
.expand_path(x
) }
49 lib_paths
.concat(more
)