2012-01-23 19:34:07 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rust < Formula
|
|
|
|
homepage 'http://www.rust-lang.org/'
|
2014-04-03 19:40:49 +00:00
|
|
|
url 'http://static.rust-lang.org/dist/rust-0.10.tar.gz'
|
|
|
|
sha1 '20460730047ca6694eeb780d990f566572c32c43'
|
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
|
2014-04-03 20:14:11 +00:00
|
|
|
sha1 "b5b11a57f873c8fd3a794ede207839dcb0bfbe4b" => :mavericks
|
|
|
|
sha1 "ca4d44441ef88c71cd98852c36d15d89e95d9fb7" => :mountain_lion
|
|
|
|
sha1 "507705ef8749dd3cfae781f016e18bfcc09d8947" => :lion
|
2014-01-09 23:48:16 +00:00
|
|
|
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"
|
2014-04-03 19:40:49 +00:00
|
|
|
system "#{bin}/rustdoc", "-h"
|
2012-01-23 19:34:07 +00:00
|
|
|
end
|
|
|
|
end
|