Notification time stamped 2021-08-28 19:43:29 UTC
From 14b97c78d64d3ab62ef5e9af0fa40f528a51acae Mon Sep 17 00:00:00 2001
From: Richard Shaw <hobbes1069(a)gmail.com>
Date: Aug 17 2021 23:14:48 +0000
Subject: Add minimal patch for OpenEXR/Imath 3 compatibility.
---
diff --git a/blender-openexr.patch b/blender-openexr.patch
new file mode 100644
index 0000000..953cd03
--- /dev/null
+++ b/blender-openexr.patch
@@ -0,0 +1,103 @@
+Index: blender-2.93.1/source/blender/imbuf/intern/openexr/openexr_api.cpp
+===================================================================
+--- blender-2.93.1.orig/source/blender/imbuf/intern/openexr/openexr_api.cpp
++++ blender-2.93.1/source/blender/imbuf/intern/openexr/openexr_api.cpp
+@@ -32,30 +32,30 @@
+ #include <stdexcept>
+ #include <string>
+
+-#include <Iex.h>
++#include <OpenEXR/Iex.h>
+ #include <ImathBox.h>
+-#include <ImfArray.h>
+-#include <ImfChannelList.h>
+-#include <ImfCompression.h>
+-#include <ImfCompressionAttribute.h>
+-#include <ImfIO.h>
+-#include <ImfInputFile.h>
+-#include <ImfOutputFile.h>
+-#include <ImfPixelType.h>
+-#include <ImfStandardAttributes.h>
+-#include <ImfStringAttribute.h>
+-#include <ImfVersion.h>
+-#include <half.h>
++#include <OpenEXR/ImfArray.h>
++#include <OpenEXR/ImfChannelList.h>
++#include <OpenEXR/ImfCompression.h>
++#include <OpenEXR/ImfCompressionAttribute.h>
++#include <OpenEXR/ImfIO.h>
++#include <OpenEXR/ImfInputFile.h>
++#include <OpenEXR/ImfOutputFile.h>
++#include <OpenEXR/ImfPixelType.h>
++#include <OpenEXR/ImfStandardAttributes.h>
++#include <OpenEXR/ImfStringAttribute.h>
++#include <OpenEXR/ImfVersion.h>
++#include <Imath/half.h>
+
+ /* multiview/multipart */
+-#include <ImfInputPart.h>
+-#include <ImfMultiPartInputFile.h>
+-#include <ImfMultiPartOutputFile.h>
+-#include <ImfMultiView.h>
+-#include <ImfOutputPart.h>
+-#include <ImfPartHelper.h>
+-#include <ImfPartType.h>
+-#include <ImfTiledOutputPart.h>
++#include <OpenEXR/ImfInputPart.h>
++#include <OpenEXR/ImfMultiPartInputFile.h>
++#include <OpenEXR/ImfMultiPartOutputFile.h>
++#include <OpenEXR/ImfMultiView.h>
++#include <OpenEXR/ImfOutputPart.h>
++#include <OpenEXR/ImfPartHelper.h>
++#include <OpenEXR/ImfPartType.h>
++#include <OpenEXR/ImfTiledOutputPart.h>
+
+ #include "DNA_scene_types.h" /* For OpenEXR compression constants */
+
+Index: blender-2.93.1/build_files/cmake/Modules/FindOpenEXR.cmake
+===================================================================
+--- blender-2.93.1.orig/build_files/cmake/Modules/FindOpenEXR.cmake
++++ blender-2.93.1/build_files/cmake/Modules/FindOpenEXR.cmake
+@@ -25,6 +25,7 @@
+ # see accompanying file BSD-3-Clause-license.txt for details.
+ #=============================================================================
+
++
+ # If OPENEXR_ROOT_DIR was defined in the environment, use it.
+ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
+ SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
+@@ -33,6 +34,16 @@ ENDIF()
+ # Old versions (before 2.0?) do not have any version string, just assuming this should
be fine though.
+ SET(_openexr_libs_ver_init "2.0")
+
++find_package(Imath CONFIG QUIET)
++if(TARGET Imath::Imath)
++SET(_openexr_FIND_COMPONENTS
++ Imath
++ Iex
++ OpenEXR
++ IlmThread
++)
++
++else()
+ SET(_openexr_FIND_COMPONENTS
+ Half
+ Iex
+@@ -40,6 +51,7 @@ SET(_openexr_FIND_COMPONENTS
+ IlmThread
+ Imath
+ )
++endif()
+
+ SET(_openexr_SEARCH_DIRS
+ ${OPENEXR_ROOT_DIR}
+@@ -121,6 +133,9 @@ IF(OPENEXR_FOUND)
+ SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
+ # Both include paths are needed because of dummy OSL headers mixing #include
<OpenEXR/foo.h> and #include <foo.h> :(
+ SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
++ if(TARGET Imath::Imath)
++ list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath)
++ endif()
+ ENDIF()
+
+ MARK_AS_ADVANCED(
diff --git a/blender.spec b/blender.spec
index b7b8023..95126ec 100644
--- a/blender.spec
+++ b/blender.spec
@@ -39,6 +39,11 @@ URL:
http://www.blender.org
Source0:
http://download.%{name}.org/source/%{name}-%{version}.tar.xz
Source1: macros.%{name}
+# One-way minimal patch for OpenEXR/Imath 3.
+%if 0%{?fedora} > 34
+Patch0: blender-openexr.patch
+%endif
+
# Include missing pyconfig header for 3.10
#Patch: %%{name}-usd-pythonlibs-fix.diff
@@ -139,7 +144,12 @@ BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(vpx)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(OpenColorIO)
+%if 0%{?fedora} > 34
+BuildRequires: cmake(Imath)
+BuildRequires: cmake(OpenEXR)
+%else
BuildRequires: pkgconfig(OpenEXR)
+%endif
BuildRequires: pkgconfig(OpenImageIO)
BuildRequires: pkgconfig(libopenjp2)
BuildRequires: pkgconfig(tbb)
https://src.fedoraproject.org/rpms/blender/c/14b97c78d64d3ab62ef5e9af0fa4...