2015-04-11 18:10:29 +00:00
|
|
|
class Camlp5TransitionalModeRequirement < Requirement
|
2013-01-19 01:30:43 +00:00
|
|
|
fatal true
|
|
|
|
|
2015-10-05 12:40:09 +00:00
|
|
|
satisfy(:build_env => false) { !Tab.for_name("camlp5").with?("strict") }
|
2013-01-20 02:45:59 +00:00
|
|
|
|
2012-03-13 03:26:25 +00:00
|
|
|
def message; <<-EOS.undent
|
|
|
|
camlp5 must be compiled in transitional mode (instead of --strict mode):
|
|
|
|
brew install camlp5
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2010-09-30 19:31:04 +00:00
|
|
|
class Coq < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Proof assistant for higher-order logic"
|
2014-10-31 23:39:27 +00:00
|
|
|
homepage "https://coq.inria.fr/"
|
2016-04-20 15:40:45 +00:00
|
|
|
url "https://coq.inria.fr/distrib/8.5pl1/files/coq-8.5pl1.tar.gz"
|
|
|
|
version "8.5pl1"
|
|
|
|
sha256 "4bfa75b10ae1be61301d0f7bc087b7c24e0b8bd025dd358c75709ac04ddd5df0"
|
2016-05-13 23:54:56 +00:00
|
|
|
revision 1
|
2010-09-30 19:31:04 +00:00
|
|
|
|
2015-05-15 14:05:09 +00:00
|
|
|
head "git://scm.gforge.inria.fr/coq/coq.git", :branch => "trunk"
|
2010-12-03 20:44:55 +00:00
|
|
|
|
2015-05-15 22:19:04 +00:00
|
|
|
bottle do
|
2016-05-14 00:17:24 +00:00
|
|
|
sha256 "76ad5f2d99e653cc9a752b00fe5007615927b2beb8d88e84fa1b309465b46a69" => :el_capitan
|
|
|
|
sha256 "5fe48d7badae317ef4d13d73bca7b4e3a02b9f382b98b9fef066356264a4b13c" => :yosemite
|
|
|
|
sha256 "66f5126d6805da8ae653e1442897c8b3796dd046eba3a9e25684576d221aa10e" => :mavericks
|
2015-05-15 22:19:04 +00:00
|
|
|
end
|
|
|
|
|
2015-04-11 18:10:29 +00:00
|
|
|
depends_on Camlp5TransitionalModeRequirement
|
2014-05-25 14:50:13 +00:00
|
|
|
depends_on "camlp5"
|
2015-09-02 23:43:23 +00:00
|
|
|
depends_on "ocaml"
|
2010-09-30 19:31:04 +00:00
|
|
|
|
|
|
|
def install
|
2016-05-13 23:54:56 +00:00
|
|
|
camlp5_lib = Formula["camlp5"].opt_lib/"ocaml/camlp5"
|
2010-09-30 19:31:04 +00:00
|
|
|
system "./configure", "-prefix", prefix,
|
|
|
|
"-mandir", man,
|
|
|
|
"-camlp5dir", camlp5_lib,
|
2015-07-05 19:33:48 +00:00
|
|
|
"-emacslib", "#{share}/emacs/site-lisp/coq",
|
2016-01-30 15:35:33 +00:00
|
|
|
"-coqdocdir", "#{pkgshare}/latex",
|
2012-08-22 19:24:45 +00:00
|
|
|
"-coqide", "no",
|
2012-08-29 17:50:21 +00:00
|
|
|
"-with-doc", "no"
|
2014-05-25 14:50:13 +00:00
|
|
|
system "make", "world"
|
2016-06-29 21:18:10 +00:00
|
|
|
ENV.deparallelize { system "make", "install" }
|
2010-09-30 19:31:04 +00:00
|
|
|
end
|
|
|
|
|
2016-04-20 15:40:45 +00:00
|
|
|
test do
|
|
|
|
(testpath/"testing.v").write <<-EOS.undent
|
|
|
|
Inductive nat : Set :=
|
|
|
|
| O : nat
|
|
|
|
| S : nat -> nat.
|
|
|
|
Fixpoint add (n m: nat) : nat :=
|
|
|
|
match n with
|
|
|
|
| O => m
|
|
|
|
| S n' => S (add n' m)
|
|
|
|
end.
|
|
|
|
Lemma add_O_r : forall (n: nat), add n O = n.
|
|
|
|
intros n; induction n; simpl; auto; rewrite IHn; auto.
|
|
|
|
Qed.
|
|
|
|
EOS
|
|
|
|
system("#{bin}/coqc", "#{testpath}/testing.v")
|
|
|
|
end
|
2010-09-30 19:31:04 +00:00
|
|
|
end
|