Skip to content

Instantly share code, notes, and snippets.

@godfat
Created November 20, 2013 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godfat/7560747 to your computer and use it in GitHub Desktop.
Save godfat/7560747 to your computer and use it in GitHub Desktop.
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