1 Index: blender-2.93.3/source/blender/imbuf/intern/openexr/openexr_api.cpp
2 ===================================================================
3 --- blender-2.93.3.orig/source/blender/imbuf/intern/openexr/openexr_api.cpp
4 +++ blender-2.93.3/source/blender/imbuf/intern/openexr/openexr_api.cpp
10 +#include <OpenEXR/Iex.h>
12 -#include <ImfArray.h>
13 -#include <ImfChannelList.h>
14 -#include <ImfCompression.h>
15 -#include <ImfCompressionAttribute.h>
17 -#include <ImfInputFile.h>
18 -#include <ImfOutputFile.h>
19 -#include <ImfPixelType.h>
20 -#include <ImfStandardAttributes.h>
21 -#include <ImfStringAttribute.h>
22 -#include <ImfVersion.h>
24 +#include <OpenEXR/ImfArray.h>
25 +#include <OpenEXR/ImfFrameBuffer.h>
26 +#include <OpenEXR/ImfChannelList.h>
27 +#include <OpenEXR/ImfCompression.h>
28 +#include <OpenEXR/ImfCompressionAttribute.h>
29 +#include <OpenEXR/ImfIO.h>
30 +#include <OpenEXR/ImfInputFile.h>
31 +#include <OpenEXR/ImfOutputFile.h>
32 +#include <OpenEXR/ImfPixelType.h>
33 +#include <OpenEXR/ImfStandardAttributes.h>
34 +#include <OpenEXR/ImfStringAttribute.h>
35 +#include <OpenEXR/ImfVersion.h>
36 +#include <Imath/half.h>
38 /* multiview/multipart */
39 -#include <ImfInputPart.h>
40 -#include <ImfMultiPartInputFile.h>
41 -#include <ImfMultiPartOutputFile.h>
42 -#include <ImfMultiView.h>
43 -#include <ImfOutputPart.h>
44 -#include <ImfPartHelper.h>
45 -#include <ImfPartType.h>
46 -#include <ImfTiledOutputPart.h>
47 +#include <OpenEXR/ImfInputPart.h>
48 +#include <OpenEXR/ImfMultiPartInputFile.h>
49 +#include <OpenEXR/ImfMultiPartOutputFile.h>
50 +#include <OpenEXR/ImfMultiView.h>
51 +#include <OpenEXR/ImfOutputPart.h>
52 +#include <OpenEXR/ImfPartHelper.h>
53 +#include <OpenEXR/ImfPartType.h>
54 +#include <OpenEXR/ImfTiledOutputPart.h>
56 #include "DNA_scene_types.h" /* For OpenEXR compression constants */
58 @@ -131,12 +132,12 @@ class IMemStream : public Imf::IStream {
62 - Int64 tellg() override
63 + uint64_t tellg() override
68 - void seekg(Int64 pos) override
69 + void seekg(uint64_t pos) override
73 @@ -146,8 +147,8 @@ class IMemStream : public Imf::IStream {
81 unsigned char *_exrbuf;
84 @@ -182,12 +183,12 @@ class IFileStream : public Imf::IStream
88 - Int64 tellg() override
89 + uint64_t tellg() override
91 return std::streamoff(ifs.tellg());
94 - void seekg(Int64 pos) override
95 + void seekg(uint64_t pos) override
99 @@ -231,19 +232,19 @@ class OMemStream : public OStream {
100 ibuf->encodedsize += n;
103 - Int64 tellp() override
104 + uint64_t tellp() override
109 - void seekp(Int64 pos) override
110 + void seekp(uint64_t pos) override
117 - void ensure_size(Int64 size)
118 + void ensure_size(uint64_t size)
120 /* if buffer is too small increase it. */
121 while (size > ibuf->encodedbuffersize) {
122 @@ -254,7 +255,7 @@ class OMemStream : public OStream {
130 /* File Output Stream */
131 @@ -284,12 +285,12 @@ class OFileStream : public OStream {
135 - Int64 tellp() override
136 + uint64_t tellp() override
138 return std::streamoff(ofs.tellp());
141 - void seekp(Int64 pos) override
142 + void seekp(uint64_t pos) override
146 Index: blender-2.93.3/build_files/cmake/Modules/FindOpenEXR.cmake
147 ===================================================================
148 --- blender-2.93.3.orig/build_files/cmake/Modules/FindOpenEXR.cmake
149 +++ blender-2.93.3/build_files/cmake/Modules/FindOpenEXR.cmake
151 # see accompanying file BSD-3-Clause-license.txt for details.
152 #=============================================================================
155 # If OPENEXR_ROOT_DIR was defined in the environment, use it.
156 IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
157 SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
158 @@ -33,6 +34,16 @@ ENDIF()
159 # Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
160 SET(_openexr_libs_ver_init "2.0")
162 +find_package(Imath CONFIG QUIET)
163 +if(TARGET Imath::Imath)
164 +SET(_openexr_FIND_COMPONENTS
172 SET(_openexr_FIND_COMPONENTS
175 @@ -40,6 +51,7 @@ SET(_openexr_FIND_COMPONENTS
181 SET(_openexr_SEARCH_DIRS
183 @@ -121,6 +133,9 @@ IF(OPENEXR_FOUND)
184 SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
185 # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
186 SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
187 + if(TARGET Imath::Imath)
188 + list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath)