From a4d2e0b04a2d37a0076a3fbda4ab41e6c130a778 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 12 Jun 2012 10:54:25 +0800 Subject: [PATCH] Initial import --- .gitignore | 1 + ibus-libpinyin-for-0.6.0.patch | 23 ++++++++++++ ibus-libpinyin.spec | 68 ++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 93 insertions(+) create mode 100644 ibus-libpinyin-for-0.6.0.patch create mode 100644 ibus-libpinyin.spec diff --git a/.gitignore b/.gitignore index e69de29..5a45cdc 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ibus-libpinyin-1.4.0.tar.gz diff --git a/ibus-libpinyin-for-0.6.0.patch b/ibus-libpinyin-for-0.6.0.patch new file mode 100644 index 0000000..00c26c6 --- /dev/null +++ b/ibus-libpinyin-for-0.6.0.patch @@ -0,0 +1,23 @@ +commit 3717bfcf2b5334c4d5800cb2239ab33410e7c26a +Author: Peng Wu +Date: Tue Apr 17 12:45:47 2012 +0800 + + update pinyin_choose_candidate + +diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc +index 4bd68fc..fe047fa 100644 +--- a/src/PYPPhoneticEditor.cc ++++ b/src/PYPPhoneticEditor.cc +@@ -379,11 +379,10 @@ LibPinyinPhoneticEditor::selectCandidate (guint i) + return TRUE; + } + +- guint8 len = pinyin_choose_candidate (m_instance, lookup_cursor, *token); ++ lookup_cursor = pinyin_choose_candidate (m_instance, lookup_cursor, *token); + pinyin_guess_sentence (m_instance); + + PinyinKeyPosVector & pinyin_poses = m_instance->m_pinyin_key_rests; +- lookup_cursor += len; + if (lookup_cursor == pinyin_poses->len) { + commit(); + return TRUE; diff --git a/ibus-libpinyin.spec b/ibus-libpinyin.spec new file mode 100644 index 0000000..b0c40a7 --- /dev/null +++ b/ibus-libpinyin.spec @@ -0,0 +1,68 @@ +Name: ibus-libpinyin +Version: 1.4.0 +Release: 1%{?dist} +Summary: Intelligent Pinyin engine based on libpinyin for IBus +License: GPLv2+ +Group: System Environment/Libraries +URL: https://github.com/libpinyin +Source0: https://github.com/downloads/libpinyin/ibus-libpinyin/%{name}-%{version}.tar.gz +Patch0: ibus-libpinyin-for-0.6.0.patch + +BuildRequires: gettext-devel +BuildRequires: intltool +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: sqlite-devel +BuildRequires: libuuid-devel +BuildRequires: opencc-devel +BuildRequires: lua-devel +BuildRequires: ibus-devel >= 1.3 +BuildRequires: libpinyin-devel >= 0.6.0 + +# Requires(post): sqlite + +Requires: ibus >= 1.2.0 +Requires: libpinyin-data >= 0.6.0 + +%description +It includes a Chinese Pinyin input method and a Chinese ZhuYin (Bopomofo) +input method based on libpinyin for IBus. + +%prep +%setup -q +%patch0 -p1 -R -b .6.x + +%build +%configure --disable-static \ + --enable-opencc \ + --disable-boost + +# make -C po update-gmo +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=${RPM_BUILD_ROOT} install + +%find_lang %{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS COPYING README +%{_libexecdir}/ibus-engine-libpinyin +%{_libexecdir}/ibus-setup-libpinyin +%{_datadir}/ibus-libpinyin/phrases.txt +%{_datadir}/ibus-libpinyin/icons +%{_datadir}/ibus-libpinyin/setup +%{_datadir}/ibus-libpinyin/base.lua +%{_datadir}/ibus-libpinyin/db/english.db +%dir %{_datadir}/ibus-libpinyin +%dir %{_datadir}/ibus-libpinyin/db +%{_datadir}/ibus/component/* + +%changelog +* Fri Jun 01 2012 Peng Wu - 1.4.0-1 +- The first version. diff --git a/sources b/sources index e69de29..2e1f1ad 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d77f029dac6657480a2b99fddbe9a014 ibus-libpinyin-1.4.0.tar.gz