Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] blender: update to 2.90.1.
@ 2020-10-12 18:43 ahesford
  2020-10-12 20:12 ` [PR PATCH] [Updated] " ahesford
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ahesford @ 2020-10-12 18:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages blender
https://github.com/void-linux/void-packages/pull/25547

blender: update to 2.90.1.
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

A patch file from https://github.com/void-linux/void-packages/pull/25547.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender-25547.patch --]
[-- Type: text/x-diff, Size: 15382 bytes --]

From ecc83fb20be343a3f84e8d13278705c92a992a33 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 12 Oct 2020 14:32:19 -0400
Subject: [PATCH] blender: update to 2.90.1.

---
 srcpkgs/blender/patches/disable_werror.patch |  10 +-
 srcpkgs/blender/patches/musl                 | 111 ++++++++++++++
 srcpkgs/blender/patches/python39.patch       | 153 -------------------
 srcpkgs/blender/template                     |  26 ++--
 4 files changed, 129 insertions(+), 171 deletions(-)
 create mode 100644 srcpkgs/blender/patches/musl
 delete mode 100644 srcpkgs/blender/patches/python39.patch

diff --git a/srcpkgs/blender/patches/disable_werror.patch b/srcpkgs/blender/patches/disable_werror.patch
index 635956f2aa9..9fada907e1c 100644
--- a/srcpkgs/blender/patches/disable_werror.patch
+++ b/srcpkgs/blender/patches/disable_werror.patch
@@ -6,8 +6,8 @@ index f22688f..c32aad1 100644
  
  # Warnings
  if(CMAKE_COMPILER_IS_GNUCXX)
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
- 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
- 	unset(_has_cxxflag_float_conversion)
- 	unset(_has_cxxflag_double_promotion)
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+   ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
+   unset(_has_cxxflag_float_conversion)
+   unset(_has_cxxflag_double_promotion)
diff --git a/srcpkgs/blender/patches/musl b/srcpkgs/blender/patches/musl
new file mode 100644
index 00000000000..5cfded1586d
--- /dev/null
+++ b/srcpkgs/blender/patches/musl
@@ -0,0 +1,111 @@
+From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Tue, 1 Sep 2020 09:09:50 +0200
+Subject: [PATCH 1/2] musl fixes
+
+[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
+
+Original Patch by Nathanael Copa
+
+---
+ CMakeLists.txt                              | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h |  2 +-
+ intern/libc_compat/libc_compat.c            |  2 --
+ source/blender/blenlib/intern/system.c      |  4 +++-
+ source/creator/creator_signals.c            |  2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cee8675..111e6e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
+ 
++# musl-libc related checks (missing execinfo.h and feenableexcept())
++include(CheckIncludeFiles)
++check_include_files(execinfo.h HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
++  add_definitions(-DHAVE_EXECINFO_H)
++endif()
++
++include(CheckLibraryExists)
++check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
++  add_definitions(-DHAVE_FEENABLEEXCEPT)
++endif()
++
+ # Blender internal features
+ option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+ mark_as_advanced(WITH_BLENDER)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 8fc3e43..ee443c4 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -33,7 +33,7 @@
+ #undef HAVE_MALLOC_STATS
+ #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
+ 
+-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
+     defined(__GLIBC__)
+ #  include <malloc.h>
+ #  define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 78e387e..d21c281 100644
+--- a/intern/libc_compat/libc_compat.c
++++ b/intern/libc_compat/libc_compat.c
+@@ -25,7 +25,6 @@
+ #  include <features.h>
+ #  include <math.h>
+ 
+-#  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+ 
+ double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -124,5 +123,4 @@ float __powf_finite(float x, float y)
+   return powf(x, y);
+ }
+ 
+-#  endif /* __GLIBC_PREREQ */
+ #endif   /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 20edbb9..6e856cd 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -35,7 +35,9 @@
+ 
+ #  include "BLI_winstuff.h"
+ #else
++#if defined(HAVE_EXECINFO_H)
+ #  include <execinfo.h>
++#endif
+ #  include <unistd.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+   /* ------------- */
+   /* Linux / Apple */
+-#  if defined(__linux__) || defined(__APPLE__)
++#  if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__)
+ 
+ #    define SIZE 100
+   void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index ad0b7b2..01d5e37 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
+    * set breakpoints on sig_handle_fpe */
+   signal(SIGFPE, sig_handle_fpe);
+ 
+-#    if defined(__linux__) && defined(__GNUC__)
++#    if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+   feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ #    endif /* defined(__linux__) && defined(__GNUC__) */
+ #    if defined(OSX_SSE_FPE)
+-- 
+2.28.0
+
diff --git a/srcpkgs/blender/patches/python39.patch b/srcpkgs/blender/patches/python39.patch
deleted file mode 100644
index 9c87fa95c6f..00000000000
--- a/srcpkgs/blender/patches/python39.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
-From: Campbell Barton <ideasman42@gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: [PATCH] Python: support building again version 3.9 (unreleased)
-
-Resolves T78089, no functional changes.
----
- .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
- .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
- .../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 327ee4dd1c3..63137e094b7 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);
-@@ -1738,7 +1740,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(
-@@ -1946,7 +1948,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() ------------------*/
-@@ -1992,7 +1994,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 39d84c1ac96..7ce0ea5f249 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 ace7480ee81..15ae811fd91 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/srcpkgs/blender/template b/srcpkgs/blender/template
index 731f4af9f68..b724ef01318 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,15 +1,17 @@
 # Template file for 'blender'
 pkgname=blender
-version=2.83.6
-revision=3
-archs="x86_64* i686* ppc64*"
+version=2.90.1
+revision=1
+archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
-configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON
- -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES=ON
- -DWITH_OPENCOLORIO=ON -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_BUILDINFO=OFF
- -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
+configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
+ -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
+ -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib
+ -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
  -DPYTHON_INCLUDE_DIRS=/$py3_inc"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
@@ -23,15 +25,13 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.blender.org"
 distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
-checksum=2338297d6061efd98c05878e954450ef26ba2dfe49658d6156f6b3eaf9b92de0
+checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99
 python_version=3
 patch_args="-Np1"
 
 case "$XBPS_TARGET_MACHINE" in
-*-musl) # crashes at startup in jemallocs free()
-	;;
-*) makedepends+=" jemalloc-devel"
-	;;
+	*-musl) ;;
+	*) makedepends+=" jemalloc-devel" ;;
 esac
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
@ 2020-10-12 20:12 ` ahesford
  2020-10-12 21:12 ` martnnw
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-12 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages blender
https://github.com/void-linux/void-packages/pull/25547

blender: update to 2.90.1.
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

A patch file from https://github.com/void-linux/void-packages/pull/25547.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender-25547.patch --]
[-- Type: text/x-diff, Size: 18017 bytes --]

From c671334ba96cb60ec52bfd02a2095572d27eb0ff Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 12 Oct 2020 14:32:19 -0400
Subject: [PATCH] blender: update to 2.90.1.

---
 srcpkgs/blender/patches/disable_werror.patch |  10 +-
 srcpkgs/blender/patches/musl.patch           | 149 ++++++++++--------
 srcpkgs/blender/patches/python39.patch       | 153 -------------------
 srcpkgs/blender/template                     |  26 ++--
 4 files changed, 103 insertions(+), 235 deletions(-)
 delete mode 100644 srcpkgs/blender/patches/python39.patch

diff --git a/srcpkgs/blender/patches/disable_werror.patch b/srcpkgs/blender/patches/disable_werror.patch
index 635956f2aa9..9fada907e1c 100644
--- a/srcpkgs/blender/patches/disable_werror.patch
+++ b/srcpkgs/blender/patches/disable_werror.patch
@@ -6,8 +6,8 @@ index f22688f..c32aad1 100644
  
  # Warnings
  if(CMAKE_COMPILER_IS_GNUCXX)
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
- 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
- 	unset(_has_cxxflag_float_conversion)
- 	unset(_has_cxxflag_double_promotion)
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+   ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
+   unset(_has_cxxflag_float_conversion)
+   unset(_has_cxxflag_double_promotion)
diff --git a/srcpkgs/blender/patches/musl.patch b/srcpkgs/blender/patches/musl.patch
index c095171df1b..5cfded1586d 100644
--- a/srcpkgs/blender/patches/musl.patch
+++ b/srcpkgs/blender/patches/musl.patch
@@ -1,90 +1,111 @@
-diff -ru blender-2.82.org/CMakeLists.txt blender-2.82/CMakeLists.txt
---- blender-2.82.org/CMakeLists.txt	2020-02-13 01:42:10.000000000 -0800
-+++ blender-2.82/CMakeLists.txt	2020-02-28 03:28:50.491903370 -0800
-@@ -848,6 +848,19 @@
-   endif()
- endif()
+From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Tue, 1 Sep 2020 09:09:50 +0200
+Subject: [PATCH 1/2] musl fixes
+
+[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
+
+Original Patch by Nathanael Copa
+
+---
+ CMakeLists.txt                              | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h |  2 +-
+ intern/libc_compat/libc_compat.c            |  2 --
+ source/blender/blenlib/intern/system.c      |  4 +++-
+ source/creator/creator_signals.c            |  2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cee8675..111e6e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
  
-+# musl-libc related checks (missing execinfo.h, and feenableexcept())
++# musl-libc related checks (missing execinfo.h and feenableexcept())
 +include(CheckIncludeFiles)
 +check_include_files(execinfo.h HAVE_EXECINFO_H)
-+if (HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
 +  add_definitions(-DHAVE_EXECINFO_H)
 +endif()
 +
 +include(CheckLibraryExists)
 +check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
-+if (HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
 +  add_definitions(-DHAVE_FEENABLEEXCEPT)
 +endif()
 +
- # See TEST_SSE_SUPPORT() for how this is defined.
- 
- # Do it globally, SSE2 is required for quite some time now.
-diff -ru blender-2.78.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
---- blender-2.78.orig/source/blender/blenlib/intern/system.c	2016-10-25 09:59:23.000000000 +0000
-+++ blender-2.78a/source/blender/blenlib/intern/system.c	2017-02-07 14:44:35.213040733 +0000
-@@ -77,7 +77,7 @@
- {
- 	/* ------------- */
- 	/* Linux / Apple */
--#if defined(__linux__) || defined(__APPLE__)
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
- 
- #define SIZE 100
- 	void *buffer[SIZE];
-diff -ru blender-2.78.orig/source/creator/creator_signals.c blender-2.78a/source/creator/creator_signals.c
---- blender-2.78.orig/source/creator/creator_signals.c	2016-10-24 14:13:56.000000000 +0000
-+++ blender-2.78a/source/creator/creator_signals.c	2017-02-07 14:47:01.888625973 +0000
-@@ -309,7 +309,7 @@
- 	 * set breakpoints on sig_handle_fpe */
- 	signal(SIGFPE, sig_handle_fpe);
- 
--# if defined(__linux__) && defined(__GNUC__)
-+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
- 	feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
- # endif /* defined(__linux__) && defined(__GNUC__) */
- # if defined(OSX_SSE_FPE)
---- a/source/blender/blenlib/intern/system.c	2019-07-30 21:05:30.702224608 +0200
-+++ -	2019-07-30 21:13:21.535328709 +0200
-@@ -38,10 +38,13 @@
- #  include <dbghelp.h>
- #  pragma warning(pop)
- #else
--#  include <execinfo.h>
- #  include <unistd.h>
- #endif
- 
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
-+#  include <execinfo.h>
-+#endif
-+
- int BLI_cpu_support_sse2(void)
- {
- #if defined(__x86_64__) || defined(_M_X64)
---- a/intern/guardedalloc/intern/mallocn_intern.h	2019-07-24 09:41:39.000000000 +0200
-+++ -	2019-10-20 00:03:13.450031866 +0200
-@@ -40,7 +40,7 @@
+ # Blender internal features
+ option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+ mark_as_advanced(WITH_BLENDER)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 8fc3e43..ee443c4 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -33,7 +33,7 @@
  #undef HAVE_MALLOC_STATS
  #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
  
 -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
-+#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
      defined(__GLIBC__)
  #  include <malloc.h>
  #  define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 78e387e..d21c281 100644
 --- a/intern/libc_compat/libc_compat.c
 +++ b/intern/libc_compat/libc_compat.c
-@@ -21,10 +21,10 @@
-  * incompatible with the system libraries that Blender is built on. To solve
-  * this we add a few -ffast-math symbols that can be missing. */
- 
--#ifdef __linux__
+@@ -25,7 +25,6 @@
  #  include <features.h>
  #  include <math.h>
  
-+#ifdef __GLIBC__
- #  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+-#  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
  
  double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -124,5 +123,4 @@ float __powf_finite(float x, float y)
+   return powf(x, y);
+ }
+ 
+-#  endif /* __GLIBC_PREREQ */
+ #endif   /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 20edbb9..6e856cd 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -35,7 +35,9 @@
+ 
+ #  include "BLI_winstuff.h"
+ #else
++#if defined(HAVE_EXECINFO_H)
+ #  include <execinfo.h>
++#endif
+ #  include <unistd.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+   /* ------------- */
+   /* Linux / Apple */
+-#  if defined(__linux__) || defined(__APPLE__)
++#  if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__)
+ 
+ #    define SIZE 100
+   void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index ad0b7b2..01d5e37 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
+    * set breakpoints on sig_handle_fpe */
+   signal(SIGFPE, sig_handle_fpe);
  
+-#    if defined(__linux__) && defined(__GNUC__)
++#    if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+   feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ #    endif /* defined(__linux__) && defined(__GNUC__) */
+ #    if defined(OSX_SSE_FPE)
+-- 
+2.28.0
+
diff --git a/srcpkgs/blender/patches/python39.patch b/srcpkgs/blender/patches/python39.patch
deleted file mode 100644
index 9c87fa95c6f..00000000000
--- a/srcpkgs/blender/patches/python39.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
-From: Campbell Barton <ideasman42@gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: [PATCH] Python: support building again version 3.9 (unreleased)
-
-Resolves T78089, no functional changes.
----
- .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
- .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
- .../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 327ee4dd1c3..63137e094b7 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);
-@@ -1738,7 +1740,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(
-@@ -1946,7 +1948,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() ------------------*/
-@@ -1992,7 +1994,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 39d84c1ac96..7ce0ea5f249 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 ace7480ee81..15ae811fd91 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/srcpkgs/blender/template b/srcpkgs/blender/template
index 731f4af9f68..b724ef01318 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,15 +1,17 @@
 # Template file for 'blender'
 pkgname=blender
-version=2.83.6
-revision=3
-archs="x86_64* i686* ppc64*"
+version=2.90.1
+revision=1
+archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
-configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON
- -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES=ON
- -DWITH_OPENCOLORIO=ON -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_BUILDINFO=OFF
- -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
+configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
+ -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
+ -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib
+ -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
  -DPYTHON_INCLUDE_DIRS=/$py3_inc"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
@@ -23,15 +25,13 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.blender.org"
 distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
-checksum=2338297d6061efd98c05878e954450ef26ba2dfe49658d6156f6b3eaf9b92de0
+checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99
 python_version=3
 patch_args="-Np1"
 
 case "$XBPS_TARGET_MACHINE" in
-*-musl) # crashes at startup in jemallocs free()
-	;;
-*) makedepends+=" jemalloc-devel"
-	;;
+	*-musl) ;;
+	*) makedepends+=" jemalloc-devel" ;;
 esac
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
  2020-10-12 20:12 ` [PR PATCH] [Updated] " ahesford
@ 2020-10-12 21:12 ` martnnw
  2020-10-13 19:33 ` [PR PATCH] [Updated] " ahesford
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: martnnw @ 2020-10-12 21:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by martnnw on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#issuecomment-707348242

Comment:
I don't see any. 
If someone is dependent on LTS they can use the tar.gz provided they are using glibc or get it via steam (on musl steam [flatpak] seems to be the only option).

The non-LTS versions of blender seem to be rock-stable anyway. But sometimes even a rock can break.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
  2020-10-12 20:12 ` [PR PATCH] [Updated] " ahesford
  2020-10-12 21:12 ` martnnw
@ 2020-10-13 19:33 ` ahesford
  2020-10-13 19:34 ` ahesford
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-13 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages blender
https://github.com/void-linux/void-packages/pull/25547

blender: update to 2.90.1.
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

A patch file from https://github.com/void-linux/void-packages/pull/25547.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender-25547.patch --]
[-- Type: text/x-diff, Size: 19292 bytes --]

From 4804a9de39823324b2a5813fb38de8eab3e348c1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 12 Oct 2020 14:32:19 -0400
Subject: [PATCH] blender: update to 2.90.1.

[ci skip]
---
 srcpkgs/blender/patches/disable_werror.patch |  10 +-
 srcpkgs/blender/patches/musl.patch           | 149 ++++++++++--------
 srcpkgs/blender/patches/py39.patch           |  28 ++++
 srcpkgs/blender/patches/python39.patch       | 153 -------------------
 srcpkgs/blender/template                     |  26 ++--
 5 files changed, 131 insertions(+), 235 deletions(-)
 create mode 100644 srcpkgs/blender/patches/py39.patch
 delete mode 100644 srcpkgs/blender/patches/python39.patch

diff --git a/srcpkgs/blender/patches/disable_werror.patch b/srcpkgs/blender/patches/disable_werror.patch
index 635956f2aa9..9fada907e1c 100644
--- a/srcpkgs/blender/patches/disable_werror.patch
+++ b/srcpkgs/blender/patches/disable_werror.patch
@@ -6,8 +6,8 @@ index f22688f..c32aad1 100644
  
  # Warnings
  if(CMAKE_COMPILER_IS_GNUCXX)
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
- 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
- 	unset(_has_cxxflag_float_conversion)
- 	unset(_has_cxxflag_double_promotion)
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+   ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
+   unset(_has_cxxflag_float_conversion)
+   unset(_has_cxxflag_double_promotion)
diff --git a/srcpkgs/blender/patches/musl.patch b/srcpkgs/blender/patches/musl.patch
index c095171df1b..5cfded1586d 100644
--- a/srcpkgs/blender/patches/musl.patch
+++ b/srcpkgs/blender/patches/musl.patch
@@ -1,90 +1,111 @@
-diff -ru blender-2.82.org/CMakeLists.txt blender-2.82/CMakeLists.txt
---- blender-2.82.org/CMakeLists.txt	2020-02-13 01:42:10.000000000 -0800
-+++ blender-2.82/CMakeLists.txt	2020-02-28 03:28:50.491903370 -0800
-@@ -848,6 +848,19 @@
-   endif()
- endif()
+From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Tue, 1 Sep 2020 09:09:50 +0200
+Subject: [PATCH 1/2] musl fixes
+
+[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
+
+Original Patch by Nathanael Copa
+
+---
+ CMakeLists.txt                              | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h |  2 +-
+ intern/libc_compat/libc_compat.c            |  2 --
+ source/blender/blenlib/intern/system.c      |  4 +++-
+ source/creator/creator_signals.c            |  2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cee8675..111e6e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
  
-+# musl-libc related checks (missing execinfo.h, and feenableexcept())
++# musl-libc related checks (missing execinfo.h and feenableexcept())
 +include(CheckIncludeFiles)
 +check_include_files(execinfo.h HAVE_EXECINFO_H)
-+if (HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
 +  add_definitions(-DHAVE_EXECINFO_H)
 +endif()
 +
 +include(CheckLibraryExists)
 +check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
-+if (HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
 +  add_definitions(-DHAVE_FEENABLEEXCEPT)
 +endif()
 +
- # See TEST_SSE_SUPPORT() for how this is defined.
- 
- # Do it globally, SSE2 is required for quite some time now.
-diff -ru blender-2.78.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
---- blender-2.78.orig/source/blender/blenlib/intern/system.c	2016-10-25 09:59:23.000000000 +0000
-+++ blender-2.78a/source/blender/blenlib/intern/system.c	2017-02-07 14:44:35.213040733 +0000
-@@ -77,7 +77,7 @@
- {
- 	/* ------------- */
- 	/* Linux / Apple */
--#if defined(__linux__) || defined(__APPLE__)
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
- 
- #define SIZE 100
- 	void *buffer[SIZE];
-diff -ru blender-2.78.orig/source/creator/creator_signals.c blender-2.78a/source/creator/creator_signals.c
---- blender-2.78.orig/source/creator/creator_signals.c	2016-10-24 14:13:56.000000000 +0000
-+++ blender-2.78a/source/creator/creator_signals.c	2017-02-07 14:47:01.888625973 +0000
-@@ -309,7 +309,7 @@
- 	 * set breakpoints on sig_handle_fpe */
- 	signal(SIGFPE, sig_handle_fpe);
- 
--# if defined(__linux__) && defined(__GNUC__)
-+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
- 	feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
- # endif /* defined(__linux__) && defined(__GNUC__) */
- # if defined(OSX_SSE_FPE)
---- a/source/blender/blenlib/intern/system.c	2019-07-30 21:05:30.702224608 +0200
-+++ -	2019-07-30 21:13:21.535328709 +0200
-@@ -38,10 +38,13 @@
- #  include <dbghelp.h>
- #  pragma warning(pop)
- #else
--#  include <execinfo.h>
- #  include <unistd.h>
- #endif
- 
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
-+#  include <execinfo.h>
-+#endif
-+
- int BLI_cpu_support_sse2(void)
- {
- #if defined(__x86_64__) || defined(_M_X64)
---- a/intern/guardedalloc/intern/mallocn_intern.h	2019-07-24 09:41:39.000000000 +0200
-+++ -	2019-10-20 00:03:13.450031866 +0200
-@@ -40,7 +40,7 @@
+ # Blender internal features
+ option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+ mark_as_advanced(WITH_BLENDER)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 8fc3e43..ee443c4 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -33,7 +33,7 @@
  #undef HAVE_MALLOC_STATS
  #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
  
 -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
-+#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
      defined(__GLIBC__)
  #  include <malloc.h>
  #  define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 78e387e..d21c281 100644
 --- a/intern/libc_compat/libc_compat.c
 +++ b/intern/libc_compat/libc_compat.c
-@@ -21,10 +21,10 @@
-  * incompatible with the system libraries that Blender is built on. To solve
-  * this we add a few -ffast-math symbols that can be missing. */
- 
--#ifdef __linux__
+@@ -25,7 +25,6 @@
  #  include <features.h>
  #  include <math.h>
  
-+#ifdef __GLIBC__
- #  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+-#  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
  
  double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -124,5 +123,4 @@ float __powf_finite(float x, float y)
+   return powf(x, y);
+ }
+ 
+-#  endif /* __GLIBC_PREREQ */
+ #endif   /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 20edbb9..6e856cd 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -35,7 +35,9 @@
+ 
+ #  include "BLI_winstuff.h"
+ #else
++#if defined(HAVE_EXECINFO_H)
+ #  include <execinfo.h>
++#endif
+ #  include <unistd.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+   /* ------------- */
+   /* Linux / Apple */
+-#  if defined(__linux__) || defined(__APPLE__)
++#  if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__)
+ 
+ #    define SIZE 100
+   void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index ad0b7b2..01d5e37 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
+    * set breakpoints on sig_handle_fpe */
+   signal(SIGFPE, sig_handle_fpe);
  
+-#    if defined(__linux__) && defined(__GNUC__)
++#    if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+   feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ #    endif /* defined(__linux__) && defined(__GNUC__) */
+ #    if defined(OSX_SSE_FPE)
+-- 
+2.28.0
+
diff --git a/srcpkgs/blender/patches/py39.patch b/srcpkgs/blender/patches/py39.patch
new file mode 100644
index 00000000000..70f5545807a
--- /dev/null
+++ b/srcpkgs/blender/patches/py39.patch
@@ -0,0 +1,28 @@
+The PyEval_ReleaseLock function is deprecated and triggers a segfault with
+Python 3.9.0. The apparent fix is documented in
+
+	https://developer.blender.org/T81688
+
+as adapted from 
+
+	https://src.fedoraproject.org/rpms/gdb/blob/28b99d9981ec195cc7dfedc33f8ec859607af381/f/gdb-rhbz1829702-fix-python39.patch
+
+and used in the `py39.patch` in the Void gdb template.
+
+--- source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:16.708347045 -0400
++++ source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:43.123345331 -0400
+@@ -29,13 +29,7 @@
+ /* analogue of PyEval_SaveThread() */
+ BPy_ThreadStatePtr BPY_thread_save(void)
+ {
+-  PyThreadState *tstate = PyThreadState_Swap(NULL);
+-  /* note: tstate can be NULL when quitting Blender */
+-
+-  if (tstate && PyEval_ThreadsInitialized()) {
+-    PyEval_ReleaseLock();
+-  }
+-
++  PyThreadState *tstate = PyEval_SaveThread();
+   return (BPy_ThreadStatePtr)tstate;
+ }
+ 
diff --git a/srcpkgs/blender/patches/python39.patch b/srcpkgs/blender/patches/python39.patch
deleted file mode 100644
index 9c87fa95c6f..00000000000
--- a/srcpkgs/blender/patches/python39.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
-From: Campbell Barton <ideasman42@gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: [PATCH] Python: support building again version 3.9 (unreleased)
-
-Resolves T78089, no functional changes.
----
- .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
- .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
- .../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 327ee4dd1c3..63137e094b7 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);
-@@ -1738,7 +1740,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(
-@@ -1946,7 +1948,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() ------------------*/
-@@ -1992,7 +1994,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 39d84c1ac96..7ce0ea5f249 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 ace7480ee81..15ae811fd91 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/srcpkgs/blender/template b/srcpkgs/blender/template
index 731f4af9f68..b724ef01318 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,15 +1,17 @@
 # Template file for 'blender'
 pkgname=blender
-version=2.83.6
-revision=3
-archs="x86_64* i686* ppc64*"
+version=2.90.1
+revision=1
+archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
-configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON
- -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES=ON
- -DWITH_OPENCOLORIO=ON -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_BUILDINFO=OFF
- -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
+configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
+ -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
+ -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib
+ -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
  -DPYTHON_INCLUDE_DIRS=/$py3_inc"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
@@ -23,15 +25,13 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.blender.org"
 distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
-checksum=2338297d6061efd98c05878e954450ef26ba2dfe49658d6156f6b3eaf9b92de0
+checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99
 python_version=3
 patch_args="-Np1"
 
 case "$XBPS_TARGET_MACHINE" in
-*-musl) # crashes at startup in jemallocs free()
-	;;
-*) makedepends+=" jemalloc-devel"
-	;;
+	*-musl) ;;
+	*) makedepends+=" jemalloc-devel" ;;
 esac
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (2 preceding siblings ...)
  2020-10-13 19:33 ` [PR PATCH] [Updated] " ahesford
@ 2020-10-13 19:34 ` ahesford
  2020-10-13 19:39 ` ahesford
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-13 19:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages blender
https://github.com/void-linux/void-packages/pull/25547

blender: update to 2.90.1.
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

A patch file from https://github.com/void-linux/void-packages/pull/25547.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender-25547.patch --]
[-- Type: text/x-diff, Size: 19296 bytes --]

From 46b6464013b828eb130bb653402551809f682c86 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 12 Oct 2020 14:32:19 -0400
Subject: [PATCH] blender: update to 2.90.1.

[ci skip]
---
 srcpkgs/blender/patches/disable_werror.patch |  10 +-
 srcpkgs/blender/patches/musl.patch           | 149 ++++++++++--------
 srcpkgs/blender/patches/py39.patch           |  28 ++++
 srcpkgs/blender/patches/python39.patch       | 153 -------------------
 srcpkgs/blender/template                     |  26 ++--
 5 files changed, 131 insertions(+), 235 deletions(-)
 create mode 100644 srcpkgs/blender/patches/py39.patch
 delete mode 100644 srcpkgs/blender/patches/python39.patch

diff --git a/srcpkgs/blender/patches/disable_werror.patch b/srcpkgs/blender/patches/disable_werror.patch
index 635956f2aa9..9fada907e1c 100644
--- a/srcpkgs/blender/patches/disable_werror.patch
+++ b/srcpkgs/blender/patches/disable_werror.patch
@@ -6,8 +6,8 @@ index f22688f..c32aad1 100644
  
  # Warnings
  if(CMAKE_COMPILER_IS_GNUCXX)
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
- 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
- 	unset(_has_cxxflag_float_conversion)
- 	unset(_has_cxxflag_double_promotion)
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+   ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
+   unset(_has_cxxflag_float_conversion)
+   unset(_has_cxxflag_double_promotion)
diff --git a/srcpkgs/blender/patches/musl.patch b/srcpkgs/blender/patches/musl.patch
index c095171df1b..5cfded1586d 100644
--- a/srcpkgs/blender/patches/musl.patch
+++ b/srcpkgs/blender/patches/musl.patch
@@ -1,90 +1,111 @@
-diff -ru blender-2.82.org/CMakeLists.txt blender-2.82/CMakeLists.txt
---- blender-2.82.org/CMakeLists.txt	2020-02-13 01:42:10.000000000 -0800
-+++ blender-2.82/CMakeLists.txt	2020-02-28 03:28:50.491903370 -0800
-@@ -848,6 +848,19 @@
-   endif()
- endif()
+From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Tue, 1 Sep 2020 09:09:50 +0200
+Subject: [PATCH 1/2] musl fixes
+
+[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
+
+Original Patch by Nathanael Copa
+
+---
+ CMakeLists.txt                              | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h |  2 +-
+ intern/libc_compat/libc_compat.c            |  2 --
+ source/blender/blenlib/intern/system.c      |  4 +++-
+ source/creator/creator_signals.c            |  2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cee8675..111e6e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
  
-+# musl-libc related checks (missing execinfo.h, and feenableexcept())
++# musl-libc related checks (missing execinfo.h and feenableexcept())
 +include(CheckIncludeFiles)
 +check_include_files(execinfo.h HAVE_EXECINFO_H)
-+if (HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
 +  add_definitions(-DHAVE_EXECINFO_H)
 +endif()
 +
 +include(CheckLibraryExists)
 +check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
-+if (HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
 +  add_definitions(-DHAVE_FEENABLEEXCEPT)
 +endif()
 +
- # See TEST_SSE_SUPPORT() for how this is defined.
- 
- # Do it globally, SSE2 is required for quite some time now.
-diff -ru blender-2.78.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
---- blender-2.78.orig/source/blender/blenlib/intern/system.c	2016-10-25 09:59:23.000000000 +0000
-+++ blender-2.78a/source/blender/blenlib/intern/system.c	2017-02-07 14:44:35.213040733 +0000
-@@ -77,7 +77,7 @@
- {
- 	/* ------------- */
- 	/* Linux / Apple */
--#if defined(__linux__) || defined(__APPLE__)
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
- 
- #define SIZE 100
- 	void *buffer[SIZE];
-diff -ru blender-2.78.orig/source/creator/creator_signals.c blender-2.78a/source/creator/creator_signals.c
---- blender-2.78.orig/source/creator/creator_signals.c	2016-10-24 14:13:56.000000000 +0000
-+++ blender-2.78a/source/creator/creator_signals.c	2017-02-07 14:47:01.888625973 +0000
-@@ -309,7 +309,7 @@
- 	 * set breakpoints on sig_handle_fpe */
- 	signal(SIGFPE, sig_handle_fpe);
- 
--# if defined(__linux__) && defined(__GNUC__)
-+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
- 	feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
- # endif /* defined(__linux__) && defined(__GNUC__) */
- # if defined(OSX_SSE_FPE)
---- a/source/blender/blenlib/intern/system.c	2019-07-30 21:05:30.702224608 +0200
-+++ -	2019-07-30 21:13:21.535328709 +0200
-@@ -38,10 +38,13 @@
- #  include <dbghelp.h>
- #  pragma warning(pop)
- #else
--#  include <execinfo.h>
- #  include <unistd.h>
- #endif
- 
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
-+#  include <execinfo.h>
-+#endif
-+
- int BLI_cpu_support_sse2(void)
- {
- #if defined(__x86_64__) || defined(_M_X64)
---- a/intern/guardedalloc/intern/mallocn_intern.h	2019-07-24 09:41:39.000000000 +0200
-+++ -	2019-10-20 00:03:13.450031866 +0200
-@@ -40,7 +40,7 @@
+ # Blender internal features
+ option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+ mark_as_advanced(WITH_BLENDER)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 8fc3e43..ee443c4 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -33,7 +33,7 @@
  #undef HAVE_MALLOC_STATS
  #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
  
 -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
-+#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
      defined(__GLIBC__)
  #  include <malloc.h>
  #  define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 78e387e..d21c281 100644
 --- a/intern/libc_compat/libc_compat.c
 +++ b/intern/libc_compat/libc_compat.c
-@@ -21,10 +21,10 @@
-  * incompatible with the system libraries that Blender is built on. To solve
-  * this we add a few -ffast-math symbols that can be missing. */
- 
--#ifdef __linux__
+@@ -25,7 +25,6 @@
  #  include <features.h>
  #  include <math.h>
  
-+#ifdef __GLIBC__
- #  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+-#  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
  
  double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -124,5 +123,4 @@ float __powf_finite(float x, float y)
+   return powf(x, y);
+ }
+ 
+-#  endif /* __GLIBC_PREREQ */
+ #endif   /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 20edbb9..6e856cd 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -35,7 +35,9 @@
+ 
+ #  include "BLI_winstuff.h"
+ #else
++#if defined(HAVE_EXECINFO_H)
+ #  include <execinfo.h>
++#endif
+ #  include <unistd.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+   /* ------------- */
+   /* Linux / Apple */
+-#  if defined(__linux__) || defined(__APPLE__)
++#  if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__)
+ 
+ #    define SIZE 100
+   void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index ad0b7b2..01d5e37 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
+    * set breakpoints on sig_handle_fpe */
+   signal(SIGFPE, sig_handle_fpe);
  
+-#    if defined(__linux__) && defined(__GNUC__)
++#    if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+   feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ #    endif /* defined(__linux__) && defined(__GNUC__) */
+ #    if defined(OSX_SSE_FPE)
+-- 
+2.28.0
+
diff --git a/srcpkgs/blender/patches/py39.patch b/srcpkgs/blender/patches/py39.patch
new file mode 100644
index 00000000000..b97f240623c
--- /dev/null
+++ b/srcpkgs/blender/patches/py39.patch
@@ -0,0 +1,28 @@
+The PyEval_ReleaseLock function is deprecated and triggers a segfault with
+Python 3.9.0. The apparent fix is documented in
+
+	https://developer.blender.org/T81688
+
+as adapted from 
+
+	https://src.fedoraproject.org/rpms/gdb/blob/28b99d9981ec195cc7dfedc33f8ec859607af381/f/gdb-rhbz1829702-fix-python39.patch
+
+and used in the `py39.patch` in the Void gdb template.
+
+--- a/source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:16.708347045 -0400
++++ b/source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:43.123345331 -0400
+@@ -29,13 +29,7 @@
+ /* analogue of PyEval_SaveThread() */
+ BPy_ThreadStatePtr BPY_thread_save(void)
+ {
+-  PyThreadState *tstate = PyThreadState_Swap(NULL);
+-  /* note: tstate can be NULL when quitting Blender */
+-
+-  if (tstate && PyEval_ThreadsInitialized()) {
+-    PyEval_ReleaseLock();
+-  }
+-
++  PyThreadState *tstate = PyEval_SaveThread();
+   return (BPy_ThreadStatePtr)tstate;
+ }
+ 
diff --git a/srcpkgs/blender/patches/python39.patch b/srcpkgs/blender/patches/python39.patch
deleted file mode 100644
index 9c87fa95c6f..00000000000
--- a/srcpkgs/blender/patches/python39.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
-From: Campbell Barton <ideasman42@gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: [PATCH] Python: support building again version 3.9 (unreleased)
-
-Resolves T78089, no functional changes.
----
- .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
- .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
- .../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 327ee4dd1c3..63137e094b7 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);
-@@ -1738,7 +1740,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(
-@@ -1946,7 +1948,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() ------------------*/
-@@ -1992,7 +1994,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 39d84c1ac96..7ce0ea5f249 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 ace7480ee81..15ae811fd91 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/srcpkgs/blender/template b/srcpkgs/blender/template
index 731f4af9f68..b724ef01318 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,15 +1,17 @@
 # Template file for 'blender'
 pkgname=blender
-version=2.83.6
-revision=3
-archs="x86_64* i686* ppc64*"
+version=2.90.1
+revision=1
+archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
-configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON
- -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES=ON
- -DWITH_OPENCOLORIO=ON -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_BUILDINFO=OFF
- -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
+configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
+ -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
+ -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib
+ -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
  -DPYTHON_INCLUDE_DIRS=/$py3_inc"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
@@ -23,15 +25,13 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.blender.org"
 distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
-checksum=2338297d6061efd98c05878e954450ef26ba2dfe49658d6156f6b3eaf9b92de0
+checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99
 python_version=3
 patch_args="-Np1"
 
 case "$XBPS_TARGET_MACHINE" in
-*-musl) # crashes at startup in jemallocs free()
-	;;
-*) makedepends+=" jemalloc-devel"
-	;;
+	*-musl) ;;
+	*) makedepends+=" jemalloc-devel" ;;
 esac
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (3 preceding siblings ...)
  2020-10-13 19:34 ` ahesford
@ 2020-10-13 19:39 ` ahesford
  2020-10-14  1:49 ` ericonr
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-13 19:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#issuecomment-707965037

Comment:
Apparently this will time out on CI, but it builds locally for `x86_64*`. This version does *not* address the Python 3.9 crash reported, but I tracked it down to a call to the deprecated function `PyEval_ReleaseLock` that segfaults on Python 3.9.0. This issue also affects gdb and is easily patched. (See [`srcpkgs/gdb/patches/py39.patch`](https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/gdb/patches/py39.patch).)

If nobody complains in the next day or two, I'll merge this and we should have a working Blender. If somebody objects to the update, we can backport this simple patch (along with the existing `py39.patch` for Blender) and at least get a working version 2.83.6 (or 2.83.7).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (4 preceding siblings ...)
  2020-10-13 19:39 ` ahesford
@ 2020-10-14  1:49 ` ericonr
  2020-10-14 14:19 ` [PR PATCH] [Updated] " ahesford
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2020-10-14  1:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#issuecomment-708104334

Comment:
@mvf might be interested as well.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (5 preceding siblings ...)
  2020-10-14  1:49 ` ericonr
@ 2020-10-14 14:19 ` ahesford
  2020-10-14 14:55 ` [PR REVIEW] " mvf
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-14 14:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages blender
https://github.com/void-linux/void-packages/pull/25547

blender: update to 2.90.1.
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

A patch file from https://github.com/void-linux/void-packages/pull/25547.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender-25547.patch --]
[-- Type: text/x-diff, Size: 19306 bytes --]

From d1195a8643e2d012af1d03f30ad7e221890cd3a0 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 12 Oct 2020 14:32:19 -0400
Subject: [PATCH] blender: update to 2.90.1.

[ci skip]
---
 srcpkgs/blender/patches/disable_werror.patch |  10 +-
 srcpkgs/blender/patches/musl.patch           | 149 ++++++++++--------
 srcpkgs/blender/patches/py39.patch           |  25 +++
 srcpkgs/blender/patches/python39.patch       | 153 -------------------
 srcpkgs/blender/template                     |  26 ++--
 5 files changed, 128 insertions(+), 235 deletions(-)
 create mode 100644 srcpkgs/blender/patches/py39.patch
 delete mode 100644 srcpkgs/blender/patches/python39.patch

diff --git a/srcpkgs/blender/patches/disable_werror.patch b/srcpkgs/blender/patches/disable_werror.patch
index 635956f2aa9..9fada907e1c 100644
--- a/srcpkgs/blender/patches/disable_werror.patch
+++ b/srcpkgs/blender/patches/disable_werror.patch
@@ -6,8 +6,8 @@ index f22688f..c32aad1 100644
  
  # Warnings
  if(CMAKE_COMPILER_IS_GNUCXX)
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
--	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
- 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
- 	unset(_has_cxxflag_float_conversion)
- 	unset(_has_cxxflag_double_promotion)
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+-  ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+   ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
+   unset(_has_cxxflag_float_conversion)
+   unset(_has_cxxflag_double_promotion)
diff --git a/srcpkgs/blender/patches/musl.patch b/srcpkgs/blender/patches/musl.patch
index c095171df1b..5cfded1586d 100644
--- a/srcpkgs/blender/patches/musl.patch
+++ b/srcpkgs/blender/patches/musl.patch
@@ -1,90 +1,111 @@
-diff -ru blender-2.82.org/CMakeLists.txt blender-2.82/CMakeLists.txt
---- blender-2.82.org/CMakeLists.txt	2020-02-13 01:42:10.000000000 -0800
-+++ blender-2.82/CMakeLists.txt	2020-02-28 03:28:50.491903370 -0800
-@@ -848,6 +848,19 @@
-   endif()
- endif()
+From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Tue, 1 Sep 2020 09:09:50 +0200
+Subject: [PATCH 1/2] musl fixes
+
+[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
+
+Original Patch by Nathanael Copa
+
+---
+ CMakeLists.txt                              | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h |  2 +-
+ intern/libc_compat/libc_compat.c            |  2 --
+ source/blender/blenlib/intern/system.c      |  4 +++-
+ source/creator/creator_signals.c            |  2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cee8675..111e6e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
  
-+# musl-libc related checks (missing execinfo.h, and feenableexcept())
++# musl-libc related checks (missing execinfo.h and feenableexcept())
 +include(CheckIncludeFiles)
 +check_include_files(execinfo.h HAVE_EXECINFO_H)
-+if (HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
 +  add_definitions(-DHAVE_EXECINFO_H)
 +endif()
 +
 +include(CheckLibraryExists)
 +check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
-+if (HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
 +  add_definitions(-DHAVE_FEENABLEEXCEPT)
 +endif()
 +
- # See TEST_SSE_SUPPORT() for how this is defined.
- 
- # Do it globally, SSE2 is required for quite some time now.
-diff -ru blender-2.78.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
---- blender-2.78.orig/source/blender/blenlib/intern/system.c	2016-10-25 09:59:23.000000000 +0000
-+++ blender-2.78a/source/blender/blenlib/intern/system.c	2017-02-07 14:44:35.213040733 +0000
-@@ -77,7 +77,7 @@
- {
- 	/* ------------- */
- 	/* Linux / Apple */
--#if defined(__linux__) || defined(__APPLE__)
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
- 
- #define SIZE 100
- 	void *buffer[SIZE];
-diff -ru blender-2.78.orig/source/creator/creator_signals.c blender-2.78a/source/creator/creator_signals.c
---- blender-2.78.orig/source/creator/creator_signals.c	2016-10-24 14:13:56.000000000 +0000
-+++ blender-2.78a/source/creator/creator_signals.c	2017-02-07 14:47:01.888625973 +0000
-@@ -309,7 +309,7 @@
- 	 * set breakpoints on sig_handle_fpe */
- 	signal(SIGFPE, sig_handle_fpe);
- 
--# if defined(__linux__) && defined(__GNUC__)
-+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
- 	feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
- # endif /* defined(__linux__) && defined(__GNUC__) */
- # if defined(OSX_SSE_FPE)
---- a/source/blender/blenlib/intern/system.c	2019-07-30 21:05:30.702224608 +0200
-+++ -	2019-07-30 21:13:21.535328709 +0200
-@@ -38,10 +38,13 @@
- #  include <dbghelp.h>
- #  pragma warning(pop)
- #else
--#  include <execinfo.h>
- #  include <unistd.h>
- #endif
- 
-+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
-+#  include <execinfo.h>
-+#endif
-+
- int BLI_cpu_support_sse2(void)
- {
- #if defined(__x86_64__) || defined(_M_X64)
---- a/intern/guardedalloc/intern/mallocn_intern.h	2019-07-24 09:41:39.000000000 +0200
-+++ -	2019-10-20 00:03:13.450031866 +0200
-@@ -40,7 +40,7 @@
+ # Blender internal features
+ option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+ mark_as_advanced(WITH_BLENDER)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 8fc3e43..ee443c4 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -33,7 +33,7 @@
  #undef HAVE_MALLOC_STATS
  #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
  
 -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
-+#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
      defined(__GLIBC__)
  #  include <malloc.h>
  #  define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 78e387e..d21c281 100644
 --- a/intern/libc_compat/libc_compat.c
 +++ b/intern/libc_compat/libc_compat.c
-@@ -21,10 +21,10 @@
-  * incompatible with the system libraries that Blender is built on. To solve
-  * this we add a few -ffast-math symbols that can be missing. */
- 
--#ifdef __linux__
+@@ -25,7 +25,6 @@
  #  include <features.h>
  #  include <math.h>
  
-+#ifdef __GLIBC__
- #  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+-#  if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
  
  double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -124,5 +123,4 @@ float __powf_finite(float x, float y)
+   return powf(x, y);
+ }
+ 
+-#  endif /* __GLIBC_PREREQ */
+ #endif   /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 20edbb9..6e856cd 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -35,7 +35,9 @@
+ 
+ #  include "BLI_winstuff.h"
+ #else
++#if defined(HAVE_EXECINFO_H)
+ #  include <execinfo.h>
++#endif
+ #  include <unistd.h>
+ #endif
+ 
+@@ -80,7 +82,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+   /* ------------- */
+   /* Linux / Apple */
+-#  if defined(__linux__) || defined(__APPLE__)
++#  if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__)
+ 
+ #    define SIZE 100
+   void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index ad0b7b2..01d5e37 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
+    * set breakpoints on sig_handle_fpe */
+   signal(SIGFPE, sig_handle_fpe);
  
+-#    if defined(__linux__) && defined(__GNUC__)
++#    if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+   feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ #    endif /* defined(__linux__) && defined(__GNUC__) */
+ #    if defined(OSX_SSE_FPE)
+-- 
+2.28.0
+
diff --git a/srcpkgs/blender/patches/py39.patch b/srcpkgs/blender/patches/py39.patch
new file mode 100644
index 00000000000..1e14eb06203
--- /dev/null
+++ b/srcpkgs/blender/patches/py39.patch
@@ -0,0 +1,25 @@
+The deprecated PyEval_ReleaseLock() triggers a segfault with Python 3.9.0.
+See issue at https://developer.blender.org/T81688 and fix at
+https://developer.blender.org/rB5edba9b42f684bf8b99894bb6988e7f46180e12c
+
+--- a/source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:16.708347045 -0400
++++ b/source/blender/python/generic/bpy_threads.c	2020-10-13 15:29:43.123345331 -0400
+@@ -29,14 +29,11 @@
+ /* analogue of PyEval_SaveThread() */
+ BPy_ThreadStatePtr BPY_thread_save(void)
+ {
+-  PyThreadState *tstate = PyThreadState_Swap(NULL);
+-  /* note: tstate can be NULL when quitting Blender */
+-
+-  if (tstate && PyEval_ThreadsInitialized()) {
+-    PyEval_ReleaseLock();
++  /* The thread-state can be NULL when quitting Blender. */
++  if (_PyThreadState_UncheckedGet()) {
++    return (BPy_ThreadStatePtr)PyEval_SaveThread();
+   }
+-
+-  return (BPy_ThreadStatePtr)tstate;
++  return NULL;
+ }
+ 
+ /* analogue of PyEval_RestoreThread() */
diff --git a/srcpkgs/blender/patches/python39.patch b/srcpkgs/blender/patches/python39.patch
deleted file mode 100644
index 9c87fa95c6f..00000000000
--- a/srcpkgs/blender/patches/python39.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
-From: Campbell Barton <ideasman42@gmail.com>
-Date: Mon, 22 Jun 2020 14:51:20 +1000
-Subject: [PATCH] Python: support building again version 3.9 (unreleased)
-
-Resolves T78089, no functional changes.
----
- .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
- .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
- .../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 327ee4dd1c3..63137e094b7 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);
-@@ -1738,7 +1740,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(
-@@ -1946,7 +1948,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() ------------------*/
-@@ -1992,7 +1994,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 39d84c1ac96..7ce0ea5f249 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 ace7480ee81..15ae811fd91 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/srcpkgs/blender/template b/srcpkgs/blender/template
index 731f4af9f68..b724ef01318 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,15 +1,17 @@
 # Template file for 'blender'
 pkgname=blender
-version=2.83.6
-revision=3
-archs="x86_64* i686* ppc64*"
+version=2.90.1
+revision=1
+archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
-configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON
- -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES=ON
- -DWITH_OPENCOLORIO=ON -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_BUILDINFO=OFF
- -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
+configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
+ -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
+ -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=$py3_ver -DPYTHON_LIBPATH=/usr/lib
+ -DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
  -DPYTHON_INCLUDE_DIRS=/$py3_inc"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
@@ -23,15 +25,13 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.blender.org"
 distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
-checksum=2338297d6061efd98c05878e954450ef26ba2dfe49658d6156f6b3eaf9b92de0
+checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99
 python_version=3
 patch_args="-Np1"
 
 case "$XBPS_TARGET_MACHINE" in
-*-musl) # crashes at startup in jemallocs free()
-	;;
-*) makedepends+=" jemalloc-devel"
-	;;
+	*-musl) ;;
+	*) makedepends+=" jemalloc-devel" ;;
 esac
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (6 preceding siblings ...)
  2020-10-14 14:19 ` [PR PATCH] [Updated] " ahesford
@ 2020-10-14 14:55 ` mvf
  2020-10-14 14:56 ` mvf
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mvf @ 2020-10-14 14:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

New review comment by mvf on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#discussion_r504746204

Comment:
Instead of making them non-fatal, these warnings can be fixed by updating `openimageio` ([mvf/blender-2.90.1](https://github.com/mvf/void-packages/commits/blender-2.90.1)) This requires a revbump of `luxmark` and `luxrays` though and they seem borked.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (7 preceding siblings ...)
  2020-10-14 14:55 ` [PR REVIEW] " mvf
@ 2020-10-14 14:56 ` mvf
  2020-10-14 18:55 ` [PR REVIEW] " ahesford
  2020-10-14 19:17 ` [PR PATCH] [Closed]: " ahesford
  10 siblings, 0 replies; 12+ messages in thread
From: mvf @ 2020-10-14 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

New comment by mvf on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#issuecomment-708458733

Comment:
Thanks for the ping, appreciated. Can confirm this branch starts on `x86_64` and builds for `x86_64-musl` (at least it did before the latest force-push).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (8 preceding siblings ...)
  2020-10-14 14:56 ` mvf
@ 2020-10-14 18:55 ` ahesford
  2020-10-14 19:17 ` [PR PATCH] [Closed]: " ahesford
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-14 18:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/25547#discussion_r504902148

Comment:
I pulled your `openimageio` bump and see what you mean about `luxmark` and `luxrays`. For the moment I will defer addressing this issue because the upstream sources for `luxmark` and `luxrays` seem to have moved and it's not clear to me where the new repos are. (I see a `luxmark` repo on GitHub, but `luxrays` seems to have disappeared.)

Because `blender` is currently broken with system Python, I'm going to merge this as-is and let somebody else propose a solution for moving to a new `openimageio` in the future.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Closed]: blender: update to 2.90.1.
  2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
                   ` (9 preceding siblings ...)
  2020-10-14 18:55 ` [PR REVIEW] " ahesford
@ 2020-10-14 19:17 ` ahesford
  10 siblings, 0 replies; 12+ messages in thread
From: ahesford @ 2020-10-14 19:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

There's a closed pull request on the void-packages repository

blender: update to 2.90.1.
https://github.com/void-linux/void-packages/pull/25547

Description:
Python 3.9 may have broken blender 2.83.6. The patch I pulled to compile against Python 3.9 left me with an installation that can launch, but a user [reported on reddit](https://www.reddit.com/r/voidlinux/comments/j9sj8x/blender_crashing_importing_obj/) that there are some runtime problems. Hopefully an update to 2.90.1 will resolve the issue.

Note that this release relies on 64-bit atomics that don't seem to be available for `i686`, and upstream only provides prebuilt versions for 64-bit Linux systems, so I've dropped `i686*` from the `archs`. We can add it back if there is a straightforward fix.

@martnnw @jkoderu-git, you both weighed in on the last update (#24644) so please comment if there is an argument against moving off of LTS (part of that argument is that the LTS release works against Python 3.9).

cc: @Gottox (package maintainer)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-10-14 19:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 18:43 [PR PATCH] blender: update to 2.90.1 ahesford
2020-10-12 20:12 ` [PR PATCH] [Updated] " ahesford
2020-10-12 21:12 ` martnnw
2020-10-13 19:33 ` [PR PATCH] [Updated] " ahesford
2020-10-13 19:34 ` ahesford
2020-10-13 19:39 ` ahesford
2020-10-14  1:49 ` ericonr
2020-10-14 14:19 ` [PR PATCH] [Updated] " ahesford
2020-10-14 14:55 ` [PR REVIEW] " mvf
2020-10-14 14:56 ` mvf
2020-10-14 18:55 ` [PR REVIEW] " ahesford
2020-10-14 19:17 ` [PR PATCH] [Closed]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).