diff options
author | Adrian Grigo <agrigo2001@yahoo.com.au> | 2020-08-22 11:00:36 +1000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-08-24 14:41:55 +0100 |
commit | ac89d92c599585bf639ab0512237bc005ba8c2ba (patch) | |
tree | b66b9c3b3d385f433b60e3afb5d5202206479ad4 /media-gfx | |
parent | media-gfx/blender: Update blender 2.79b for openvdb (diff) | |
download | gentoo-ac89d92c599585bf639ab0512237bc005ba8c2ba.tar.gz gentoo-ac89d92c599585bf639ab0512237bc005ba8c2ba.tar.bz2 gentoo-ac89d92c599585bf639ab0512237bc005ba8c2ba.zip |
media-gfx/blender: Patch for opencollada > 1.65
Opencollada 1.65 added a pure virtual function to writeAnimationClip
which prevents blender from creating an implementation of
DocumentImporter in the usual manner.
These patches are backported from blender 2.80-rc1 which add
definitions for writeAnimationClip to DoucmentImporter resolving the
issue.
Thanks to Dennis Schridde for finding them.
Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au>
Closes: https://bugs.gentoo.org/733500
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/blender/blender-2.79b-r2.ebuild | 1 | ||||
-rw-r--r-- | media-gfx/blender/files/blender-2.79b-fix-opencollada.patch | 112 |
2 files changed, 113 insertions, 0 deletions
diff --git a/media-gfx/blender/blender-2.79b-r2.ebuild b/media-gfx/blender/blender-2.79b-r2.ebuild index 0a45c7112732..1b08a01395b6 100644 --- a/media-gfx/blender/blender-2.79b-r2.ebuild +++ b/media-gfx/blender/blender-2.79b-r2.ebuild @@ -106,6 +106,7 @@ PATCHES=( "${FILESDIR}/${P}-gcc-8.patch" "${FILESDIR}/${P}-ffmpeg-4-compat.patch" "${FILESDIR}/${P}-fix-for-gcc9-new-openmp-data-sharing.patch" + "${FILESDIR}/${P}-fix-opencollada.patch" ) blender_check_requirements() { diff --git a/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch b/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch new file mode 100644 index 000000000000..ab1704864a02 --- /dev/null +++ b/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch @@ -0,0 +1,112 @@ +Opencollada 1.65 and later added a pure virtual function writeAnimationClip +so the compiler is unable to create a DocumentImporter implementation. +These patches are backported from blender 2.80-r1 which fix the issue. + +See https://developer.blender.org/rB10c50d7dbf7578b35b3bf19a1948f556f9eb203b +and https://developer.blender.org/rB3552731551ef1845b493ffebf78be5a42527e9f2 + +Thanks to Dennis Schridde for finding them. + +--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig 2020-07-23 18:00:09.421620416 +0200 ++++ blender-2.79b/source/blender/collada/CMakeLists.txt 2020-07-23 18:00:13.868584964 +0200 +@@ -25,6 +25,18 @@ + + remove_strict_flags() + ++FIND_FILE(_opencollada_with_animation_clip ++ NAMES ++ COLLADAFWAnimationClip.h ++ PATHS ++ ${OPENCOLLADA_INCLUDE_DIRS} ++ NO_DEFAULT_PATH ++ ) ++ ++IF(_opencollada_with_animation_clip) ++ add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP) ++ENDIF() ++ + set(INC + . + ../blenkernel +--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig 2018-03-23 16:10:23.000000000 +0100 ++++ blender-2.79b/source/blender/collada/DocumentImporter.h 2020-07-23 18:00:13.897584733 +0200 +@@ -108,6 +108,11 @@ + + bool writeAnimationList(const COLLADAFW::AnimationList*); + ++#if OPENCOLLADA_WITH_ANIMATION_CLIP ++ // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp) ++ bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip); ++#endif ++ + bool writeGeometry(const COLLADAFW::Geometry*); + + bool writeMaterial(const COLLADAFW::Material*); +--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig 2018-03-23 16:22:25.000000000 +0100 ++++ blender-2.79b/source/blender/collada/DocumentImporter.cpp 2020-07-23 18:00:13.896584741 +0200 +@@ -1349,6 +1349,19 @@ + ++#if OPENCOLLADA_WITH_ANIMATION_CLIP ++// Since opencollada 1.6.68 ++// called on post-process stage after writeVisualScenes ++bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip) ++{ ++ if (mImportStage != General) ++ return true; ++ ++ return true; ++ //return animation_clip_importer.write_animation_clip(animationClip); // TODO: implement import of AnimationClips ++} ++#endif ++ + // this is called on postprocess, before writeVisualScenes + bool DocumentImporter::writeController(const COLLADAFW::Controller *controller) + { + if (mImportStage != General) + return true; +--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig 2020-07-23 18:00:45.035336449 +0200 ++++ blender-2.79b/source/blender/collada/CMakeLists.txt 2020-07-23 18:00:52.459277244 +0200 +@@ -24,8 +24,7 @@ + # ***** END GPL LICENSE BLOCK ***** + + remove_strict_flags() +- +-FIND_FILE(_opencollada_with_animation_clip ++FIND_FILE(OPENCOLLADA_ANIMATION_CLIP + NAMES + COLLADAFWAnimationClip.h + PATHS +@@ -33,8 +32,11 @@ + NO_DEFAULT_PATH + ) + +-IF(_opencollada_with_animation_clip) +- add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP) ++IF(OPENCOLLADA_ANIMATION_CLIP) ++ message(STATUS "Found opencollada: ${OPENCOLLADA_ANIMATION_CLIP} ") ++ add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP) ++ELSE() ++ message(STATUS "opencollada: Build without animation clip support") + ENDIF() + + set(INC +--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig 2020-07-23 18:00:13.897584733 +0200 ++++ blender-2.79b/source/blender/collada/DocumentImporter.h 2020-07-23 18:00:52.487277021 +0200 +@@ -108,7 +108,7 @@ + + bool writeAnimationList(const COLLADAFW::AnimationList*); + +-#if OPENCOLLADA_WITH_ANIMATION_CLIP ++#if WITH_OPENCOLLADA_ANIMATION_CLIP + // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp) + bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip); + #endif +--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig 2020-07-23 18:00:13.896584741 +0200 ++++ blender-2.79b/source/blender/collada/DocumentImporter.cpp 2020-07-23 18:00:52.486277028 +0200 +@@ -1349,5 +1349,5 @@ + +-#if OPENCOLLADA_WITH_ANIMATION_CLIP ++#if WITH_OPENCOLLADA_ANIMATION_CLIP + // Since opencollada 1.6.68 + // called on post-process stage after writeVisualScenes + bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip) |