commit: 4e606a23bd52173d31a62befbea1b4ddc972fe19 Author: Robert Förster <Dessa <AT> gmake <DOT> de> AuthorDate: Sun Jul 20 14:48:00 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Jul 23 02:30:11 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e606a23
dev-libs/Ice: enable py3.13, py3.14 Closes: https://bugs.gentoo.org/952300 Signed-off-by: Robert Förster <Dessa <AT> gmake.de> Part-of: https://github.com/gentoo/gentoo/pull/43081 Closes: https://github.com/gentoo/gentoo/pull/43081 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/Ice/Ice-3.7.10-r1.ebuild | 9 +-- dev-libs/Ice/Ice-3.7.10-r2.ebuild | 9 +-- dev-libs/Ice/files/Ice-3.7.8-python3.13.patch | 96 +++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 8 deletions(-) diff --git a/dev-libs/Ice/Ice-3.7.10-r1.ebuild b/dev-libs/Ice/Ice-3.7.10-r1.ebuild index af91b98a0272..e06d4fc78b78 100644 --- a/dev-libs/Ice/Ice-3.7.10-r1.ebuild +++ b/dev-libs/Ice/Ice-3.7.10-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{11..14} ) RUBY_OPTIONAL="yes" USE_RUBY="ruby32" @@ -14,14 +14,15 @@ PHP_EXT_ZENDEXT="no" PHP_EXT_OPTIONAL_USE=php -USE_PHP="php8-2 php8-3" +USE_PHP="php8-2 php8-3 php8-4" inherit php-ext-source-r3 python-r1 ruby-ng toolchain-funcs DESCRIPTION="ICE middleware C++ library and generator tools" -HOMEPAGE="https://zeroc.com/products/ice" +HOMEPAGE="https://zeroc.com/ice" SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz doc? ( https://download.zeroc.com/Ice/$(ver_cut 1-2)/${PN}-3.7.1.pdf )" +S="${WORKDIR}/${P,}" LICENSE="GPL-2" SLOT="0/37" KEYWORDS="amd64 ~arm ~arm64 x86" @@ -47,11 +48,11 @@ DEPEND="${RDEPEND} # Maintainer notes: # TODO: java bindings -S="${WORKDIR}/${P,}" PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${PN}-3.7.8-fix-musl-build.patch" + "${FILESDIR}/${PN}-3.7.8-python3.13.patch" ) pkg_setup() { diff --git a/dev-libs/Ice/Ice-3.7.10-r2.ebuild b/dev-libs/Ice/Ice-3.7.10-r2.ebuild index dba8bcadec63..7a133a6ff836 100644 --- a/dev-libs/Ice/Ice-3.7.10-r2.ebuild +++ b/dev-libs/Ice/Ice-3.7.10-r2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{11..14} ) RUBY_OPTIONAL="yes" USE_RUBY="ruby33" @@ -14,14 +14,15 @@ PHP_EXT_ZENDEXT="no" PHP_EXT_OPTIONAL_USE=php -USE_PHP="php8-2 php8-3" +USE_PHP="php8-2 php8-3 php8-4" inherit php-ext-source-r3 python-r1 ruby-ng toolchain-funcs DESCRIPTION="ICE middleware C++ library and generator tools" -HOMEPAGE="https://zeroc.com/products/ice" +HOMEPAGE="https://zeroc.com/ice" SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz doc? ( https://download.zeroc.com/Ice/$(ver_cut 1-2)/${PN}-3.7.1.pdf )" +S="${WORKDIR}/${P,}" LICENSE="GPL-2" SLOT="0/37" KEYWORDS="amd64 ~arm ~arm64 x86" @@ -47,11 +48,11 @@ DEPEND="${RDEPEND} # Maintainer notes: # TODO: java bindings -S="${WORKDIR}/${P,}" PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${PN}-3.7.8-fix-musl-build.patch" + "${FILESDIR}/${PN}-3.7.8-python3.13.patch" ) pkg_setup() { diff --git a/dev-libs/Ice/files/Ice-3.7.8-python3.13.patch b/dev-libs/Ice/files/Ice-3.7.8-python3.13.patch new file mode 100644 index 000000000000..dfca89be44f8 --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.7.8-python3.13.patch @@ -0,0 +1,96 @@ +Description: Python 3.13 build fixes +Author: Jose <[email protected]> +Origin: backport +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092441 +Applied-Upstream: https://github.com/zeroc-ice/ice/commit/019976e2db4899a5ac30f497aa45b51335b024ec +Reviewed-by: Simon Quigley <[email protected]> +Last-Update: 2025-02-24 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/python/modules/IcePy/Types.cpp ++++ b/python/modules/IcePy/Types.cpp +@@ -455,14 +455,7 @@ IcePy::StreamUtil::setSlicedDataMember(P + assert(_sliceInfoType); + } + +- IcePy::PyObjectHandle args = PyTuple_New(0); +- if(!args.get()) +- { +- assert(PyErr_Occurred()); +- throw AbortMarshaling(); +- } +- +- PyObjectHandle sd = PyEval_CallObject(_slicedDataType, args.get()); ++ PyObjectHandle sd{PyObject_CallObject(_slicedDataType, nullptr)}; + if(!sd.get()) + { + assert(PyErr_Occurred()); +@@ -488,7 +481,7 @@ IcePy::StreamUtil::setSlicedDataMember(P + int i = 0; + for(vector<Ice::SliceInfoPtr>::const_iterator p = slicedData->slices.begin(); p != slicedData->slices.end(); ++p) + { +- PyObjectHandle slice = PyEval_CallObject(_sliceInfoType, args.get()); ++ PyObjectHandle slice{PyObject_CallObject(_sliceInfoType, nullptr)}; + if(!slice.get()) + { + assert(PyErr_Occurred()); +@@ -1669,18 +1662,17 @@ IcePy::SequenceInfo::marshal(PyObject* p + Py_ssize_t sz = 0; + if(p != Py_None) + { +- const void* buf = 0; +- if(PyObject_AsReadBuffer(p, &buf, &sz) == 0) ++ Py_buffer pybuf; ++ if (pi && PyObject_GetBuffer(p, &pybuf, PyBUF_SIMPLE | PyBUF_FORMAT) == 0) + { +- if(pi->kind == PrimitiveInfo::KindString) +- { +- PyErr_Format(PyExc_ValueError, STRCAST("expected sequence value")); +- throw AbortMarshaling(); +- } ++ // Strings are handled as variable length types above. ++ assert(pi->kind != PrimitiveInfo::KindString); ++ sz = pybuf.len; ++ PyBuffer_Release(&pybuf); + } + else + { +- PyErr_Clear(); // PyObject_AsReadBuffer sets an exception on failure. ++ PyErr_Clear(); // PyObject_GetBuffer sets an exception on failure. + + PyObjectHandle fs; + if(pi) +@@ -1906,7 +1898,7 @@ IcePy::SequenceInfo::marshalPrimitiveSeq + if(pi->kind != PrimitiveInfo::KindString) + { + // +- // With Python 3 and greater we marshal sequences of pritive types using the new ++ // With Python 3 and greater we marshal sequences of primitive types using the new + // buffer protocol when possible, for older versions we use the old buffer protocol. + // + #if PY_VERSION_HEX >= 0x03000000 +@@ -2030,7 +2022,7 @@ IcePy::SequenceInfo::marshalPrimitiveSeq + } + else + { +- PyErr_Clear(); // PyObject_GetBuffer/PyObject_AsReadBuffer sets an exception on failure. ++ PyErr_Clear(); // PyObject_GetBuffer sets an exception on failure. + } + } + +--- a/python/modules/IcePy/Util.cpp ++++ b/python/modules/IcePy/Util.cpp +@@ -729,12 +729,7 @@ PyObject* + IcePy::createExceptionInstance(PyObject* type) + { + assert(PyExceptionClass_Check(type)); +- IcePy::PyObjectHandle args = PyTuple_New(0); +- if(!args.get()) +- { +- return 0; +- } +- return PyEval_CallObject(type, args.get()); ++ return PyObject_CallObject(type, nullptr); + } + + static void
