aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2024-02-18 14:49:14 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2024-02-18 14:49:14 +0000
commit0f936531a1e45c8b66892a1a7793ac84e32c90fe (patch)
treeba7e6347bfaa0cd96fc3ae734f2061ec85a53eae
parent02ddaaa15bc8994d6be0b245fd646a8f4f6144a9 (diff)
downloadports-0f936531a1e45c8b66892a1a7793ac84e32c90fe.tar.gz
ports-0f936531a1e45c8b66892a1a7793ac84e32c90fe.zip
devel/py-gyp: fix for python 3.11
This patch is fixing runtime on python 3.11 and allows to build japanese/mozc-server and japanese/mozc-tool with python3.11 PR: 276707 PR: 275494 Approved by: hrs (maintainer timout, 14d+)
-rw-r--r--devel/py-gyp/Makefile1
-rw-r--r--devel/py-gyp/files/patch-pylib_gyp_common.py23
2 files changed, 24 insertions, 0 deletions
diff --git a/devel/py-gyp/Makefile b/devel/py-gyp/Makefile
index ad2ffa3a7fa4..2eefdf628e41 100644
--- a/devel/py-gyp/Makefile
+++ b/devel/py-gyp/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gyp
PORTVERSION= 20200512
+PORTREVISION= 1
CATEGORIES= devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/devel/py-gyp/files/patch-pylib_gyp_common.py b/devel/py-gyp/files/patch-pylib_gyp_common.py
new file mode 100644
index 000000000000..d712c8ddd0ae
--- /dev/null
+++ b/devel/py-gyp/files/patch-pylib_gyp_common.py
@@ -0,0 +1,23 @@
+--- pylib/gyp/common.py.orig 2020-05-12 14:59:53 UTC
++++ pylib/gyp/common.py
+@@ -12,6 +12,11 @@ import sys
+ import tempfile
+ import sys
+
++if sys.version_info.major == 3 and sys.version_info.minor >= 10:
++ from collections.abc import MutableSet
++ collections.MutableSet = collections.abc.MutableSet
++else:
++ from collections import MutableSet
+
+ # A minimal memoizing decorator. It'll blow up if the args aren't immutable,
+ # among other "problems".
+@@ -494,7 +499,7 @@ def uniquer(seq, idfun=None):
+
+
+ # Based on http://code.activestate.com/recipes/576694/.
+-class OrderedSet(collections.MutableSet):
++class OrderedSet(MutableSet):
+ def __init__(self, iterable=None):
+ self.end = end = []
+ end += [None, end, end] # sentinel node for doubly linked list