homebrew-core/Formula/plplot.rb
Stefan 48f50b1cc0 plplot: disable xcairo if X11 is not installed.
Closes Homebrew/homebrew#26041.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-01-29 16:12:26 +01:00

26 lines
726 B
Ruby

require 'formula'
class Plplot < Formula
homepage 'http://plplot.sourceforge.net'
url 'http://downloads.sourceforge.net/project/plplot/plplot/5.9.11%20Source/plplot-5.9.11.tar.gz'
sha1 'cfe7e8085ca054d484b24598636d4a5dcbf357c6'
depends_on 'cmake' => :build
depends_on 'pkg-config' => :build
depends_on 'pango'
depends_on :x11 => :optional
option 'with-java'
def install
args = std_cmake_args
args << '-DPLD_wxwidgets=OFF' << '-DENABLE_wxwidgets=OFF'
args << '-DENABLE_java=OFF' unless build.with? 'java'
args << '-DPLD_xcairo=OFF' unless MacOS::X11.installed?
mkdir "plplot-build" do
system "cmake", "..", *args
system "make"
system "make install"
end
end
end