aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-05-29 18:22:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-05 17:19:29 +0000
commite13b0edc8bb2f696676715abd54d65b9c0403b66 (patch)
tree181f29f5317e9078719d7015d90d53ce3976e2b7
parent8433c283d75450e04dcb3d57ee0eba6ed38de4cc (diff)
downloadports-e13b0edc8bb2f696676715abd54d65b9c0403b66.tar.gz
ports-e13b0edc8bb2f696676715abd54d65b9c0403b66.zip
devel/py-greenlet: fix build with clang 16 on i386
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because devel/py-greenlet's build infrastructure does not explicitly set its C++ standard, this leads to several errors: In file included from src/greenlet/greenlet.cpp:21: In file included from src/greenlet/greenlet_slp_switch.hpp:82: In file included from src/greenlet/slp_platformselect.h:18: src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ The register keyword has already been removed from the similar switch_amd64_unix.h header, which is why the above problem does not occur on amd64. To work around the errors, define the register keyword away using CPPFLAGS. PR: 271712 Approved by: sunpoet (maintainer) MFH: 2023Q2
-rw-r--r--devel/py-greenlet/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/devel/py-greenlet/Makefile b/devel/py-greenlet/Makefile
index bf0be9f0ad5a..e433e84e57fa 100644
--- a/devel/py-greenlet/Makefile
+++ b/devel/py-greenlet/Makefile
@@ -1,5 +1,6 @@
PORTNAME= greenlet
PORTVERSION= 2.0.2
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -17,6 +18,8 @@ NOT_FOR_ARCHS_REASON= greenlet needs to be ported to this platform
USES= python:3.5+
USE_PYTHON= autoplist concurrent distutils
+CPPFLAGS+= -Dregister=
+
post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +