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 +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/fix_qml_typos.patch b/fix_qml_typos.patch new file mode 100644 index 0000000..cf6cae8 --- /dev/null +++ b/fix_qml_typos.patch @@ -0,0 +1,50 @@ +From 1aba6e338ce2d4662f6374e59e195761d44901eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9s=20B=2ES?= +Date: Tue, 15 Feb 2022 17:23:30 -0600 +Subject: [PATCH] Fix 3 QML import typos in some languages. + +--- + plugins/fr-ch/qml/Keyboard_fr-ch_url.qml | 2 +- + plugins/fr-ch/qml/Keyboard_fr-ch_url_search.qml | 2 +- + plugins/tr/qml/Keyboard_tr_url.qml | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/fr-ch/qml/Keyboard_fr-ch_url.qml b/plugins/fr-ch/qml/Keyboard_fr-ch_url.qml +index 1874c932..b7905bc6 100644 +--- a/plugins/fr-ch/qml/Keyboard_fr-ch_url.qml ++++ b/plugins/fr-ch/qml/Keyboard_fr-ch_url.qml +@@ -16,7 +16,7 @@ + + import QtQuick 2.4 + +-import MaliitKeyobard 2.0 ++import MaliitKeyboard 2.0 + + import keys 1.0 + +diff --git a/plugins/fr-ch/qml/Keyboard_fr-ch_url_search.qml b/plugins/fr-ch/qml/Keyboard_fr-ch_url_search.qml +index c5469141..38b5e716 100644 +--- a/plugins/fr-ch/qml/Keyboard_fr-ch_url_search.qml ++++ b/plugins/fr-ch/qml/Keyboard_fr-ch_url_search.qml +@@ -16,7 +16,7 @@ + + import QtQuick 2.4 + +-import MaliitKeyobard 2.0 ++import MaliitKeyboard 2.0 + + import keys 1.0 + +diff --git a/plugins/tr/qml/Keyboard_tr_url.qml b/plugins/tr/qml/Keyboard_tr_url.qml +index 60b3b75d..726d0126 100644 +--- a/plugins/tr/qml/Keyboard_tr_url.qml ++++ b/plugins/tr/qml/Keyboard_tr_url.qml +@@ -16,7 +16,7 @@ + + import QtQuick 2.4 + +-import MaliitKeyobard 2.0 ++import MaliitKeyboard 2.0 + + import keys 1.0 + diff --git a/keyboard-2.2.0.tar.gz b/keyboard-2.2.0.tar.gz new file mode 100644 index 0000000..bab76e5 Binary files /dev/null and b/keyboard-2.2.0.tar.gz differ diff --git a/maliit-keyboard.spec b/maliit-keyboard.spec new file mode 100644 index 0000000..6049de2 --- /dev/null +++ b/maliit-keyboard.spec @@ -0,0 +1,63 @@ +Name: maliit-keyboard +Version: 2.2.0 +Release: 1 +Summary: Maliit Keyboard 2 + +License: LGPLv3 and BSD and CC-BY-3.0 +URL: https://maliit.github.io/ +Source0: https://github.com/maliit/keyboard/archive/refs/tags/keyboard-%{version}.tar.gz + +Patch0: fix_qml_typos.patch +Patch1: 0001-Enable-anthy-unicode-build.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: maliit-framework-devel >= %{version} +BuildRequires: glib2-devel +BuildRequires: hunspell-devel +BuildRequires: anthy-unicode-devel +BuildRequires: libpinyin-devel +BuildRequires: libchewing-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtdeclarative-devel +BuildRequires: qt5-qtmultimedia-devel +BuildRequires: qt5-qtfeedback-devel + + +%description +Based on Ubuntu Keyboard. Ubuntu Keyboard was a QML and C++ based Keyboard +Plugin for Maliit, based on the Maliit Reference plugin, taking into account the +special UI/UX requests of Ubuntu Phone. + + +%prep +%autosetup -n keyboard-%{version} -p1 + + +%build +%cmake -Denable-presage=OFF +%make_build + +%install +make install/fast DESTDIR=%{buildroot} + +rm -rf %{buildroot}%{_datadir}/doc/maliit-keyboard +%find_lang %{name} + +%files -f %{name}.lang +%license COPYING.BSD COPYING.CC-BY COPYING +%doc README.md +%{_bindir}/maliit-keyboard +%dir %{_libdir}/maliit/ +%{_libdir}/maliit/keyboard2/ +%{_libdir}/maliit/plugins/ +%dir %{_datadir}/maliit/ +%{_datadir}/maliit/keyboard2/ +%{_datadir}/glib-2.0/schemas/org.maliit.keyboard.maliit.gschema.xml +%{_datadir}/applications/com.github.maliit.keyboard.desktop +%{_metainfodir}/com.github.maliit.keyboard.metainfo.xml + + +%changelog +* Wed Jul 20 2022 misaka00251 - 2.2.0-1 +- Init package diff --git a/maliit-keyboard.yaml b/maliit-keyboard.yaml new file mode 100644 index 0000000..46a8288 --- /dev/null +++ b/maliit-keyboard.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: maliit/keyboard +tag_prefix: "" +separator: "."