Skip to content

Instantly share code, notes, and snippets.

@godfat

godfat/rubinius.rb

Created Nov 20, 2013
Embed
What would you like to do?
install rubinius 2.2.1
require 'formula'
class Rubinius < Formula
homepage 'http://rubini.us/'
url 'http://releases.rubini.us/rubinius-2.2.1.tar.bz2'
sha1 'c34e5c19dcc66c35278ac4e5ec133798372c23ed'
head 'https://github.com/rubinius/rubinius.git'
# Yes, rubinius actually needs a pre-existing ruby 2.0 install to build
depends_on 'ruby' => :build
env :std
def install
system "bundle install --path vendor/gems"
system "./configure",
"--bindir", bin,
"--prefix", prefix,
"--includedir", "#{include}/rubinius",
"--libdir", lib,
"--mandir", man, # For completeness; no manpages exist yet.
"--gemsdir", "#{lib}/rubinius/gems"
ohai "config.rb", File.open('config.rb').to_a if ARGV.debug? or ARGV.verbose?
system "rake", "install"
# Remove conflicting command aliases
bin.children.select(&:symlink?).each(&:unlink)
# This conclicts with the Ruby command of the same name
(bin/'testrb').unlink
end
test do
assert_equal 'rbx', `"#{bin}/rbx" -e "puts RUBY_ENGINE"`.chomp
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment