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
|
2012-08-28 22:24:01 +00:00
|
|
|
homepage 'http://www.ocaml-lang.org'
|
2012-10-08 20:54:36 +00:00
|
|
|
url 'http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1.tar.bz2'
|
|
|
|
sha1 '10b8a4d0b88d20b003e3dd719f2ac9434e6a1042'
|
2012-06-11 00:26:57 +00:00
|
|
|
|
|
|
|
head 'http://caml.inria.fr/svn/ocaml/trunk', :using => :svn
|
|
|
|
|
2012-09-02 08:08:58 +00:00
|
|
|
depends_on :x11 if MacOS::X11.installed?
|
2012-08-29 21:38:21 +00:00
|
|
|
|
2012-10-13 13:50:37 +00:00
|
|
|
bottle do
|
|
|
|
sha1 'b5c2e3a881fa0080725d83a994d30f1ebc2bb99f' => :mountainlion
|
|
|
|
sha1 '0d7ca01705c22e203e9ddff748b944da6cba921b' => :lion
|
|
|
|
sha1 'b485f013972629a06f883e080ee1c71055579288' => :snowleopard
|
|
|
|
end
|
|
|
|
|
2009-09-04 00:44:12 +00:00
|
|
|
def install
|
2012-08-29 02:05:25 +00:00
|
|
|
system "./configure", "--prefix", HOMEBREW_PREFIX,
|
|
|
|
"--mandir", man,
|
|
|
|
"-cc", ENV.cc,
|
2012-10-17 18:28:19 +00:00
|
|
|
"-with-debug-runtime",
|
2012-08-29 02:05:25 +00:00
|
|
|
"-aspp", "#{ENV.cc} -c"
|
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"
|
2012-05-15 18:31:21 +00:00
|
|
|
system "make", "PREFIX=#{prefix}", "install"
|
2010-07-10 20:20:36 +00:00
|
|
|
|
2012-01-30 06:02:28 +00:00
|
|
|
# site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location,
|
|
|
|
# which is mkpath'd by Keg#link when something installs into it
|
2012-08-29 02:05:25 +00:00
|
|
|
ln_s HOMEBREW_PREFIX/"lib/ocaml/site-lib", lib/"ocaml/site-lib"
|
2009-09-04 00:44:12 +00:00
|
|
|
end
|
|
|
|
end
|