diff options
author | Sam James <sam@gentoo.org> | 2022-02-12 18:01:28 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-15 19:49:50 +0000 |
commit | 22d23e6ab87569d482db5b5aad1f9e11d8c7c377 (patch) | |
tree | daec65dd9cd630961793bdfa0933619ea40754e7 /media-gfx | |
parent | media-libs/ilmbase: adjust to unslotted OpenEXR (diff) | |
download | gentoo-22d23e6ab87569d482db5b5aad1f9e11d8c7c377.tar.gz gentoo-22d23e6ab87569d482db5b5aad1f9e11d8c7c377.tar.bz2 gentoo-22d23e6ab87569d482db5b5aad1f9e11d8c7c377.zip |
media-gfx/blender: adjust to unslotted OpenEXR
Bug: https://bugs.gentoo.org/833197
Bug: https://bugs.gentoo.org/828441
Bug: https://bugs.gentoo.org/833265
Bug: https://bugs.gentoo.org/833196
Bug: https://bugs.gentoo.org/833158
Bug: https://bugs.gentoo.org/831357
Bug: https://bugs.gentoo.org/832862
Bug: https://bugs.gentoo.org/821247
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/blender/blender-2.93.8-r2.ebuild | 4 | ||||
-rw-r--r-- | media-gfx/blender/blender-3.0.1-r3.ebuild | 6 | ||||
-rw-r--r-- | media-gfx/blender/blender-9999.ebuild | 2 | ||||
-rw-r--r-- | media-gfx/blender/files/blender-3.0.1-openexr.patch | 161 |
4 files changed, 75 insertions, 98 deletions
diff --git a/media-gfx/blender/blender-2.93.8-r2.ebuild b/media-gfx/blender/blender-2.93.8-r2.ebuild index 91f10fa0ecec..6de91d891438 100644 --- a/media-gfx/blender/blender-2.93.8-r2.ebuild +++ b/media-gfx/blender/blender-2.93.8-r2.ebuild @@ -43,8 +43,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} # Library versions for official builds can be found in the blender source directory in: # build_files/build_environment/install_deps.sh -# We can use a lower version of OIO but we need a version we know we've -# switched to OpenEXR 3. RDEPEND="${PYTHON_DEPS} dev-libs/boost:=[nls?,threads(+)] dev-libs/lzo:2= @@ -88,7 +86,7 @@ RDEPEND="${PYTHON_DEPS} openimageio? ( >=media-libs/openimageio-2.3.12.0:= ) openexr? ( dev-libs/imath:= - media-libs/openexr:3= + media-libs/openexr:= ) opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] ) openvdb? ( diff --git a/media-gfx/blender/blender-3.0.1-r3.ebuild b/media-gfx/blender/blender-3.0.1-r3.ebuild index ed6d2a645173..1d4c81b283d6 100644 --- a/media-gfx/blender/blender-3.0.1-r3.ebuild +++ b/media-gfx/blender/blender-3.0.1-r3.ebuild @@ -62,7 +62,7 @@ RDEPEND="${PYTHON_DEPS} virtual/opengl alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] ) collada? ( >=media-libs/opencollada-1.6.68 ) - color-management? ( >=media-libs/opencolorio-2.1.1-r3:= ) + color-management? ( >=media-libs/opencolorio-2.1.1-r4:= ) cuda? ( dev-util/nvidia-cuda-toolkit:= ) embree? ( >=media-libs/embree-3.10.0[raymask] ) ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] ) @@ -83,10 +83,10 @@ RDEPEND="${PYTHON_DEPS} nls? ( virtual/libiconv ) openal? ( media-libs/openal ) oidn? ( >=media-libs/oidn-1.4.1 ) - openimageio? ( >=media-libs/openimageio-2.3.12.0:= ) + openimageio? ( >=media-libs/openimageio-2.3.12.0-r1:= ) openexr? ( dev-libs/imath:= - media-libs/openexr:3= + media-libs/openexr:= ) opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] ) openvdb? ( diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild index 43041614f74c..42b0254daa05 100644 --- a/media-gfx/blender/blender-9999.ebuild +++ b/media-gfx/blender/blender-9999.ebuild @@ -86,7 +86,7 @@ RDEPEND="${PYTHON_DEPS} openimageio? ( >=media-libs/openimageio-2.3.12.0:= ) openexr? ( dev-libs/imath:= - media-libs/openexr:3= + >=media-libs/openexr-3:= ) opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] ) openvdb? ( diff --git a/media-gfx/blender/files/blender-3.0.1-openexr.patch b/media-gfx/blender/files/blender-3.0.1-openexr.patch index 3ff6b213b05f..435498cd8a3d 100644 --- a/media-gfx/blender/files/blender-3.0.1-openexr.patch +++ b/media-gfx/blender/files/blender-3.0.1-openexr.patch @@ -1,79 +1,13 @@ -Based on https://src.fedoraproject.org/rpms/blender/blob/rawhide/f/blender-openexr.patch +https://src.fedoraproject.org/rpms/blender/blob/rawhide/f/blender-openexr.patch -The issue is that our dependencies are fragile and want to be linked againt OpenEXR 3 -usually, and we've had to give in and go with it. The patches needed to Blender to -make it go with this (outside of issues related to slotting and adapting to it) -are simple, and will hopefuly bring less pain / build errors / etc than before. -diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake -index 09af546..dfe15cd 100644 ---- a/build_files/cmake/Modules/FindOpenEXR.cmake -+++ b/build_files/cmake/Modules/FindOpenEXR.cmake -@@ -33,6 +33,17 @@ 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-3 CONFIG QUIET) -+if(TARGET Imath-3::Imath) -+SET(_openexr_FIND_COMPONENTS -+ Imath -+ Iex -+ OpenEXR -+ IlmThread -+) -+ -+else() -+ - SET(_openexr_FIND_COMPONENTS - Half - Iex -@@ -41,6 +52,8 @@ SET(_openexr_FIND_COMPONENTS - Imath - ) - -+endif() -+ - SET(_openexr_SEARCH_DIRS - ${OPENEXR_ROOT_DIR} - /opt/lib/openexr -@@ -48,7 +61,8 @@ SET(_openexr_SEARCH_DIRS - - FIND_PATH(OPENEXR_INCLUDE_DIR - NAMES -- OpenEXR/ImfXdr.h -+ OpenEXR-3/ImfXdr.h -+ OpenEXR/ImfXdr.h - HINTS - ${_openexr_SEARCH_DIRS} - PATH_SUFFIXES -@@ -65,6 +79,7 @@ IF(OPENEXR_INCLUDE_DIR) - PATHS - "${OPENEXR_INCLUDE_DIR}" -+ "${OPENEXR_INCLUDE_DIR}/OpenEXR-3" - "${OPENEXR_INCLUDE_DIR}/OpenEXR" - NO_DEFAULT_PATH - ) - -@@ -120,7 +135,10 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG - 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) -+ SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR-3) -+ if(TARGET Imath::Imath) -+ list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath-3) -+ endif() - ENDIF() - - MARK_AS_ADVANCED( -https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch ---- blender-2.93.3.orig/source/blender/imbuf/intern/openexr/openexr_api.cpp -+++ blender-2.93.3/source/blender/imbuf/intern/openexr/openexr_api.cpp +--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp ++++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -32,30 +32,31 @@ #include <stdexcept> #include <string> -#include <Iex.h> -+#include <OpenEXR-3/Iex.h> ++#include <OpenEXR/Iex.h> #include <ImathBox.h> -#include <ImfArray.h> -#include <ImfChannelList.h> @@ -87,19 +21,19 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch -#include <ImfStringAttribute.h> -#include <ImfVersion.h> -#include <half.h> -+#include <OpenEXR-3/ImfArray.h> -+#include <OpenEXR-3/ImfFrameBuffer.h> -+#include <OpenEXR-3/ImfChannelList.h> -+#include <OpenEXR-3/ImfCompression.h> -+#include <OpenEXR-3/ImfCompressionAttribute.h> -+#include <OpenEXR-3/ImfIO.h> -+#include <OpenEXR-3/ImfInputFile.h> -+#include <OpenEXR-3/ImfOutputFile.h> -+#include <OpenEXR-3/ImfPixelType.h> -+#include <OpenEXR-3/ImfStandardAttributes.h> -+#include <OpenEXR-3/ImfStringAttribute.h> -+#include <OpenEXR-3/ImfVersion.h> -+#include <Imath-3/half.h> ++#include <OpenEXR/ImfArray.h> ++#include <OpenEXR/ImfFrameBuffer.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> @@ -110,14 +44,14 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch -#include <ImfPartHelper.h> -#include <ImfPartType.h> -#include <ImfTiledOutputPart.h> -+#include <OpenEXR-3/ImfInputPart.h> -+#include <OpenEXR-3/ImfMultiPartInputFile.h> -+#include <OpenEXR-3/ImfMultiPartOutputFile.h> -+#include <OpenEXR-3/ImfMultiView.h> -+#include <OpenEXR-3/ImfOutputPart.h> -+#include <OpenEXR-3/ImfPartHelper.h> -+#include <OpenEXR-3/ImfPartType.h> -+#include <OpenEXR-3/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 */ @@ -209,3 +143,48 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch { ofs.seekp(pos); check_error(); +--- a/build_files/cmake/Modules/FindOpenEXR.cmake ++++ b/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( |