Permalink
Browse files

update ruby install task to use libyaml + libffi

  • Loading branch information...
1 parent c9e6434 commit 7939f2bccdc2ff23f143853f5b2f061f485a13fb @hone hone committed Nov 4, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 Rakefile
View
@@ -103,12 +103,18 @@ task "ruby:install", :version do |t, args|
version = args[:version]
name = "ruby-#{version}"
prefix = "/app/vendor/#{name}"
+ usr_dir = "usr"
Dir.mktmpdir("ruby-") do |tmpdir|
Dir.chdir(tmpdir) do |dir|
FileUtils.rm_rf("#{tmpdir}/*")
sh "curl http://ftp.ruby-lang.org/pub/ruby/1.9/#{name}.tar.gz -s -o - | tar vzxf -"
- sh "vulcan build -v -o #{name}.tgz --source #{name} --command=\"./configure --disable-install-doc --prefix #{prefix} && make && make install\""
+ FileUtils.mkdir_p("#{name}/#{usr_dir}")
+ Dir.chdir("#{name}/#{usr_dir}") do
+ sh "curl #{VENDOR_URL}/libyaml-0.1.4.tgz -s -o - | tar vzxf -"
+ sh "curl #{VENDOR_URL}/libffi-3.0.10.tgz -s -o - | tar vzxf -"
+ end
+ sh "vulcan build -v -o #{name}.tgz --source #{name} --command=\"mv usr /tmp && ./configure --disable-install-doc --prefix #{prefix} && env CPATH=/tmp/#{usr_dir}/include:\\$CPATH CPPATH=/tmp/#{usr_dir}/include:\\$CPPATH LIBRARY_PATH=/tmp/#{usr_dir}/lib:\\$LIBRARY_PATH make && make install\""
s3_upload(tmpdir, name)
end
end

0 comments on commit 7939f2b

Please sign in to comment.