blender: update to 2.92.0.

This commit is contained in:
Enno Boland 2021-04-16 20:31:28 +02:00 committed by Enno Boland
parent 5a9466f3e3
commit 726149f2c2
6 changed files with 74 additions and 113 deletions

View file

@ -1,46 +1,22 @@
From 8f2b2e92ffdec658d4eb999f41acf6c74a5b32ed Mon Sep 17 00:00:00 2001 Imported from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch?id=42cee48643cb6ccc1a110e66446aa74408ee0160
adapted to not use __MUSL__ definition
From e530dc5b32695c208aa46bfe460ac7d76159a6d3 Mon Sep 17 00:00:00 2001
From: Leon Marz <lmarz@cs.uni-frankfurt.de> From: Leon Marz <lmarz@cs.uni-frankfurt.de>
Date: Tue, 1 Sep 2020 09:09:50 +0200 Date: Wed, 25 Nov 2020 10:10:41 +0100
Subject: [PATCH 1/2] musl fixes Subject: [PATCH 1/3] musl fixes
[ Taken from https://git.alpinelinux.org/aports/plain/testing/blender/0001-musl-fixes.patch ]
Original Patch by Nathanael Copa
Original patch by Nathanael Copa
--- ---
CMakeLists.txt | 13 +++++++++++++ intern/guardedalloc/intern/mallocn_intern.h | 2 +-
intern/guardedalloc/intern/mallocn_intern.h | 2 +- intern/libc_compat/libc_compat.c | 2 --
intern/libc_compat/libc_compat.c | 2 -- source/blender/blenlib/intern/system.c | 4 +++-
source/blender/blenlib/intern/system.c | 4 +++- source/blender/gpu/GPU_vertex_buffer.h | 1 -
source/creator/creator_signals.c | 2 +- source/creator/creator_signals.c | 2 +-
5 files changed, 18 insertions(+), 5 deletions(-) 5 files changed, 5 insertions(+), 6 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 diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
index 8fc3e43..ee443c4 100644 index aa95615..f7e347d 100644
--- a/intern/guardedalloc/intern/mallocn_intern.h --- a/intern/guardedalloc/intern/mallocn_intern.h
+++ b/intern/guardedalloc/intern/mallocn_intern.h +++ b/intern/guardedalloc/intern/mallocn_intern.h
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
@ -48,7 +24,7 @@ index 8fc3e43..ee443c4 100644
#define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */ #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \ -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
+#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \ +#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
defined(__GLIBC__) defined(__GLIBC__)
# include <malloc.h> # include <malloc.h>
# define HAVE_MALLOC_STATS # define HAVE_MALLOC_STATS
@ -71,14 +47,14 @@ index 78e387e..d21c281 100644
-# endif /* __GLIBC_PREREQ */ -# endif /* __GLIBC_PREREQ */
#endif /* __linux__ */ #endif /* __linux__ */
diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
index 20edbb9..6e856cd 100644 index 8e3d489..4d0789b 100644
--- a/source/blender/blenlib/intern/system.c --- a/source/blender/blenlib/intern/system.c
+++ b/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c
@@ -35,7 +35,9 @@ @@ -35,7 +35,9 @@
# include "BLI_winstuff.h" # include "BLI_winstuff.h"
#else #else
+#if defined(HAVE_EXECINFO_H) +#if defined(__GLIBC__)
# include <execinfo.h> # include <execinfo.h>
+#endif +#endif
# include <unistd.h> # include <unistd.h>
@ -89,12 +65,24 @@ index 20edbb9..6e856cd 100644
/* ------------- */ /* ------------- */
/* Linux / Apple */ /* Linux / Apple */
-# if defined(__linux__) || defined(__APPLE__) -# if defined(__linux__) || defined(__APPLE__)
+# if defined(__linux__) && defined(HAVE_EXECINFO_H) || defined(__APPLE__) +# if defined(__linux__) && defined(__GLIBC__) || defined(__APPLE__)
# define SIZE 100 # define SIZE 100
void *buffer[SIZE]; void *buffer[SIZE];
diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
index eeaebd3..93a77a2 100644
--- a/source/blender/gpu/GPU_vertex_buffer.h
+++ b/source/blender/gpu/GPU_vertex_buffer.h
@@ -118,7 +118,6 @@ GPU_INLINE void *GPU_vertbuf_raw_step(GPUVertBufRaw *a)
{
unsigned char *data = a->data;
a->data += a->stride;
- BLI_assert(data < a->_data_end);
return (void *)data;
}
diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
index ad0b7b2..01d5e37 100644 index 29e12a9..d90da8f 100644
--- a/source/creator/creator_signals.c --- a/source/creator/creator_signals.c
+++ b/source/creator/creator_signals.c +++ b/source/creator/creator_signals.c
@@ -269,7 +269,7 @@ void main_signal_setup_fpe(void) @@ -269,7 +269,7 @@ void main_signal_setup_fpe(void)
@ -102,10 +90,10 @@ index ad0b7b2..01d5e37 100644
signal(SIGFPE, sig_handle_fpe); signal(SIGFPE, sig_handle_fpe);
-# if defined(__linux__) && defined(__GNUC__) -# if defined(__linux__) && defined(__GNUC__)
+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT) +# if defined(__linux__) && defined(__GNUC__) && defined(__GLIBC__)
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
# endif /* defined(__linux__) && defined(__GNUC__) */ # endif /* defined(__linux__) && defined(__GNUC__) */
# if defined(OSX_SSE_FPE) # if defined(OSX_SSE_FPE)
-- --
2.28.0 2.30.1

View file

@ -0,0 +1,25 @@
Imported from https://git.alpinelinux.org/aports/plain/testing/blender/0002-fix-linking-issue.patch?id=42cee48643cb6ccc1a110e66446aa74408ee0160
From 54f5929131f537b6cbb74b5a7da45858cef6020b Mon Sep 17 00:00:00 2001
From: Leon Marz <lmarz@cs.uni-frankfurt.de>
Date: Tue, 1 Sep 2020 09:11:18 +0200
Subject: [PATCH 2/3] fix linking issue
---
intern/ghost/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 1739659..d6b442b 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -484,5 +484,5 @@ if(WITH_XR_OPENXR)
endif()
add_definitions(${GL_DEFINITIONS})
-
+list(APPEND LIB "-lX11" "-lXi" "-lXxf86vm" "-lXfixes" "-lXrender")
blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
--
2.30.1

View file

@ -1,32 +0,0 @@
This applies a better workaround for C++ type conflicts
in AltiVec/C++, allowing it to build on BE ppc(64).
--- a/extern/clew/include/clew.h
+++ b/extern/clew/include/clew.h
@@ -370,15 +370,18 @@ typedef unsigned int cl_GLenum;
/* Define basic vector types */
/* Workaround for ppc64el platform: conflicts with bool from C++. */
-#if defined( __VEC__ ) && !(defined(__PPC64__) && defined(__LITTLE_ENDIAN__))
+#if defined(__VEC__)
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
- typedef vector unsigned char __cl_uchar16;
- typedef vector signed char __cl_char16;
- typedef vector unsigned short __cl_ushort8;
- typedef vector signed short __cl_short8;
- typedef vector unsigned int __cl_uint4;
- typedef vector signed int __cl_int4;
- typedef vector float __cl_float4;
+ #undef vector
+ #undef bool
+ #undef pixel
+ typedef __vector unsigned char __cl_uchar16;
+ typedef __vector signed char __cl_char16;
+ typedef __vector unsigned short __cl_ushort8;
+ typedef __vector signed short __cl_short8;
+ typedef __vector unsigned int __cl_uint4;
+ typedef __vector signed int __cl_int4;
+ typedef __vector float __cl_float4;
#define __CL_UCHAR16__ 1
#define __CL_CHAR16__ 1
#define __CL_USHORT8__ 1

View file

@ -1,13 +1,11 @@
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt --- ./intern/cycles/CMakeLists.txt.orig 2021-04-16 20:47:50.466754473 +0200
index f22688f..c32aad1 100644 +++ ./intern/cycles/CMakeLists.txt 2021-04-16 20:48:06.199903232 +0200
--- a/intern/cycles/CMakeLists.txt @@ -336,7 +336,7 @@ endif()
+++ b/intern/cycles/CMakeLists.txt
@@ -227,8 +227,6 @@ endif()
# Warnings # Warnings
if(CMAKE_COMPILER_IS_GNUCXX) 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_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_cxxflag_double_promotion "-Werror=double-promotion")
+ #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") 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_float_conversion)
unset(_has_cxxflag_double_promotion) unset(_has_cxxflag_double_promotion)

View file

@ -1,25 +0,0 @@
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() */

View file

@ -1,7 +1,7 @@
# Template file for 'blender' # Template file for 'blender'
pkgname=blender pkgname=blender
version=2.90.1 version=2.92.0
revision=2 revision=1
archs="x86_64* ppc64*" archs="x86_64* ppc64*"
build_style="cmake" build_style="cmake"
pycompile_dirs="/usr/share/blender/${version%.*}/scripts" pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
@ -18,16 +18,23 @@ makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
libsamplerate-devel ffmpeg-devel fftw-devel boost-devel pcre-devel llvm libsamplerate-devel ffmpeg-devel fftw-devel boost-devel pcre-devel llvm
libopenexr-devel libopenjpeg2-devel libXi-devel openimageio-devel libopenexr-devel libopenjpeg2-devel libXi-devel openimageio-devel
opencolorio-devel opencollada-devel python3-numpy libXrender-devel opencolorio-devel opencollada-devel python3-numpy libXrender-devel
OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel" OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel
pugixml-devel"
depends="desktop-file-utils hicolor-icon-theme" depends="desktop-file-utils hicolor-icon-theme"
short_desc="3D graphics creation suite" short_desc="3D graphics creation suite"
maintainer="Enno Boland <gottox@voidlinux.org>" maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later" license="GPL-2.0-or-later"
homepage="http://www.blender.org" homepage="http://www.blender.org"
distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz" distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.xz"
checksum=e78dcc946c823ad1bd89bcc6938fc6b375540ec3eff58649586acf1f6a653d99 checksum=e791cfc403292383577c3c8ce2cd34e5aa2cd8da0a7483041049a1609ddb4595
python_version=3 python_version=3
CXXFLAGS="-DNDEBUG"
CFLAGS="$CXXFLAGS"
LDFLAGS="-Wl,-z,stack-size=2097152"
patch_args="-Np1" patch_args="-Np1"
# Blender tests are executed against a system installation of blender. This
# is currently not supported by xbps-src.
make_check=no
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
*-musl) ;; *-musl) ;;