From e6fbd214fe8047ac027f7c70b3ef41befea52671 Mon Sep 17 00:00:00 2001 From: Matthew R Becker Date: Sat, 7 Jun 2014 01:15:13 -0700 Subject: plotutils: add optional X11 support Closes #29951. Signed-off-by: Misty De Meo --- Library/Formula/plotutils.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Formula/plotutils.rb b/Library/Formula/plotutils.rb index 216282f2f..402695f4e 100644 --- a/Library/Formula/plotutils.rb +++ b/Library/Formula/plotutils.rb @@ -8,14 +8,19 @@ class Plotutils < Formula revision 1 depends_on 'libpng' + depends_on :x11 => :optional def install # Fix usage of libpng to be 1.5 compatible inreplace 'libplot/z_write.c', 'png_ptr->jmpbuf', 'png_jmpbuf (png_ptr)' - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-libplotter" + args = ["--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-libplotter"] + args << "--with-x" if build.with? "x11" + + system "./configure", *args system "make" system "make install" end -- cgit v1.2.3