diff options
| author | Matthew R Becker | 2014-06-07 01:15:13 -0700 |
|---|---|---|
| committer | Misty De Meo | 2014-06-07 12:29:05 -0700 |
| commit | e6fbd214fe8047ac027f7c70b3ef41befea52671 (patch) | |
| tree | b885fef6b075ae1f0013ec16fb4bb45e56220149 | |
| parent | 10b712101818677a4f878ecd9274e1f3e3e82653 (diff) | |
| download | homebrew-e6fbd214fe8047ac027f7c70b3ef41befea52671.tar.bz2 | |
plotutils: add optional X11 support
Closes #29951.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
| -rw-r--r-- | Library/Formula/plotutils.rb | 11 |
1 files changed, 8 insertions, 3 deletions
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 |
