diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2021-11-17 14:13:21 +0300 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2021-11-17 15:34:18 +0300 |
commit | d8107994a2970045df453f6e702925ffdf59c7cb (patch) | |
tree | 60441c58abba22ce14ac99e4ca88889c4469bbde /lang | |
parent | graphics/autotrace: fix package build by disabling one of conflicting options (diff) |
lang/spidermonkey78: fix build with python 3.10
Approved by: portmgr blanket
Diffstat (limited to 'lang')
5 files changed, 84 insertions, 0 deletions
diff --git a/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_backend_configenvironment.py b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_backend_configenvironment.py new file mode 100644 index 000000000000..fd3d705fefbf --- /dev/null +++ b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_backend_configenvironment.py @@ -0,0 +1,17 @@ +--- python/mozbuild/mozbuild/backend/configenvironment.py.orig 2021-03-15 15:52:37 UTC ++++ python/mozbuild/mozbuild/backend/configenvironment.py +@@ -9,8 +9,13 @@ import six + import sys + import json + +-from collections import Iterable, OrderedDict ++from collections import OrderedDict + from types import ModuleType ++ ++if sys.version.startswith('2'): ++ from collections import Iterable ++else: ++ from collections.abc import Iterable + + import mozpack.path as mozpath + diff --git a/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_makeutil.py b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_makeutil.py new file mode 100644 index 000000000000..024e8e0c692f --- /dev/null +++ b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_makeutil.py @@ -0,0 +1,16 @@ +--- python/mozbuild/mozbuild/makeutil.py.orig 2021-03-15 15:52:38 UTC ++++ python/mozbuild/mozbuild/makeutil.py +@@ -7,7 +7,12 @@ from __future__ import absolute_import, print_function + import os + import re + import six +-from collections import Iterable ++import sys ++ ++if sys.version.startswith('2'): ++ from collections import Iterable ++else: ++ from collections.abc import Iterable + + + class Makefile(object): diff --git a/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_pythonutil.py b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_pythonutil.py new file mode 100644 index 000000000000..64a142ffd5bd --- /dev/null +++ b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_pythonutil.py @@ -0,0 +1,11 @@ +--- python/mozbuild/mozbuild/pythonutil.py.orig 2021-03-15 15:52:37 UTC ++++ python/mozbuild/mozbuild/pythonutil.py +@@ -81,7 +81,7 @@ def _find_python_executable(major): + names = ['python%d' % major] + + # Look for `pythonX.Y` down to our minimum version. +- for minor in range(9, min_version.version[1] - 1, -1): ++ for minor in range(20, min_version.version[1] - 1, -1): + names.append('python%d.%d' % (major, minor)) + + for name in names: diff --git a/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_util.py b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_util.py new file mode 100644 index 000000000000..3c5488327fd8 --- /dev/null +++ b/lang/spidermonkey78/files/patch-python_mozbuild_mozbuild_util.py @@ -0,0 +1,23 @@ +--- python/mozbuild/mozbuild/util.py.orig 2021-03-15 15:52:38 UTC ++++ python/mozbuild/mozbuild/util.py +@@ -27,6 +27,11 @@ from collections import ( + ) + from io import (BytesIO, StringIO) + ++if sys.version.startswith('2'): ++ from collections import Sequence ++else: ++ from collections.abc import Sequence ++ + import six + + if sys.platform == 'win32': +@@ -782,7 +787,7 @@ class HierarchicalStringList(object): + self._strings = StrictOrderingOnAppendList() + self._children = {} + +- class StringListAdaptor(collections.Sequence): ++ class StringListAdaptor(Sequence): + def __init__(self, hsl): + self._hsl = hsl + diff --git a/lang/spidermonkey78/files/patch-testing_mozbase_manifestparser_manifestparser_filters.py b/lang/spidermonkey78/files/patch-testing_mozbase_manifestparser_manifestparser_filters.py new file mode 100644 index 000000000000..c445d477852c --- /dev/null +++ b/lang/spidermonkey78/files/patch-testing_mozbase_manifestparser_manifestparser_filters.py @@ -0,0 +1,17 @@ +--- testing/mozbase/manifestparser/manifestparser/filters.py.orig 2021-03-15 15:52:38 UTC ++++ testing/mozbase/manifestparser/manifestparser/filters.py +@@ -12,7 +12,13 @@ from __future__ import absolute_import + + import itertools + import os +-from collections import defaultdict, MutableSequence ++import sys ++from collections import defaultdict ++ ++if sys.version.startswith('2'): ++ from collections import MutableSequence ++else: ++ from collections.abc import MutableSequence + + import six + from six import string_types |