aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/povray.rb
blob: 649a9764f981f16c123fc74eeb472433b6c614fe (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
require 'formula'

class Povray < Formula
  url 'http://www.povray.org/ftp/pub/povray/Official/Unix/povray-3.6.1.tar.bz2'
  homepage 'http://www.povray.org/'
  md5 'b5789bb7eeaed0809c5c82d0efda571d'

  depends_on 'libtiff' => :optional
  depends_on 'jpeg' => :optional

  if MACOS_VERSION == 10.5
    fails_with_llvm "povray fails with 'terminate called after throwing an instance of int'"
  end

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "COMPILED_BY=homebrew",
                          "--prefix=#{prefix}",
                          "--mandir=#{man}"
    system "make install"
  end

  def test
    ohai "Rendering all test scenes; this may take a while"
    mktemp do
      system "#{share}/povray-3.6/scripts/allscene.sh -o ."
    end
  end
end