1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

graphics/yafaray: make compatible with OpenEXR/Imath 3.0

This commit is contained in:
Matthias Andree 2021-04-11 02:44:26 +02:00
parent 136cf0c62d
commit 581762cb8d
3 changed files with 70 additions and 3 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= yafaray
DISTVERSIONPREFIX= v
DISTVERSION= 3.5.1
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= graphics
MAINTAINER= yuri@FreeBSD.org
@ -19,8 +19,8 @@ ONLY_FOR_ARCHS_REASON= assembly is only for amd64 and i386, but it breaks on i38
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libfreetype.so:print/freetype2 \
libHalf.so:graphics/ilmbase \
libIlmImf.so:graphics/openexr \
libImath.so:math/Imath \
libOpenEXR.so:graphics/openexr \
libopencv_photo.so:graphics/opencv \
libopencv_core.so:graphics/opencv \
libpng.so:graphics/png \

View File

@ -0,0 +1,56 @@
--- CMakeModules/FindOpenEXR.cmake.orig 2020-07-13 08:15:40 UTC
+++ CMakeModules/FindOpenEXR.cmake
@@ -26,10 +26,13 @@ IF(ZLIB_FOUND)
/sw/include
/opt/local/include)
- FIND_LIBRARY(OPENEXR_HALF_LIBRARY
- NAMES Half
- PATHS ${LIBRARY_DIRS})
-
+ FIND_PATH(IMATH_INCLUDE_PATH ImathVec.h
+ PATH_SUFFIXES Imath
+ /usr/include
+ /usr/local/include
+ /sw/include
+ /opt/local/include)
+
FIND_LIBRARY(OPENEXR_IEX_LIBRARY
NAMES Iex
PATHS ${LIBRARY_DIRS})
@@ -39,7 +42,7 @@ IF(ZLIB_FOUND)
PATHS ${LIBRARY_DIRS})
FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY
- NAMES IlmImf
+ NAMES OpenEXR
PATHS ${LIBRARY_DIRS})
FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY
@@ -50,15 +53,15 @@ ENDIF(ZLIB_FOUND)
#MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY})
-IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+IF (OPENEXR_INCLUDE_PATH AND IMATH_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY)
SET(OPENEXR_FOUND TRUE)
- SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
- SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
+ SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_PATH} ${IMATH_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
+ SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
IF(OPENEXR_ILMTHREAD_LIBRARY)
SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ${OPENEXR_ILMTHREAD_LIBRARY})
ENDIF(OPENEXR_ILMTHREAD_LIBRARY)
-ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY)
IF(OPENEXR_FOUND)
IF(NOT OPENEXR_FIND_QUIETLY)
@@ -75,5 +78,4 @@ MARK_AS_ADVANCED(
OPENEXR_LIBRARIES
OPENEXR_ILMIMF_LIBRARY
OPENEXR_IMATH_LIBRARY
- OPENEXR_IEX_LIBRARY
- OPENEXR_HALF_LIBRARY)
+ OPENEXR_IEX_LIBRARY)

View File

@ -0,0 +1,11 @@
--- src/image_handlers/exrHandler.cc.orig 2020-07-13 08:15:40 UTC
+++ src/image_handlers/exrHandler.cc
@@ -35,6 +35,8 @@
#include <ImfVersion.h>
#include <IexThrowErrnoExc.h>
+typedef uint64_t Int64;
+
using namespace Imf;
using namespace Imath;