diff options
| author | nibbles 2bits | 2012-08-30 09:28:59 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-30 13:31:36 -0700 |
| commit | 72bbc8b0c7821f77e1680d6f80fd5d423f25cbec (patch) | |
| tree | 18c13b70fd3c5df2f1a81d89bd2db4deb70767b8 /Library/Formula/open-scene-graph.rb | |
| parent | 051f9421bab8416424d1fcf8d70090ade46285df (diff) | |
| download | homebrew-72bbc8b0c7821f77e1680d6f80fd5d423f25cbec.tar.bz2 | |
open-scene-graph 3.1.2
Upgrade open-scene-graph to version 3.1.2.
Remove that patch that is merged into this version.
Add a `--docs` option. Don't build them by default.
Add deps on doxygen and graphviz if building docs.
Install the docs into the correct path.
Add a dep on gnuplot.
Add a dep on gtkglext.
Add an option to build ffmpeg support. It is off by default.
Make the ffmpeg dep conditional on the option.
Use inreplace to turn off ffmpeg rather than 10 CMake vars.
Actually build the docs using `make doc_openscenegraph` if asked.
Remove the `fails_with` because it works now.
Add a patch to fix a syntax error during `cmake`, missing OR.
Change to 10.7 specific cmake code to `10.7 or 10.8`.
Reported upstream and noted removal date in comments.
Tested on ML using clang and llvm from XCode-4.4.1.
Fixes #13840
Closes #14563.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/open-scene-graph.rb')
| -rw-r--r-- | Library/Formula/open-scene-graph.rb | 81 |
1 files changed, 51 insertions, 30 deletions
diff --git a/Library/Formula/open-scene-graph.rb b/Library/Formula/open-scene-graph.rb index 3a98513df..585290765 100644 --- a/Library/Formula/open-scene-graph.rb +++ b/Library/Formula/open-scene-graph.rb @@ -2,50 +2,45 @@ require 'formula' class OpenSceneGraph < Formula homepage 'http://www.openscenegraph.org/projects/osg' - url 'http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.0.1/source/OpenSceneGraph-3.0.1.zip' - sha1 '13c7e39f6d62047ad944d8d28a0f0eb60384ce33' + url 'http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.2.zip' + sha1 '96b003aa7153b6c8e9ffc77fba13ef5d52db9cb0' head 'http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/' + option 'ffmpeg', 'Build with ffmpeg support' + option 'docs', 'Build the documentation with Doxygen and Graphviz' + depends_on 'cmake' => :build depends_on 'jpeg' depends_on 'wget' - depends_on 'ffmpeg' => :optional + depends_on 'gtkglext' depends_on 'gdal' => :optional depends_on 'jasper' => :optional depends_on 'openexr' => :optional depends_on 'dcmtk' => :optional depends_on 'librsvg' => :optional depends_on 'collada-dom' => :optional + depends_on 'gnuplot' => :optional + depends_on 'ffmpeg' if build.include? 'ffmpeg' + depends_on 'doxygen' if build.include? 'docs' + depends_on 'graphviz' if build.include? 'docs' - devel do - url 'http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.1.zip' - md5 '079b9c1738057227b1804c6698fc9c89' - end - - fails_with :clang do - build 421 - cause <<-EOS.undent - cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *const' - http://forum.openscenegraph.org/viewtopic.php?t=10042 - EOS - end - # 1: The mini-Boost finder in FindCOLLADA doesn't find our boost, so fix it. - # 2: Lion replacement for CGDisplayBitsPerPixel() taken from: - # http://www.openscenegraph.org/projects/osg/changeset/12790/OpenSceneGraph/trunk/src/osgViewer/DarwinUtils.mm - # https://github.com/mxcl/homebrew/issues/11391 - # Remove at >= 3.1.1 + # The mini-Boost finder in FindCOLLADA doesn't find our boost, so fix it. + # Also CMakeLists is missing an OR plus code for 10.8. + # Reported: http://forum.openscenegraph.org/viewtopic.php?t=10647 + # Remove: Unknown. Neither fix is merged upstream yet. def patches - p = [DATA] - p << "https://raw.github.com/gist/2890654/a07dec42b8451edf9edbf6468e5ae464c73b3b95/osg.diff" if build.stable? - return p + DATA end def install - args = std_cmake_args + %w[ - -DBUILD_DOCUMENTATION=ON - ] + # Turning off FFMPEG takes this change or a dozen "-DFFMPEG_" variables + unless build.include? 'ffmpeg' + inreplace 'CMakeLists.txt', 'FIND_PACKAGE(FFmpeg)', '#FIND_PACKAGE(FFmpeg)' + end + args = std_cmake_args + args << '-DBUILD_DOCUMENTATION=' + ((build.include? 'docs') ? 'ON' : 'OFF') if snow_leopard_64? args << "-DCMAKE_OSX_ARCHITECTURES=x86_64" args << "-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio" @@ -53,15 +48,19 @@ class OpenSceneGraph < Formula else args << "-DCMAKE_OSX_ARCHITECTURES=i386" end - if Formula.factory('collada-dom').installed? args << "-DCOLLADA_INCLUDE_DIR=#{HOMEBREW_PREFIX}/include/collada-dom" end args << '..' - mkdir "build" do - system "cmake", *args - system "make install" + mkdir 'build' do + system 'cmake', *args + system 'make' + system 'make', 'doc_openscenegraph' if build.include? 'docs' + system 'make install' + if build.include? 'docs' + doc.install Dir["#{prefix}/doc/OpenSceneGraphReferenceDocs/*"] + end end end @@ -90,3 +89,25 @@ index 428cb29..6206580 100644 PATHS ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw +--- a/CMakeLists.txt 2012-03-23 03:21:51.000000000 -0700 ++++ b/CMakeLists.txt 2012-08-29 11:55:21.000000000 -0700 +@@ -824,16 +824,15 @@ + # FORCE is used because the options are not reflected in the UI otherwise. + # Seems like a good place to add version specific compiler flags too. + IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) +- IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7") ++ IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8") + SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) + # 64 Bit Works, PPC is not supported any more + SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) +- ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" / +- ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5") ++ ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5") + SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) + # 64-bit compiles are not supported with Carbon. +- SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE) ++ SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) + ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.4") + SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) |
