git: 0eff9817a438 - main - graphics/ogre3d: make compatible with OpenEXR/Imath 3.0

Matthias Andree mandree at FreeBSD.org
Mon Apr 12 00:34:52 UTC 2021


The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0eff9817a438f4b40038a308feb40b8e7d0af881

commit 0eff9817a438f4b40038a308feb40b8e7d0af881
Author:     Matthias Andree <mandree at FreeBSD.org>
AuthorDate: 2021-04-12 00:28:57 +0000
Commit:     Matthias Andree <mandree at FreeBSD.org>
CommitDate: 2021-04-12 00:33:52 +0000

    graphics/ogre3d: make compatible with OpenEXR/Imath 3.0
---
 graphics/ogre3d/Makefile                           | 10 +++---
 .../files/patch-CMake_Packages_FindOpenEXR.cmake   | 39 ++++++++++++++++++++++
 .../patch-PlugIns_EXRCodec_src_OgreEXRCodec.cpp    | 12 +++++++
 3 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/graphics/ogre3d/Makefile b/graphics/ogre3d/Makefile
index 6120025b510f..1310115e9b0f 100644
--- a/graphics/ogre3d/Makefile
+++ b/graphics/ogre3d/Makefile
@@ -3,7 +3,7 @@
 PORTNAME=	ogre3d
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.11.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics devel
 
 MAINTAINER=	oliver at FreeBSD.org
@@ -54,10 +54,8 @@ FREEIMAGE_LIB_DEPENDS=	libfreeimage.so:graphics/freeimage
 
 OPENEXR_USE=		XORG=ice
 OPENEXR_CMAKE_BOOL=	OGRE_BUILD_PLUGIN_EXRCODEC
-OPENEXR_LIB_DEPENDS=	libIlmImf.so:graphics/openexr \
-			libIlmThread-2_3.so:graphics/ilmbase \
-			libHalf.so:graphics/ilmbase \
-			libIex-2_3.so:graphics/ilmbase
+OPENEXR_LIB_DEPENDS=	libOpenEXR.so:graphics/openexr \
+			libImath.so:math/Imath
 
 OPENGL_CMAKE_BOOL=	OGRE_BUILD_RENDERSYSTEM_GL3PLUS \
 			OGRE_BUILD_RENDERSYSTEM_GL \
@@ -80,7 +78,7 @@ PYTHON_CMAKE_BOOL=	OGRE_BUILD_COMPONENT_PYTHON
 PYTHON_BUILD_DEPENDS=	swig:devel/swig
 PYTHON_USES=		python
 
-CXXFLAGS+=		-DNDEBUG -I${LOCALBASE}/include
+CXXFLAGS+=		-DNDEBUG -I${LOCALBASE}/include -I${LOCALBASE}/include/Imath
 
 post-patch:
 	@${REINPLACE_CMD} -e '\
diff --git a/graphics/ogre3d/files/patch-CMake_Packages_FindOpenEXR.cmake b/graphics/ogre3d/files/patch-CMake_Packages_FindOpenEXR.cmake
new file mode 100644
index 000000000000..b0d44f2adda6
--- /dev/null
+++ b/graphics/ogre3d/files/patch-CMake_Packages_FindOpenEXR.cmake
@@ -0,0 +1,39 @@
+--- CMake/Packages/FindOpenEXR.cmake.orig	2019-04-24 16:21:46 UTC
++++ CMake/Packages/FindOpenEXR.cmake
+@@ -25,7 +25,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
+ )
+ 
+ # Macro to find exr libraries (deduplicating search paths)
+-# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
++# example: OPENEXR_FIND_VAR(OPENEXR_OpenEXR_LIBRARY OpenEXR)
+ MACRO(OPENEXR_FIND_VAR varname libname)
+     FIND_LIBRARY( ${varname}
+         NAMES ${libname}
+@@ -45,20 +45,20 @@ MACRO(OPENEXR_FIND_VAR varname libname)
+ ENDMACRO(OPENEXR_FIND_VAR)
+ 
+ # Macro to find exr libraries (and debug versions)
+-# example: OPENEXR_FIND(IlmImf)
++# example: OPENEXR_FIND(OpenEXR)
+ MACRO(OPENEXR_FIND libname)
+     OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY ${libname})
+     OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY_DEBUG ${libname}d)
+ ENDMACRO(OPENEXR_FIND)
+ 
+-OPENEXR_FIND(IlmImf)
++OPENEXR_FIND(OpenEXR)
+ OPENEXR_FIND(IlmThread)
+ OPENEXR_FIND(Iex)
+-OPENEXR_FIND(Half)
++OPENEXR_FIND(Imath)
+ 
+ SET(OPENEXR_FOUND NO)
+-IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
+-    SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} ${OPENEXR_IlmThread_LIBRARY} ${OPENEXR_Half_LIBRARY} ${OPENEXR_Iex_LIBRARY} )
+-    SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY OPENEXR_IlmThread_LIBRARY OPENEXR_Half_LIBRARY OPENEXR_Iex_LIBRARY )
++IF(OPENEXR_INCLUDE_DIR AND OPENEXR_OpenEXR_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Imath_LIBRARY)
++    SET(OPENEXR_LIBRARIES ${OPENEXR_OpenEXR_LIBRARY} ${OPENEXR_IlmThread_LIBRARY} ${OPENEXR_Imath_LIBRARY} ${OPENEXR_Iex_LIBRARY} )
++    SET(OPENEXR_LIBRARIES_VARS OPENEXR_OpenEXR_LIBRARY OPENEXR_IlmThread_LIBRARY OPENEXR_Imath_LIBRARY OPENEXR_Iex_LIBRARY )
+     SET(OPENEXR_FOUND YES)
+-ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
++ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_OpenEXR_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Imath_LIBRARY)
diff --git a/graphics/ogre3d/files/patch-PlugIns_EXRCodec_src_OgreEXRCodec.cpp b/graphics/ogre3d/files/patch-PlugIns_EXRCodec_src_OgreEXRCodec.cpp
new file mode 100644
index 000000000000..4510a71a94d3
--- /dev/null
+++ b/graphics/ogre3d/files/patch-PlugIns_EXRCodec_src_OgreEXRCodec.cpp
@@ -0,0 +1,12 @@
+--- PlugIns/EXRCodec/src/OgreEXRCodec.cpp.orig	2019-04-24 16:21:46 UTC
++++ PlugIns/EXRCodec/src/OgreEXRCodec.cpp
+@@ -42,6 +42,9 @@ THE SOFTWARE.
+ #include <ImfStringAttribute.h>
+ #include <ImfMatrixAttribute.h>
+ #include <ImfArray.h>
++#include <ImathBox.h>
++#include <ImfHeader.h>
++#include <ImfFrameBuffer.h>
+ 
+ using namespace Imath;
+ using namespace Imf;


More information about the dev-commits-ports-all mailing list