Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

povray 3.7.0.RC6 #15093

Closed
wants to merge 4 commits into from

5 participants

royhodgman Misty De Meo Charlie Sharpsteen Adam Vandenberg Mike McQuaid
royhodgman

The previous version of povray (3.6.1) would not compile with recent versions of libpng. This beta version does compile with recent versions of libpng.

Almost all changes to this formula come from studying the povray portfile from MacPorts and reading a bug report about how they solved the same problem.

royhodgman royhodgman povray 3.7.0.RC6
The previous version of povray (3.6.1) would not compile with recent versions of libpng. This beta version does compile with recent versions of libpng.

Almost all changes to this formula come from studying the [povray portfile][1] from MacPorts and reading [a bug report][2] about how they solved the same problem.

[1]: https://svn.macports.org/repository/macports/trunk/dports/graphics/povray/Portfile "MacPorts POV-Ray portfile"
[2]: https://trac.macports.org/ticket/35949 "MacPorts Ticket 35949"
b462570
Adam Vandenberg

As long as you're touching this, put homepage above url, thanks.

Adam Vandenberg

un-indent these back a bit.

and done

royhodgman royhodgman small cosmetic changes
moved homepage above url
removed some spaces from patches section
fe9bacb
Mike McQuaid

Is this not optional too?

I thought it would have been optional, but there were build errors when it was not previously installed on my system.

Mike McQuaid

They added a dependency on all of boost in 3.7.0? That sucks.

Mike McQuaid

zlib is included with OSX; this shouldn't be needed.

Misty De Meo
Owner

This doesn't build for me on 10.6:

/usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../source -I../../source -I../../source/base -I../../unix -I../../vfe -I../../vfe/unix -I/usr/local/opt/libpng/include -pthread -I/usr/local/include  -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.6 -D_THREAD_SAFE -c -o hfield.o `test -f 'shape/hfield.cpp' || echo './'`shape/hfield.cpp
In file included from support/task.cpp:103:
../../source/backend/support/task.h:187: error: thread-local storage not supported for this target
Misty De Meo
Owner

It looks like povray 3.7 is known not to build with gcc/llvm-gcc 4.2: http://news.povray.org/povray.beta-test/thread/%3Cweb.4d091fcd62af24a47800993b0@news.povray.org%3E/

That thread is 2 years old (and the provided patch no longer applies); a more recent Macports discussion indicates that the povray developers have no interest in making povray work on gcc 4.2: https://trac.macports.org/ticket/36172

royhodgman

So is there a way to construct a formula which will use 3.6.1 on 10.6 systems and 3.7.0.RC6 on 10.7 and 10.8 other than to create two different formulas?

Charlie Sharpsteen
Collaborator

Another possibility is to fail the formula unless Lion or newer is being used---Snow Leopard is support is going to ride into the sunset whenever 10.9 is released.

royhodgman

Now the formula should fail unless Lion or newer is being used.

I do not have a 10.6 machine, so I have not tested whether the added requirement on NeedsLion behaves as expected, but I copied the structure of the same requirement from the Nu formula, so I imagine it should.

Adam Vandenberg
Owner

Please squash to a single commit for review; not keen on losing Snow Leopard support yet I guess, but if it is an upstream issue not much we can do (other than "fix upstream".)

Adam Vandenberg
Owner

Note that MacPorts has patches, so we should look into that: https://trac.macports.org/browser/trunk/dports/graphics/povray/Portfile

royhodgman

I created a new pull request for the squashed commits: #15576.

The patches from MacPorts were included in the original commit in this pull request, and I don't see any new activity over there since the last time I worked on this formula.

Adam Vandenberg
Owner

Closing as a duplicate of #15576.

Adam Vandenberg adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 25, 2012
  1. royhodgman

    povray 3.7.0.RC6

    royhodgman authored
    The previous version of povray (3.6.1) would not compile with recent versions of libpng. This beta version does compile with recent versions of libpng.
    
    Almost all changes to this formula come from studying the [povray portfile][1] from MacPorts and reading [a bug report][2] about how they solved the same problem.
    
    [1]: https://svn.macports.org/repository/macports/trunk/dports/graphics/povray/Portfile "MacPorts POV-Ray portfile"
    [2]: https://trac.macports.org/ticket/35949 "MacPorts Ticket 35949"
  2. royhodgman

    small cosmetic changes

    royhodgman authored
    moved homepage above url
    removed some spaces from patches section
Commits on Sep 27, 2012
  1. royhodgman
Commits on Oct 7, 2012
  1. royhodgman
This page is out of date. Refresh to see the latest.
Showing with 50 additions and 17 deletions.
  1. +50 −17 Library/Formula/povray.rb
67 Library/Formula/povray.rb
View
@@ -1,37 +1,70 @@
require 'formula'
+class NeedsLion < Requirement
+ def satisfied?
+ MacOS.version >= :lion
+ end
+ def message
+ "PovRay 3.7.0.RC6 requires Mac OS X 10.7 or newer"
+ end
+ def fatal?
+ true
+ end
+end
+
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'
+ url 'http://www.povray.org/beta/source/povray-3.7.0.RC6.tar.gz'
+ sha256 '374957bdb90fb7be5f36f839b3f04ab0a4340f6e8cf369f658d6592a342803e3'
+ version '3.7.0.RC6'
- depends_on 'libtiff' => :optional
- depends_on 'jpeg' => :optional
+ option 'use-openexr', 'Compile with OpenEXR support.'
+ option 'use-zlib', 'Compile with zlib support.'
- # 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
+ depends_on NeedsLion.new
+ depends_on 'boost'
+ depends_on 'jpeg'
+ depends_on 'libpng'
+ depends_on 'libtiff'
+ depends_on 'openexr' => :optional if build.include? 'use-openexr'
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"}
+ {:p0 => [
+ "http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-boost-1.50.diff",
+ "http://svn.macports.org/repository/macports/trunk/dports/graphics/povray/files/patch-configure-stat.diff",
+ "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
def install
- system "./configure", "--disable-debug", "--disable-dependency-tracking",
- "COMPILED_BY=homebrew",
- "--prefix=#{prefix}",
- "--mandir=#{man}"
+
+ # 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"
+
+ args = [
+ "COMPILED_BY=homebrew",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--mandir=#{man}",
+ ]
+
+ args << "--with-openexr=${HOMEBREW_PREFIX}" if build.include? "use-openexr"
+ args << "--with-zlib=${HOMEBREW_PREFIX}" if build.include? "use-zlib"
+
+ system "./configure", *args
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", "."
+ system "#{share}/povray-3.7.0.RC6/scripts/allscene.sh", "-o", "."
end
end
end
Something went wrong with that request. Please try again.