From 9b0ecbb5c5d89a7d6f20dd2ebd9abbaec9103498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 2 Feb 2021 22:32:37 +0700 Subject: [PATCH] ibus-anthy: rebuild for anthy 0.4 - Build with python3-gobject-devel - Remove gir build option since it can't be built without. Upstream don't provide option to disable --- .../0001-read-utf-8-encoded-zipfile.patch | 25 +++++++++++++++++++ srcpkgs/ibus-anthy/template | 20 +++++++-------- 2 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 srcpkgs/ibus-anthy/patches/0001-read-utf-8-encoded-zipfile.patch diff --git a/srcpkgs/ibus-anthy/patches/0001-read-utf-8-encoded-zipfile.patch b/srcpkgs/ibus-anthy/patches/0001-read-utf-8-encoded-zipfile.patch new file mode 100644 index 00000000000..f84de477023 --- /dev/null +++ b/srcpkgs/ibus-anthy/patches/0001-read-utf-8-encoded-zipfile.patch @@ -0,0 +1,25 @@ +From: NOKUBI Takatsugu +Date: Thu, 2 Nov 2017 15:11:52 +0900 +Subject: read utf-8 encoded zipfile + +--- + anthy form Debian converted those zipfile to utf-8 + data/zipcode-textdic.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/data/zipcode-textdic.py b/data/zipcode-textdic.py +index 6fa50d6..cb28a1f 100755 +--- data/zipcode-textdic.py ++++ data/zipcode-textdic.py +@@ -21,9 +21,9 @@ if len(sys.argv) < 2: + anthy_zipfile = sys.argv[1] + + try: +- contents = codecs.open(anthy_zipfile, 'r', 'euc_jp').read() ++ contents = codecs.open(anthy_zipfile, 'r', 'utf-8').read() + except UnicodeDecodeError as e: +- print('Your file is not eucJP? %s' % anthy_zipfile, file=sys.stderr) ++ print('Your file is not of UTF-8? %s' % anthy_zipfile, file=sys.stderr) + contents = open(anthy_zipfile).read() + + output_zipfile = codecs.open('zipcode.t', 'w', 'utf-8') diff --git a/srcpkgs/ibus-anthy/template b/srcpkgs/ibus-anthy/template index d9d0f92e56a..9b96fa82063 100644 --- a/srcpkgs/ibus-anthy/template +++ b/srcpkgs/ibus-anthy/template @@ -1,11 +1,12 @@ # Template file for 'ibus-anthy' pkgname=ibus-anthy version=1.5.11 -revision=1 +revision=2 build_style=gnu-configure -configure_args="--libexec=/usr/lib/ibus $(vopt_enable gir introspection)" -hostmakedepends="automake gettext $(vopt_if gir gobject-introspection) libtool pkg-config swig" -makedepends="anthy-devel gettext-devel ibus-devel python-gobject-devel" +build_helper=gir +configure_args="--libexec=/usr/lib/ibus" +hostmakedepends="automake libtool pkg-config swig intltool gettext-devel" +makedepends="anthy-devel ibus-devel python3-gobject-devel" depends="ibus" short_desc="Japanese input method Anthy IMEngine for IBus Framework" maintainer="7185 <7185@free.fr>" @@ -13,14 +14,11 @@ license="LGPL-2.1-or-later" homepage="https://github.com/ibus/ibus/wiki" distfiles="https://github.com/ibus/${pkgname}/archive/${version}.tar.gz" checksum=57d42a302be72409708274aa680c6d7515077766853a2b9193b9974c9c6eeaf6 +make_check=extended -# Package build options -build_options="gir" - -# Disable gir for cross builds. -if [ -z "$CROSS_BUILD" ]; then - build_options_default="gir" -fi +post_patch() { + 2to3 -w gir/test.py +} pre_configure() { autoreconf -fi