-
Notifications
You must be signed in to change notification settings - Fork 8
/
rubinius-2.5.4.rb
36 lines (28 loc) · 978 Bytes
/
rubinius-2.5.4.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'formula'
class Rubinius254 < Formula
homepage 'http://rubini.us/'
url 'https://downloads-rubini-us.s3.amazonaws.com/homebrew/rubinius-2.5.4.tar.bz2'
sha256 'fb0bba6507c2e32e2f645cffb712ff7c2521f4919bccdf60984ea0596a5f99c4'
depends_on 'libyaml'
depends_on :arch => :x86_64
depends_on :macos => :yosemite
keg_only "Conflicts with MRI (Matz's Ruby Implementation)."
def install
# We must install chruby first because eg bin.install moves files.
rbx = "rbx-#{version}"
rubies = File.expand_path "~/.rubies"
rubies_rbx = "#{rubies}/#{rbx}"
if Dir.exist? rubies and not Dir.exist? rubies_rbx
ohai "Installing for chruby..."
mkdir_p rubies_rbx
cp_r Dir["#{buildpath}/*"], rubies_rbx
end
bin.install Dir["bin/*"]
lib.install Dir["lib/*"]
include.install Dir["include/*"]
man1.install Dir["man/man1/*"]
end
test do
assert_equal 'rbx', `"#{bin}/rbx" -e "puts RUBY_ENGINE"`.chomp
end
end