From 9699c9b0fb6981c902cfdc8b00a803d698e1b1c1 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 5 Jul 2011 16:33:58 +0900 Subject: [PATCH] Update to 1.3.1-4. --- ibus-hangul-xx-icon-symbol.patch | 108 +++++++++++++++++++++++++++++++ ibus-hangul.spec | 20 +++++- 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 ibus-hangul-xx-icon-symbol.patch diff --git a/ibus-hangul-xx-icon-symbol.patch b/ibus-hangul-xx-icon-symbol.patch new file mode 100644 index 0000000..af9f51c --- /dev/null +++ b/ibus-hangul-xx-icon-symbol.patch @@ -0,0 +1,108 @@ +From e0463ae479a2d40b8f036ac81133585d2edd6e89 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Mon, 4 Jul 2011 18:42:43 +0900 +Subject: [PATCH] Supply hotkeys and icon_symbol in engine desc. + +--- + configure.ac | 4 +++ + m4/.gitignore | 1 + + m4/ibus.m4 | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ + src/hangul.xml.in.in | 2 + + 4 files changed, 58 insertions(+), 0 deletions(-) + create mode 100644 m4/ibus.m4 + +diff --git a/configure.ac b/configure.ac +index 043e150..edf19d8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -75,6 +75,10 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only + AM_GNU_GETTEXT([external]) + AM_GNU_GETTEXT_VERSION([0.17]) + ++# hotkeys and icon-symbol properties in component xml ++IBUS_WITH_HOTKEYS([Control+space,Hangul]) ++IBUS_ICON_SYMBOL([&xD55C;]) ++ + + # OUTPUT files + AC_CONFIG_FILES([ po/Makefile.in +diff --git a/m4/.gitignore b/m4/.gitignore +index 0f4126c..aa522fb 100644 +--- a/m4/.gitignore ++++ b/m4/.gitignore +@@ -1 +1,2 @@ + *.m4 ++!ibus.m4 +diff --git a/m4/ibus.m4 b/m4/ibus.m4 +new file mode 100644 +index 0000000..b92d000 +--- /dev/null ++++ b/m4/ibus.m4 +@@ -0,0 +1,51 @@ ++# IBUS_WITH_HOTKEYS([DEFAULT]) ++AC_DEFUN([IBUS_WITH_HOTKEYS], [ ++ HOTKEYS_DEFAULT=m4_default([$1], [Control+space,Zenkaku_Hankaku]) ++ AC_ARG_WITH(hotkeys, ++ [AC_HELP_STRING([--with-hotkeys=HOTKEYS], ++ [Use hotkeys for ibus bridge mode. (available value: yes/no/keys)])], ++ [with_hotkeys="$withval"], ++ [with_hotkeys="no"]) ++ if test x$with_hotkeys = xno; then ++ HOTKEYS_XML="" ++ elif test x$with_hotkeys = xyes -o x$with_hotkeys = x; then ++ HOTKEYS="$HOTKEYS_DEFAULT" ++ HOTKEYS_XML="${HOTKEYS}" ++ else ++ HOTKEYS="$with_hotkeys" ++ HOTKEYS_XML="${HOTKEYS}" ++ fi ++ if test x$HOTKEYS != x; then ++ AC_DEFINE_UNQUOTED(IBUS_HOTKEYS, ["$HOTKEYS"], ++ [IME specific hotkeys for IBus]) ++ AC_SUBST(HOTKEYS) ++ fi ++ AC_SUBST(HOTKEYS_XML) ++]) ++ ++# IBUS_ICON_SYMBOL(SYMBOL) ++AC_DEFUN([IBUS_ICON_SYMBOL], [ ++ ICON_SYMBOL="$1" ++ if test x$PYTHON = x; then ++ AM_PATH_PYTHON([2.5]) ++ fi ++ AC_MSG_CHECKING([if ibus supports icon symbol]) ++ $PYTHON <<_ICON_SYMBOL_TEST ++import ibus ++engine = ibus.EngineDesc('test') ++exit(not hasattr(engine, 'icon_symbol')) ++_ICON_SYMBOL_TEST ++ if test $? -eq 0; then ++ ICON_SYMBOL_XML="${icon_symbol}" ++ AC_MSG_RESULT([yes]) ++ else ++ ICON_SYMBOL_XML="" ++ ICON_SYMBOL= ++ AC_MSG_RESULT([no]) ++ fi ++ if test x$ICON_SYMBOL != x; then ++ AC_DEFINE_UNQUOTED([IBUS[]_ICON_SYMBOL], ["$ICON_SYMBOL"], ++ [Icon symbol string for IBus]) ++ fi ++ AC_SUBST(ICON_SYMBOL_XML) ++]) +diff --git a/src/hangul.xml.in.in b/src/hangul.xml.in.in +index a87df59..00ba331 100644 +--- a/src/hangul.xml.in.in ++++ b/src/hangul.xml.in.in +@@ -21,6 +21,8 @@ + Korean + Korean Input Method + 99 ++ @HOTKEYS_XML@ ++ @ICON_SYMBOL_XML@ + + + +-- +1.7.6 + diff --git a/ibus-hangul.spec b/ibus-hangul.spec index 0315252..69d9766 100644 --- a/ibus-hangul.spec +++ b/ibus-hangul.spec @@ -1,15 +1,19 @@ %define require_ibus_version 1.2.99 %define require_libhangul_version 0.0.10 +%define have_bridge_hotkey 1 Name: ibus-hangul Version: 1.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Hangul engine for IBus input platform License: GPLv2+ Group: System Environment/Libraries URL: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Patch0: ibus-hangul-ibus-1.4.patch +%if %have_bridge_hotkey +Patch1: ibus-hangul-xx-icon-symbol.patch +%endif BuildRequires: gettext-devel BuildRequires: intltool @@ -17,6 +21,9 @@ BuildRequires: libtool BuildRequires: libhangul-devel >= %{require_libhangul_version} BuildRequires: pkgconfig BuildRequires: ibus-devel >= %{require_ibus_version} +%if %have_bridge_hotkey +BuildRequires: ibus +%endif Requires: ibus >= %{require_ibus_version} Requires: libhangul >= %{require_libhangul_version} @@ -28,9 +35,17 @@ libhangul. %prep %setup -q %patch0 -p1 -b .ibus-1.4 +%if %have_bridge_hotkey +%patch1 -p1 -b .icon-symbol +%endif %build +%if %have_bridge_hotkey +autoreconf +%configure --disable-static --with-hotkeys +%else %configure --disable-static +%endif # make -C po update-gmo make %{?_smp_mflags} @@ -48,6 +63,9 @@ make DESTDIR=${RPM_BUILD_ROOT} install %{_datadir}/ibus/component/* %changelog +* Mon Jul 4 2011 Daiki Ueno - 1.3.1-4 +- Added ibus-hangul-xx-icon-symbol.patch to enable the engine symbol & hotkeys. + * Wed May 11 2011 Daiki Ueno - 1.3.1-3 - Update ibus-1.4 patch. - Move the ibus version check into the patch from this spec.