2010-05-26 07:46:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rubinius < Formula
|
|
|
|
homepage 'http://rubini.us/'
|
2011-03-15 18:36:24 +00:00
|
|
|
url 'http://asset.rubini.us/rubinius-1.2.3-20110315.tar.gz'
|
|
|
|
version '1.2.3'
|
|
|
|
sha1 '7326e27f459e299dd0c2905de9b54034cc70ccbe'
|
2010-05-26 07:46:38 +00:00
|
|
|
head 'git://github.com/evanphx/rubinius.git'
|
|
|
|
|
|
|
|
# Do not strip binaries, or else it fails to run.
|
2010-04-07 05:58:35 +00:00
|
|
|
skip_clean :all
|
2010-05-26 07:46:38 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Let Rubinius define its own flags; messing with these causes build breaks.
|
|
|
|
%w{CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS}.each { |e| ENV.delete(e) }
|
|
|
|
|
2010-12-26 18:46:16 +00:00
|
|
|
# Unset RUBYLIB to configure Rubinius
|
|
|
|
ENV.delete("RUBYLIB")
|
|
|
|
|
2010-12-21 20:57:28 +00:00
|
|
|
# Set to stop Rubinius messing with our prefix.
|
|
|
|
ENV["RELEASE"] = "1"
|
|
|
|
|
2010-11-16 22:26:18 +00:00
|
|
|
system "/usr/bin/ruby", "./configure",
|
|
|
|
"--skip-system", # download and use the prebuilt LLVM
|
2010-12-21 20:57:28 +00:00
|
|
|
"--bindir", bin,
|
2010-09-07 21:34:39 +00:00
|
|
|
"--prefix", prefix,
|
2010-05-26 07:46:38 +00:00
|
|
|
"--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 "/usr/bin/ruby", "-S", "rake", "install"
|
2010-12-26 19:16:02 +00:00
|
|
|
|
|
|
|
# Remove conflicting command aliases
|
|
|
|
bin.children.select(&:symlink?).each(&:unlink)
|
2010-05-26 07:46:38 +00:00
|
|
|
end
|
2010-07-18 19:31:09 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2010-10-26 04:05:28 +00:00
|
|
|
Consider using RVM or Cinderella to manage Ruby environments:
|
2010-07-18 19:31:09 +00:00
|
|
|
* RVM: http://rvm.beginrescueend.com/
|
2010-10-26 04:05:28 +00:00
|
|
|
* Cinderella: http://www.atmos.org/cinderella/
|
2010-07-18 19:31:09 +00:00
|
|
|
EOS
|
|
|
|
end
|
2010-05-26 07:46:38 +00:00
|
|
|
end
|