From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8FA0138359 for ; Mon, 10 Aug 2020 13:30:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39619E0729; Mon, 10 Aug 2020 13:30:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24B89E0729 for ; Mon, 10 Aug 2020 13:30:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1996434F51B for ; Mon, 10 Aug 2020 13:30:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 84DC8301 for ; Mon, 10 Aug 2020 13:30:14 +0000 (UTC) From: "Akinori Hattori" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Akinori Hattori" Message-ID: <1597066187.e9f523470ee04ea0ed7ebadbc950b16e2afb17b5.hattya@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/eekboard/files/, dev-libs/eekboard/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild dev-libs/eekboard/files/eekboard-python-3.patch X-VCS-Directories: dev-libs/eekboard/files/ dev-libs/eekboard/ X-VCS-Committer: hattya X-VCS-Committer-Name: Akinori Hattori X-VCS-Revision: e9f523470ee04ea0ed7ebadbc950b16e2afb17b5 X-VCS-Branch: master Date: Mon, 10 Aug 2020 13:30:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 16ba990a-1643-4e1e-a143-f176f282915d X-Archives-Hash: 2dbfa77ee0128f82996297657d55f5e9 commit: e9f523470ee04ea0ed7ebadbc950b16e2afb17b5 Author: Akinori Hattori gentoo org> AuthorDate: Mon Aug 10 13:27:17 2020 +0000 Commit: Akinori Hattori gentoo org> CommitDate: Mon Aug 10 13:29:47 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9f52347 dev-libs/eekboard: add support for python3 Closes: https://bugs.gentoo.org/695018 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Akinori Hattori gentoo.org> dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild | 9 ++++-- dev-libs/eekboard/files/eekboard-python-3.patch | 39 +++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild b/dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild index b534ae9a443..f9d9fbb4d40 100644 --- a/dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild +++ b/dev-libs/eekboard/eekboard-1.0.8_p20121001.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python3_{6,7,8} ) VALA_USE_DEPEND="vapigen" inherit autotools gnome2-utils python-any-r1 vala vcs-snapshot virtualx xdg-utils @@ -39,7 +39,10 @@ DEPEND="${RDEPEND} sys-devel/gettext virtual/pkgconfig" -PATCHES=( "${FILESDIR}"/${PN}-vala.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-python-3.patch + "${FILESDIR}"/${PN}-vala.patch +) src_prepare() { use vala && vala_src_prepare 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 00000000000..1bb75feb76f --- /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")