2010-09-30 19:31:04 +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
|
|
|
|
|
2013-01-20 02:45:59 +00:00
|
|
|
satisfy do
|
|
|
|
# If not installed, it will install in the correct mode.
|
|
|
|
# If installed, make sure it is transitional instead of strict.
|
|
|
|
!which('camlp5') || `camlp5 -pmode 2>&1`.chomp == 'transitional'
|
|
|
|
end
|
|
|
|
|
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
|
2012-03-13 03:26:25 +00:00
|
|
|
homepage 'http://coq.inria.fr/'
|
2013-04-07 19:18:35 +00:00
|
|
|
url 'http://coq.inria.fr/distrib/V8.4pl2/files/coq-8.4pl2.tar.gz'
|
2013-04-05 20:15:52 +00:00
|
|
|
version '8.4pl2'
|
|
|
|
sha1 'adcef430b8e27663e8ea075e646112f7d4d51fa6'
|
2010-09-30 19:31:04 +00:00
|
|
|
|
2012-09-14 18:05:55 +00:00
|
|
|
head 'svn://scm.gforge.inria.fr/svn/coq/trunk'
|
2010-12-03 20:44:55 +00:00
|
|
|
|
2013-01-27 22:42:01 +00:00
|
|
|
depends_on TransitionalMode
|
2010-09-30 19:31:04 +00:00
|
|
|
depends_on 'objective-caml'
|
|
|
|
depends_on 'camlp5'
|
|
|
|
|
|
|
|
def install
|
|
|
|
camlp5_lib = Formula.factory('camlp5').lib+'ocaml/camlp5'
|
|
|
|
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
|
2011-07-02 03:09:03 +00:00
|
|
|
system "make world"
|
2010-09-30 19:31:04 +00:00
|
|
|
system "make install"
|
|
|
|
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
|
|
|
|
#{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:
|
|
|
|
(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
|