blender: update to 2.82

This commit is contained in:
oreo639 2020-02-28 03:57:30 -08:00 committed by Juan RP
parent f11eef3880
commit 088018456b
4 changed files with 24 additions and 105 deletions

View File

@ -1,49 +0,0 @@
Index: blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
===================================================================
--- blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
+++ blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
@@ -717,9 +717,11 @@
****************************************************************************/
PyObject *PyC_DefaultNameSpace(const char *filename)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
+ PyObject *modules = PyImport_GetModuleDict();
+ PyObject *builtins = PyDict_GetItemString(modules, "builtins");
+
PyObject *mod_main = PyModule_New("__main__");
- PyDict_SetItemString(interp->modules, "__main__", mod_main);
+ PyDict_SetItemString(modules, "__main__", mod_main);
Py_DECREF(mod_main); /* sys.modules owns now */
PyModule_AddStringConstant(mod_main, "__name__", "__main__");
if (filename) {
@@ -727,8 +729,8 @@
* note: this wont map to a real file when executing text-blocks and buttons. */
PyModule_AddObject(mod_main, "__file__", PyC_UnicodeFromByte(filename));
}
- PyModule_AddObject(mod_main, "__builtins__", interp->builtins);
- Py_INCREF(interp->builtins); /* AddObject steals a reference */
+ PyModule_AddObject(mod_main, "__builtins__", builtins);
+ Py_INCREF(builtins); /* AddObject steals a reference */
return PyModule_GetDict(mod_main);
}
@@ -755,15 +757,15 @@
/* restore MUST be called after this */
void PyC_MainModule_Backup(PyObject **main_mod)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
- *main_mod = PyDict_GetItemString(interp->modules, "__main__");
+ PyObject *modules = PyImport_GetModuleDict();
+ *main_mod = PyDict_GetItemString(modules, "__main__");
Py_XINCREF(*main_mod); /* don't free */
}
void PyC_MainModule_Restore(PyObject *main_mod)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
- PyDict_SetItemString(interp->modules, "__main__", main_mod);
+ PyObject *modules = PyImport_GetModuleDict();
+ PyDict_SetItemString(modules, "__main__", main_mod);
Py_XDECREF(main_mod);
}

View File

@ -1,24 +1,26 @@
--- a/CMakeLists.txt 2019-12-04 12:00:31.000000000 +0100
+++ - 2020-01-26 14:37:19.575701782 +0100
@@ -185,6 +185,18 @@
set(_init_OPENSUBDIV OFF)
set(_init_OPENVDB OFF)
set(_init_OPENIMAGEDENOISE OFF)
+ # 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()
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()
+# 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()
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
+include(CheckLibraryExists)
+check_library_exists(m feenableexcept "fenv.h" 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

View File

@ -1,34 +0,0 @@
From c30453ca249ba1a49e761c5042ee0da939ea5b23 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 4 Feb 2020 13:17:18 +0100
Subject: [PATCH] fix broken endian check
__LITTLE_ENDIAN is not a thing, only __LITTLE_ENDIAN__ is. It
also does not make sense to create a third case as there are
only two options.
---
intern/numaapi/source/build_config.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/intern/numaapi/source/build_config.h b/intern/numaapi/source/build_config.h
index b8af51a..9725d8b 100644
--- a/intern/numaapi/source/build_config.h
+++ b/intern/numaapi/source/build_config.h
@@ -311,12 +311,10 @@
# define ARCH_CPU_PPC_FAMILY 1
# define ARCH_CPU_PPC 1
# define ARCH_CPU_64_BITS 1
-# if defined(__BIG_ENDIAN__)
-# define ARCH_CPU_BIG_ENDIAN 1
-# elif defined(__LITTLE_ENDIAN)
+# if defined(__LITTLE_ENDIAN__)
# define ARCH_CPU_LITTLE_ENDIAN 1
# else
-# error Please define your endianness
+# define ARCH_CPU_BIG_ENDIAN 1
# endif
#elif defined(__s390x__)
# define ARCH_CPU_S390_FAMILY 1
--
2.24.0

View File

@ -1,6 +1,6 @@
# Template file for 'blender'
pkgname=blender
version=2.81a
version=2.82
revision=1
build_style="cmake"
makedepends="
@ -16,7 +16,7 @@ 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=52ac4145cef3d49ca6a36cbc6d009598ca2833143fd6c4f1caba4f5c525680fe
checksum=002adf2c51fc58a8941c87fc8e180bb1aacb73a0c223714f36d3d84da345fc65
patch_args="-Np1"
pycompile_version="$py3_ver"