Notification time stamped 2022-02-22 08:54:55 UTC
From 4e5214b459e68f7c029fe0898fb598e035b57ca2 Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <tfujiwar(a)redhat.com>
Date: Feb 22 2022 07:07:33 +0000
Subject: add anthy-unicode build
anthy is no longer maintained in upstream and anthy-unicode
is used in Fedora.
https://github.com/maliit/keyboard/pull/96
---
diff --git a/0001-Enable-anthy-unicode-build.patch
b/0001-Enable-anthy-unicode-build.patch
new file mode 100644
index 0000000..410cd7d
--- /dev/null
+++ b/0001-Enable-anthy-unicode-build.patch
@@ -0,0 +1,64 @@
+From 2078913c2735cfb8322af5430511ec1d6d43d3dd Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1(a)gmail.com>
+Date: Thu, 10 Feb 2022 19:38:49 +0900
+Subject: [PATCH] Enable anthy-unicode build
+
+anthy is no longer maintained currently and anthy-unicode is generated
+to convert internal EUC data to UTF-8 and maintained.
+If anthy-unicode package is found, it can be used instead of anthy.
+---
+ CMakeLists.txt | 9 ++++++++-
+ cmake/FindAnthyUnicode.cmake | 14 ++++++++++++++
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+ create mode 100644 cmake/FindAnthyUnicode.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2233e11b..869458b1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -35,6 +35,7 @@ find_package(Qt5Multimedia)
+ find_package(Qt5Feedback)
+ find_package(Intl REQUIRED)
+
++find_package(AnthyUnicode)
+ find_package(Anthy)
+ find_package(Pinyin)
+ find_package(Chewing)
+@@ -353,7 +354,13 @@ abstract_language_plugin(en@dv englishdvorak
+ abstract_language_plugin(fr-ch french LIBRARIES westernsupport)
+ abstract_language_plugin(th thai DIRECTORY qml/keys)
+
+-if(Anthy_FOUND)
++if(AnthyUnicode_FOUND)
++ abstract_language_plugin(ja japanese ABSTRACT_LANGUAGE_PLUGIN
++ SOURCES anthyadapter.cpp anthyadapter.h
++ LIBRARIES ${AnthyUnicode_LIBRARIES}
++ INCLUDE_DIRS ${AnthyUnicode_INCLUDE_DIRS}
++ DIRECTORY qml/keys)
++elseif(Anthy_FOUND)
+ abstract_language_plugin(ja japanese ABSTRACT_LANGUAGE_PLUGIN
+ SOURCES anthyadapter.cpp anthyadapter.h
+ LIBRARIES ${Anthy_LIBRARIES}
+diff --git a/cmake/FindAnthyUnicode.cmake b/cmake/FindAnthyUnicode.cmake
+new file mode 100644
+index 00000000..6c13a222
+--- /dev/null
++++ b/cmake/FindAnthyUnicode.cmake
+@@ -0,0 +1,14 @@
++include(FeatureSummary)
++set_package_properties(anthyunicode PROPERTIES
++ URL "https://github.com/fujiwarat/anthy-unicode"
++ DESCRIPTION "Anthy provides the library to input Japanese on the
applications.")
++
++find_package(PkgConfig)
++pkg_check_modules(PC_AnthyUnicode QUIET anthy-unicode)
++
++find_library(AnthyUnicode_LIBRARIES NAMES anthy-unicode ${PC_AnthyUnicode_LIBRARIES}
HINTS ${PC_AnthyUnicode_LIBRARY_DIRS})
++find_path(AnthyUnicode_INCLUDE_DIRS anthy/anthy.h HINTS
${PC_AnthyUnicode_INCLUDE_DIRS})
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(AnthyUnicode DEFAULT_MSG AnthyUnicode_LIBRARIES
AnthyUnicode_INCLUDE_DIRS)
++mark_as_advanced(AnthyUnicode_INCLUDE_DIRS AnthyUnicode_LIBRARIES)
+--
+2.33.1
+
diff --git a/maliit-keyboard.spec b/maliit-keyboard.spec
index d643db2..9b09b2d 100644
--- a/maliit-keyboard.spec
+++ b/maliit-keyboard.spec
@@ -1,6 +1,6 @@
Name: maliit-keyboard
Version: 2.2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Maliit Keyboard 2
License: LGPLv3 and BSD and CC-BY
@@ -10,6 +10,8 @@ Source0:
https://github.com/maliit/keyboard/archive/%{version}/%{name}-%{
# Upstream Patch
Patch0: fix_qml_typos.patch
+#
https://github.com/maliit/keyboard/pull/96
+Patch1: 0001-Enable-anthy-unicode-build.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -66,6 +68,9 @@ rm -rf %{buildroot}%{_datadir}/doc/maliit-keyboard
%changelog
+* Tue Feb 22 2022 Takao Fujiwara <tfujiwar(a)redhat.com> - 2.2.0-2
+- add anthy-unicode build
+
* Tue Feb 15 2022 Onuralp Sezer <thunderbirdtr(a)fedoraproject.org> - 2.2.0-1
- Version 2.2.0
https://src.fedoraproject.org/rpms/maliit-keyboard/c/4e5214b459e68f7c029f...