community/openvdb to 8.0.1-3

This commit is contained in:
Kevin Mihelich 2021-04-28 14:13:19 +00:00
parent 5497345542
commit 4c565d359a
3 changed files with 131 additions and 15 deletions

View file

@ -5,18 +5,24 @@
pkgname=openvdb
pkgver=8.0.1
pkgrel=1
pkgrel=3
pkgdesc='A large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids'
url='https://github.com/dreamworksanimation/openvdb'
arch=('x86_64')
license=('MPL')
depends=('openexr' 'boost-libs' 'intel-tbb' 'zlib' 'jemalloc' 'blosc' 'log4cplus' 'openexr')
depends=('boost-libs' 'intel-tbb' 'zlib' 'jemalloc' 'blosc' 'log4cplus' 'imath')
makedepends=('doxygen' 'boost' 'cmake' 'mesa' 'cppunit' 'glfw-x11' 'glu' 'python' 'python-numpy' 'ninja')
optdepends=('glfw: for tools'
'glu: for tools'
'python-numpy: python module')
source=("$pkgname-$pkgver.tar.gz::https://github.com/dreamworksanimation/openvdb/archive/v${pkgver}.tar.gz")
sha512sums=('6a5a8b637429295efa72494aef82ff92dd83092591b713f56930ccf4aab3a33806d1263bfd090c27239eab97b4fdc053288dc545e631f8a7d4ca180a32331be2')
source=("$pkgname-$pkgver.tar.gz::https://github.com/dreamworksanimation/openvdb/archive/v${pkgver}.tar.gz"
openvdb-openexr3.patch)
sha512sums=('6a5a8b637429295efa72494aef82ff92dd83092591b713f56930ccf4aab3a33806d1263bfd090c27239eab97b4fdc053288dc545e631f8a7d4ca180a32331be2'
'bc7a0e4c7ef00b620e62097f56a741f4924d1465528d5fabd52fefe1c981d109389c7c75056508bc32353f0daa8305367c9a52e941b7ec1fbef865ee5719615a')
prepare() {
patch -d $pkgname-$pkgver -p1 < openvdb-openexr3.patch
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"

View file

@ -1,11 +0,0 @@
diff -upr openvdb-5.1.0.orig/openvdb/CMakeLists.txt openvdb-5.1.0/openvdb/CMakeLists.txt
--- openvdb-5.1.0.orig/openvdb/CMakeLists.txt 2018-06-03 02:59:00.521389220 +0300
+++ openvdb-5.1.0/openvdb/CMakeLists.txt 2018-06-03 03:07:55.094264747 +0300
@@ -275,6 +275,7 @@ IF (NOT WIN32)
TARGET_LINK_LIBRARIES ( vdb_view
openvdb_shared
${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${COCOA_LIBRARY}

View file

@ -0,0 +1,121 @@
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 3cb246d6..a9c8c8bb 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -444,7 +444,7 @@ endif()
# Add standard dependencies
-find_package(IlmBase REQUIRED COMPONENTS Half)
+find_package(Imath CONFIG REQUIRED)
find_package(TBB REQUIRED COMPONENTS tbb)
find_package(ZLIB REQUIRED)
@@ -596,8 +596,7 @@ if(OpenVDB_USES_LOG4CPLUS)
endif()
if(OpenVDB_USES_EXR)
- find_package(IlmBase REQUIRED)
- find_package(OpenEXR REQUIRED)
+ find_package(OpenEXR CONFIG REQUIRED)
endif()
if(UNIX)
@@ -608,7 +607,7 @@ if(WIN32)
# @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles
# used in PlatformConfig.h to configure EXR exports. Once this file
# is completely removed, this define can be too
- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE)
+ get_target_property(ILMBASE_LIB_TYPE Imath::Imath TYPE)
if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY))
list(APPEND OpenVDB_DEFINITIONS OPENVDB_OPENEXR_STATICLIB)
endif()
@@ -623,7 +622,7 @@ endif()
set(_OPENVDB_VISIBLE_DEPENDENCIES
Boost::iostreams
Boost::system
- IlmBase::Half
+ Imath::Imath
)
if(OpenVDB_ABI)
@@ -632,10 +631,7 @@ endif()
if(OpenVDB_USES_EXR)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ OpenEXR::OpenEXR
)
list(APPEND OpenVDB_DEFINITIONS OPENVDB_TOOLS_RAYTRACER_USE_EXR)
endif()
diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt
index 04bfee59..c853689a 100644
--- a/openvdb/openvdb/CMakeLists.txt
+++ b/openvdb/openvdb/CMakeLists.txt
@@ -46,8 +46,8 @@ message(STATUS "----------------------------------------------------")
# Collect and configure lib dependencies
if(USE_EXR)
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED)
- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
+ find_package(Imath CONFIG REQUIRED)
+ find_package(OpenEXR CONFIG REQUIRED)
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_OPENEXR_VERSION)
if(${OpenEXR_VERSION} VERSION_LESS FUTURE_MINIMUM_OPENEXR_VERSION)
message(DEPRECATION "Support for OpenEXR versions < ${FUTURE_MINIMUM_OPENEXR_VERSION} "
@@ -55,7 +55,7 @@ if(USE_EXR)
endif()
endif()
else()
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half)
+ find_package(Imath CONFIG REQUIRED)
endif()
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION)
@@ -129,7 +129,7 @@ endif()
set(OPENVDB_CORE_DEPENDENT_LIBS
Boost::iostreams
Boost::system
- IlmBase::Half
+ Imath::Imath
)
if(WIN32)
@@ -147,10 +147,8 @@ endif()
if(USE_EXR)
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ Imath::Imath
+ OpenEXR::OpenEXR
)
endif()
@@ -413,7 +411,7 @@ if(WIN32)
# @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles
# used in PlatformConfig.h to configure EXR exports. Once this file
# is completely removed, this define can be too
- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE)
+ get_target_property(ILMBASE_LIB_TYPE Imath::Imath TYPE)
if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY))
list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB)
endif()
diff --git a/openvdb/openvdb/Types.h b/openvdb/openvdb/Types.h
index d176c874..4ba72e3e 100644
--- a/openvdb/openvdb/Types.h
+++ b/openvdb/openvdb/Types.h
@@ -7,7 +7,7 @@
#include "version.h"
#include "Platform.h"
#include "TypeList.h" // backwards compat
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
#include <openvdb/math/Math.h>
#include <openvdb/math/BBox.h>
#include <openvdb/math/Quat.h>