git: 4157a2754239 - main - devel/py-zope.contenttype: Fix build with setuptools 58.0.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 25 Mar 2022 13:50:20 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4157a275423978c88ba7569acc4bfb006e7340d3

commit 4157a275423978c88ba7569acc4bfb006e7340d3
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 13:32:28 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 13:38:13 +0000

    devel/py-zope.contenttype: Fix build with setuptools 58.0.0+
    
    With hat:       python
---
 devel/py-zope.contenttype/files/patch-2to3 | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/devel/py-zope.contenttype/files/patch-2to3 b/devel/py-zope.contenttype/files/patch-2to3
new file mode 100644
index 000000000000..490d88cb1cf2
--- /dev/null
+++ b/devel/py-zope.contenttype/files/patch-2to3
@@ -0,0 +1,31 @@
+--- src/zope/contenttype/__init__.py.orig	2011-07-27 03:41:00 UTC
++++ src/zope/contenttype/__init__.py
+@@ -106,6 +106,6 @@ here = os.path.dirname(os.path.abspath(__file__))
+ add_files([os.path.join(here, "mime.types")])
+ 
+ if __name__ == '__main__':
+-    items = mimetypes.types_map.items()
++    items = list(mimetypes.types_map.items())
+     items.sort()
+-    for item in items: print "%s:\t%s" % item
++    for item in items: print("%s:\t%s" % item)
+--- src/zope/contenttype/parse.py.orig	2010-04-05 21:04:38 UTC
++++ src/zope/contenttype/parse.py
+@@ -112,14 +112,15 @@ def _unescape(string):
+     return string
+ 
+ 
+-def join((major, minor, params)):
++def join(xxx_todo_changeme):
++    (major, minor, params) = xxx_todo_changeme
+     pstr = ""
+     try:
+         params.items
+     except AttributeError:
+         pass
+     else:
+-        params = params.items()
++        params = list(params.items())
+         # ensure a predictable order:
+         params.sort()
+     for name, value in params: