[packages/blender] - up to 3.0.1

baggins baggins at pld-linux.org
Sun Feb 13 22:56:03 CET 2022


commit 4ec3633de16fbd3b7e271b386468e33e01cf3775
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Feb 13 22:55:44 2022 +0100

    - up to 3.0.1

 0006-fix_FTBFS_with_python3.9.patch | 152 ----------------------------
 blender.spec                        |  19 ++--
 format-security.patch               |   4 +-
 oiio-2.3.patch                      |  29 ++++++
 openexr3.patch                      | 192 ++++++++++++++++++++++++++++++++++++
 5 files changed, 235 insertions(+), 161 deletions(-)
---
diff --git a/blender.spec b/blender.spec
index 864e93a..8d72d1a 100644
--- a/blender.spec
+++ b/blender.spec
@@ -4,15 +4,16 @@
 Summary:	3D modeling, rendering, animation and game creation package
 Summary(pl.UTF-8):	Pakiet do tworzenia animacji 3D oraz gier
 Name:		blender
-Version:	2.83.12
-Release:	4
+Version:	3.0.1
+Release:	1
 License:	GPL
 Group:		X11/Applications/Graphics
 Source0:	http://download.blender.org/source/%{name}-%{version}.tar.xz
-# Source0-md5:	6c890dfb3599bffed5edc05d43f61506
+# Source0-md5:	41cccf2fe68b9b307204e9b9b2278b0c
 Patch0:		%{name}-2.76-droid.patch
 Patch1:		format-security.patch
-Patch2:		0006-fix_FTBFS_with_python3.9.patch
+Patch2:		oiio-2.3.patch
+Patch3:		openexr3.patch
 URL:		http://www.blender.org/
 BuildRequires:	OpenAL-devel
 BuildRequires:	OpenColorIO-devel
@@ -23,6 +24,7 @@ BuildRequires:	OpenImageIO-devel
 BuildRequires:	SDL2-devel
 BuildRequires:	boost-devel
 BuildRequires:	cmake
+BuildRequires:	embree-devel
 BuildRequires:	ffmpeg-devel >= 0.4.9-4.20080930.1
 BuildRequires:	fftw3-devel
 BuildRequires:	freealut-devel
@@ -56,6 +58,7 @@ Requires(post,postun):	desktop-file-utils
 Requires:	OpenGL
 Requires:	freetype
 Requires:	python3-modules
+ExclusiveArch:	%{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_noautoreqdep	libGL.so.1 libGLU.so.1
@@ -74,9 +77,9 @@ Blender to darmowy i w pełni funkcjonalny pakiet do tworzenia animacji
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
-      release/bin/blender-thumbnailer.py \
       release/scripts/addons/io_curve_svg/svg_util_test.py \
       release/scripts/addons/io_scene_fbx/fbx2json.py \
       release/scripts/addons/io_scene_fbx/json2fbx.py \
@@ -129,7 +132,9 @@ install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_mandir}/man1}
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-./doc/manpage/blender.1.py $RPM_BUILD_ROOT%{_bindir}/blender $RPM_BUILD_ROOT%{_mandir}/man1/blender.1
+./doc/manpage/blender.1.py \
+	--blender $RPM_BUILD_ROOT%{_bindir}/blender \
+	--output $RPM_BUILD_ROOT%{_mandir}/man1/blender.1
 
 #%find_lang %{name}
 
@@ -147,7 +152,7 @@ rm -rf $RPM_BUILD_ROOT
 # -f %{name}.lang
 %doc doc/license/bf-members.txt doc/guides/*.txt
 %attr(755,root,root) %{_bindir}/blender
-%attr(755,root,root) %{_bindir}/blender-thumbnailer.py
+%attr(755,root,root) %{_bindir}/blender-thumbnailer
 %attr(755,root,root) %{_datadir}/%{name}
 %{_desktopdir}/*.desktop
 %{_iconsdir}/hicolor/scalable/apps/blender.svg
diff --git a/0006-fix_FTBFS_with_python3.9.patch b/0006-fix_FTBFS_with_python3.9.patch
deleted file mode 100644
index 1ca36a2..0000000
--- a/0006-fix_FTBFS_with_python3.9.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From: Campbell Barton <ideasman42 at gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: fix_FTBFS_with_python3.9
-
-Resolves T78089, no functional changes.
----
- source/blender/python/mathutils/mathutils_Matrix.c     | 16 +++++++++-------
- source/blender/python/mathutils/mathutils_Quaternion.c | 14 ++++++++------
- source/blender/python/mathutils/mathutils_Vector.c     |  6 +++---
- 3 files changed, 20 insertions(+), 16 deletions(-)
-
-diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
-index 7a3a92d..d380b61 100644
---- a/source/blender/python/mathutils/mathutils_Matrix.c
-+++ b/source/blender/python/mathutils/mathutils_Matrix.c
-@@ -42,7 +42,8 @@ static PyObject *Matrix_copy_notest(MatrixObject *self, const float *matrix);
- static PyObject *Matrix_copy(MatrixObject *self);
- static PyObject *Matrix_deepcopy(MatrixObject *self, PyObject *args);
- static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *value);
--static PyObject *matrix__apply_to_copy(PyNoArgsFunction matrix_func, MatrixObject *self);
-+static PyObject *matrix__apply_to_copy(PyObject *(*matrix_func)(MatrixObject *),
-+                                       MatrixObject *self);
- static PyObject *MatrixAccess_CreatePyObject(MatrixObject *matrix, const eMatrixAccess_t type);
- 
- static int matrix_row_vector_check(MatrixObject *mat, VectorObject *vec, int row)
-@@ -395,14 +396,15 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-   return NULL;
- }
- 
--static PyObject *matrix__apply_to_copy(PyNoArgsFunction matrix_func, MatrixObject *self)
-+static PyObject *matrix__apply_to_copy(PyObject *(*matrix_func)(MatrixObject *),
-+                                       MatrixObject *self)
- {
-   PyObject *ret = Matrix_copy(self);
-   if (ret) {
--    PyObject *ret_dummy = matrix_func(ret);
-+    PyObject *ret_dummy = matrix_func((MatrixObject *)ret);
-     if (ret_dummy) {
-       Py_DECREF(ret_dummy);
--      return (PyObject *)ret;
-+      return ret;
-     }
-     else { /* error */
-       Py_DECREF(ret);
-@@ -1737,7 +1739,7 @@ PyDoc_STRVAR(
-     "   .. note:: When the matrix cant be adjugated a :exc:`ValueError` exception is raised.\n");
- static PyObject *Matrix_adjugated(MatrixObject *self)
- {
--  return matrix__apply_to_copy((PyNoArgsFunction)Matrix_adjugate, self);
-+  return matrix__apply_to_copy(Matrix_adjugate, self);
- }
- 
- PyDoc_STRVAR(
-@@ -1945,7 +1947,7 @@ PyDoc_STRVAR(Matrix_transposed_doc,
-              "   :rtype: :class:`Matrix`\n");
- static PyObject *Matrix_transposed(MatrixObject *self)
- {
--  return matrix__apply_to_copy((PyNoArgsFunction)Matrix_transpose, self);
-+  return matrix__apply_to_copy(Matrix_transpose, self);
- }
- 
- /*---------------------------matrix.normalize() ------------------*/
-@@ -1991,7 +1993,7 @@ PyDoc_STRVAR(Matrix_normalized_doc,
-              "   :rtype: :class:`Matrix`\n");
- static PyObject *Matrix_normalized(MatrixObject *self)
- {
--  return matrix__apply_to_copy((PyNoArgsFunction)Matrix_normalize, self);
-+  return matrix__apply_to_copy(Matrix_normalize, self);
- }
- 
- /*---------------------------matrix.zero() -----------------------*/
-diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
-index 39d84c1..7ce0ea5 100644
---- a/source/blender/python/mathutils/mathutils_Quaternion.c
-+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
-@@ -34,7 +34,8 @@
- 
- #define QUAT_SIZE 4
- 
--static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObject *self);
-+static PyObject *quat__apply_to_copy(PyObject *(*quat_func)(QuaternionObject *),
-+                                     QuaternionObject *self);
- static void quat__axis_angle_sanitize(float axis[3], float *angle);
- static PyObject *Quaternion_copy(QuaternionObject *self);
- static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args);
-@@ -463,7 +464,7 @@ PyDoc_STRVAR(Quaternion_normalized_doc,
-              "   :rtype: :class:`Quaternion`\n");
- static PyObject *Quaternion_normalized(QuaternionObject *self)
- {
--  return quat__apply_to_copy((PyNoArgsFunction)Quaternion_normalize, self);
-+  return quat__apply_to_copy(Quaternion_normalize, self);
- }
- 
- PyDoc_STRVAR(Quaternion_invert_doc,
-@@ -490,7 +491,7 @@ PyDoc_STRVAR(Quaternion_inverted_doc,
-              "   :rtype: :class:`Quaternion`\n");
- static PyObject *Quaternion_inverted(QuaternionObject *self)
- {
--  return quat__apply_to_copy((PyNoArgsFunction)Quaternion_invert, self);
-+  return quat__apply_to_copy(Quaternion_invert, self);
- }
- 
- PyDoc_STRVAR(Quaternion_identity_doc,
-@@ -553,7 +554,7 @@ PyDoc_STRVAR(Quaternion_conjugated_doc,
-              "   :rtype: :class:`Quaternion`\n");
- static PyObject *Quaternion_conjugated(QuaternionObject *self)
- {
--  return quat__apply_to_copy((PyNoArgsFunction)Quaternion_conjugate, self);
-+  return quat__apply_to_copy(Quaternion_conjugate, self);
- }
- 
- PyDoc_STRVAR(Quaternion_copy_doc,
-@@ -1385,10 +1386,11 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw
-   return Quaternion_CreatePyObject(quat, type);
- }
- 
--static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObject *self)
-+static PyObject *quat__apply_to_copy(PyObject *(*quat_func)(QuaternionObject *),
-+                                     QuaternionObject *self)
- {
-   PyObject *ret = Quaternion_copy(self);
--  PyObject *ret_dummy = quat_func(ret);
-+  PyObject *ret_dummy = quat_func((QuaternionObject *)ret);
-   if (ret_dummy) {
-     Py_DECREF(ret_dummy);
-     return ret;
-diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
-index 6ea0dd5..c49cde8 100644
---- a/source/blender/python/mathutils/mathutils_Vector.c
-+++ b/source/blender/python/mathutils/mathutils_Vector.c
-@@ -96,10 +96,10 @@ static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-   return Vector_CreatePyObject_alloc(vec, size, type);
- }
- 
--static PyObject *vec__apply_to_copy(PyNoArgsFunction vec_func, VectorObject *self)
-+static PyObject *vec__apply_to_copy(PyObject *(*vec_func)(VectorObject *), VectorObject *self)
- {
-   PyObject *ret = Vector_copy(self);
--  PyObject *ret_dummy = vec_func(ret);
-+  PyObject *ret_dummy = vec_func((VectorObject *)ret);
-   if (ret_dummy) {
-     Py_DECREF(ret_dummy);
-     return (PyObject *)ret;
-@@ -376,7 +376,7 @@ PyDoc_STRVAR(Vector_normalized_doc,
-              "   :rtype: :class:`Vector`\n");
- static PyObject *Vector_normalized(VectorObject *self)
- {
--  return vec__apply_to_copy((PyNoArgsFunction)Vector_normalize, self);
-+  return vec__apply_to_copy(Vector_normalize, self);
- }
- 
- PyDoc_STRVAR(Vector_resize_doc,
diff --git a/format-security.patch b/format-security.patch
index e8675b2..a565eb7 100644
--- a/format-security.patch
+++ b/format-security.patch
@@ -6,5 +6,5 @@
    ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT     -Wno-int-in-bool-context)
 -  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT                  -Wno-format)
    ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH                  -Wno-switch)
- 
-   ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS     -Wno-class-memaccess)
+   ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE         -Wno-unused-variable)
+   ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE         -Wno-uninitialized)
diff --git a/oiio-2.3.patch b/oiio-2.3.patch
new file mode 100644
index 0000000..87175b7
--- /dev/null
+++ b/oiio-2.3.patch
@@ -0,0 +1,29 @@
+Index: blender-2.93.4/build_files/cmake/Modules/FindOpenImageIO.cmake
+===================================================================
+--- blender-2.93.4.orig/build_files/cmake/Modules/FindOpenImageIO.cmake
++++ blender-2.93.4/build_files/cmake/Modules/FindOpenImageIO.cmake
+@@ -48,6 +48,15 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
+     lib64 lib
+   )
+ 
++FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY
++  NAMES
++    OpenImageIO_Util
++  HINTS
++    ${_openimageio_SEARCH_DIRS}
++  PATH_SUFFIXES
++    lib64 lib
++  )
++
+ FIND_FILE(OPENIMAGEIO_IDIFF
+   NAMES
+     idiff
+@@ -64,7 +73,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenIm
+     OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
+ 
+ IF(OPENIMAGEIO_FOUND)
+-  SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
++  SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIO_UTIL_LIBRARY})
+   SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
+   IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
+     SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
diff --git a/openexr3.patch b/openexr3.patch
new file mode 100644
index 0000000..56aef7e
--- /dev/null
+++ b/openexr3.patch
@@ -0,0 +1,192 @@
+Index: blender-2.93.3/source/blender/imbuf/intern/openexr/openexr_api.cpp
+===================================================================
+--- 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
+@@ -32,30 +32,31 @@
+ #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/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>
+-#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 */
+ 
+@@ -131,12 +132,12 @@ class IMemStream : public Imf::IStream {
+     return false;
+   }
+ 
+-  Int64 tellg() override
++  uint64_t tellg() override
+   {
+     return _exrpos;
+   }
+ 
+-  void seekg(Int64 pos) override
++  void seekg(uint64_t pos) override
+   {
+     _exrpos = pos;
+   }
+@@ -146,8 +147,8 @@ class IMemStream : public Imf::IStream {
+   }
+ 
+  private:
+-  Int64 _exrpos;
+-  Int64 _exrsize;
++  uint64_t _exrpos;
++  uint64_t _exrsize;
+   unsigned char *_exrbuf;
+ };
+ 
+@@ -182,12 +183,12 @@ class IFileStream : public Imf::IStream
+     return check_error();
+   }
+ 
+-  Int64 tellg() override
++  uint64_t tellg() override
+   {
+     return std::streamoff(ifs.tellg());
+   }
+ 
+-  void seekg(Int64 pos) override
++  void seekg(uint64_t pos) override
+   {
+     ifs.seekg(pos);
+     check_error();
+@@ -231,19 +232,19 @@ class OMemStream : public OStream {
+     ibuf->encodedsize += n;
+   }
+ 
+-  Int64 tellp() override
++  uint64_t tellp() override
+   {
+     return offset;
+   }
+ 
+-  void seekp(Int64 pos) override
++  void seekp(uint64_t pos) override
+   {
+     offset = pos;
+     ensure_size(offset);
+   }
+ 
+  private:
+-  void ensure_size(Int64 size)
++  void ensure_size(uint64_t size)
+   {
+     /* if buffer is too small increase it. */
+     while (size > ibuf->encodedbuffersize) {
+@@ -254,7 +255,7 @@ class OMemStream : public OStream {
+   }
+ 
+   ImBuf *ibuf;
+-  Int64 offset;
++  uint64_t offset;
+ };
+ 
+ /* File Output Stream */
+@@ -284,12 +285,12 @@ class OFileStream : public OStream {
+     check_error();
+   }
+ 
+-  Int64 tellp() override
++  uint64_t tellp() override
+   {
+     return std::streamoff(ofs.tellp());
+   }
+ 
+-  void seekp(Int64 pos) override
++  void seekp(uint64_t pos) override
+   {
+     ofs.seekp(pos);
+     check_error();
+Index: blender-2.93.3/build_files/cmake/Modules/FindOpenEXR.cmake
+===================================================================
+--- blender-2.93.3.orig/build_files/cmake/Modules/FindOpenEXR.cmake
++++ blender-2.93.3/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(
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/blender.git/commitdiff/4ec3633de16fbd3b7e271b386468e33e01cf3775



More information about the pld-cvs-commit mailing list