aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/plotutils.rb
blob: 57b7b21270c06d71ed0a4a6d8de6ab3ff6ad6cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'formula'

class Plotutils < Formula
  url 'ftp://mirrors.kernel.org/gnu/plotutils/plotutils-2.6.tar.gz'
  homepage 'http://www.gnu.org/software/plotutils/'
  md5 'c08a424bd2438c80a786a7f4b5bb6a40'

  def install
    ENV.x11 # enable libpng support

    # 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"
    system "make"
    system "make install"
  end
end