homebrew-core/Formula/coq.rb

52 lines
1.5 KiB
Ruby
Raw Normal View History

2014-05-25 14:50:13 +00:00
require "formula"
2012-03-13 03:26:25 +00:00
class TransitionalMode < Requirement
2013-01-19 01:30:43 +00:00
fatal true
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
class Coq < Formula
homepage "https://coq.inria.fr/"
url "https://coq.inria.fr/distrib/V8.4pl5/files/coq-8.4pl5.tar.gz"
version "8.4pl5"
sha1 "107717cbaef3a469e8ff775ae54dbbc457935816"
2014-05-25 14:50:13 +00:00
head "git://scm.gforge.inria.fr/coq/coq.git"
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"
def install
2014-05-25 14:50:13 +00:00
camlp5_lib = Formula["camlp5"].opt_lib+"ocaml/camlp5"
system "./configure", "-prefix", prefix,
"-mandir", man,
"-camlp5dir", camlp5_lib,
"-emacslib", "#{lib}/emacs/site-lisp",
"-coqdocdir", "#{share}/coq/latex",
"-coqide", "no",
"-with-doc", "no"
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"
end
2012-03-13 03:26:25 +00:00
def caveats; <<-EOS.undent
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
To use the Coq Emacs mode, you need to put the following lines in
your .emacs file:
(setq auto-mode-alist (cons '("\\\\.v$" . coq-mode) auto-mode-alist))
(autoload 'coq-mode "coq" "Major mode for editing Coq vernacular." t)
EOS
end
end