From 237e926a0656f455c67273a5de94e9967964172e Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 23 Sep 2023 21:03:15 -0400 Subject: [PATCH] python3-orocos-kdl: rebuild for Python 3.12 --- srcpkgs/python3-orocos-kdl/patches/python3.12.patch | 12 ++++++++++++ srcpkgs/python3-orocos-kdl/template | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/python3-orocos-kdl/patches/python3.12.patch diff --git a/srcpkgs/python3-orocos-kdl/patches/python3.12.patch b/srcpkgs/python3-orocos-kdl/patches/python3.12.patch new file mode 100644 index 00000000000..e30d06e63b5 --- /dev/null +++ b/srcpkgs/python3-orocos-kdl/patches/python3.12.patch @@ -0,0 +1,12 @@ +--- ./python_orocos_kdl/PyKDL/std_string.sip.orig 2023-09-29 20:22:49.017791953 -0400 ++++ ./python_orocos_kdl/PyKDL/std_string.sip 2023-09-29 20:23:50.063156359 -0400 +@@ -49,7 +49,8 @@ + } + if (PyUnicode_Check(sipPy)) { + PyObject* s = PyUnicode_AsEncodedString(sipPy, "UTF-8", ""); +- *sipCppPtr = new std::string(PyUnicode_AS_DATA(s)); ++ const char *sb = PyBytes_AsString(s); ++ *sipCppPtr = new std::string(sb ? sb : ""); + Py_DECREF(s); + return 1; + } diff --git a/srcpkgs/python3-orocos-kdl/template b/srcpkgs/python3-orocos-kdl/template index 8ff996bf8c0..6cbdc6b1a62 100644 --- a/srcpkgs/python3-orocos-kdl/template +++ b/srcpkgs/python3-orocos-kdl/template @@ -1,11 +1,11 @@ # Template file for 'python3-orocos-kdl' pkgname=python3-orocos-kdl version=1.4.0 -revision=5 +revision=6 build_wrksrc=python_orocos_kdl build_style=cmake configure_args="-DPYTHON_VERSION=3 -DSIP_EXECUTABLE=/usr/bin/sip" -hostmakedepends="python3 python3-sip sip4" +hostmakedepends="python3-setuptools python3-sip sip4" makedepends="python3-sip-devel python3-devel orocos-kdl-devel eigen3.2" depends="python3 python3-sip" short_desc="Python3 Bindings for Orocos Kinematics and Dynamics C++ library"