From 3e19562b2174e452823effea0fa2a634f03e7a5b Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Tue, 22 Apr 2025 12:05:10 +0800 Subject: [PATCH] lorcon: python 3.13 patch for testing --- net-wireless/lorcon/files/python_3.13.patch | 20 +++++++++++++++++++ .../lorcon-2020.06.06_p20220216-r3.ebuild | 11 +++------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 net-wireless/lorcon/files/python_3.13.patch diff --git a/net-wireless/lorcon/files/python_3.13.patch b/net-wireless/lorcon/files/python_3.13.patch new file mode 100644 index 000000000..8f9599f15 --- /dev/null +++ b/net-wireless/lorcon/files/python_3.13.patch @@ -0,0 +1,20 @@ +--- a/pylorcon2/PyLorcon2.c.orig 2022-02-16 23:20:32.000000000 +0800 ++++ b/pylorcon2/PyLorcon2.c 2025-04-22 12:02:33.146371998 +0800 +@@ -1325,7 +1325,7 @@ + + /* Call the error cb function */ + cb_arg = Py_BuildValue("(O)", lorcon_obj); +- pyresult = PyEval_CallObject(multi->error_cb_func, cb_arg); ++ pyresult = PyObject_Call(multi->error_cb_func, cb_arg, NULL); + Py_DECREF(cb_arg); + + if (pyresult == NULL) { +@@ -1425,7 +1425,7 @@ + Py_DECREF(packet_tuple_arg); + + cb_arg = Py_BuildValue("(O)", pypacket); +- pyresult = PyEval_CallObject(multi->cb_func, cb_arg); ++ pyresult = PyObject_Call(multi->cb_func, cb_arg, NULL); + Py_DECREF(cb_arg); + + if (pyresult == NULL) { diff --git a/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild b/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild index 68a49de94..278d77670 100644 --- a/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild +++ b/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild @@ -40,16 +40,11 @@ BDEPEND=" virtual/pkgconfig python? ( ${DISTUTILS_DEPS} )" -PATCHES=( "${FILESDIR}"/${P}-C99-decls.patch ) +PATCHES=( "${FILESDIR}"/${P}-C99-decls.patch + "${FILESDIR}"/python_3.13.patch + ) src_prepare() { - - if use python && use python_targets_python3_13; then - eerror "Python 3.13 is not supported by this version" - eerror "Please disable python use flag" - die - fi - default use python && distutils-r1_src_prepare }