2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-20 16:51:35 +00:00
|
|
|
|
|
|
|
class Gnuplot <Formula
|
2011-02-22 13:13:19 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/gnuplot/gnuplot/4.4.2/gnuplot-4.4.2.tar.gz'
|
2010-05-10 04:18:50 +00:00
|
|
|
homepage 'http://www.gnuplot.info'
|
2011-02-22 13:13:19 +00:00
|
|
|
md5 'a4f0dd89f9b9334890464f687ddd9f50'
|
2010-03-15 12:10:07 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2009-09-20 16:51:35 +00:00
|
|
|
depends_on 'readline'
|
2010-03-23 10:58:39 +00:00
|
|
|
depends_on 'gd' unless ARGV.include? "--nogd"
|
|
|
|
depends_on 'pdflib-lite' if ARGV.include? "--pdf"
|
2009-09-20 16:51:35 +00:00
|
|
|
|
2010-08-10 20:05:20 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--pdf", "Build with pdf support."],
|
|
|
|
["--without-lua", "Build without lua support."],
|
|
|
|
["--nogd", "Build without gd support."]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2009-09-20 16:51:35 +00:00
|
|
|
def install
|
2010-03-15 12:10:07 +00:00
|
|
|
ENV.x11
|
2010-06-16 04:16:40 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-readline=#{prefix}",
|
|
|
|
"--disable-wxwidgets"]
|
|
|
|
args << "--without-lua" if ARGV.include? "--without-lua"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2009-09-20 16:51:35 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|