diff options
author | Steve Wills <swills@FreeBSD.org> | 2020-09-28 20:09:59 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2020-09-28 20:09:59 +0000 |
commit | b90364b34fa501d372eb771c126025a902566f0d (patch) | |
tree | d9561c363d970eb69b46f3c793ed20972c261816 /net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py | |
parent | x11/libinput: Update to 1.6.1 (diff) |
telepathy ports: fix build with python 3
PR: 249549
PR: 249550
PR: 249570
PR: 249734
PR: 249735
PR: 249738
Approved by: desktop (tcberner)
Obtained from: ArchLinux, see Bugzilla PRs for details
Notes
Notes:
svn path=/head/; revision=550445
Diffstat (limited to 'net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py')
-rw-r--r-- | net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py b/net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py new file mode 100644 index 000000000000..39816830d2a4 --- /dev/null +++ b/net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py @@ -0,0 +1,56 @@ +--- tools/glib-ginterface-gen.py.orig 2020-09-28 19:59:50 UTC ++++ tools/glib-ginterface-gen.py +@@ -22,6 +22,7 @@ + # License along with this library; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ++import functools + import sys + import os.path + import xml.dom.minidom +@@ -85,18 +86,12 @@ class Generator(object): + self.allow_havoc = allow_havoc + + def h(self, s): +- if isinstance(s, unicode): +- s = s.encode('utf-8') + self.__header.append(s) + + def b(self, s): +- if isinstance(s, unicode): +- s = s.encode('utf-8') + self.__body.append(s) + + def d(self, s): +- if isinstance(s, unicode): +- s = s.encode('utf-8') + self.__docs.append(s) + + def do_node(self, node): +@@ -733,7 +728,7 @@ class Generator(object): + + def __call__(self): + nodes = self.dom.getElementsByTagName('node') +- nodes.sort(cmp_by_name) ++ nodes.sort(key=functools.cmp_to_key(cmp_by_name)) + + self.h('#include <glib-object.h>') + self.h('#include <dbus/dbus-glib.h>') +@@ -768,7 +763,7 @@ class Generator(object): + file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs)) + + def cmdline_error(): +- print """\ ++ print ("""\ + usage: + gen-ginterface [OPTIONS] xmlfile Prefix_ + options: +@@ -788,7 +783,7 @@ options: + void symbol (DBusGMethodInvocation *context) + and return some sort of "not implemented" error via + dbus_g_method_return_error (context, ...) +-""" ++""") + sys.exit(1) + + |