blender: update to 3.6.4.
This commit is contained in:
parent
cc69ae5654
commit
282cde69ab
3 changed files with 1384 additions and 0 deletions
89
srcpkgs/blender/patches/python3.12-opcode.patch
Normal file
89
srcpkgs/blender/patches/python3.12-opcode.patch
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
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. */
|
||||||
|
|
1161
srcpkgs/blender/patches/python3.12-pyarg-parser.patch
Normal file
1161
srcpkgs/blender/patches/python3.12-pyarg-parser.patch
Normal file
File diff suppressed because it is too large
Load diff
134
srcpkgs/blender/patches/python3.12-pylongobject.patch
Normal file
134
srcpkgs/blender/patches/python3.12-pylongobject.patch
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
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 = {
|
||||||
|
|
||||||
|
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
|
||||||
|
|
||||||
|
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
|
||||||
|
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
|
||||||
|
PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){FIRST}};
|
||||||
|
static PyLongObject _IntegrationType_LAST = {
|
||||||
|
PyVarObject_HEAD_INIT(&IntegrationType_Type, 1){LAST}};
|
||||||
|
+#else
|
||||||
|
+#define NON_SIZE_BITS 3
|
||||||
|
+#define TAG_FROM_SIGN_AND_SIZE(sign, size) ((1 - (sign)) | ((size) << NON_SIZE_BITS))
|
||||||
|
+#define _Py_IntegrationTypeType_DIGIT_INIT(val) \
|
||||||
|
+ { \
|
||||||
|
+ .ob_base = PyObject_HEAD_INIT(&IntegrationType_Type) \
|
||||||
|
+ .long_value = { \
|
||||||
|
+ .lv_tag = TAG_FROM_SIGN_AND_SIZE( \
|
||||||
|
+ (val) == 0 ? 0 : ((val) < 0 ? -1 : 1), \
|
||||||
|
+ (val) == 0 ? 0 : 1), \
|
||||||
|
+ { ((val) >= 0 ? (val) : -(val)) }, \
|
||||||
|
+ } \
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+static PyLongObject _IntegrationType_MEAN = _Py_IntegrationTypeType_DIGIT_INIT(MEAN);
|
||||||
|
+static PyLongObject _IntegrationType_MIN = _Py_IntegrationTypeType_DIGIT_INIT(MIN);
|
||||||
|
+static PyLongObject _IntegrationType_MAX = _Py_IntegrationTypeType_DIGIT_INIT(MAX);
|
||||||
|
+static PyLongObject _IntegrationType_FIRST = _Py_IntegrationTypeType_DIGIT_INIT(FIRST);
|
||||||
|
+static PyLongObject _IntegrationType_LAST = _Py_IntegrationTypeType_DIGIT_INIT(LAST);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#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 = {
|
||||||
|
|
||||||
|
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
|
||||||
|
|
||||||
|
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
|
||||||
|
PyLongObject _BPy_MediumType_DRY_MEDIUM = {
|
||||||
|
PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::DRY_MEDIUM},
|
||||||
|
};
|
||||||
|
@@ -80,6 +81,24 @@ PyLongObject _BPy_MediumType_HUMID_MEDIU
|
||||||
|
PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
|
||||||
|
PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::OPAQUE_MEDIUM},
|
||||||
|
};
|
||||||
|
+#else
|
||||||
|
+#define NON_SIZE_BITS 3
|
||||||
|
+#define TAG_FROM_SIGN_AND_SIZE(sign, size) ((1 - (sign)) | ((size) << NON_SIZE_BITS))
|
||||||
|
+#define _Py_MediumType_DIGIT_INIT(val) \
|
||||||
|
+ { \
|
||||||
|
+ .ob_base = PyObject_HEAD_INIT(&MediumType_Type) \
|
||||||
|
+ .long_value = { \
|
||||||
|
+ .lv_tag = TAG_FROM_SIGN_AND_SIZE( \
|
||||||
|
+ (val) == 0 ? 0 : ((val) < 0 ? -1 : 1), \
|
||||||
|
+ (val) == 0 ? 0 : 1), \
|
||||||
|
+ { ((val) >= 0 ? (val) : -(val)) }, \
|
||||||
|
+ } \
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+PyLongObject _BPy_MediumType_DRY_MEDIUM = _Py_MediumType_DIGIT_INIT(Stroke::DRY_MEDIUM);
|
||||||
|
+PyLongObject _BPy_MediumType_HUMID_MEDIUM = _Py_MediumType_DIGIT_INIT(Stroke::HUMID_MEDIUM);
|
||||||
|
+PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = _Py_MediumType_DIGIT_INIT(Stroke::OPAQUE_MEDIUM);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
//-------------------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 = {
|
||||||
|
|
||||||
|
/*-----------------------BPy_Nature instance definitions ----------------------------------*/
|
||||||
|
|
||||||
|
+#if PY_VERSION_HEX < 0x030c0000 /* older than Python 3.12 */
|
||||||
|
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
|
||||||
|
PyVarObject_HEAD_INIT(&Nature_Type, 1){Nature::MATERIAL_BOUNDARY}};
|
||||||
|
static PyLongObject _Nature_EDGE_MARK = {
|
||||||
|
PyVarObject_HEAD_INIT(&Nature_Type, 1){Nature::EDGE_MARK}};
|
||||||
|
+#else
|
||||||
|
+#define NON_SIZE_BITS 3
|
||||||
|
+#define TAG_FROM_SIGN_AND_SIZE(sign, size) ((1 - (sign)) | ((size) << NON_SIZE_BITS))
|
||||||
|
+#define _Py_Nature_TypeType_DIGIT_INIT(val) \
|
||||||
|
+ { \
|
||||||
|
+ .ob_base = PyObject_HEAD_INIT(&Nature_Type) \
|
||||||
|
+ .long_value = { \
|
||||||
|
+ .lv_tag = TAG_FROM_SIGN_AND_SIZE( \
|
||||||
|
+ (val) == 0 ? 0 : ((val) < 0 ? -1 : 1), \
|
||||||
|
+ (val) == 0 ? 0 : 1), \
|
||||||
|
+ { ((val) >= 0 ? (val) : -(val)) }, \
|
||||||
|
+ } \
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+static PyLongObject _Nature_POINT = _Py_Nature_TypeType_DIGIT_INIT(Nature::POINT);
|
||||||
|
+static PyLongObject _Nature_S_VERTEX = _Py_Nature_TypeType_DIGIT_INIT(Nature::S_VERTEX);
|
||||||
|
+static PyLongObject _Nature_VIEW_VERTEX = _Py_Nature_TypeType_DIGIT_INIT(Nature::VIEW_VERTEX);
|
||||||
|
+static PyLongObject _Nature_NON_T_VERTEX = _Py_Nature_TypeType_DIGIT_INIT(Nature::NON_T_VERTEX);
|
||||||
|
+static PyLongObject _Nature_T_VERTEX = _Py_Nature_TypeType_DIGIT_INIT(Nature::T_VERTEX);
|
||||||
|
+static PyLongObject _Nature_CUSP = _Py_Nature_TypeType_DIGIT_INIT(Nature::CUSP);
|
||||||
|
+static PyLongObject _Nature_NO_FEATURE = _Py_Nature_TypeType_DIGIT_INIT(Nature::NO_FEATURE);
|
||||||
|
+static PyLongObject _Nature_SILHOUETTE = _Py_Nature_TypeType_DIGIT_INIT(Nature::SILHOUETTE);
|
||||||
|
+static PyLongObject _Nature_BORDER = _Py_Nature_TypeType_DIGIT_INIT(Nature::BORDER);
|
||||||
|
+static PyLongObject _Nature_CREASE = _Py_Nature_TypeType_DIGIT_INIT(Nature::CREASE);
|
||||||
|
+static PyLongObject _Nature_RIDGE = _Py_Nature_TypeType_DIGIT_INIT(Nature::RIDGE);
|
||||||
|
+static PyLongObject _Nature_VALLEY = _Py_Nature_TypeType_DIGIT_INIT(Nature::VALLEY);
|
||||||
|
+static PyLongObject _Nature_SUGGESTIVE_CONTOUR = _Py_Nature_TypeType_DIGIT_INIT(Nature::SUGGESTIVE_CONTOUR);
|
||||||
|
+static PyLongObject _Nature_MATERIAL_BOUNDARY = _Py_Nature_TypeType_DIGIT_INIT(Nature::MATERIAL_BOUNDARY);
|
||||||
|
+static PyLongObject _Nature_EDGE_MARK = _Py_Nature_TypeType_DIGIT_INIT(Nature::EDGE_MARK);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#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
|
||||||
|
else {
|
||||||
|
result = PyObject_NewVar(BPy_Nature, &Nature_Type, 1);
|
||||||
|
if (result) {
|
||||||
|
+#if PY_VERSION_HEX >= 0x030c0000 /* Python 3.12 and newer */
|
||||||
|
+ result->i.long_value.lv_tag = TAG_FROM_SIGN_AND_SIZE((v > 0 ? 1 : -1), 1);
|
||||||
|
+ result->i.long_value.ob_digit[0] = v;
|
||||||
|
+#else
|
||||||
|
result->i.ob_digit[0] = v;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (PyObject *)result;
|
Loading…
Add table
Add a link
Reference in a new issue