aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/graphviz.rb
blob: 6a9a8e18f2a38c1d753c043e0ef19f2e17f60fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'formula'

class Graphviz < Formula
  url 'http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.26.3.tar.gz'
  md5 '6f45946fa622770c45609778c0a982ee'
  homepage 'http://graphviz.org/'

  depends_on 'pkg-config' => :build

  if ARGV.include? '--with-pdf'
    depends_on 'pango'
    depends_on 'cairo' if MacOS.leopard?
  end

  def options
    [["--with-pdf", "Build with Pango/Cairo to support native PDF output"]]
  end

  def install
    ENV.x11
    # Various language bindings fail with 32/64 issues.
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--disable-quartz",
                          "--disable-java",
                          "--disable-ocaml",
                          "--disable-perl",
                          "--disable-php",
                          "--disable-python",
                          "--disable-r",
                          "--disable-ruby",
                          "--disable-sharp",
                          "--disable-swig"
    system "make install"
  end
end