homebrew-core/Formula/povray.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

30 lines
898 B
Ruby

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/'
sha1 '1fab3ccbdedafbf77e3a66087709bbdf60bc643d'
depends_on 'libtiff' => :optional
depends_on 'jpeg' => :optional
# TODO give this a build number (2326?)
fails_with :llvm do
cause "povray fails with 'terminate called after throwing an instance of int'"
end if MacOS.version == :leopard
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