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

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).