git: bda4fee6878a - main - devel/py-unicodedata2: Fix build with Python 3.10
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Nov 2021 21:29:41 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=bda4fee6878af30a901d3d08e616cf1047cadb31
commit bda4fee6878af30a901d3d08e616cf1047cadb31
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 21:18:52 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 21:28:49 +0000
devel/py-unicodedata2: Fix build with Python 3.10
---
devel/py-unicodedata2/Makefile | 2 +-
.../files/patch-unicodedata2-py3-unicodedata.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/devel/py-unicodedata2/Makefile b/devel/py-unicodedata2/Makefile
index 0854dfb89019..5c373556c00a 100644
--- a/devel/py-unicodedata2/Makefile
+++ b/devel/py-unicodedata2/Makefile
@@ -13,7 +13,7 @@ COMMENT= Unicodedata backport and updates
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= python:3.6-3.9
+USES= python:3.6+
USE_PYTHON= autoplist concurrent distutils
post-install:
diff --git a/devel/py-unicodedata2/files/patch-unicodedata2-py3-unicodedata.c b/devel/py-unicodedata2/files/patch-unicodedata2-py3-unicodedata.c
new file mode 100644
index 000000000000..1b540f0c3b85
--- /dev/null
+++ b/devel/py-unicodedata2/files/patch-unicodedata2-py3-unicodedata.c
@@ -0,0 +1,15 @@
+--- unicodedata2/py3/unicodedata.c.orig 2020-03-20 18:40:50 UTC
++++ unicodedata2/py3/unicodedata.c
+@@ -16,7 +16,12 @@
+ #define PY_SSIZE_T_CLEAN
+
+ #include "Python.h"
++#if PY_MINOR_VERSION < 10
+ #include "ucnhash.h"
++#else
++#define Py_BUILD_CORE
++#include "internal/pycore_ucnhash.h"
++#endif
+ #include "structmember.h"
+ #include "unicodectype.h"
+