povray 3.7.0.RC6

Closes Homebrew/homebrew#15576.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
royhodgman 2012-09-25 01:02:43 -04:00 committed by Adam Vandenberg
parent bfc7425499
commit 6e7c3bcda4
1 changed files with 48 additions and 21 deletions

View File

@ -1,37 +1,64 @@
require 'formula' require 'formula'
class NeedsLion < Requirement
fatal true
satisfy MacOS.version >= :lion
def message; <<-EOS.undent
PovRay 3.7.0.RC6 requires Mac OS X 10.7 or newer.
To install on Leopard or Snow Leopard:
brew tap homebrew/versions
brew install povray36
EOS
end
end
class Povray < 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/' homepage 'http://www.povray.org/'
sha1 '1fab3ccbdedafbf77e3a66087709bbdf60bc643d' url 'http://www.povray.org/beta/source/povray-3.7.0.RC6.tar.gz'
version '3.7.0.RC6'
sha256 '374957bdb90fb7be5f36f839b3f04ab0a4340f6e8cf369f658d6592a342803e3'
depends_on 'libtiff' => :optional depends_on NeedsLion.new
depends_on 'jpeg' => :optional depends_on :libpng
depends_on 'boost'
# TODO give this a build number (2326?) depends_on 'jpeg'
fails_with :llvm do depends_on 'libtiff'
cause "povray fails with 'terminate called after throwing an instance of int'" depends_on 'openexr' => :optional
end if MacOS.version == :leopard
def patches def patches
# povray has issues determining libpng version; can't get it to compile {:p0 => [
# against system libpng, but it works with its internal libpng. "http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-boost-1.50.diff",
# Look at this again on the next povray version bump! "http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-configure-stat.diff",
{:p0 => "https://trac.macports.org/export/97719/trunk/dports/graphics/povray/files/patch-configure"} "http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-lseek64.diff",
"http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-vfe-uint.diff"
]}
end end
def install def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"COMPILED_BY=homebrew", # while this is RC6, the code still says RC5, so update to reflect that
"--prefix=#{prefix}", inreplace [ 'VERSION', 'configure' ], '3.7.0.RC5', '3.7.0.RC6'
"--mandir=#{man}"
# include the boost system library to resolve compilation conflicts
ENV["LIBS"] = "-lboost_system-mt"
args = [
"COMPILED_BY=homebrew",
"--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}",
]
args << "--with-openexr=${HOMEBREW_PREFIX}" if build.include? "use-openexr"
system "./configure", *args
system "make install" system "make install"
end end
def test test do
ohai "Rendering all test scenes; this may take a while" ohai "Rendering all test scenes; this may take a while"
mktemp do system "#{share}/povray-3.7/scripts/allscene.sh", "-o", "."
system "#{share}/povray-3.6/scripts/allscene.sh", "-o", "."
end
end end
end end