use opam to install ocamlfind temporarily

Closes #7874.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-12-15 05:12:56 -08:00
parent a5bd23e2be
commit aa172e518d

View file

@ -13,10 +13,8 @@ end
class Coq < Formula class Coq < Formula
desc "Proof assistant for higher-order logic" desc "Proof assistant for higher-order logic"
homepage "https://coq.inria.fr/" homepage "https://coq.inria.fr/"
url "https://coq.inria.fr/distrib/8.5pl3/files/coq-8.5pl3.tar.gz" url "https://coq.inria.fr/distrib/V8.6/files/coq-8.6.tar.gz"
version "8.5pl3" sha256 "6e3c3cf5c8e2b0b760dc52738e2e849f3a8c630869659ecc0cf41413fcee81df"
sha256 "305b92e05d406d4d0c64f43d4fadb6b89419120a1d4ae4115ed1c5eb8812d33b"
revision 1
head "git://scm.gforge.inria.fr/coq/coq.git", :branch => "trunk" head "git://scm.gforge.inria.fr/coq/coq.git", :branch => "trunk"
bottle do bottle do
@ -25,13 +23,21 @@ class Coq < Formula
sha256 "17f5b15170776cebc527478b1b6247036682888fe2a270ab614febbd0f1b4326" => :yosemite sha256 "17f5b15170776cebc527478b1b6247036682888fe2a270ab614febbd0f1b4326" => :yosemite
end end
depends_on "opam" => :build
depends_on Camlp5TransitionalModeRequirement depends_on Camlp5TransitionalModeRequirement
depends_on "camlp5" depends_on "camlp5"
depends_on "ocaml" depends_on "ocaml"
def install def install
ENV["OPAMYES"] = "1"
ENV["OPAMROOT"] = Pathname.pwd/"opamroot"
(Pathname.pwd/"opamroot").mkpath
system "opam", "init", "--no-setup"
system "opam", "install", "ocamlfind"
camlp5_lib = Formula["camlp5"].opt_lib/"ocaml/camlp5" camlp5_lib = Formula["camlp5"].opt_lib/"ocaml/camlp5"
system "./configure", "-prefix", prefix, system "opam", "config", "exec", "--",
"./configure", "-prefix", prefix,
"-mandir", man, "-mandir", man,
"-camlp5dir", camlp5_lib, "-camlp5dir", camlp5_lib,
"-emacslib", elisp, "-emacslib", elisp,