2012-12-24 10:24:33 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Plplot < Formula
|
|
|
|
homepage 'http://plplot.sourceforge.net'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/plplot/plplot/5.9.11%20Source/plplot-5.9.11.tar.gz'
|
2014-01-16 06:51:35 +00:00
|
|
|
sha1 'cfe7e8085ca054d484b24598636d4a5dcbf357c6'
|
2012-12-24 10:24:33 +00:00
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'pango'
|
2014-01-20 01:54:27 +00:00
|
|
|
depends_on :x11 => :optional
|
2012-12-24 10:24:33 +00:00
|
|
|
|
2013-11-19 12:44:12 +00:00
|
|
|
option 'with-java'
|
|
|
|
|
2012-12-24 10:24:33 +00:00
|
|
|
def install
|
2013-11-19 12:44:12 +00:00
|
|
|
args = std_cmake_args
|
2013-11-23 21:10:45 +00:00
|
|
|
args << '-DPLD_wxwidgets=OFF' << '-DENABLE_wxwidgets=OFF'
|
2013-11-19 12:44:12 +00:00
|
|
|
args << '-DENABLE_java=OFF' unless build.with? 'java'
|
2014-01-20 01:54:27 +00:00
|
|
|
args << '-DPLD_xcairo=OFF' unless MacOS::X11.installed?
|
2012-12-24 10:24:33 +00:00
|
|
|
mkdir "plplot-build" do
|
2013-11-19 12:44:12 +00:00
|
|
|
system "cmake", "..", *args
|
2012-12-24 10:24:33 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|