diff options
Diffstat (limited to 'Library/Formula/gnuplot.rb')
| -rw-r--r-- | Library/Formula/gnuplot.rb | 109 |
1 files changed, 48 insertions, 61 deletions
diff --git a/Library/Formula/gnuplot.rb b/Library/Formula/gnuplot.rb index 2cc500e89..7f541c170 100644 --- a/Library/Formula/gnuplot.rb +++ b/Library/Formula/gnuplot.rb @@ -1,13 +1,13 @@ class LuaRequirement < Requirement fatal true - default_formula 'lua' - satisfy { which 'lua' } + default_formula "lua" + satisfy { which "lua" } end class Gnuplot < Formula - homepage 'http://www.gnuplot.info' - url 'https://downloads.sourceforge.net/project/gnuplot/gnuplot/4.6.6/gnuplot-4.6.6.tar.gz' - sha256 '1f19596fd09045f22225afbfec11fa91b9ad1d95b9f48406362f517d4f130274' + homepage "http://www.gnuplot.info" + url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.0/gnuplot-5.0.0.tar.gz" + sha256 "417d4bc5bc914a60409bb75cf18dd14f48b07f53c6ad3c4a4d3cd9a8d7370faf" bottle do revision 1 @@ -24,33 +24,37 @@ class Gnuplot < Formula depends_on "libtool" => :build end - option 'pdf', 'Build the PDF terminal using pdflib-lite' - option 'wx', 'Build the wxWidgets terminal using pango' - option 'qt', 'Build the Qt4 terminal' - option 'cairo', 'Build the Cairo based terminals' - option 'nolua', 'Build without the lua/TikZ terminal' - option 'nogd', 'Build without gd support' - option 'tests', 'Verify the build with make check (1 min)' - option 'without-emacs', 'Do not build Emacs lisp files' - option 'latex', 'Build with LaTeX support' - option 'with-aquaterm', 'Build with AquaTerm support' + option "with-cairo", "Build the Cairo based terminals" + option "without-lua", "Build without the lua/TikZ terminal" + option "with-tests", "Verify the build with make check (1 min)" + option "without-emacs", "Do not build Emacs lisp files" + option "with-latex", "Build with LaTeX support" + option "with-aquaterm", "Build with AquaTerm support" deprecated_option "with-x" => "with-x11" - - depends_on 'pkg-config' => :build - depends_on LuaRequirement unless build.include? 'nolua' - depends_on 'readline' + deprecated_option "pdf" => "with-pdflib-lite" + deprecated_option "wx" => "with-wxmac" + deprecated_option "qt" => "with-qt" + deprecated_option "nogd" => "without-gd" + deprecated_option "cairo" => "with-cairo" + deprecated_option "nolua" => "without-lua" + deprecated_option "tests" => "with-tests" + deprecated_option "latex" => "with-latex" + + depends_on "pkg-config" => :build + depends_on LuaRequirement if build.with? "lua" + depends_on "readline" depends_on "libpng" depends_on "jpeg" depends_on "libtiff" depends_on "fontconfig" - depends_on 'pango' if build.include? 'cairo' or build.include? 'wx' + depends_on "pango" if (build.with? "cairo") || (build.with? "wxmac") depends_on :x11 => :optional - depends_on 'pdflib-lite' if build.include? 'pdf' - depends_on 'gd' unless build.include? 'nogd' - depends_on 'wxmac' if build.include? 'wx' - depends_on 'qt' if build.include? 'qt' - depends_on :tex if build.include? 'latex' + depends_on "pdflib-lite" => :optional + depends_on "gd" => :recommended + depends_on "wxmac" => :optional + depends_on "qt" => :optional + depends_on :tex if build.with? "latex" def install if build.with? "aquaterm" @@ -59,18 +63,6 @@ class Gnuplot < Formula # when building against an SDK (Nov 2013). ENV.prepend "CPPFLAGS", "-F/Library/Frameworks" ENV.prepend "LDFLAGS", "-F/Library/Frameworks" - - unless build.head? - # Fix up Gnuplot v4.6.x to accommodate framework style linking. This is - # required with a standard install of AquaTerm 1.1.1 and is supported under - # earlier versions of AquaTerm. Refer: - # https://github.com/AquaTerm/AquaTerm/blob/v1.1.1/aquaterm/ReleaseNotes#L1-11 - # https://github.com/AquaTerm/AquaTerm/blob/v1.1.1/aquaterm/INSTALL#L7-15 - inreplace "configure", "-laquaterm", "-framework AquaTerm" - inreplace "term/aquaterm.trm", "<aquaterm/AQTAdapter.h>", "<AquaTerm/AQTAdapter.h>" - end - elsif !build.head? - inreplace "configure", "-laquaterm", "" end # Help configure find libraries @@ -85,35 +77,30 @@ class Gnuplot < Formula --with-readline=#{readline} ] - args << "--with-pdf=#{pdflib}" if build.include? 'pdf' - args << '--with' + ((build.include? 'nogd') ? 'out-gd' : "-gd=#{gd}") - args << '--disable-wxwidgets' unless build.include? 'wx' - args << '--without-cairo' unless build.include? 'cairo' - args << '--enable-qt' if build.include? 'qt' - args << '--without-lua' if build.include? 'nolua' - args << '--without-lisp-files' if build.without? "emacs" - args << (build.with?('aquaterm') ? '--with-aquaterm' : '--without-aquaterm') - - if build.with? "x11" - args << "--with-x" - else - args << "--without-x" - end - - if build.include? 'latex' - args << '--with-latex' - args << '--with-tutorial' + args << "--with-pdf=#{pdflib}" if build.with? "pdflib-lite" + args << ((build.with? "gd") ? "--with-gd=#{gd}" : "--without-gd") + args << "--disable-wxwidgets" if build.without? "wxmac" + args << "--without-cairo" if build.without? "cairo" + args << "--enable-qt" if build.with? "qt" + args << "--without-lua" if build.without? "lua" + args << "--without-lisp-files" if build.without? "emacs" + args << ((build.with? "aquaterm") ? "--with-aquaterm" : "--without-aquaterm") + args << ((build.with? "x11") ? "--with-x" : "--without-x") + + if build.with? "latex" + args << "--with-latex" + args << "--with-tutorial" else - args << '--without-latex' - args << '--without-tutorial' + args << "--without-latex" + args << "--without-tutorial" end - system './prepare' if build.head? + system "./prepare" if build.head? system "./configure", *args ENV.j1 # or else emacs tries to edit the same file with two threads - system 'make' - system 'make check' if build.include? 'tests' # Awesome testsuite - system "make install" + system "make" + system "make", "check" if build.with? "tests" # Awesome testsuite + system "make", "install" end test do |
