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
|
2013-09-12 13:04:13 +00:00
|
|
|
homepage 'http://ocaml.org'
|
|
|
|
url 'http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-4.01.0.tar.gz'
|
|
|
|
sha1 '31ae98051d42e038f4fbc5fd338c4fa5c36744e0'
|
2013-09-05 19:09:17 +00:00
|
|
|
|
2012-06-11 00:26:57 +00:00
|
|
|
head 'http://caml.inria.fr/svn/ocaml/trunk', :using => :svn
|
|
|
|
|
2014-03-18 08:02:47 +00:00
|
|
|
revision 1
|
|
|
|
|
2014-06-03 07:46:31 +00:00
|
|
|
depends_on :x11 => :recommended
|
2012-08-29 21:38:21 +00:00
|
|
|
|
2012-10-13 13:50:37 +00:00
|
|
|
bottle do
|
2014-03-18 08:27:01 +00:00
|
|
|
revision 3
|
|
|
|
sha1 "33e3a1cb87802572e531c801958ca6cdeee4cfbc" => :mavericks
|
|
|
|
sha1 "c418ec76d9f5eba9e1c2151a6e1c89e91da8d212" => :mountain_lion
|
|
|
|
sha1 "7da29c24adfd64772e2c3cca8b8502a1d6ce9fe0" => :lion
|
2012-10-13 13:50:37 +00:00
|
|
|
end
|
|
|
|
|
2014-03-16 22:41:33 +00:00
|
|
|
# recent versions of clang fail with a hard error if -fno-defer-pop
|
2014-06-04 20:59:21 +00:00
|
|
|
# is specified, and older versions warn. This patch fixes the OCaml
|
2014-03-16 22:41:33 +00:00
|
|
|
# configure script to not pass this option on recent MacOS versions.
|
|
|
|
# See http://caml.inria.fr/mantis/view.php?id=6346 for upstream bug.
|
2014-03-20 01:21:16 +00:00
|
|
|
patch :DATA
|
2014-03-16 22:41:33 +00:00
|
|
|
|
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"
|
2014-03-25 16:33:09 +00:00
|
|
|
end
|
2010-07-10 20:20:36 +00:00
|
|
|
|
2014-03-25 16:33:09 +00:00
|
|
|
def post_install
|
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
|
2014-03-25 16:33:09 +00:00
|
|
|
(lib/"ocaml").install_symlink HOMEBREW_PREFIX/"lib/ocaml/site-lib"
|
2009-09-04 00:44:12 +00:00
|
|
|
end
|
|
|
|
end
|
2014-03-16 22:41:33 +00:00
|
|
|
__END__
|
|
|
|
diff --git a/configure b/configure
|
|
|
|
index d45e88f..25d872b 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
|
|
|
@@ -322,7 +322,14 @@ case "$bytecc,$target" in
|
|
|
|
bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
|
|
|
|
mathlib="";;
|
|
|
|
*,*-*-darwin*)
|
|
|
|
- bytecccompopts="-fno-defer-pop $gcc_warnings"
|
|
|
|
+ # On recent version of OSX, gcc is a symlink to clang
|
|
|
|
+ if $bytecc --version | grep -q clang; then
|
|
|
|
+ # -fno-defer-pop is not supported by clang, and make recent
|
|
|
|
+ # versions of clang to fail
|
|
|
|
+ bytecccompopts="$gcc_warnings"
|
|
|
|
+ else
|
|
|
|
+ bytecccompopts="-fno-defer-pop $gcc_warnings"
|
|
|
|
+ fi
|
|
|
|
mathlib=""
|
|
|
|
mkexe="$mkexe -Wl,-no_compact_unwind"
|
|
|
|
# Tell gcc that we can use 32-bit code addresses for threaded code
|