summaryrefslogtreecommitdiff
path: root/dev-libs/eekboard/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-libs/eekboard/files
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-libs/eekboard/files')
-rw-r--r--dev-libs/eekboard/files/eekboard-python-3.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-libs/eekboard/files/eekboard-python-3.patch b/dev-libs/eekboard/files/eekboard-python-3.patch
new file mode 100644
index 000000000000..1bb75feb76fd
--- /dev/null
+++ b/dev-libs/eekboard/files/eekboard-python-3.patch
@@ -0,0 +1,39 @@
+--- a/eek/gen-keysym-entries.py
++++ b/eek/gen-keysym-entries.py
+@@ -18,17 +18,20 @@
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ # 02110-1301 USA
+
++from __future__ import print_function
+ import sys
+ import re
+
+ if len(sys.argv) != 2:
+- print >> sys.stderr, "Usage: %s TABLE-NAME" % sys.argv[0]
++ print("Usage: %s TABLE-NAME" % sys.argv[0], file=sys.stderr)
+ sys.exit(-1)
+
++py2 = sys.version_info[0] < 3
+ table = dict()
+ for line in sys.stdin:
+- line = line.decode('UTF-8')
+- match = re.match(r'\s*(0x[0-9A-F]+)\s+(\S*)\s+(\S*)', line, re.I)
++ if py2:
++ line = line.decode('UTF-8')
++ match = re.match(r'\s*(0x[0-9A-F]+)\s+(\w*)\s+(\w*)', line, re.I)
+ if match:
+ table[int(match.group(1), 16)] = (match.group(2), match.group(3))
+
+@@ -37,8 +40,10 @@
+
+ for index, (keysym, (l, c)) in enumerate([(keysym, table[keysym])
+ for keysym in sorted(table.keys())]):
+- sys.stdout.write(" { 0x%X, %s, %s }" %
+- (keysym, l.encode('UTF-8'), c.encode('UTF-8')))
++ if py2:
++ l = l.encode('UTF-8')
++ c = c.encode('UTF-8')
++ sys.stdout.write(" { 0x%X, %s, %s }" % (keysym, l, c))
+ if index < len(table) - 1:
+ sys.stdout.write(",")
+ sys.stdout.write("\n")