infer 0.9.4
Add `-no-graphics` to OPAM's configure options for OCaml to avoid build failure when XQuartz is installed. Closes #7057. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
b8ae4683c3
commit
6007b4ee6c
1 changed files with 9 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
|||
class Infer < Formula
|
||||
desc "Static analyzer for Java, C and Objective-C"
|
||||
homepage "http://fbinfer.com/"
|
||||
url "https://github.com/facebook/infer/releases/download/v0.9.2/infer-osx-v0.9.2.tar.xz"
|
||||
sha256 "3935f8be25982a023aba306b66804d73a7316ab833296277c1ec6c3694bfc7c7"
|
||||
url "https://github.com/facebook/infer/releases/download/v0.9.4/infer-osx-v0.9.4.tar.xz"
|
||||
sha256 "529d147bccf3285ddb7500c22e0c50d6e0cbdb2c7f9b11a84e8005873994b3e2"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -17,6 +17,7 @@ class Infer < Formula
|
|||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "ocaml" => :build
|
||||
depends_on "opam" => :build
|
||||
|
||||
def install
|
||||
|
@ -24,7 +25,7 @@ class Infer < Formula
|
|||
odie "infer: --without-clang and --without-java are mutually exclusive"
|
||||
end
|
||||
|
||||
opamroot = buildpath/"build"
|
||||
opamroot = buildpath/"opamroot"
|
||||
opamroot.mkpath
|
||||
ENV["OPAMROOT"] = opamroot
|
||||
ENV["OPAMYES"] = "1"
|
||||
|
@ -44,8 +45,12 @@ class Infer < Formula
|
|||
"all"
|
||||
end
|
||||
|
||||
system "opam", "init", "--no-setup"
|
||||
ocaml_version = File.read("build-infer.sh").match(/OCAML_VERSION=\"([0-9\.]+)\"/)[1]
|
||||
inreplace "#{opamroot}/compilers/#{ocaml_version}/#{ocaml_version}/#{ocaml_version}.comp",
|
||||
'["./configure"', '["./configure" "-no-graph"'
|
||||
system "./build-infer.sh", target_platform, "--yes"
|
||||
system "opam", "config", "exec", "--switch=infer-4.02.3", "--", "make", "install"
|
||||
system "opam", "config", "exec", "--switch=infer-#{ocaml_version}", "--", "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in a new issue