diff options
author | Sam James <sam@gentoo.org> | 2023-01-28 01:23:14 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-28 01:33:14 +0000 |
commit | 374d969ff9186ab83d7a2b99cd6f88dc7d862845 (patch) | |
tree | 40a350cade424bf83675320928a0aaaa79cef13e /dev-python/greenlet | |
parent | sys-apps/systemd: drop 252.4 (diff) | |
download | gentoo-374d969ff9186ab83d7a2b99cd6f88dc7d862845.tar.gz gentoo-374d969ff9186ab83d7a2b99cd6f88dc7d862845.tar.bz2 gentoo-374d969ff9186ab83d7a2b99cd6f88dc7d862845.zip |
dev-python/greenlet: fix build w/ gcc 13
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/greenlet')
-rw-r--r-- | dev-python/greenlet/files/greenlet-2.0.1-gcc-13.patch | 47 | ||||
-rw-r--r-- | dev-python/greenlet/greenlet-2.0.1-r1.ebuild | 33 |
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/greenlet/files/greenlet-2.0.1-gcc-13.patch b/dev-python/greenlet/files/greenlet-2.0.1-gcc-13.patch new file mode 100644 index 000000000000..4afbca8f1479 --- /dev/null +++ b/dev-python/greenlet/files/greenlet-2.0.1-gcc-13.patch @@ -0,0 +1,47 @@ +https://github.com/python-greenlet/greenlet/commit/3be53248cd1f8e4859563b84b04054de7a9fcad2 +https://github.com/python-greenlet/greenlet/commit/86c4e2a98f1bd27eff38edd5dba8c10300bc8e64 + +From 3be53248cd1f8e4859563b84b04054de7a9fcad2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 16 Jan 2023 21:37:26 -0800 +Subject: [PATCH] greenlet: Drop using 'register' storage class keyword + +This has been dropped in c++17 and newer + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/src/greenlet/platform/switch_riscv_unix.h ++++ b/src/greenlet/platform/switch_riscv_unix.h +@@ -11,8 +11,8 @@ + static int + slp_switch(void) + { +- register int ret; +- register long *stackref, stsizediff; ++ int ret; ++ long *stackref, stsizediff; + __asm__ volatile ("" : : : REGS_TO_SAVE); + __asm__ volatile ("mv %0, sp" : "=r" (stackref) : ); + { + +From 86c4e2a98f1bd27eff38edd5dba8c10300bc8e64 Mon Sep 17 00:00:00 2001 +From: Jason Madden <jamadden@gmail.com> +Date: Thu, 26 Jan 2023 12:58:46 -0600 +Subject: [PATCH] Add the rebind member to the allocator. + +Based on, and fixes #335 +--- a/src/greenlet/greenlet_allocator.hpp ++++ b/src/greenlet/greenlet_allocator.hpp +@@ -51,6 +51,11 @@ namespace greenlet + else + PyMem_Free(p); + } ++ // This member is deprecated in C++17 and removed in C++20 ++ template< class U > ++ struct rebind { ++ typedef PythonAllocator<U> other; ++ }; + + }; + } + + diff --git a/dev-python/greenlet/greenlet-2.0.1-r1.ebuild b/dev-python/greenlet/greenlet-2.0.1-r1.ebuild new file mode 100644 index 000000000000..2b8702123d9d --- /dev/null +++ b/dev-python/greenlet/greenlet-2.0.1-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +# Note: greenlet is built-in in pypy +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +DESCRIPTION="Lightweight in-process concurrent programming" +HOMEPAGE=" + https://greenlet.readthedocs.io/en/latest/ + https://github.com/python-greenlet/greenlet/ + https://pypi.org/project/greenlet/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 -hppa -ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + +PATCHES=( + "${FILESDIR}"/${P}-gcc-13.patch +) + +distutils_enable_sphinx docs +distutils_enable_tests unittest + +python_test() { + eunittest greenlet.tests +} |