diff --git a/dev-libs/Ice/Ice-3.7.8-r1.ebuild b/dev-libs/Ice/Ice-3.7.8-r1.ebuild index 038737b..a3cd289 100644 --- a/dev-libs/Ice/Ice-3.7.8-r1.ebuild +++ b/dev-libs/Ice/Ice-3.7.8-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{8..11} ) RUBY_OPTIONAL="yes" USE_RUBY="ruby30" @@ -52,6 +52,7 @@ PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${P}-fix-musl-build.patch" + "${FILESDIR}/${P}-py3k11.patch" ) pkg_setup() { diff --git a/dev-libs/Ice/Ice-3.7.8-r2.ebuild b/dev-libs/Ice/Ice-3.7.8-r2.ebuild index 0610c22..8d6d561 100644 --- a/dev-libs/Ice/Ice-3.7.8-r2.ebuild +++ b/dev-libs/Ice/Ice-3.7.8-r2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{8..11} ) RUBY_OPTIONAL="yes" USE_RUBY="ruby31" @@ -52,6 +52,7 @@ PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${P}-fix-musl-build.patch" + "${FILESDIR}/${P}-py3k11.patch" ) pkg_setup() { diff --git a/dev-libs/Ice/Ice-3.7.8.ebuild b/dev-libs/Ice/Ice-3.7.8.ebuild index dbf38c2..e65f661 100644 --- a/dev-libs/Ice/Ice-3.7.8.ebuild +++ b/dev-libs/Ice/Ice-3.7.8.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{8..11} ) RUBY_OPTIONAL="yes" USE_RUBY="ruby27" @@ -52,6 +52,7 @@ PHP_EXT_S="${S}/php" PATCHES=( "${FILESDIR}/${P}-fix-musl-build.patch" + "${FILESDIR}/${P}-py3k11.patch" ) pkg_setup() { diff --git a/dev-libs/Ice/files/Ice-3.7.8-py3k11.patch b/dev-libs/Ice/files/Ice-3.7.8-py3k11.patch new file mode 100644 index 0000000..7295aa6 --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.7.8-py3k11.patch @@ -0,0 +1,45 @@ +From a98f34df525dce54a96f443806599978b293d7c5 Mon Sep 17 00:00:00 2001 +From: Jose +Date: Thu, 3 Nov 2022 16:52:58 +0100 +Subject: [PATCH] Python 3.11 build fixes (#1394) + +--- + python/modules/IcePy/Slice.cpp | 7 ++++++- + python/modules/IcePy/Util.cpp | 5 +++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/python/modules/IcePy/Slice.cpp b/python/modules/IcePy/Slice.cpp +index e11365d8d40..7138e76dac0 100644 +--- a/python/modules/IcePy/Slice.cpp ++++ b/python/modules/IcePy/Slice.cpp +@@ -14,7 +14,12 @@ + // Python headers needed for PyEval_EvalCode. + // + #include +-#include ++// Use ceval.h instead of eval.h with Pyhthon 3.11 and greater ++#if PY_VERSION_HEX >= 0x030B0000 ++# include ++#else ++# include ++#endif + + using namespace std; + using namespace IcePy; +diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp +index f15c7a5c690..73955c933a2 100644 +--- a/python/modules/IcePy/Util.cpp ++++ b/python/modules/IcePy/Util.cpp +@@ -225,7 +225,12 @@ IcePy::getFunction() + // + // Get name of current function. + // ++ // Use PyEval_GetFrame with Pyhthon >= 3.11 ++#if PY_VERSION_HEX >= 0x030B0000 ++ PyFrameObject *f = PyEval_GetFrame(); ++#else + PyFrameObject *f = PyThreadState_GET()->frame; ++#endif + PyObjectHandle code = getAttr(reinterpret_cast(f), "f_code", false); + assert(code.get()); + PyObjectHandle func = getAttr(code.get(), "co_name", false);