Notification time stamped 2021-08-28 19:54:57 UTC
From f133d7a5a9273bcf92bd21f38bc34bf3fbcd2317 Mon Sep 17 00:00:00 2001
From: Luya Tshimbalanga <luya(a)fedoraproject.org>
Date: Aug 22 2021 03:31:59 +0000
Subject: Various fixes
Fix USD support
Enable OSL support for x64 architecture
---
diff --git a/blender-usd-pythonlibs-fix.diff b/blender-usd-pythonlibs-fix.diff
new file mode 100644
index 0000000..28fd72e
--- /dev/null
+++ b/blender-usd-pythonlibs-fix.diff
@@ -0,0 +1,20 @@
+diff -ru blender-2.93.3-original/source/blender/io/usd/CMakeLists.txt
blender-2.93.3/source/blender/io/usd/CMakeLists.txt
+--- blender-2.93.3-original/source/blender/io/usd/CMakeLists.txt 2021-04-20
19:02:39.000000000 -0700
++++ blender-2.93.3/source/blender/io/usd/CMakeLists.txt 2021-08-19 22:52:43.578924282
-0700
+@@ -53,6 +53,7 @@
+ ${USD_INCLUDE_DIRS}
+ ${BOOST_INCLUDE_DIR}
+ ${TBB_INCLUDE_DIR}
++ ${PYTHON_INCLUDE_DIRS}
+ )
+
+ set(SRC
+@@ -86,6 +87,8 @@
+
+ list(APPEND LIB
+ ${BOOST_LIBRARIES}
++ ${PYTHON_LINKFLAGS}
++ ${PYTHON_LIBRARIES}
+ )
+
+ list(APPEND LIB
diff --git a/blender-usd-writer-abstract-fix.diff b/blender-usd-writer-abstract-fix.diff
new file mode 100644
index 0000000..7b36a8f
--- /dev/null
+++ b/blender-usd-writer-abstract-fix.diff
@@ -0,0 +1,14 @@
+diff -Naur blender-2.93.3.original/source/blender/io/usd/intern/usd_writer_abstract.cc
blender-2.93.3/source/blender/io/usd/intern/usd_writer_abstract.cc
+---
blender-2.93.3.original/source/blender/io/usd/intern/usd_writer_abstract.cc 2021-04-20
19:02:39.000000000 -0700
++++ blender-2.93.3/source/blender/io/usd/intern/usd_writer_abstract.cc 2021-08-21
18:39:23.531036813 -0700
+@@ -102,7 +102,9 @@
+ shader.CreateInput(usdtokens::metallic,
pxr::SdfValueTypeNames->Float).Set(material->metallic);
+
+ /* Connect the shader and the material together. */
+- usd_material.CreateSurfaceOutput().ConnectToSource(shader, usdtokens::surface);
++ usd_material.CreateSurfaceOutput().ConnectToSource(
++ shader.ConnectableAPI(),
++ usdtokens::surface);
+
+ return usd_material;
+ }
diff --git a/blender.spec b/blender.spec
index cf4428c..13086af 100644
--- a/blender.spec
+++ b/blender.spec
@@ -4,8 +4,8 @@
%bcond_with clang
%bcond_with ffmpeg
# Needed to enable osl support for cycles rendering
-%bcond_with llvm
-%bcond_with openshading
+%bcond_without llvm
+%bcond_without openshading
%bcond_without system_eigen3
%bcond_with wayland
@@ -32,6 +32,7 @@ Epoch: 1
Version: %{blender_api}.3
Release: %autorelease
+
Summary: 3D modeling, animation, rendering and post-production
License: GPLv2
URL:
http://www.blender.org
@@ -45,7 +46,11 @@ Patch0: blender-openexr.patch
%endif
# Include missing pyconfig header for 3.10
-#Patch: %%{name}-usd-pythonlibs-fix.diff
+Patch1: %{name}-usd-pythonlibs-fix.diff
+
+# Fix USD build
+#
https://developer.blender.org/T90842
+Patch2: %{name}-usd-writer-abstract-fix.diff
# Development stuff
BuildRequires: boost-devel
@@ -95,13 +100,14 @@ BuildRequires: pkgconfig(lzo2)
BuildRequires: pkgconfig(zlib)
# 3D modeling stuff
+BuildRequires: cmake(ceres)
%if %{with embree}
BuildRequires: cmake(embree)
%endif
BuildRequires: opensubdiv-devel
%if %{with openshading}
# Use oslc compiler
-BuildRequires: openshadinglanguage
+BuildRequires: openshadinglanguage-common-headers
BuildRequires: pkgconfig(oslcomp)
%endif
%if %{with oidn}
@@ -143,7 +149,8 @@ BuildRequires: pkgconfig(theora)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(vpx)
BuildRequires: pkgconfig(libwebp)
-BuildRequires: pkgconfig(OpenColorIO)
+# OpenColorIO 2 and up required
+BuildRequires: pkgconfig(OpenColorIO) > 1
%if 0%{?fedora} > 34
BuildRequires: cmake(Imath)
BuildRequires: cmake(OpenEXR)
https://src.fedoraproject.org/rpms/blender/c/f133d7a5a9273bcf92bd21f38bc3...