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
|
|
|
homepage 'http://www.povray.org/'
|
2012-09-25 05:02:43 +00:00
|
|
|
url 'http://www.povray.org/beta/source/povray-3.7.0.RC6.tar.gz'
|
|
|
|
version '3.7.0.RC6'
|
|
|
|
sha256 '374957bdb90fb7be5f36f839b3f04ab0a4340f6e8cf369f658d6592a342803e3'
|
2010-11-10 04:39:06 +00:00
|
|
|
|
2013-06-18 15:09:55 +00:00
|
|
|
depends_on :macos => :lion
|
2012-09-25 05:02:43 +00:00
|
|
|
depends_on :libpng
|
|
|
|
depends_on 'boost'
|
|
|
|
depends_on 'jpeg'
|
|
|
|
depends_on 'libtiff'
|
|
|
|
depends_on 'openexr' => :optional
|
2010-02-05 15:12:48 +00:00
|
|
|
|
2012-09-13 01:10:15 +00:00
|
|
|
def patches
|
2012-09-25 05:02:43 +00:00
|
|
|
{:p0 => [
|
2013-02-03 05:57:03 +00:00
|
|
|
"https://trac.macports.org/export/102440/trunk/dports/graphics/povray/files/patch-boost-1.50.diff",
|
|
|
|
"https://trac.macports.org/export/102440/trunk/dports/graphics/povray/files/patch-configure-stat.diff",
|
|
|
|
"https://trac.macports.org/export/102440/trunk/dports/graphics/povray/files/patch-lseek64.diff",
|
|
|
|
"https://trac.macports.org/export/102440/trunk/dports/graphics/povray/files/patch-vfe-uint.diff"
|
2012-09-25 05:02:43 +00:00
|
|
|
]}
|
2012-09-13 01:10:15 +00:00
|
|
|
end
|
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2012-09-25 05:02:43 +00:00
|
|
|
|
|
|
|
# while this is RC6, the code still says RC5, so update to reflect that
|
|
|
|
inreplace [ 'VERSION', 'configure' ], '3.7.0.RC5', '3.7.0.RC6'
|
|
|
|
|
|
|
|
# include the boost system library to resolve compilation conflicts
|
2013-02-25 11:49:41 +00:00
|
|
|
ENV["LIBS"] = "-lboost_system-mt -lboost_thread-mt"
|
2012-09-25 05:02:43 +00:00
|
|
|
|
|
|
|
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
|
2010-01-30 05:47:01 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-09-03 21:14:08 +00:00
|
|
|
|
2012-09-25 05:02:43 +00:00
|
|
|
test do
|
2011-09-03 21:14:08 +00:00
|
|
|
ohai "Rendering all test scenes; this may take a while"
|
2012-09-25 05:02:43 +00:00
|
|
|
system "#{share}/povray-3.7/scripts/allscene.sh", "-o", "."
|
2011-09-03 21:14:08 +00:00
|
|
|
end
|
2010-01-30 05:47:01 +00:00
|
|
|
end
|