homebrew-core/Formula/rust.rb

29 lines
676 B
Ruby
Raw Normal View History

require 'formula'
class Rust < Formula
homepage 'http://www.rust-lang.org/'
url 'http://static.rust-lang.org/dist/rust-0.9.tar.gz'
sha1 '6c5ef4c3c87a1b424510e41ad95dd17981b707b3'
head 'https://github.com/mozilla/rust.git'
fails_with :clang do
build 318
cause "cannot initialize a parameter of type 'volatile long long *' with an rvalue of type 'int *'"
end
def install
args = ["--prefix=#{prefix}"]
args << "--enable-clang" if ENV.compiler == :clang
system "./configure", *args
system "make"
system "make install"
end
def test
system "#{bin}/rustc"
system "#{bin}/rustdoc -h"
system "#{bin}/rustpkg -v"
end
end