homebrew-core/Formula/ldc.rb

52 lines
1.2 KiB
Ruby
Raw Normal View History

2014-08-18 17:24:41 +00:00
require "formula"
class Ldc < Formula
desc "Portable D programming language compiler"
2014-08-18 17:24:41 +00:00
homepage "http://wiki.dlang.org/LDC"
url "https://github.com/ldc-developers/ldc/releases/download/v0.15.1/ldc-0.15.1-src.tar.gz"
sha1 "06db0c07d73bf714e6fc7a4aca4c44123e4a585a"
2014-08-18 17:24:41 +00:00
devel do
url "https://github.com/ldc-developers/ldc/releases/download/v0.15.2-beta1/ldc-0.15.2-beta1-src.tar.gz"
sha1 "cf5b22ea98f4905ad3ba468aedfdce78d194e59d"
version "0.15.2-beta1"
end
bottle do
2014-12-15 13:34:30 +00:00
sha1 "bc329c6a0f9f52d634c99877a6c020436307b941" => :yosemite
sha1 "86d65479ffc178437ed3f0dd0ea05549eede13ed" => :mavericks
sha1 "7a89443907b3d2af67d46f273c0949f0a587c456" => :mountain_lion
end
needs :cxx11
2014-08-18 17:24:41 +00:00
depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on "libconfig"
def install
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
system "#{bin}/ldc2", 'test.d'
system "./test"
system "#{bin}/ldmd2", 'test.d'
system "./test"
end
end