graphviz: Add build option --with-x

--without-x prevents building useful programs, such as lefty.

Closes Homebrew/homebrew#15555.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Shaun Jackman 2012-10-19 10:59:10 -07:00 committed by Adam Vandenberg
parent af0c831714
commit 935632998e

View file

@ -11,6 +11,7 @@ class Graphviz < Formula
option 'with-bindings', 'Build Perl/Python/Ruby/etc. bindings'
option 'with-pangocairo', 'Build with Pango/Cairo for alternate PDF output'
option 'with-freetype', 'Build with FreeType support'
option 'with-x', 'Build with X11 support'
option 'with-app', 'Build GraphViz.app (requires full XCode install)'
depends_on :libpng
@ -18,7 +19,8 @@ class Graphviz < Formula
depends_on 'pkg-config' => :build
depends_on 'pango' if build.include? 'with-pangocairo'
depends_on 'swig' if build.include? 'with-bindings'
depends_on :freetype if build.include? 'with-freetype'
depends_on :freetype if build.include? 'with-freetype' or MacOS::X11.installed?
depends_on :x11 if build.include? 'with-x' or MacOS::X11.installed?
depends_on :xcode if build.include? 'with-app'
fails_with :clang do
@ -26,8 +28,9 @@ class Graphviz < Formula
end
def patches
{ :p0 => "https://trac.macports.org/export/78507/trunk/dports/graphics/graphviz-gui/files/patch-project.pbxproj.diff",
:p1 => DATA}
{:p0 =>
"https://trac.macports.org/export/78507/trunk/dports/graphics/graphviz-gui/files/patch-project.pbxproj.diff",
:p1 => DATA}
end
def install
@ -36,11 +39,11 @@ class Graphviz < Formula
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--without-qt",
"--without-x",
"--with-quartz"]
args << "--disable-swig" unless build.include? 'with-bindings'
args << "--without-pangocairo" unless build.include? 'with-pangocairo'
args << "--without-freetype2" unless build.include? 'with-freetype'
args << "--without-x" unless build.include? 'with-x' or MacOS::X11.installed?
system "./configure", *args
system "make install"