aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-03-03 19:11:30 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-03-03 20:51:02 +0000
commit03f7dd327e77ece810122edab088f1d778dbb2ef (patch)
treeab1524466e68296bd7c4dc957af786e466830dac
parentcb98925ac78ab2c7bc0b01b2d163ca6ddefacbb2 (diff)
downloadports-03f7dd327e77ece810122edab088f1d778dbb2ef.tar.gz
ports-03f7dd327e77ece810122edab088f1d778dbb2ef.zip
math/py-levmar: fix build with Python > 3.8
tp_print is deprecated in Python-3.8, and it causes an error in 3.9. PR: 262325 Approved by: yuri (maintainer)
-rw-r--r--math/py-levmar/files/patch-levmar___levmar.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/math/py-levmar/files/patch-levmar___levmar.c b/math/py-levmar/files/patch-levmar___levmar.c
new file mode 100644
index 000000000000..d895157ceb43
--- /dev/null
+++ b/math/py-levmar/files/patch-levmar___levmar.c
@@ -0,0 +1,22 @@
+--- levmar/_levmar.c.orig 2019-10-23 16:15:35 UTC
++++ levmar/_levmar.c
+@@ -15970,7 +15970,9 @@ static PyTypeObject __pyx_type_6levmar_7_levmar__LMFun
+ sizeof(struct __pyx_obj_6levmar_7_levmar__LMFunc), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_6levmar_7_levmar__LMFunc, /*tp_dealloc*/
++#if PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
++#endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+@@ -17179,7 +17181,9 @@ static int __pyx_pymod_exec__levmar(PyObject *__pyx_py
+ __pyx_vtable_6levmar_7_levmar__LMFunc.eval_func = (void (*)(struct __pyx_obj_6levmar_7_levmar__LMFunc *, double *, double *, int, int))__pyx_f_6levmar_7_levmar_7_LMFunc_eval_func;
+ __pyx_vtable_6levmar_7_levmar__LMFunc.eval_jacf = (void (*)(struct __pyx_obj_6levmar_7_levmar__LMFunc *, double *, double *, int, int))__pyx_f_6levmar_7_levmar_7_LMFunc_eval_jacf;
+ if (PyType_Ready(&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
++#if PY_VERSION_HEX < 0x03090000
+ __pyx_type_6levmar_7_levmar__LMFunc.tp_print = 0;
++#endif
+ if (__Pyx_SetVtable(__pyx_type_6levmar_7_levmar__LMFunc.tp_dict, __pyx_vtabptr_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "_LMFunc", (PyObject *)&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)