blender: update to 2.90.1.

[ci skip]

Closes: #25547
This commit is contained in:
Andrew J. Hesford 2020-10-12 14:32:19 -04:00
parent 1ab6fa4c6c
commit a3e35af504
4 changed files with 125 additions and 232 deletions

View file

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

View file

@ -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

View file

@ -1,153 +1,25 @@
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)
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
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;
--- 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;
}
-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,
/* analogue of PyEval_RestoreThread() */

View file

@ -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