2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-04 00:44:12 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class ObjectiveCaml < Formula
|
2011-08-18 18:26:25 +00:00
|
|
|
url 'http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.1.tar.bz2'
|
2010-05-14 21:19:24 +00:00
|
|
|
homepage 'http://caml.inria.fr/ocaml/index.en.html'
|
2011-08-18 18:26:25 +00:00
|
|
|
md5 '227a3daaedb150bf5037a3db01f5bf42'
|
2010-05-14 21:19:24 +00:00
|
|
|
|
2010-11-08 17:13:16 +00:00
|
|
|
# Don't strip symbols, so dynamic linking doesn't break.
|
2010-04-07 05:58:35 +00:00
|
|
|
skip_clean :all
|
2009-09-04 00:44:12 +00:00
|
|
|
|
|
|
|
def install
|
2011-01-16 15:48:48 +00:00
|
|
|
system "./configure", "--prefix", HOMEBREW_PREFIX, "--mandir", man
|
2010-11-08 17:13:16 +00:00
|
|
|
ENV.deparallelize # Builds are not parallel-safe, esp. with many cores
|
2009-09-30 19:38:55 +00:00
|
|
|
system "make world"
|
2009-09-04 00:44:12 +00:00
|
|
|
system "make opt"
|
|
|
|
system "make opt.opt"
|
2011-01-16 15:48:48 +00:00
|
|
|
system "make PREFIX=#{prefix} install"
|
2010-07-10 20:20:36 +00:00
|
|
|
|
|
|
|
# site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location
|
|
|
|
(HOMEBREW_PREFIX+"lib/ocaml/site-lib").mkpath
|
|
|
|
ln_s HOMEBREW_PREFIX+"lib/ocaml/site-lib", lib+"ocaml/site-lib"
|
2009-09-04 00:44:12 +00:00
|
|
|
end
|
|
|
|
end
|