diff options
| -rw-r--r-- | Library/Formula/rubinius.rb | 66 |
1 files changed, 54 insertions, 12 deletions
diff --git a/Library/Formula/rubinius.rb b/Library/Formula/rubinius.rb index 04f8c2a9e..28d5f9065 100644 --- a/Library/Formula/rubinius.rb +++ b/Library/Formula/rubinius.rb @@ -2,13 +2,19 @@ require 'formula' class Rubinius < Formula homepage 'http://rubini.us/' - url 'http://asset.rubini.us/rubinius-1.2.4-20110705.tar.gz' - version '1.2.4' - sha1 'c39c4fb1e62e0fb418453811636177e6ccf6a936' + url 'http://releases.rubini.us/rubinius-2.0.0.tar.bz2' + sha1 'b2b6c0c95eddcadd5b8db058a26c6975f1af26a4' 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 + # Configure options like --libdir are broken; submitted upstream: + # https://github.com/rubinius/rubinius/pull/2658 + def patches; DATA; end + def install # Let Rubinius define its own flags; messing with these causes build breaks. ENV.remove_cc_etc @@ -19,20 +25,56 @@ class Rubinius < Formula # Set to stop Rubinius messing with our prefix. ENV["RELEASE"] = "1" - ruby "./configure", - "--skip-system", # download and use the prebuilt LLVM - "--bindir", bin, - "--prefix", prefix, - "--includedir", "#{include}/rubinius", - "--libdir", lib, - "--mandir", man, # For completeness; no manpages exist yet. - "--gemsdir", "#{lib}/rubinius/gems" + system "bundle" + system "./configure", + "--skip-system", # download and use the prebuilt LLVM + "--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? - ruby "-S", "rake", "install" + 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 + +__END__ +diff --git a/configure b/configure +index 3e1a715..03c2ea7 100755 +--- a/configure ++++ b/configure +@@ -384,7 +384,7 @@ class Configure + + o.on "-P", "--prefix", "PATH", "Install Rubinius in subdirectories of PATH" do |dir| + warn_prefix dir +- @prefixdir = dir ++ @prefixdir = dir.dup + end + + o.on "-B", "--bindir", "PATH", "Install Rubinius executable in PATH" do |dir| +@@ -396,11 +396,11 @@ class Configure + end + + o.on "-A", "--appdir", "PATH", "Install Ruby runtime and libraries in PATH" do |dir| +- @appdir = dir ++ @appdir = dir.dup + end + + o.on "-L", "--libdir", "PATH", "Install Rubinius shared library in PATH" do |dir| +- @libdir = dir ++ @libdir = dir.dup + end + + o.on "-M", "--mandir", "PATH", "Install man pages in PATH" do |dir| |
