From 1b976a952416257956372b392eba514f4f101f80 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Jun 22 2011 04:45:22 +0000 Subject: Added ibus-anthy-xx-icon-symbol.patch --- diff --git a/ibus-anthy-xx-icon-symbol.patch b/ibus-anthy-xx-icon-symbol.patch new file mode 100644 index 0000000..13b7914 --- /dev/null +++ b/ibus-anthy-xx-icon-symbol.patch @@ -0,0 +1,76 @@ +--- ibus-anthy-1.2.4/engine/anthy.xml.in.in.orig 2011-06-21 18:24:39.000000000 +0900 ++++ ibus-anthy-1.2.4/engine/anthy.xml.in.in 2011-06-22 12:56:29.000000000 +0900 +@@ -22,6 +22,8 @@ + Anthy + Anthy Input Method + 99 ++ @HOTKEYS@ ++ @ICON_SYMBOL@ + + + +--- ibus-anthy-1.2.4/engine/engine.py.orig 2011-06-22 13:16:30.000000000 +0900 ++++ ibus-anthy-1.2.4/engine/engine.py 2011-06-22 13:16:35.000000000 +0900 +@@ -626,6 +626,7 @@ class Engine(ibus.EngineBase): + self.__input_mode = mode + prop = self.__prop_dict[u"InputMode"] + prop.label = label ++ self.set_icon_symbol(label) + self.update_property(prop) + + self.__reset() +--- ibus-anthy-1.2.4/configure.ac.orig 2011-06-21 18:25:58.000000000 +0900 ++++ ibus-anthy-1.2.4/configure.ac 2011-06-22 13:14:26.000000000 +0900 +@@ -122,6 +122,36 @@ AC_ARG_WITH(kasumi-icon, + [KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"]) + AC_SUBST(KASUMI_ICON_FILE) + ++dnl - check hotkeys for ibus-anthy which is used for ibus bridge mode. ++dnl - Normally you don't need this so could be HOTKEYS="no" ++AC_ARG_WITH(hotkeys, ++ [AC_HELP_STRING([--with-hotkeys=HOTKEYS], ++ [Use hotkeys for ibus bridge mode. (available value: yes/no/keys)])], ++ [HOTKEYS="$withval"], ++ [HOTKEYS="no"]) ++if test x"$HOTKEYS" = x"no"; then ++ HOTKEYS="" ++elif test x"$HOTKEYS" = x"yes"; then ++ HOTKEYS="Control+space,Zenkaku_Hankaku" ++elif test x"$HOTKEYS" = x; then ++ HOTKEYS="Control+space,Zenkaku_Hankaku" ++else ++ HOTKEYS="${HOTKEYS}" ++fi ++AC_SUBST(HOTKEYS) ++ ++ICON_SYMBOL_TEST="import ibus ++engine = ibus.EngineDesc('test') ++print hasattr(engine, 'icon_symbol') ++" ++HAS_ICON_SYMBOL=`$PYTHON -c "$ICON_SYMBOL_TEST"` ++if test x"$HAS_ICON_SYMBOL" = x"True"; then ++ ICON_SYMBOL="" ++else ++ ICON_SYMBOL="" ++fi ++AC_SUBST(ICON_SYMBOL) ++ + dnl - define GETTEXT_* variables + GETTEXT_PACKAGE=ibus-anthy + AC_SUBST(GETTEXT_PACKAGE) +@@ -146,3 +176,15 @@ m4/Makefile + ]) + + AC_OUTPUT ++echo " ++ IBus-Anthy version ibus_version ++ ++python-config: $PYTHON_CONFIG ++PYTHON_CFLAGS $PYTHON_CFLAGS ++PYTHON_LIBS $PYTHON_LIBS ++ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE ++KASUMI_EXEC_FILE $KASUMI_EXEC_FILE ++KASUMI_ICON_FILE $KASUMI_ICON_FILE ++HOTKEYS $HOTKEYS ++ICON_SYMBOL $ICON_SYMBOL ++" diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 9dc44a3..0063a5f 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -1,6 +1,7 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define require_ibus_version 1.2.0.20100111 %define require_pygtk2_version 2.15.2 +%define have_bridge_hotkey 1 Name: ibus-anthy Version: 1.2.6 Release: 1%{?dist} @@ -10,6 +11,9 @@ Group: System Environment/Libraries URL: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz # Patch0: ibus-anthy-HEAD.patch +%if %have_bridge_hotkey +Patch1: ibus-anthy-xx-icon-symbol.patch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -33,9 +37,19 @@ libanthy. %prep %setup -q # %patch0 -p1 +%if %have_bridge_hotkey +%patch1 -p1 -b .icon-symbol +%endif %build -%configure --disable-static +%if %have_bridge_hotkey +autoreconf +%endif +%configure \ +%if %have_bridge_hotkey + --with-hotkeys \ +%endif + --disable-static # make -C po update-gmo make %{?_smp_mflags}