[packages/blender] - up to 2.83.12 - add patch from debian to fix build with python 3.9
baggins
baggins at pld-linux.org
Sat Mar 6 20:04:04 CET 2021
commit 391429cdc5e17d4c26a6f4c5d3db7c30a14e4ffe
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Mar 6 20:03:37 2021 +0100
- up to 2.83.12
- add patch from debian to fix build with python 3.9
0006-fix_FTBFS_with_python3.9.patch | 152 ++++++++++++++++++++++++++++++++++++
blender-2.76-droid.patch | 19 +++--
blender.spec | 8 +-
3 files changed, 166 insertions(+), 13 deletions(-)
---
diff --git a/blender.spec b/blender.spec
index d10738c..184fa17 100644
--- a/blender.spec
+++ b/blender.spec
@@ -4,14 +4,15 @@
Summary: 3D modeling, rendering, animation and game creation package
Summary(pl.UTF-8): Pakiet do tworzenia animacji 3D oraz gier
Name: blender
-Version: 2.82a
-Release: 3
+Version: 2.83.12
+Release: 1
License: GPL
Group: X11/Applications/Graphics
Source0: http://download.blender.org/source/%{name}-%{version}.tar.xz
-# Source0-md5: 3e9d669185b83d5d2cb1b38dcf64d5ec
+# Source0-md5: 6c890dfb3599bffed5edc05d43f61506
Patch0: %{name}-2.76-droid.patch
Patch1: format-security.patch
+Patch2: 0006-fix_FTBFS_with_python3.9.patch
URL: http://www.blender.org/
BuildRequires: OpenAL-devel
BuildRequires: OpenColorIO-devel
@@ -72,6 +73,7 @@ Blender to darmowy i w pełni funkcjonalny pakiet do tworzenia animacji
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -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 \
diff --git a/0006-fix_FTBFS_with_python3.9.patch b/0006-fix_FTBFS_with_python3.9.patch
new file mode 100644
index 0000000..1ca36a2
--- /dev/null
+++ b/0006-fix_FTBFS_with_python3.9.patch
@@ -0,0 +1,152 @@
+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/blender-2.76-droid.patch b/blender-2.76-droid.patch
index f485ddc..2c8b6c8 100644
--- a/blender-2.76-droid.patch
+++ b/blender-2.76-droid.patch
@@ -1,12 +1,11 @@
-diff -uNr blender-2.76.orig/source/blender/blenfont/intern/blf_font_i18n.c blender-2.76/source/blender/blenfont/intern/blf_font_i18n.c
---- blender-2.76.orig/source/blender/blenfont/intern/blf_font_i18n.c 2015-10-10 10:20:56.000000000 +0200
-+++ blender-2.76/source/blender/blenfont/intern/blf_font_i18n.c 2015-10-12 16:40:42.225473358 +0200
-@@ -57,7 +57,7 @@
+--- blender-2.83.12/source/blender/blenfont/intern/blf_font_default.c~ 2021-01-15 15:25:53.000000000 +0100
++++ blender-2.83.12/source/blender/blenfont/intern/blf_font_default.c 2021-03-06 19:32:29.170479890 +0100
+@@ -33,7 +33,7 @@
- static void fontbuf_load(struct FontBuf *fb)
+ static int blf_load_font_default(const char *filename, const bool unique)
{
-- const char *fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts");
-+ const char *fontpath = "/usr/share/fonts/blender";
- if (fontpath) {
- char unifont_path[1024];
- BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, fb->filename);
+- const char *dir = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts");
++ const char *dir = "/usr/share/fonts/blender";
+ if (dir == NULL) {
+ fprintf(stderr,
+ "%s: 'fonts' data path not found for '%s', will not be able to display text\n",
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/blender.git/commitdiff/391429cdc5e17d4c26a6f4c5d3db7c30a14e4ffe
More information about the pld-cvs-commit
mailing list