diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2022-11-11 00:00:10 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2022-11-11 00:03:42 +0100 |
commit | d5b4e4f0eaa2057de7dda8b3e2af437fca7016c9 (patch) | |
tree | 5da359ee3c775f25df623b4720cd857b296d7cc2 /app-metrics | |
parent | app-misc/graphlcd-base: fix compilation with musl (diff) | |
download | gentoo-d5b4e4f0eaa2057de7dda8b3e2af437fca7016c9.tar.gz gentoo-d5b4e4f0eaa2057de7dda8b3e2af437fca7016c9.tar.bz2 gentoo-d5b4e4f0eaa2057de7dda8b3e2af437fca7016c9.zip |
app-metrics/collectd: fix compilation with python3_11
Closes: https://bugs.gentoo.org/880445
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r-- | app-metrics/collectd/collectd-5.12.0-r7.ebuild | 5 | ||||
-rw-r--r-- | app-metrics/collectd/files/collectd-5.12.0-python3_11.patch | 33 |
2 files changed, 37 insertions, 1 deletions
diff --git a/app-metrics/collectd/collectd-5.12.0-r7.ebuild b/app-metrics/collectd/collectd-5.12.0-r7.ebuild index 1b25586eb8fc..26990d0f4680 100644 --- a/app-metrics/collectd/collectd-5.12.0-r7.ebuild +++ b/app-metrics/collectd/collectd-5.12.0-r7.ebuild @@ -170,7 +170,10 @@ REQUIRED_USE=" collectd_plugins_smart? ( udev ) contrib? ( perl )" -PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch + "${FILESDIR}"/${PN}-5.12.0-python3_11.patch +) # @FUNCTION: collectd_plugin_kernel_linux # @DESCRIPTION: diff --git a/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch b/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch new file mode 100644 index 000000000000..3c0572889559 --- /dev/null +++ b/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch @@ -0,0 +1,33 @@ +From 623e95394e0e62e7f9ced2104b786d21e9c0bf53 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + <congdanhqx@gmail.com> +Date: Wed, 21 Sep 2022 22:21:58 +0700 +Subject: [PATCH] cpython: fix build with Python 3.11 + +Python 3.11 moves longintrepr.h into cpython sub-directory. +However, in this version, longintrepr.h is always included. +--- + src/cpython.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/cpython.h b/src/cpython.h +index 11e64fa62f..bcfa406feb 100644 +--- a/src/cpython.h ++++ b/src/cpython.h +@@ -24,9 +24,15 @@ + * Sven Trenkel <collectd at semidefinite.de> + **/ + ++#include <Python.h> + /* Some python versions don't include this by default. */ +- ++#if PY_VERSION_HEX < 0x030B0000 ++/* ++ * Python 3.11 move longintrepr.h to cpython/longintrepr.h ++ * And it's always included ++ */ + #include <longintrepr.h> ++#endif /* PY_VERSION_HEX < 0x030B0000 */ + + /* These two macros are basically Py_BEGIN_ALLOW_THREADS and + * Py_BEGIN_ALLOW_THREADS |