summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Scruggs <j.scruggs@gmail.com>2017-01-15 11:20:28 +0000
committerDavid Seifert <soap@gentoo.org>2017-01-15 14:31:36 +0100
commite85a57635ca71d56e2c0df6acbbb26e2f92c6e61 (patch)
tree5b6bc370470397bd123b36bec78503eae205aa4d /media-gfx/openvdb
parentmedia-gfx/blender: eigen 3.3.1 compile fix and openvdb 4 support (diff)
downloadgentoo-e85a57635ca71d56e2c0df6acbbb26e2f92c6e61.tar.gz
gentoo-e85a57635ca71d56e2c0df6acbbb26e2f92c6e61.tar.bz2
gentoo-e85a57635ca71d56e2c0df6acbbb26e2f92c6e61.zip
media-gfx/openvdb: Version bump to 4.0.0
* Switched to CMake and a sane ebuild * Added abi3-compat USE Flag * Removed openvdb-compression as it's now hard enabled Signed-off by: Jonathan Scruggs (j.scruggs@gmail.com) Closes: https://github.com/gentoo/gentoo/pull/3473
Diffstat (limited to 'media-gfx/openvdb')
-rw-r--r--media-gfx/openvdb/Manifest1
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.0-build-docs-once.patch32
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.0-make-docs-optional.patch71
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.0-namespace-fixes.patch65
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.0-python-module-install-dir-fix.patch16
-rw-r--r--media-gfx/openvdb/metadata.xml6
-rw-r--r--media-gfx/openvdb/openvdb-4.0.0.ebuild78
7 files changed, 268 insertions, 1 deletions
diff --git a/media-gfx/openvdb/Manifest b/media-gfx/openvdb/Manifest
index 175e892dbe5e..50e0668256cb 100644
--- a/media-gfx/openvdb/Manifest
+++ b/media-gfx/openvdb/Manifest
@@ -1 +1,2 @@
DIST openvdb-3.2.0.tar.gz 1368870 SHA256 d4b6eb63a2c1c62ca449399f3d7789638fde655c32a977b50717b727420a634b SHA512 df9a4895b219aae3b5a9616c34eb846d565877ff76648405691f0c903507f6faba94e8eba9173423b50cb5cef80f3ec500a9f70977cb7161701d39fd105abc91 WHIRLPOOL 3b76ba4998ac39405bbbdf0b1a80488234c5f25e8b0943d4520d9fa783384a111e48ff2120e942f5d9b3862e1f227ff89dcc633842e1290060afb1836785455f
+DIST openvdb-4.0.0.tar.gz 1545221 SHA256 eaf37b8e723cfd011df350cb0ef93ffa22d927bf7cb1f72c38176fce523b3537 SHA512 138e23408d725f153f5545c8083cd16f6b3e5cf80308e080d5e463f74f947759cdf5f9d818137ebffaf8b2de77bffa8f38ef0d20758a1418aea1c71702c0001d WHIRLPOOL 8b6413dc3bb7aa6efb2b5472b9df0ccc8493082be02ddd9243fa6ccc1cf183612c8700e3384d1a26f321dda99022292338d61bfa3576cc6ad96a0f35de6fd226
diff --git a/media-gfx/openvdb/files/openvdb-4.0.0-build-docs-once.patch b/media-gfx/openvdb/files/openvdb-4.0.0-build-docs-once.patch
new file mode 100644
index 000000000000..5a8baee0f260
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-4.0.0-build-docs-once.patch
@@ -0,0 +1,32 @@
+From 5bb7bc424b09f93417a1d447f2d4f3081394f964 Mon Sep 17 00:00:00 2001
+From: Nicholas Yue <yue.nicholas@gmail.com>
+Date: Thu, 17 Nov 2016 16:59:47 -0800
+Subject: [PATCH] Refine Doxygen run so that it is done only once and only
+ during the installation phase
+
+---
+ openvdb/CMakeLists.txt | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
+index aa1a080..88e46ca 100644
+--- a/openvdb/CMakeLists.txt
++++ b/openvdb/CMakeLists.txt
+@@ -443,13 +443,15 @@ IF (OPENVDB_BUILD_DOCS)
+ FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config ${DOXYGEN_CONFIG_CONTENT} )
+ FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config "OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/doc\n" )
+
+- ADD_CUSTOM_TARGET ( doc ALL
++ ADD_CUSTOM_TARGET ( doc
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMENT "Generating API documentation with Doxygen" VERBATIM
+ )
+
+- INSTALL ( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ DESTINATION doc)
++ INSTALL ( CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build \"${PROJECT_BINARY_DIR}\" --target doc)")
++ INSTALL ( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION docs)
++
+ ENDIF ()
+
+ # Installation
diff --git a/media-gfx/openvdb/files/openvdb-4.0.0-make-docs-optional.patch b/media-gfx/openvdb/files/openvdb-4.0.0-make-docs-optional.patch
new file mode 100644
index 000000000000..92c4fa320596
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-4.0.0-make-docs-optional.patch
@@ -0,0 +1,71 @@
+From 3c7f3247e443620658a5cb7b4e9cdea488c450d9 Mon Sep 17 00:00:00 2001
+From: Nicholas Yue <yue.nicholas@gmail.com>
+Date: Thu, 17 Nov 2016 03:58:58 -0800
+Subject: [PATCH] Fix the Doxygen generation problem but current solution is
+ not very elegant as there was a regeneration run of Doxygen. Committing this
+ for now so that at least it will work for the initial 4.0.0 release.
+ Introduce a CMake option variable to toggle the generation and installation
+ of doxygen
+
+---
+ CMakeLists.txt | 1 +
+ openvdb/CMakeLists.txt | 27 +++++++++++++++------------
+ 2 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 739d57f..32f82d2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,6 +33,7 @@ PROJECT ( OpenVDB )
+ ENABLE_TESTING()
+
+ OPTION ( OPENVDB_BUILD_UNITTESTS "Build the OpenVDB unit tests" ON )
++OPTION ( OPENVDB_BUILD_DOCS "Build the OpenVDB documentation" OFF )
+ OPTION ( OPENVDB_BUILD_PYTHON_MODULE "Build the pyopenvdb Python module" ON )
+ OPTION ( OPENVDB_BUILD_HOUDINI_SOPS "Build the Houdini SOPs" OFF )
+ OPTION ( OPENVDB_BUILD_MAYA_PLUGIN "Build the Maya plugin" OFF )
+diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
+index f86b306..aa1a080 100644
+--- a/openvdb/CMakeLists.txt
++++ b/openvdb/CMakeLists.txt
+@@ -97,7 +97,9 @@ FIND_PACKAGE ( ZLIB REQUIRED )
+ FIND_PACKAGE ( ILMBase REQUIRED )
+ FIND_PACKAGE ( OpenEXR REQUIRED )
+ FIND_PACKAGE ( OpenGL REQUIRED )
+-FIND_PACKAGE ( Doxygen REQUIRED )
++IF (OPENVDB_BUILD_DOCS)
++ FIND_PACKAGE ( Doxygen REQUIRED )
++ENDIF ()
+ IF (OPENVDB_BUILD_UNITTESTS)
+ FIND_PACKAGE ( CPPUnit REQUIRED )
+ ENDIF ()
+@@ -435,17 +437,18 @@ IF ( OPENVDB_BUILD_PYTHON_MODULE )
+ ENDIF ( OPENVDB_BUILD_PYTHON_MODULE )
+
+ # Doxygen docmentation
+-FILE ( READ ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config DOXYGEN_CONFIG_CONTENT )
+-FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config ${DOXYGEN_CONFIG_CONTENT} )
+-FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config "OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/doc\n" )
+-
+-ADD_CUSTOM_TARGET ( doc
+- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config
+- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+- COMMENT "Generating API documentation with Doxygen" VERBATIM
+-)
+-
+-IF ( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doc/html )
++IF (OPENVDB_BUILD_DOCS)
++
++ FILE ( READ ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config DOXYGEN_CONFIG_CONTENT )
++ FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config ${DOXYGEN_CONFIG_CONTENT} )
++ FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config "OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/doc\n" )
++
++ ADD_CUSTOM_TARGET ( doc ALL
++ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config
++ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
++ COMMENT "Generating API documentation with Doxygen" VERBATIM
++ )
++
+ INSTALL ( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ DESTINATION doc)
+ ENDIF ()
+
diff --git a/media-gfx/openvdb/files/openvdb-4.0.0-namespace-fixes.patch b/media-gfx/openvdb/files/openvdb-4.0.0-namespace-fixes.patch
new file mode 100644
index 000000000000..913c6079a081
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-4.0.0-namespace-fixes.patch
@@ -0,0 +1,65 @@
+diff -purN a/cmake/FindILMBase.cmake b/cmake/FindILMBase.cmake
+--- a/cmake/FindILMBase.cmake 2016-11-16 20:24:17.000000000 +0000
++++ b/cmake/FindILMBase.cmake 2017-01-05 09:28:43.941910625 +0000
+@@ -57,15 +57,15 @@ OPTION ( ILMBASE_NAMESPACE_VERSIONING "N
+
+ IF ( ILMBASE_FOUND )
+
+- FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ")
+- STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}")
+- STRING ( STRIP ${_ilmbase_version_major_unstrip} ILMBASE_VERSION_MAJOR )
++ IF ( ILMBASE_NAMESPACE_VERSIONING )
++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ")
++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}")
++ STRING ( STRIP ${_ilmbase_version_major_unstrip} ILMBASE_VERSION_MAJOR )
+
+- FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ")
+- STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}")
+- STRING ( STRIP ${_ilmbase_version_minor_unstrip} ILMBASE_VERSION_MINOR )
++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ")
++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}")
++ STRING ( STRIP ${_ilmbase_version_minor_unstrip} ILMBASE_VERSION_MINOR )
+
+- IF ( ILMBASE_NAMESPACE_VERSIONING )
+ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+diff -purN a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
+--- a/cmake/FindOpenEXR.cmake 2016-11-16 20:24:17.000000000 +0000
++++ b/cmake/FindOpenEXR.cmake 2017-01-05 09:34:51.167736304 +0000
+@@ -52,22 +52,24 @@ OPTION ( OPENEXR_NAMESPACE_VERSIONING "N
+
+ IF ( OPENEXR_FOUND )
+
+- FILE ( STRINGS "${OPENEXR_LOCATION}/include/OpenEXR/OpenEXRConfig.h" _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR ")
+- STRING ( REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" "" _openexr_version_major_unstrip "${_openexr_version_major_string}")
+- STRING ( STRIP ${_openexr_version_major_unstrip} OPENEXR_VERSION_MAJOR )
+-
+- FILE ( STRINGS "${OPENEXR_LOCATION}/include/OpenEXR/OpenEXRConfig.h" _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR ")
+- STRING ( REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" _openexr_version_minor_unstrip "${_openexr_version_minor_string}")
+- STRING ( STRIP ${_openexr_version_minor_unstrip} OPENEXR_VERSION_MINOR )
+-
+- MESSAGE ( STATUS "Found OpenEXR v${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR} at ${OPENEXR_LOCATION}" )
+-
+ IF ( OPENEXR_NAMESPACE_VERSIONING )
++ FILE ( STRINGS "${OPENEXR_LOCATION}/include/OpenEXR/OpenEXRConfig.h" _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR ")
++ STRING ( REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" "" _openexr_version_major_unstrip "${_openexr_version_major_string}")
++ STRING ( STRIP ${_openexr_version_major_unstrip} OPENEXR_VERSION_MAJOR )
++
++ FILE ( STRINGS "${OPENEXR_LOCATION}/include/OpenEXR/OpenEXRConfig.h" _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR ")
++ STRING ( REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" _openexr_version_minor_unstrip "${_openexr_version_minor_string}")
++ STRING ( STRIP ${_openexr_version_minor_unstrip} OPENEXR_VERSION_MINOR )
++
++ MESSAGE ( STATUS "Found OpenEXR v${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR} at ${OPENEXR_LOCATION}" )
++
+ SET ( ILMIMF_LIBRARY_NAME IlmImf-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR} )
+ ELSE ( OPENEXR_NAMESPACE_VERSIONING )
++ MESSAGE ( STATUS "Found OpenEXR at ${OPENEXR_LOCATION}" )
++
+ SET ( ILMIMF_LIBRARY_NAME IlmImf )
+ ENDIF ( OPENEXR_NAMESPACE_VERSIONING )
+-
++
+ SET ( OPENEXR_INCLUDE_DIRS
+ ${OPENEXR_LOCATION}/include
+ ${OPENEXR_LOCATION}/include/OpenEXR
diff --git a/media-gfx/openvdb/files/openvdb-4.0.0-python-module-install-dir-fix.patch b/media-gfx/openvdb/files/openvdb-4.0.0-python-module-install-dir-fix.patch
new file mode 100644
index 000000000000..34c6c76ea9da
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-4.0.0-python-module-install-dir-fix.patch
@@ -0,0 +1,16 @@
+diff -purN a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
+--- a/openvdb/CMakeLists.txt 2016-11-16 20:24:17.000000000 +0000
++++ b/openvdb/CMakeLists.txt 2017-01-09 13:46:00.000000000 +0000
+@@ -426,10 +426,11 @@ IF ( OPENVDB_BUILD_PYTHON_MODULE )
+ ADD_TEST ( pytest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/python/test/TestOpenVDB.py )
+ SET_TESTS_PROPERTIES ( pytest PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}")
+
++ SET ( PYOENVDB_INSTALL_DIRECTORY lib/python${OPENVDB_PYTHON_VERSION_MAJOR}.${OPENVDB_PYTHON_VERSION_MINOR} CACHE STRING "The directory to install the pyopenvdb.so module.")
+ INSTALL ( TARGETS
+ pyopenvdb
+ DESTINATION
+- lib/python${OPENVDB_PYTHON_VERSION_MAJOR}.${OPENVDB_PYTHON_VERSION_MINOR}
++ ${PYOENVDB_INSTALL_DIRECTORY}
+ )
+
+ ENDIF ( OPENVDB_BUILD_PYTHON_MODULE )
diff --git a/media-gfx/openvdb/metadata.xml b/media-gfx/openvdb/metadata.xml
index 611db53ce199..0faae8bd619e 100644
--- a/media-gfx/openvdb/metadata.xml
+++ b/media-gfx/openvdb/metadata.xml
@@ -19,7 +19,11 @@
Chance of Meatballs2' and 'How to Train Your Dragon 2'.
</longdescription>
<use>
- <flag name="openvdb-compression">
+ <flag restrict="&gt;=media-gfx/openvdb-4.0.0" name="abi3-compat">
+ Enables compatibility with the old 3.x ABI.
+ enabled by dfault.
+ </flag>
+ <flag restrict="&lt;=media-gfx/openvdb-3.2.0" name="openvdb-compression">
Adds enhanced compression to files through
<pkg>dev-libs/c-blosc</pkg>. Very useful so
enabled by dfault.
diff --git a/media-gfx/openvdb/openvdb-4.0.0.ebuild b/media-gfx/openvdb/openvdb-4.0.0.ebuild
new file mode 100644
index 000000000000..f35201437c79
--- /dev/null
+++ b/media-gfx/openvdb/openvdb-4.0.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $id$
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit eutils flag-o-matic cmake-utils python-single-r1
+
+DESCRIPTION="Libs for the efficient manipulation of volumetric data"
+HOMEPAGE="http://www.openvdb.org"
+
+SRC_URI="https://github.com/dreamworksanimation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+abi3-compat doc python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=dev-libs/boost-1.62:=[python?,${PYTHON_USEDEP}]
+ >=dev-libs/c-blosc-1.5.0
+ dev-libs/jemalloc
+ dev-libs/log4cplus
+ media-libs/glfw:=
+ media-libs/openexr:=
+ sys-libs/zlib
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXinerama
+ x11-libs/libXcursor
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-cpp/tbb
+ doc? (
+ app-doc/doxygen
+ python? ( dev-python/pdoc[${PYTHON_USEDEP}] )
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-make-docs-optional.patch
+ "${FILESDIR}"/${P}-build-docs-once.patch
+ "${FILESDIR}"/${P}-namespace-fixes.patch
+ "${FILESDIR}"/${P}-python-module-install-dir-fix.patch
+)
+
+src_configure() {
+ local myprefix="${EPREFIX}"/usr/
+
+ # To stay in sync with Boost
+ append-cxxflags -std=c++14
+
+ # Enable unit tests later in 4.0.1
+ local mycmakeargs=(
+ -DOPENVDB_BUILD_UNITTESTS=OFF
+ -DOPENVDB_BUILD_DOCS=$(usex doc)
+ -DOPENVDB_BUILD_PYTHON_MODULE=$(usex python)
+ -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=$(usex abi3-compat)
+ -DBLOSC_LOCATION="${myprefix}"
+ -DGLEW_LOCATION="${myprefix}"
+ -DUSE_GLFW3=ON
+ -DGLFW3_LOCATION="${myprefix}"
+ -DILMBASE_LOCATION="${myprefix}"
+ -DILMBASE_NAMESPACE_VERSIONING=OFF
+ -DOPENEXR_LOCATION="${myprefix}"
+ -DOPENEXR_NAMESPACE_VERSIONING=OFF
+ -DTBB_LOCATION="${myprefix}"
+ )
+
+ use python && mycmakeargs+=( -DPYOENVDB_INSTALL_DIRECTORY=$(python_get_sitedir) )
+
+ cmake-utils_src_configure
+}