blender: update to 4.0.2.

This commit is contained in:
Đoàn Trần Công Danh 2024-01-08 21:29:11 +07:00
parent 89ab927e97
commit ed3c4fce5e
8 changed files with 61 additions and 1290 deletions

View file

@ -10,17 +10,15 @@ Subject: [PATCH 1/2] musl fixes
extern/glog/src/config_linux.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/extern/glog/src/config_linux.h b/extern/glog/src/config_linux.h
index b3a3325..946095a 100644
--- a/extern/glog/src/config_linux.h
+++ b/extern/glog/src/config_linux.h
@@ -14,7 +14,6 @@
@@ -14,7 +14,9 @@
#define HAVE_DLFCN_H
/* Define to 1 if you have the <execinfo.h> header file. */
-#define HAVE_EXECINFO_H
+#ifdef __GLIBC__
#define HAVE_EXECINFO_H
+#endif
/* Define if you have the `fcntl' function */
#define HAVE_FCNTL
--
2.38.1

View file

@ -1,10 +1,8 @@
This applies a better workaround for C++ type conflicts
in AltiVec/C++, allowing it to build on BE ppc(64).
Index: blender-3.3.0/extern/clew/include/clew.h
===================================================================
--- blender-3.3.0.orig/extern/clew/include/clew.h
+++ blender-3.3.0/extern/clew/include/clew.h
--- 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 */

View file

@ -1,12 +0,0 @@
Index: blender-3.3.0/intern/locale/boost_locale_wrapper.cpp
===================================================================
--- blender-3.3.0.orig/intern/locale/boost_locale_wrapper.cpp
+++ blender-3.3.0/intern/locale/boost_locale_wrapper.cpp
@@ -7,6 +7,7 @@
#include <boost/locale.hpp>
#include <stdio.h>
+#include <iostream>
#include "boost_locale_wrapper.h"

View file

@ -0,0 +1,36 @@
--- a/scripts/addons/io_import_dxf/dxfgrabber/dxfentities.py
+++ b/scripts/addons/io_import_dxf/dxfgrabber/dxfentities.py
@@ -852,7 +852,7 @@ class MText(DXFEntity):
self.set_default_extrusion()
def lines(self):
- return self.raw_text.split('\P')
+ return self.raw_text.split(r'\P')
def plain_text(self, split=False):
chars = []
--- a/scripts/addons/io_scene_gltf2/io/exp/gltf2_io_image_data.py
+++ b/scripts/addons/io_scene_gltf2/io/exp/gltf2_io_image_data.py
@@ -22,9 +22,9 @@ class ImageData:
return hash(self._data)
def adjusted_name(self):
- regex_dot = re.compile("\.")
+ regex_dot = re.compile(r"\.")
adjusted_name = re.sub(regex_dot, "_", self.name)
- new_name = "".join([char for char in adjusted_name if char not in "!#$&'()*+,/:;<>?@[\]^`{|}~"])
+ new_name = "".join([char for char in adjusted_name if char not in r"!#$&'()*+,/:;<>?@[\]^`{|}~"])
return new_name
@property
--- a/scripts/modules/bl_i18n_utils/settings.py
+++ b/scripts/modules/bl_i18n_utils/settings.py
@@ -302,7 +302,7 @@ PYGETTEXT_KEYWORDS = (() +
# becomes extremely slow to process some (unrelated) source files.
((r"\{(?:(?:\s*\"[^\",]+\"\s*,)|(?:\s*\"\\\"\",)|(?:\s*nullptr\s*,)){4}\s*" +
_msg_re + r"\s*,(?:(?:\s*\"[^\"',]+\"\s*,)|(?:\s*nullptr\s*,))(?:[^,]+,){2}"
- + "(?:\|?\s*B_UNIT_DEF_[_A-Z]+\s*)+\}"),) +
+ + r"(?:\|?\s*B_UNIT_DEF_[_A-Z]+\s*)+\}"),) +
tuple((r"{}\(\s*" + _msg_re + r"\s*,\s*(?:" +
r"\s*,\s*)?(?:".join(_ctxt_re_gen(i) for i in range(PYGETTEXT_MAX_MULTI_CTXT)) + r")?\s*\)").format(it)

View file

@ -1,89 +0,0 @@
https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5ed674e4d/f/blender-3.6.1-py312-opcode.patch
--- blender-3.6.1/source/blender/python/intern/bpy_driver.c.pyop 2023-05-18 08:04:45.000000000 +0900
+++ blender-3.6.1/source/blender/python/intern/bpy_driver.c 2023-08-01 17:11:06.356802916 +0900
@@ -313,14 +313,27 @@ static const bool secure_opcodes[255] =
OK_OP(CACHE),
OK_OP(POP_TOP),
OK_OP(PUSH_NULL),
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
+ OK_OP(INTERPRETER_EXIT),
+ OK_OP(END_FOR),
+ OK_OP(END_SEND),
+#endif
OK_OP(NOP),
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
OK_OP(UNARY_POSITIVE),
+#endif
OK_OP(UNARY_NEGATIVE),
OK_OP(UNARY_NOT),
OK_OP(UNARY_INVERT),
OK_OP(BINARY_SUBSCR),
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
+ OK_OP(BINARY_SLICE),
+ OK_OP(STORE_SLICE),
+#endif
OK_OP(GET_LEN),
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
OK_OP(LIST_TO_TUPLE),
+#endif
OK_OP(RETURN_VALUE),
OK_OP(SWAP),
OK_OP(BUILD_TUPLE),
@@ -329,10 +342,15 @@ static const bool secure_opcodes[255] =
OK_OP(BUILD_MAP),
OK_OP(COMPARE_OP),
OK_OP(JUMP_FORWARD),
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
+ OK_OP(POP_JUMP_IF_FALSE),
+ OK_OP(POP_JUMP_IF_TRUE),
+#else
OK_OP(JUMP_IF_FALSE_OR_POP),
OK_OP(JUMP_IF_TRUE_OR_POP),
OK_OP(POP_JUMP_FORWARD_IF_FALSE),
OK_OP(POP_JUMP_FORWARD_IF_TRUE),
+#endif
OK_OP(LOAD_GLOBAL),
OK_OP(IS_OP),
OK_OP(CONTAINS_OP),
@@ -340,8 +358,13 @@ static const bool secure_opcodes[255] =
OK_OP(LOAD_FAST),
OK_OP(STORE_FAST),
OK_OP(DELETE_FAST),
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
+ OK_OP(POP_JUMP_IF_NOT_NONE),
+ OK_OP(POP_JUMP_IF_NONE),
+#else
OK_OP(POP_JUMP_FORWARD_IF_NOT_NONE),
OK_OP(POP_JUMP_FORWARD_IF_NONE),
+#endif
OK_OP(BUILD_SLICE),
OK_OP(LOAD_DEREF),
OK_OP(STORE_DEREF),
@@ -354,17 +377,26 @@ static const bool secure_opcodes[255] =
OK_OP(DICT_MERGE),
OK_OP(DICT_UPDATE),
# endif
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
+ OK_OP(INSTRUMENTED_POP_JUMP_IF_NONE),
+ OK_OP(INSTRUMENTED_POP_JUMP_IF_NOT_NONE),
+ OK_OP(INSTRUMENTED_POP_JUMP_IF_FALSE),
+ OK_OP(INSTRUMENTED_POP_JUMP_IF_TRUE),
+#else
OK_OP(POP_JUMP_BACKWARD_IF_NOT_NONE),
OK_OP(POP_JUMP_BACKWARD_IF_NONE),
OK_OP(POP_JUMP_BACKWARD_IF_FALSE),
OK_OP(POP_JUMP_BACKWARD_IF_TRUE),
+#endif
/* Special cases. */
OK_OP(LOAD_CONST), /* Ok because constants are accepted. */
OK_OP(LOAD_NAME), /* Ok, because `PyCodeObject.names` is checked. */
OK_OP(CALL), /* Ok, because we check its "name" before calling. */
OK_OP(KW_NAMES), /* Ok, because it's used for calling functions with keyword arguments. */
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
OK_OP(PRECALL), /* Ok, because it's used for calling. */
+#endif
# else /* Python 3.10 and older. */

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5ed674e4d/f/blender-3.6.1-py312-pylongobject.patch
--- blender-3.6.1/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp.pyorig 2023-05-18 08:04:44.000000000 +0900
+++ blender-3.6.1/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp 2023-08-01 16:30:13.609640614 +0900
@@ -186,6 +186,7 @@ PyTypeObject IntegrationType_Type = {
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -188,6 +188,7 @@ PyTypeObject IntegrationType_Type = {
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@ -10,7 +10,7 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
static PyLongObject _IntegrationType_MEAN = {
PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){MEAN}};
static PyLongObject _IntegrationType_MIN = {PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){MIN}};
@@ -194,6 +195,26 @@ static PyLongObject _IntegrationType_FIR
@@ -196,6 +197,26 @@ static PyLongObject _IntegrationType_FIR
PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){FIRST}};
static PyLongObject _IntegrationType_LAST = {
PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){LAST}};
@ -37,9 +37,9 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
#define BPy_IntegrationType_MEAN ((PyObject *)&_IntegrationType_MEAN)
#define BPy_IntegrationType_MIN ((PyObject *)&_IntegrationType_MIN)
--- blender-3.6.1/source/blender/freestyle/intern/python/BPy_MediumType.cpp.pyorig 2023-05-18 08:04:44.000000000 +0900
+++ blender-3.6.1/source/blender/freestyle/intern/python/BPy_MediumType.cpp 2023-08-01 16:30:18.875628797 +0900
@@ -71,6 +71,7 @@ PyTypeObject MediumType_Type = {
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -73,6 +73,7 @@ PyTypeObject MediumType_Type = {
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@ -47,7 +47,7 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
PyLongObject _BPy_MediumType_DRY_MEDIUM = {
PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::DRY_MEDIUM},
};
@@ -80,6 +81,24 @@ PyLongObject _BPy_MediumType_HUMID_MEDIU
@@ -82,6 +83,24 @@ PyLongObject _BPy_MediumType_HUMID_MEDIU
PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::OPAQUE_MEDIUM},
};
@ -72,9 +72,9 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
//-------------------MODULE INITIALIZATION--------------------------------
--- blender-3.6.1/source/blender/freestyle/intern/python/BPy_Nature.cpp.pyorig 2023-05-18 08:04:44.000000000 +0900
+++ blender-3.6.1/source/blender/freestyle/intern/python/BPy_Nature.cpp 2023-08-01 16:49:31.446042329 +0900
@@ -135,6 +135,7 @@ PyTypeObject Nature_Type = {
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -137,6 +137,7 @@ PyTypeObject Nature_Type = {
/*-----------------------BPy_Nature instance definitions ----------------------------------*/
@ -82,7 +82,7 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
static PyLongObject _Nature_POINT = {PyVarObject_HEAD_INIT(&Nature_Type, 0){Nature::POINT}};
static PyLongObject _Nature_S_VERTEX = {PyVarObject_HEAD_INIT(&Nature_Type, 1){Nature::S_VERTEX}};
static PyLongObject _Nature_VIEW_VERTEX = {
@@ -157,6 +158,36 @@ static PyLongObject _Nature_MATERIAL_BOU
@@ -159,6 +160,36 @@ static PyLongObject _Nature_MATERIAL_BOU
PyVarObject_HEAD_INIT(&Nature_Type, 1){Nature::MATERIAL_BOUNDARY}};
static PyLongObject _Nature_EDGE_MARK = {
PyVarObject_HEAD_INIT(&Nature_Type, 1){Nature::EDGE_MARK}};
@ -119,7 +119,7 @@ https://src.fedoraproject.org/rpms/blender/raw/7045717eb5477c40905f6d29dfd3dbf5e
#define BPy_Nature_POINT ((PyObject *)&_Nature_POINT)
#define BPy_Nature_S_VERTEX ((PyObject *)&_Nature_S_VERTEX)
@@ -247,7 +278,12 @@ static PyObject *BPy_Nature_bitwise(PyOb
@@ -249,7 +280,12 @@ static PyObject *BPy_Nature_bitwise(PyOb
else {
result = PyObject_NewVar(BPy_Nature, &Nature_Type, 1);
if (result) {

View file

@ -1,10 +1,10 @@
# Template file for 'blender'
pkgname=blender
version=3.6.5
revision=2
version=4.0.2
revision=1
archs="x86_64* ppc64*"
build_style="cmake"
pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
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_EMBREE=OFF -DWITH_OPENCOLORIO=ON
@ -23,14 +23,15 @@ makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel
pugixml-devel libXxf86vm-devel libepoxy-devel gmp-devel gmpxx-devel
wayland-protocols wayland-devel libxkbcommon-devel libdecor-devel
eigen lzo-devel"
libspnav-devel libwebp-devel potrace-devel Haru-devel openpgl-devel
pulseaudio-devel eigen lzo-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="3D graphics creation suite"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.blender.org"
distfiles="https://download.blender.org/source/blender-${version}.tar.xz"
checksum=4001c0fe99f6d872ec7c7e955f84a9eebdb9ada17100f4b519eae08decf7f243
checksum=aaa0e729da7591cfbf45772af76345977daaa7b11a0af35d98f9313e246077a3
python_version=3
LDFLAGS="-Wl,-z,stack-size=2097152"
# Blender tests are executed against a system installation of blender. This