Created
November 20, 2013 10:08
-
-
Save godfat/7560747 to your computer and use it in GitHub Desktop.
install rubinius 2.2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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