2014-05-25 14:50:13 +00:00
|
|
|
require "formula"
|
2010-09-30 19:31:04 +00:00
|
|
|
|
2012-03-13 03:26:25 +00:00
|
|
|
class TransitionalMode < Requirement
|
2013-01-19 01:30:43 +00:00
|
|
|
fatal true
|
|
|
|
|
2014-07-30 02:50:24 +00:00
|
|
|
satisfy { !Tab.for_name("camlp5").include?("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/"
|
2015-05-15 21:18:10 +00:00
|
|
|
url "https://coq.inria.fr/distrib/V8.4pl6/files/coq-8.4pl6.tar.gz"
|
|
|
|
version "8.4pl6"
|
|
|
|
sha1 "c89525295659a805661ef91da24ecfb94e226953"
|
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
|
|
|
|
sha256 "c2978c36d4cf84212e5f9d246135f032267b04cfb5bf413620706c7b8be87c1f" => :yosemite
|
|
|
|
sha256 "01b1fe69d4dab5f6c30891f37ce7e8999768784f02685a3a548abe37c5876e0e" => :mavericks
|
|
|
|
sha256 "3dcdec51e2d2402d6ec9bca3f5f1d29a486995fcccfbb46e9b023f18715a4968" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2013-01-27 22:42:01 +00:00
|
|
|
depends_on TransitionalMode
|
2014-05-25 14:50:13 +00:00
|
|
|
depends_on "objective-caml"
|
|
|
|
depends_on "camlp5"
|
2010-09-30 19:31:04 +00:00
|
|
|
|
|
|
|
def install
|
2014-05-25 14:50:13 +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,
|
|
|
|
"-emacslib", "#{lib}/emacs/site-lisp",
|
|
|
|
"-coqdocdir", "#{share}/coq/latex",
|
2012-08-22 19:24:45 +00:00
|
|
|
"-coqide", "no",
|
2012-08-29 17:50:21 +00:00
|
|
|
"-with-doc", "no"
|
2010-09-30 19:31:04 +00:00
|
|
|
ENV.j1 # Otherwise "mkdir bin" can be attempted by more than one job
|
2014-05-25 14:50:13 +00:00
|
|
|
system "make", "world"
|
|
|
|
system "make", "install"
|
2010-09-30 19:31:04 +00:00
|
|
|
end
|
|
|
|
|
2012-03-13 03:26:25 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2010-09-30 19:31:04 +00:00
|
|
|
Coq's Emacs mode is installed into
|
2014-05-25 14:50:13 +00:00
|
|
|
#{opt_lib}/emacs/site-lisp
|
2012-03-13 03:26:25 +00:00
|
|
|
|
2010-09-30 19:31:04 +00:00
|
|
|
To use the Coq Emacs mode, you need to put the following lines in
|
|
|
|
your .emacs file:
|
2014-04-25 00:08:26 +00:00
|
|
|
(setq auto-mode-alist (cons '("\\\\.v$" . coq-mode) auto-mode-alist))
|
2010-09-30 19:31:04 +00:00
|
|
|
(autoload 'coq-mode "coq" "Major mode for editing Coq vernacular." t)
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|