corectl: fix build due to OCaml shift

Closes #41066.

Signed-off-by: Sean Molenaar <smillerdev@me.com>
This commit is contained in:
Caleb Xu 2019-04-25 21:42:48 -04:00 committed by Sean Molenaar
parent 0349638d62
commit eff8a521b5
No known key found for this signature in database
GPG key ID: 6BF5D8DF0D34FAAE

View file

@ -3,7 +3,7 @@ class Corectl < Formula
homepage "https://github.com/TheNewNormal/corectl" homepage "https://github.com/TheNewNormal/corectl"
url "https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz" url "https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz"
sha256 "9bdf7bc8c6a7bd861e2b723c0566d0a093ed5d5caf370a065a1708132b4ab98a" sha256 "9bdf7bc8c6a7bd861e2b723c0566d0a093ed5d5caf370a065a1708132b4ab98a"
revision 1 revision 2
head "https://github.com/TheNewNormal/corectl.git", :branch => "golang" head "https://github.com/TheNewNormal/corectl.git", :branch => "golang"
bottle do bottle do
@ -19,6 +19,7 @@ class Corectl < Formula
depends_on "go" => :build depends_on "go" => :build
depends_on "ocaml" => :build depends_on "ocaml" => :build
depends_on "opam" => :build depends_on "opam" => :build
depends_on :x11 => :build
depends_on "libev" depends_on "libev"
depends_on :macos => :yosemite depends_on :macos => :yosemite
@ -37,18 +38,12 @@ class Corectl < Formula
args << "VERSION=#{version}" if build.stable? args << "VERSION=#{version}" if build.stable?
cd path do cd path do
system "opam", "init", "--no-setup" system "opam", "init", "--no-setup", "--disable-sandboxing"
system "opam", "switch", "create", "ocaml-base-compiler.4.05.0"
# Upstream issue "OCaml 4.05.0 support - cannot build in Homebrew" system "opam", "config", "exec", "--", "opam", "install", "uri.2.2.0",
# Reported 23 Jul 2017 https://github.com/TheNewNormal/corectl/issues/119 "ocamlfind.1.8.0", "qcow-format.0.5.0", "conf-libev.4-11", "io-page.1.6.1",
inreplace "opamroot/compilers/4.04.2/4.04.2/4.04.2.comp", "mirage-block-unix.2.4.0", "lwt.3.0.0"
'["./configure"', '["./configure" "-no-graph"' (opamroot/"system/bin").install_symlink opamroot/"ocaml-base-compiler.4.05.0/bin/qcow-tool"
system "opam", "switch", "4.04.2"
system "opam", "config", "exec", "--", "opam", "install", "uri",
"ocamlfind", "qcow-format", "conf-libev", "io-page<2",
"mirage-block-unix>2.3.0", "lwt<3.1.0"
(opamroot/"system/bin").install_symlink opamroot/"4.04.2/bin/qcow-tool"
system "opam", "config", "exec", "--", "make", "tarball", *args system "opam", "config", "exec", "--", "make", "tarball", *args
bin.install Dir["bin/*"] bin.install Dir["bin/*"]