dmd 2.076.0

Closes #17499.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
John Colvin 2017-09-01 16:19:51 +01:00 committed by ilovezfs
parent 80cb108e6d
commit d103adc5cb

View file

@ -3,22 +3,22 @@ class Dmd < Formula
homepage "https://dlang.org/"
stable do
url "https://github.com/dlang/dmd/archive/v2.075.1.tar.gz"
sha256 "98f3851c744b5cece97821aa371b7e690f7dfa1086b929385ae79e567664e89e"
url "https://github.com/dlang/dmd/archive/v2.076.0.tar.gz"
sha256 "5c65be56012d352f204cc692c6517c95f09518bde92d136e8f9ca5a75700e188"
resource "druntime" do
url "https://github.com/dlang/druntime/archive/v2.075.1.tar.gz"
sha256 "5635347bff625522d50707352588d8e43d53618486f5322cc69100e97f4d2d3f"
url "https://github.com/dlang/druntime/archive/v2.076.0.tar.gz"
sha256 "8696070aa7d1e92e7ec130d58ff18b5ab35d701dc5299f1fb604140dee979c78"
end
resource "phobos" do
url "https://github.com/dlang/phobos/archive/v2.075.1.tar.gz"
sha256 "94ba75e996904e890889b1bbe73eb8ba7dca5982cb3c6574ae7cad26384fa87c"
url "https://github.com/dlang/phobos/archive/v2.076.0.tar.gz"
sha256 "7e9ca04f18bc8711c7bfd0b44b0ba30d1c6356eaadeb54c812c3d9241200ad19"
end
resource "tools" do
url "https://github.com/dlang/tools/archive/v2.075.1.tar.gz"
sha256 "ba3ea0925f05b0a5d730c13f0ceae4000942157ae78e1afc4c214d55b9cbc60c"
url "https://github.com/dlang/tools/archive/v2.076.0.tar.gz"
sha256 "5f58dc6492e1abb539291a5fbf2bfb06eed818bd158912f090b55cd712c2a34a"
end
end
@ -28,30 +28,6 @@ class Dmd < Formula
sha256 "48df5506973862c14a85a7fb1da6f12b335da3abe977851a98047974ad4a278e" => :yosemite
end
devel do
url "https://github.com/dlang/dmd/archive/v2.076.0-b1.tar.gz"
version "2.076.0-b1"
sha256 "4239a110bd879ebaa137b06f7e8d5b1f7be89906407014a6c78af0e9428f40c8"
resource "druntime" do
url "https://github.com/dlang/druntime/archive/v2.076.0-b1.tar.gz"
version "2.076.0-b1"
sha256 "c87d68a82f733d1922ec9f0bae9eedc4ed8a4b6efca372818429198deecc5b3c"
end
resource "phobos" do
url "https://github.com/dlang/phobos/archive/v2.076.0-b1.tar.gz"
version "2.076.0-b1"
sha256 "985dcb145b649614601d7fd1e3608bb7d1f04ce006db130740910e43335f8718"
end
resource "tools" do
url "https://github.com/dlang/tools/archive/v2.076.0-b1.tar.gz"
version "2.076.0-b1"
sha256 "e325545812d4b822d4850af38d293cf0405fc53902723b42656733bd93368a59"
end
end
head do
url "https://github.com/dlang/dmd.git"
@ -77,63 +53,31 @@ class Dmd < Formula
prefix.install "samples"
man.install Dir["docs/man/*"]
if build.stable?
# A proper dmd.conf is required for later build steps:
conf = buildpath/"dmd.conf"
# Can't use opt_include or opt_lib here because dmd won't have been
# linked into opt by the time this build runs:
conf.write <<-EOS.undent
[Environment]
DFLAGS=-I#{include}/dlang/dmd -L-L#{lib}
EOS
etc.install conf
install_new_dmd_conf
make_args.unshift "DMD_DIR=#{buildpath}", "DRUNTIME_PATH=#{buildpath}/druntime", "PHOBOS_PATH=#{buildpath}/phobos"
(buildpath/"druntime").install resource("druntime")
(buildpath/"phobos").install resource("phobos")
system "make", "-C", "druntime", *make_args
system "make", "-C", "phobos", "VERSION=#{buildpath}/VERSION", *make_args
make_args.unshift "DMD=#{bin}/dmd"
(buildpath/"druntime").install resource("druntime")
(buildpath/"phobos").install resource("phobos")
system "make", "-C", "druntime", *make_args
system "make", "-C", "phobos", "VERSION=#{buildpath}/VERSION", *make_args
(include/"dlang/dmd").install Dir["druntime/import/*"]
cp_r ["phobos/std", "phobos/etc"], include/"dlang/dmd"
lib.install Dir["druntime/lib/*", "phobos/**/libphobos2.a"]
resource("tools").stage do
inreplace "posix.mak", "install: $(TOOLS) $(CURL_TOOLS)", "install: $(TOOLS) $(ROOT)/dustmite"
system "make", "install", *make_args
end
else
make_args.unshift "DMD_DIR=#{buildpath}", "DRUNTIME_PATH=#{buildpath}/druntime", "PHOBOS_PATH=#{buildpath}/phobos"
(buildpath/"druntime").install resource("druntime")
(buildpath/"phobos").install resource("phobos")
system "make", "-C", "druntime", *make_args
system "make", "-C", "phobos", "VERSION=#{buildpath}/VERSION", *make_args
resource("tools").stage do
inreplace "posix.mak", "install: $(TOOLS) $(CURL_TOOLS)", "install: $(TOOLS) $(ROOT)/dustmite"
system "make", "install", *make_args
end
(include/"dlang/dmd").install Dir["druntime/import/*"]
cp_r ["phobos/std", "phobos/etc"], include/"dlang/dmd"
lib.install Dir["druntime/lib/*", "phobos/**/libphobos2.a"]
(buildpath/"dmd.conf").write <<-EOS.undent
[Environment]
DFLAGS=-I#{opt_include}/dlang/dmd -L-L#{opt_lib}
EOS
etc.install "dmd.conf"
resource("tools").stage do
inreplace "posix.mak", "install: $(TOOLS) $(CURL_TOOLS)", "install: $(TOOLS) $(ROOT)/dustmite"
system "make", "install", *make_args
end
(include/"dlang/dmd").install Dir["druntime/import/*"]
cp_r ["phobos/std", "phobos/etc"], include/"dlang/dmd"
lib.install Dir["druntime/lib/*", "phobos/**/libphobos2.a"]
(buildpath/"dmd.conf").write <<-EOS.undent
[Environment]
DFLAGS=-I#{opt_include}/dlang/dmd -L-L#{opt_lib}
EOS
etc.install "dmd.conf"
end
# Previous versions of this formula may have left in place an incorrect
# dmd.conf. If it differs from the newly generated one, move it out of place
# and warn the user.
# This must be idempotent because it may run from both install() and
# post_install() if the user is running `brew install --build-from-source`.
def install_new_dmd_conf
conf = etc/"dmd.conf"