2012-01-23 19:34:07 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rust < Formula
|
|
|
|
homepage 'http://www.rust-lang.org/'
|
2014-01-09 23:10:05 +00:00
|
|
|
url 'http://static.rust-lang.org/dist/rust-0.9.tar.gz'
|
|
|
|
sha1 '6c5ef4c3c87a1b424510e41ad95dd17981b707b3'
|
2012-01-23 19:34:07 +00:00
|
|
|
|
2013-06-13 22:44:15 +00:00
|
|
|
head 'https://github.com/mozilla/rust.git'
|
2013-05-24 13:44:31 +00:00
|
|
|
|
2014-01-09 23:48:16 +00:00
|
|
|
bottle do
|
|
|
|
sha1 'faecc6797465be3297554bf18c4b0ff73d27bfb1' => :mavericks
|
|
|
|
sha1 '4546c45d79531e0797af6e7bd9c6b2aaceb8b1e4' => :mountain_lion
|
|
|
|
sha1 '924740d0e449bab18e7f06f263ee2f1ececee5f4' => :lion
|
|
|
|
end
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 318
|
|
|
|
cause "cannot initialize a parameter of type 'volatile long long *' with an rvalue of type 'int *'"
|
|
|
|
end
|
|
|
|
|
2012-01-23 19:34:07 +00:00
|
|
|
def install
|
2012-08-26 03:28:54 +00:00
|
|
|
args = ["--prefix=#{prefix}"]
|
2014-02-13 05:20:27 +00:00
|
|
|
args << "--disable-rpath" if build.head?
|
2012-08-26 03:28:54 +00:00
|
|
|
args << "--enable-clang" if ENV.compiler == :clang
|
|
|
|
system "./configure", *args
|
2012-01-23 19:34:07 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2012-01-23 19:34:07 +00:00
|
|
|
system "#{bin}/rustc"
|
2013-09-27 01:43:55 +00:00
|
|
|
system "#{bin}/rustdoc -h"
|
2014-02-05 18:15:14 +00:00
|
|
|
system "#{bin}/rustpkg -v" unless build.head?
|
2012-01-23 19:34:07 +00:00
|
|
|
end
|
|
|
|
end
|