Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2021 00:34:19 GMT
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 0440ba7ebb75 - main - misc/openvdb: make compatible with OpenEXR/Imath 3.0
Message-ID:  <202104120034.13C0YJ5w092246@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0440ba7ebb752df5fd351b051229a1fe8427543c

commit 0440ba7ebb752df5fd351b051229a1fe8427543c
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2021-04-10 23:36:11 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2021-04-12 00:33:39 +0000

    misc/openvdb: make compatible with OpenEXR/Imath 3.0
---
 misc/openvdb/Makefile                              |   6 +-
 misc/openvdb/files/patch-CMakeLists.txt            |  12 +-
 misc/openvdb/files/patch-cmake_FindIlmBase.cmake   | 130 +++++++++++++++++++++
 misc/openvdb/files/patch-cmake_FindOpenEXR.cmake   |  12 ++
 misc/openvdb/files/patch-cmake_FindTBB.cmake       |   4 +-
 misc/openvdb/files/patch-doc_CMakeLists.txt        |   8 +-
 .../files/patch-openvdb_openvdb_CMakeLists.txt     |  41 +++++++
 misc/openvdb/files/patch-openvdb_openvdb_Types.h   |  11 ++
 .../files/patch-openvdb_openvdb_cmd_CMakeLists.txt |  26 +++++
 .../patch-openvdb_openvdb_python_CMakeLists.txt    |   6 +-
 10 files changed, 242 insertions(+), 14 deletions(-)

diff --git a/misc/openvdb/Makefile b/misc/openvdb/Makefile
index 48523f2e7ada..91d35694f066 100644
--- a/misc/openvdb/Makefile
+++ b/misc/openvdb/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	openvdb
 DISTVERSIONPREFIX=	v
 DISTVERSION=	8.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	misc
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -12,7 +12,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libblosc.so:archivers/c-blosc \
 		libboost_system.so:devel/boost-libs \
-		libHalf.so:graphics/ilmbase \
+		libImath.so:math/Imath \
 		libtbb.so:devel/tbb
 
 USES=		cmake compiler:c++11-lang localbase:ldflags pkgconfig
@@ -38,7 +38,7 @@ TOOLS_DESC=		Build CLI tools
 TOOLS_CMAKE_BOOL=	OPENVDB_BUILD_BINARIES OPENVDB_BUILD_VDB_LOD \
 			OPENVDB_BUILD_VDB_RENDER OPENVDB_BUILD_VDB_VIEW
 TOOLS_LIB_DEPENDS=	libglfw.so:graphics/glfw \
-			libIlmImf.so:graphics/openexr
+			libOpenEXR.so:graphics/openexr
 TOOLS_USES=		gl xorg
 TOOLS_USE=		GL=gl,glu XORG=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm
 
diff --git a/misc/openvdb/files/patch-CMakeLists.txt b/misc/openvdb/files/patch-CMakeLists.txt
index 3ee6cdf18515..ec5eb9bd5c01 100644
--- a/misc/openvdb/files/patch-CMakeLists.txt
+++ b/misc/openvdb/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig	2020-12-24 17:13:14 UTC
+--- CMakeLists.txt.orig	2021-02-05 19:21:38 UTC
 +++ CMakeLists.txt
 @@ -199,7 +199,7 @@ mark_as_advanced(
  # @note  Blosc version is currently treated as exception which must be adhered
@@ -9,7 +9,15 @@
  # @note  ABI always enforced so the correct deprecation messages are available.
  # OPENVDB_USE_DEPRECATED_ABI_<VERSION> should be used to circumvent this
  set(MINIMUM_OPENVDB_ABI_VERSION 6)
-@@ -220,7 +220,7 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
+@@ -214,13 +214,13 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
+   set(MINIMUM_MSVC_VERSION 19.10)
+ 
+   set(MINIMUM_BOOST_VERSION 1.61)  # @warning should be 1.66, but H18 ships with 1.61
+-  set(MINIMUM_ILMBASE_VERSION 2.2) # @warning should be 2.3, but H18 ships with 2.2
+-  set(MINIMUM_OPENEXR_VERSION 2.2) # @warning should be 2.3, but H18 ships with 2.2
++  set(MINIMUM_ILMBASE_VERSION 3.0) # @warning should be 2.3, but H18 ships with 2.2
++  set(MINIMUM_OPENEXR_VERSION 3.0) # @warning should be 2.3, but H18 ships with 2.2
+   set(MINIMUM_ZLIB_VERSION 1.2.7)
    set(MINIMUM_TBB_VERSION 2018.0)
    set(MINIMUM_LLVM_VERSION 6.0.0)
  
diff --git a/misc/openvdb/files/patch-cmake_FindIlmBase.cmake b/misc/openvdb/files/patch-cmake_FindIlmBase.cmake
new file mode 100644
index 000000000000..cf0981eb6b00
--- /dev/null
+++ b/misc/openvdb/files/patch-cmake_FindIlmBase.cmake
@@ -0,0 +1,130 @@
+--- cmake/FindIlmBase.cmake.orig	2021-02-05 19:21:38 UTC
++++ cmake/FindIlmBase.cmake
+@@ -36,11 +36,11 @@ Result Variables
+ 
+ This will define the following variables:
+ 
+-``IlmBase_FOUND``
+-  True if the system has the IlmBase library.
++``Imath_FOUND``
++  True if the system has the Imath library.
+ ``IlmBase_VERSION``
+   The version of the IlmBase library which was found.
+-``IlmBase_INCLUDE_DIRS``
++``S``
+   Include directories needed to use IlmBase.
+ ``IlmBase_LIBRARIES``
+   Libraries needed to link to IlmBase.
+@@ -54,7 +54,7 @@ Cache Variables
+ 
+ The following cache variables may also be set:
+ 
+-``IlmBase_INCLUDE_DIR``
++````
+   The directory containing ``IlmBase/config-auto.h``.
+ ``IlmBase_{COMPONENT}_LIBRARY``
+   Individual component libraries for IlmBase
+@@ -85,7 +85,7 @@ include(GNUInstallDirs)
+ 
+ 
+ mark_as_advanced(
+-  IlmBase_INCLUDE_DIR
++  
+   IlmBase_LIBRARY
+ )
+ 
+@@ -95,10 +95,6 @@ if(DISABLE_CMAKE_SEARCH_PATHS)
+ endif()
+ 
+ set(_ILMBASE_COMPONENT_LIST
+-  Half
+-  Iex
+-  IexMath
+-  IlmThread
+   Imath
+ )
+ 
+@@ -142,7 +138,7 @@ if(USE_PKGCONFIG)
+   if(NOT DEFINED PKG_CONFIG_FOUND)
+     find_package(PkgConfig)
+   endif()
+-  pkg_check_modules(PC_IlmBase QUIET IlmBase)
++  pkg_check_modules(PC_IlmBase QUIET Imath)
+ endif()
+ 
+ # ------------------------------------------------------------------------
+@@ -158,15 +154,15 @@ list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS
+ )
+ 
+ # Look for a standard IlmBase header file.
+-find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h
++find_path( IlmBaseConfig.h
+   ${_FIND_ILMBASE_ADDITIONAL_OPTIONS}
+   PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS}
+   PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR include/OpenEXR OpenEXR
+ )
+ 
+-if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
++if(EXISTS "${}/IlmBaseConfig.h")
+   # Get the ILMBASE version information from the config header
+-  file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
++  file(STRINGS "${}/IlmBaseConfig.h"
+     _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
+   )
+   string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
+@@ -174,7 +170,7 @@ if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
+   )
+   string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
+ 
+-  file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
++  file(STRINGS "${}/IlmBaseConfig.h"
+      _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
+   )
+   string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
+@@ -255,16 +251,16 @@ unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
+ # ------------------------------------------------------------------------
+ 
+ include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(IlmBase
+-  FOUND_VAR IlmBase_FOUND
++find_package_handle_standard_args(Imath
++  FOUND_VAR Imath_FOUND
+   REQUIRED_VARS
+-    IlmBase_INCLUDE_DIR
++    
+     IlmBase_LIB_COMPONENTS
+   VERSION_VAR IlmBase_VERSION
+   HANDLE_COMPONENTS
+ )
+ 
+-if(IlmBase_FOUND)
++if(Imath_FOUND)
+   set(IlmBase_LIBRARIES ${IlmBase_LIB_COMPONENTS})
+ 
+   # We have to add both include and include/OpenEXR to the include
+@@ -280,12 +276,12 @@ if(IlmBase_FOUND)
+ 
+   set(_IlmBase_Parent_Dir "")
+   get_filename_component(_IlmBase_Parent_Dir
+-    ${IlmBase_INCLUDE_DIR}/../ ABSOLUTE)
++    ${}/../ ABSOLUTE)
+ 
+-  set(IlmBase_INCLUDE_DIRS)
+-  list(APPEND IlmBase_INCLUDE_DIRS
++  set(S)
++  list(APPEND S
+     ${_IlmBase_Parent_Dir}
+-    ${IlmBase_INCLUDE_DIR}
++    ${}
+   )
+   unset(_IlmBase_Parent_Dir)
+ 
+@@ -330,7 +326,7 @@ if(IlmBase_FOUND)
+         IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}"
+         INTERFACE_COMPILE_OPTIONS "${PC_IlmBase_CFLAGS_OTHER}"
+         INTERFACE_COMPILE_DEFINITIONS "${IlmBase_${COMPONENT}_DEFINITIONS}"
+-        INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}"
++        INTERFACE_INCLUDE_DIRECTORIES "${S}"
+       )
+     endif()
+   endforeach()
diff --git a/misc/openvdb/files/patch-cmake_FindOpenEXR.cmake b/misc/openvdb/files/patch-cmake_FindOpenEXR.cmake
new file mode 100644
index 000000000000..45d78f1a4039
--- /dev/null
+++ b/misc/openvdb/files/patch-cmake_FindOpenEXR.cmake
@@ -0,0 +1,12 @@
+--- cmake/FindOpenEXR.cmake.orig	2021-02-05 19:21:38 UTC
++++ cmake/FindOpenEXR.cmake
+@@ -91,8 +91,7 @@ if(DISABLE_CMAKE_SEARCH_PATHS)
+ endif()
+ 
+ set(_OPENEXR_COMPONENT_LIST
+-  IlmImf
+-  IlmImfUtil
++  OpenEXR
+ )
+ 
+ if(OpenEXR_FIND_COMPONENTS)
diff --git a/misc/openvdb/files/patch-cmake_FindTBB.cmake b/misc/openvdb/files/patch-cmake_FindTBB.cmake
index fc179fcb71d1..384f0817d3a9 100644
--- a/misc/openvdb/files/patch-cmake_FindTBB.cmake
+++ b/misc/openvdb/files/patch-cmake_FindTBB.cmake
@@ -1,6 +1,6 @@
---- cmake/FindTBB.cmake.orig	2020-08-13 19:15:58 UTC
+--- cmake/FindTBB.cmake.orig	2021-02-05 19:21:38 UTC
 +++ cmake/FindTBB.cmake
-@@ -97,7 +97,6 @@ endif()
+@@ -93,7 +93,6 @@ endif()
  set(_TBB_COMPONENT_LIST
    tbb
    tbbmalloc
diff --git a/misc/openvdb/files/patch-doc_CMakeLists.txt b/misc/openvdb/files/patch-doc_CMakeLists.txt
index 66fa91c6e35e..31df4557ff24 100644
--- a/misc/openvdb/files/patch-doc_CMakeLists.txt
+++ b/misc/openvdb/files/patch-doc_CMakeLists.txt
@@ -1,10 +1,10 @@
---- doc/CMakeLists.txt.orig	2020-12-24 17:13:14 UTC
+--- doc/CMakeLists.txt.orig	2021-02-05 19:21:38 UTC
 +++ doc/CMakeLists.txt
-@@ -193,5 +193,5 @@ doxygen_add_docs(doc ${DOXY_FILES}
+@@ -195,5 +195,5 @@ doxygen_add_docs(doc ${DOXY_FILES}
    COMMENT "Generating API documentation with Doxygen")
  
  # Suppress "Installing..." messages for all but one of the hundreds of generated files.
--install(FILES ${CMAKE_CURRENT_BINARY_DIR}/html/index.html DESTINATION doc/html)
--install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION doc MESSAGE_NEVER)
+-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/html/index.html DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
+-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} MESSAGE_NEVER)
 +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html/index.html DESTINATION share/doc/openvdb)
 +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html DESTINATION share/doc/openvdb MESSAGE_NEVER)
diff --git a/misc/openvdb/files/patch-openvdb_openvdb_CMakeLists.txt b/misc/openvdb/files/patch-openvdb_openvdb_CMakeLists.txt
new file mode 100644
index 000000000000..a2948db95809
--- /dev/null
+++ b/misc/openvdb/files/patch-openvdb_openvdb_CMakeLists.txt
@@ -0,0 +1,41 @@
+--- openvdb/openvdb/CMakeLists.txt.orig	2021-02-05 19:21:38 UTC
++++ openvdb/openvdb/CMakeLists.txt
+@@ -45,8 +45,8 @@ message(STATUS "--------------------------------------
+ 
+ # Collect and configure lib dependencies
+ 
++find_package(Imath ${MINIMUM_ILMBASE_VERSION} REQUIRED)
+ if(USE_EXR)
+-  find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED)
+   find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
+   if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_OPENEXR_VERSION)
+     if(${OpenEXR_VERSION} VERSION_LESS FUTURE_MINIMUM_OPENEXR_VERSION)
+@@ -54,8 +54,6 @@ if(USE_EXR)
+         "is deprecated and will be removed.")
+     endif()
+   endif()
+-else()
+-  find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half)
+ endif()
+ 
+ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION)
+@@ -129,7 +127,7 @@ endif()
+ set(OPENVDB_CORE_DEPENDENT_LIBS
+   Boost::iostreams
+   Boost::system
+-  IlmBase::Half
++  Imath::Imath
+ )
+ 
+ if(WIN32)
+@@ -147,9 +145,7 @@ endif()
+ 
+ if(USE_EXR)
+   list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
+-    IlmBase::IlmThread
+-    IlmBase::Iex
+-    IlmBase::Imath
++    Imath::Imath
+     OpenEXR::IlmImf
+   )
+ endif()
diff --git a/misc/openvdb/files/patch-openvdb_openvdb_Types.h b/misc/openvdb/files/patch-openvdb_openvdb_Types.h
new file mode 100644
index 000000000000..762e39c0c602
--- /dev/null
+++ b/misc/openvdb/files/patch-openvdb_openvdb_Types.h
@@ -0,0 +1,11 @@
+--- openvdb/openvdb/Types.h.orig	2021-02-05 19:21:38 UTC
++++ 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>
diff --git a/misc/openvdb/files/patch-openvdb_openvdb_cmd_CMakeLists.txt b/misc/openvdb/files/patch-openvdb_openvdb_cmd_CMakeLists.txt
new file mode 100644
index 000000000000..a772e6ef3952
--- /dev/null
+++ b/misc/openvdb/files/patch-openvdb_openvdb_cmd_CMakeLists.txt
@@ -0,0 +1,26 @@
+--- openvdb/openvdb/cmd/CMakeLists.txt.orig	2021-02-05 19:21:38 UTC
++++ openvdb/openvdb/cmd/CMakeLists.txt
+@@ -116,8 +116,8 @@ endif()
+ #### vdb_render
+ 
+ if(OPENVDB_BUILD_VDB_RENDER)
+-  find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath)
+-  find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf)
++  find_package(Imath ${MINIMUM_ILMBASE_VERSION} REQUIRED)
++  find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
+ 
+   set(VDB_RENDER_SOURCE_FILES openvdb_render.cc)
+   add_executable(vdb_render ${VDB_RENDER_SOURCE_FILES})
+@@ -129,10 +129,8 @@ if(OPENVDB_BUILD_VDB_RENDER)
+   # headers
+ 
+   target_link_libraries(vdb_render
+-    OpenEXR::IlmImf
+-    IlmBase::IlmThread
+-    IlmBase::Iex
+-    IlmBase::Imath
++    OpenEXR::OpenEXR
++    Imath::Imath
+     ${OPENVDB_BINARIES_DEPENDENT_LIBS}
+   )
+ 
diff --git a/misc/openvdb/files/patch-openvdb_openvdb_python_CMakeLists.txt b/misc/openvdb/files/patch-openvdb_openvdb_python_CMakeLists.txt
index 1da43047a6c7..16ccc54eefa9 100644
--- a/misc/openvdb/files/patch-openvdb_openvdb_python_CMakeLists.txt
+++ b/misc/openvdb/files/patch-openvdb_openvdb_python_CMakeLists.txt
@@ -1,6 +1,6 @@
---- openvdb/openvdb/python/CMakeLists.txt.orig	2020-12-24 17:13:14 UTC
+--- openvdb/openvdb/python/CMakeLists.txt.orig	2021-02-05 19:21:38 UTC
 +++ openvdb/openvdb/python/CMakeLists.txt
-@@ -85,7 +85,7 @@ if(OPENVDB_BUILD_PYTHON_UNITTESTS)
+@@ -81,7 +81,7 @@ if(OPENVDB_BUILD_PYTHON_UNITTESTS)
  endif()
  
  if(${CMAKE_VERSION} VERSION_LESS 3.14)
@@ -9,7 +9,7 @@
    OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS})
  
    if(USE_NUMPY)
-@@ -94,11 +94,11 @@ if(${CMAKE_VERSION} VERSION_LESS 3.14)
+@@ -90,11 +90,11 @@ if(${CMAKE_VERSION} VERSION_LESS 3.14)
      list(APPEND OPENVDB_PYTHON_DEPS Python::NumPy)
    endif()
  else()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104120034.13C0YJ5w092246>