ldc: revision for llvm

This commit is contained in:
ilovezfs 2017-03-14 04:40:26 -07:00
parent 054d0f733e
commit 6b7c3dd1e2

View file

@ -1,6 +1,7 @@
class Ldc < Formula
desc "Portable D programming language compiler"
homepage "https://wiki.dlang.org/LDC"
revision 1
stable do
url "https://github.com/ldc-developers/ldc/releases/download/v1.1.1/ldc-1.1.1-src.tar.gz"
@ -10,6 +11,14 @@ class Ldc < Formula
url "https://github.com/ldc-developers/ldc/releases/download/v0.17.3/ldc-0.17.3-src.tar.gz"
sha256 "325bd540f7eb71c309fa0ee9ef6d196a75ee2c3ccf323076053e6b7b295c2dad"
end
# Remove for > 1.1.1
# Upstream commit from 26 Feb 2017 "Fix build for LLVM 4.0"
# See https://github.com/ldc-developers/ldc/pull/2017
resource "ldc-lts-patch" do
url "https://github.com/ldc-developers/ldc/commit/4847d8a.patch"
sha256 "7d93765898ce5501eb9660d76e9837682eb0dd38708fa640b6b443b02577a172"
end
end
bottle do
@ -35,6 +44,15 @@ class Ldc < Formula
def install
ENV.cxx11
(buildpath/"ldc-lts").install resource("ldc-lts")
# Remove for > 1.1.1
if build.stable?
resource("ldc-lts-patch").stage do
system "patch", "-p1", "-i", Pathname.pwd/"4847d8a.patch", "-d",
buildpath/"ldc-lts"
end
end
cd "ldc-lts" do
mkdir "build" do
args = std_cmake_args + %W[