From 2ff2cf28f858290f50b17bf2f3eb133564438434 Mon Sep 17 00:00:00 2001 From: Martin Schumann Date: Mon, 2 May 2016 20:35:38 +0200 Subject: [PATCH] ocamlbuild 0.9.2 Since Ocaml 4.03.0, ocamlbuild is no longer part of ocaml, but is still required for other packages, so it is installed separately Updated camlp4 to depend on ocamlbuild for compilation --- Formula/camlp4.rb | 2 ++ Formula/ocamlbuild.rb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Formula/ocamlbuild.rb diff --git a/Formula/camlp4.rb b/Formula/camlp4.rb index b14c21b13b..1b3102eaf5 100644 --- a/Formula/camlp4.rb +++ b/Formula/camlp4.rb @@ -14,6 +14,8 @@ class Camlp4 < Formula end depends_on "ocaml" + # since Ocaml 4.03.0, ocamlbuild is no longer part of ocaml + depends_on "ocamlbuild" def install # this build fails if jobs are parallelized diff --git a/Formula/ocamlbuild.rb b/Formula/ocamlbuild.rb new file mode 100644 index 0000000000..4877b67bed --- /dev/null +++ b/Formula/ocamlbuild.rb @@ -0,0 +1,19 @@ +class Ocamlbuild < Formula + desc "Generic build tool for OCaml" + homepage "https://github.com/ocaml/ocamlbuild" + url "https://github.com/ocaml/ocamlbuild/archive/0.9.2.tar.gz" + sha256 "257a3961da1aa47deb3de8da238ebe1daf13a73efef2228f97a064a90f91c6bc" + head "https://github.com/ocaml/ocamlbuild.git" + + depends_on "ocaml" + + def install + system "make", "configure", "OCAMLBUILD_BINDIR=#{bin}", "OCAMLBUILD_LIBDIR=#{lib}" + system "make" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ocamlbuild --version") + end +end