From 4ce8717a18bbec90cc07e07dfa296effabdc7bb4 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Fri, 24 Aug 2012 16:00:07 -0700 Subject: graphviz: Building GraphViz.app is now optional Building GraphViz.app requires a full install of XCode.app so building it by default breaks the installation for users who only install the Command Line Tools. Fixes #14431. --- Library/Formula/graphviz.rb | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'Library') diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb index 10ab5cb18..de4f574ec 100644 --- a/Library/Formula/graphviz.rb +++ b/Library/Formula/graphviz.rb @@ -8,12 +8,14 @@ class Graphviz < Formula option :universal option 'with-bindings', 'Build Perl/Python/Ruby/etc. bindings' option 'with-pangocairo', 'Build with Pango/Cairo for alternate PDF output' + option 'with-app', 'Build GraphViz.app (requires full XCode install)' depends_on :libpng depends_on 'pkg-config' => :build depends_on 'pango' if build.include? 'with-pangocairo' depends_on 'swig' if build.include? 'with-bindings' + depends_on :xcode if build.include? 'with-app' fails_with :clang do build 318 @@ -38,11 +40,14 @@ class Graphviz < Formula system "./configure", *args system "make install" - # build Graphviz.app - cd "macosx" do - system "xcodebuild", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES" + if build.include? 'with-app' + # build Graphviz.app + cd "macosx" do + system "xcodebuild", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES" + end + prefix.install "macosx/build/Release/Graphviz.app" end - prefix.install "macosx/build/Release/Graphviz.app" + (bin+'gvmap.sh').unlink end @@ -59,13 +64,16 @@ class Graphviz < Formula end end - def caveats; <<-EOS - Graphviz.app was installed in: - #{prefix} + def caveats + if build.include? 'with-app' + <<-EOS + Graphviz.app was installed in: + #{prefix} - To symlink into ~/Applications, you can do: - brew linkapps - EOS + To symlink into ~/Applications, you can do: + brew linkapps + EOS + end end end -- cgit v1.2.3