From 782247d548ee824d0c6f4009cbf5b1f9b2a7fc0d Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 27 Oct 2014 18:40:14 +0000 Subject: ocaml 4.02.1: make X11 optional by default This disables the little-used Graphics module by default, but leaves it installable via a `--with-x11` option in the package. --- Library/Formula/objective-caml.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/objective-caml.rb b/Library/Formula/objective-caml.rb index e947552ef..64f9cb3c5 100644 --- a/Library/Formula/objective-caml.rb +++ b/Library/Formula/objective-caml.rb @@ -6,8 +6,10 @@ class ObjectiveCaml < Formula sha1 "6af8c67f2badece81d8e1d1ce70568a16e42313e" head "http://caml.inria.fr/svn/ocaml/trunk", :using => :svn + revision 1 - depends_on :x11 => :recommended + option 'without-x11', 'Install without the Graphics module' + depends_on :x11 => :optional bottle do revision 5 @@ -17,12 +19,17 @@ class ObjectiveCaml < Formula end def install - system "./configure", "--prefix", HOMEBREW_PREFIX, - "--mandir", man, - "-cc", ENV.cc, - "-with-debug-runtime", - "-aspp", "#{ENV.cc} -c" + args = %W[ + --prefix #{HOMEBREW_PREFIX} + --mandir #{man} + -cc #{ENV.cc} + -with-debug-runtime + ] + args << "-aspp" << "#{ENV.cc} -c" + args << "-no-graph" if build.without?("x11") + ENV.deparallelize # Builds are not parallel-safe, esp. with many cores + system "./configure", *args system "make world" system "make opt" system "make opt.opt" -- cgit v1.2.3