povray 3.7.0.0

Closes Homebrew/homebrew#24373.
Closes Homebrew/homebrew#23612.
Closes Homebrew/homebrew#24326.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Misty De Meo 2013-11-16 01:12:36 -08:00 committed by Adam Vandenberg
parent 3d493413a6
commit f6f381249c

View file

@ -2,11 +2,14 @@ require 'formula'
class Povray < Formula
homepage 'http://www.povray.org/'
url 'http://www.povray.org/beta/source/povray-3.7.0.RC6.tar.gz'
version '3.7.0.RC6'
sha256 '374957bdb90fb7be5f36f839b3f04ab0a4340f6e8cf369f658d6592a342803e3'
url 'https://github.com/POV-Ray/povray/archive/v3.7.0.0.tar.gz'
sha1 '1d160d45e69d096e4c22f3b034dcc9ee94d22208'
depends_on :macos => :lion
depends_on :autoconf
depends_on :automake
depends_on :libpng
depends_on 'boost'
depends_on 'jpeg'
@ -14,19 +17,28 @@ class Povray < Formula
depends_on 'openexr' => :optional
def patches
{:p0 => [
"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"
]}
{
:p0 => [
# Patches lseek64 => lseek
"https://trac.macports.org/export/113876/trunk/dports/graphics/povray/files/patch-lseek64.diff",
# Fixes configure script's stat usage, automake subdir
"https://trac.macports.org/export/113876/trunk/dports/graphics/povray/files/patch-unix-configure.ac.diff",
# prebuild.sh doesn't create Makefile.in properly
"https://trac.macports.org/export/113876/trunk/dports/graphics/povray/files/patch-unix-prebuild.sh.diff",
# missing sys/types.h header include
"https://trac.macports.org/export/113887/trunk/dports/graphics/povray/files/patch-vfe-uint.diff"
],
# Fixes some compiler warnings; comes from the upstream repo,
# should be in next release.
:p1 => [
"https://github.com/POV-Ray/povray/commit/b3846f5723745e6e7926883ec6bc404922a900e6.patch",
# Replaces references to shared_ptr with boost::shared_ptr
"https://gist.github.com/mistydemeo/7633971/raw/ef285191f9da25aa73806d1200611b8c955ab873/boost-sharedptr.diff"
]
}
end
def install
# 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
ENV["LIBS"] = "-lboost_system-mt -lboost_thread-mt"
@ -40,6 +52,10 @@ class Povray < Formula
args << "--with-openexr=${HOMEBREW_PREFIX}" if build.include? "use-openexr"
cd 'unix' do
system "./prebuild.sh"
end
system "./configure", *args
system "make install"
end