2012-01-23 19:34:07 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rust < Formula
|
|
|
|
homepage 'http://www.rust-lang.org/'
|
2013-07-03 19:27:55 +00:00
|
|
|
url 'http://static.rust-lang.org/dist/rust-0.7.tar.gz'
|
|
|
|
sha256 '0b88b8a4489382e0a69214eaab88e2e7c316ec33c164af0d3b53630b17590df0'
|
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
|
|
|
|
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}"]
|
|
|
|
args << "--enable-clang" if ENV.compiler == :clang
|
|
|
|
system "./configure", *args
|
2012-01-23 19:34:07 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/rustc"
|
|
|
|
system "#{bin}/rustdoc"
|
2013-06-12 14:23:19 +00:00
|
|
|
system "#{bin}/rustpkg"
|
2012-01-23 19:34:07 +00:00
|
|
|
end
|
|
|
|
end
|