2014-08-18 17:24:41 +00:00
|
|
|
class Ldc < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Portable D programming language compiler"
|
2014-08-18 17:24:41 +00:00
|
|
|
homepage "http://wiki.dlang.org/LDC"
|
2015-10-28 08:56:33 +00:00
|
|
|
url "https://github.com/ldc-developers/ldc/releases/download/v0.16.1/ldc-0.16.1-src.tar.gz"
|
|
|
|
sha256 "e66cea99f0b1406bbd265ad5fe6aa1412bae31ac86d8a678eb6751f304b6f95b"
|
2015-07-26 21:59:28 +00:00
|
|
|
|
|
|
|
head "https://github.com/ldc-developers/ldc.git", :shallow => false
|
2015-03-26 11:40:30 +00:00
|
|
|
|
2014-08-18 17:41:27 +00:00
|
|
|
bottle do
|
2015-10-28 09:03:30 +00:00
|
|
|
sha256 "d358950e5bc80c8c51303b033f20f68496c65c15cdb74a06c8ad7b386ca9907b" => :el_capitan
|
|
|
|
sha256 "0ed16e8ad04729ce88eef3ee436fbe14acf99941fffbcffa40b94724c105176a" => :yosemite
|
|
|
|
sha256 "0d1f8e211e525e8eb106aa1ec6553240d8813e82dfec8bca0adc3cda590fc9a8" => :mavericks
|
2014-08-18 17:41:27 +00:00
|
|
|
end
|
|
|
|
|
2014-12-15 10:24:25 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2014-08-18 17:24:41 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "llvm" => :build
|
|
|
|
depends_on "libconfig"
|
|
|
|
|
|
|
|
def install
|
2014-12-15 10:24:25 +00:00
|
|
|
ENV.cxx11
|
2014-08-18 17:24:41 +00:00
|
|
|
mkdir "build"
|
|
|
|
cd "build" do
|
|
|
|
system "cmake", "..", *std_cmake_args
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.d").write <<-EOS.undent
|
|
|
|
import std.stdio;
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
writeln("Hello, world!");
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
|
2015-07-26 21:59:28 +00:00
|
|
|
system "#{bin}/ldc2", "test.d"
|
2014-08-18 17:24:41 +00:00
|
|
|
system "./test"
|
2015-07-26 21:59:28 +00:00
|
|
|
system "#{bin}/ldmd2", "test.d"
|
2014-08-18 17:24:41 +00:00
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|