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-07-09 08:57:39 +00:00
|
|
|
url "https://github.com/ldc-developers/ldc/releases/download/v0.15.2-beta2/ldc-0.15.2-beta2-src.tar.gz"
|
|
|
|
version "0.15.2-beta2"
|
2015-07-26 21:59:28 +00:00
|
|
|
sha256 "b421acbca0cdeef42c5af2bd53060253822dea6d78d216f973ee5e2b362723e2"
|
|
|
|
|
|
|
|
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-07-09 09:30:31 +00:00
|
|
|
sha256 "42429da7c6b69babb33d17797492179faf584cee6a55980f5beba8c79d951c5a" => :yosemite
|
|
|
|
sha256 "0b9aaf9f9f5b8dc05a4a0989ce1d54bd81fe857e36d84d54dee0ba3cad008c09" => :mavericks
|
|
|
|
sha256 "8ea1ad6cbd93ca1b909fdce9ff136fe56ada447cd535840f2684088dcab0fea2" => :mountain_lion
|
2014-08-18 17:41:27 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 20:53:39 +00:00
|
|
|
devel do
|
|
|
|
url "https://github.com/ldc-developers/ldc/releases/download/v0.16.0-alpha2/ldc-0.16.0-alpha2-src.tar.gz"
|
|
|
|
version "0.16.0-alpha2"
|
|
|
|
sha256 "197c6cfdff9444dcea82255321f0da9d1017da9a7b1808eee75bc8793c926623"
|
|
|
|
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
|