diff --git a/packages/boost/boost-1.80.0-python-3.11.patch b/packages/boost/boost-1.80.0-python-3.11.patch new file mode 100644 index 0000000000..71555b19d1 --- /dev/null +++ b/packages/boost/boost-1.80.0-python-3.11.patch @@ -0,0 +1,37 @@ +https://github.com/boostorg/python/commit/a218babc8daee904a83f550fb66e5cb3f1cb3013 + +From a218babc8daee904a83f550fb66e5cb3f1cb3013 Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Mon, 25 Apr 2022 10:51:46 +0200 +Subject: [PATCH] Fix enum_type_object type on Python 3.11 + +The enum_type_object type inherits from PyLong_Type which is not tracked +by the GC. Instances doesn't have to be tracked by the GC: remove the +Py_TPFLAGS_HAVE_GC flag. + +The Python C API documentation says: + + "To create a container type, the tp_flags field of the type object + must include the Py_TPFLAGS_HAVE_GC and provide an implementation of + the tp_traverse handler." + +https://docs.python.org/dev/c-api/gcsupport.html + +The new exception was introduced in Python 3.11 by: +https://github.com/python/cpython/issues/88429 +--- + src/object/enum.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/object/enum.cpp b/src/object/enum.cpp +index 293e705899..5753b32e07 100644 +--- a/src/object/enum.cpp ++++ b/libs/python/src/object/enum.cpp +@@ -113,7 +113,6 @@ static PyTypeObject enum_type_object = { + #if PY_VERSION_HEX < 0x03000000 + | Py_TPFLAGS_CHECKTYPES + #endif +- | Py_TPFLAGS_HAVE_GC + | Py_TPFLAGS_BASETYPE, /* tp_flags */ + 0, /* tp_doc */ + 0, /* tp_traverse */ diff --git a/packages/boost/build.sh b/packages/boost/build.sh index 93dfb3efc8..9e4f7db063 100644 --- a/packages/boost/build.sh +++ b/packages/boost/build.sh @@ -5,6 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux" # Never forget to always bump revision of reverse dependencies and rebuild them # when bumping version. TERMUX_PKG_VERSION=1.80.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://boostorg.jfrog.io/artifactory/main/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2 TERMUX_PKG_SHA256=1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0 TERMUX_PKG_DEPENDS="libc++, libbz2, libiconv, liblzma, zlib"