2010-01-30 05:47:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Povray < Formula
|
2010-01-30 05:47:01 +00:00
|
|
|
url 'http://www.povray.org/ftp/pub/povray/Official/Unix/povray-3.6.1.tar.bz2'
|
|
|
|
homepage 'http://www.povray.org/'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '1fab3ccbdedafbf77e3a66087709bbdf60bc643d'
|
2010-01-30 05:47:01 +00:00
|
|
|
|
2010-11-10 04:39:06 +00:00
|
|
|
depends_on 'libtiff' => :optional
|
|
|
|
depends_on 'jpeg' => :optional
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
# TODO give this a build number (2326?)
|
|
|
|
fails_with :llvm do
|
|
|
|
cause "povray fails with 'terminate called after throwing an instance of int'"
|
2012-09-05 04:04:01 +00:00
|
|
|
end if MacOS.version == :leopard
|
2010-02-05 15:12:48 +00:00
|
|
|
|
2012-09-13 01:10:15 +00:00
|
|
|
def patches
|
|
|
|
# povray has issues determining libpng version; can't get it to compile
|
|
|
|
# against system libpng, but it works with its internal libpng.
|
|
|
|
# Look at this again on the next povray version bump!
|
|
|
|
{:p0 => "https://trac.macports.org/export/97719/trunk/dports/graphics/povray/files/patch-configure"}
|
|
|
|
end
|
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2010-04-07 05:58:35 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"COMPILED_BY=homebrew",
|
2010-11-10 04:39:06 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
2010-01-30 05:47:01 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-09-03 21:14:08 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
ohai "Rendering all test scenes; this may take a while"
|
|
|
|
mktemp do
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{share}/povray-3.6/scripts/allscene.sh", "-o", "."
|
2011-09-03 21:14:08 +00:00
|
|
|
end
|
|
|
|
end
|
2010-01-30 05:47:01 +00:00
|
|
|
end
|