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-logger/files/patch-tools_c-constants-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-logger/files/patch-tools_c-constants-gen.py')
-rw-r--r-- | net-im/telepathy-logger/files/patch-tools_c-constants-gen.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net-im/telepathy-logger/files/patch-tools_c-constants-gen.py b/net-im/telepathy-logger/files/patch-tools_c-constants-gen.py new file mode 100644 index 000000000000..69dfa35aa4bd --- /dev/null +++ b/net-im/telepathy-logger/files/patch-tools_c-constants-gen.py @@ -0,0 +1,39 @@ +--- tools/c-constants-gen.py.orig 2020-09-23 16:17:54 UTC ++++ tools/c-constants-gen.py +@@ -3,7 +3,7 @@ + from sys import argv, stdout, stderr + import xml.dom.minidom + +-from libtpcodegen import file_set_contents ++from libtpcodegen import file_set_contents, u + from libglibcodegen import NS_TP, get_docstring, \ + get_descendant_text, get_by_path + +@@ -12,7 +12,7 @@ class Generator(object): + self.prefix = prefix + '_' + self.spec = get_by_path(dom, "spec")[0] + +- self.output_base = output_base ++ self.output_base = output_base + self.__header = [] + self.__docs = [] + +@@ -21,14 +21,14 @@ class Generator(object): + self.do_body() + self.do_footer() + +- file_set_contents(self.output_base + '.h', ''.join(self.__header)) +- file_set_contents(self.output_base + '-gtk-doc.h', ''.join(self.__docs)) ++ file_set_contents(self.output_base + '.h', u('').join(self.__header).encode('utf-8')) ++ file_set_contents(self.output_base + '-gtk-doc.h', u('').join(self.__docs).encode('utf-8')) + + def write(self, code): +- self.__header.append(code.encode('utf-8')) ++ self.__header.append(code) + + def d(self, code): +- self.__docs.append(code.encode('utf-8')) ++ self.__docs.append(code) + + # Header + def do_header(self): |