From 3f615590d2e2c7201db4677523b1a4cd2f3aa452 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 30 Jul 2011 00:09:04 +0900 Subject: [PATCH] Added --with-hotkeys for f16 or later. --- ibus-anthy-xx-icon-symbol.patch | 36 +++++++++++++++++---------------- ibus-anthy.spec | 19 +++++++++-------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ibus-anthy-xx-icon-symbol.patch b/ibus-anthy-xx-icon-symbol.patch index 75d0558..9b3a2a5 100644 --- a/ibus-anthy-xx-icon-symbol.patch +++ b/ibus-anthy-xx-icon-symbol.patch @@ -1,6 +1,6 @@ --- 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-30 18:10:50.000000000 +0900 -@@ -122,6 +122,37 @@ AC_ARG_WITH(kasumi-icon, ++++ ibus-anthy-1.2.4/configure.ac 2011-07-29 23:37:19.000000000 +0900 +@@ -122,6 +122,39 @@ AC_ARG_WITH(kasumi-icon, [KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"]) AC_SUBST(KASUMI_ICON_FILE) @@ -12,33 +12,35 @@ + [HOTKEYS="$withval"], + [HOTKEYS="no"]) +if test x"$HOTKEYS" = x"no"; then -+ HOTKEYS="" ++ HOTKEYS_XML="" +elif test x"$HOTKEYS" = x"yes"; then -+ HOTKEYS="Control+space,Zenkaku_Hankaku" ++ HOTKEYS_XML="Control+space,Zenkaku_Hankaku" +elif test x"$HOTKEYS" = x; then -+ HOTKEYS="Control+space,Zenkaku_Hankaku" ++ HOTKEYS_XML="Control+space,Zenkaku_Hankaku" ++elif test x"$HOTKEYS" = xnull; then ++ HOTKEYS_XML="" +else -+ HOTKEYS="${HOTKEYS}" ++ HOTKEYS_XML="${HOTKEYS}" +fi -+AC_SUBST(HOTKEYS) ++AC_SUBST(HOTKEYS_XML) + ++SYMBOL_CHAR='あ' +SYMBOL_TEST="import ibus +engine = ibus.EngineDesc('test') +exit(not hasattr(engine, 'symbol')) +" +$PYTHON -c "$SYMBOL_TEST" +if test $? -eq 0; then -+ SYMBOL="\xe3\x81\x82" ++ SYMBOL_XML="${SYMBOL_CHAR}" +else -+ SYMBOL="" ++ SYMBOL_XML="" +fi -+SYMBOL=`printf "$SYMBOL"` -+AC_SUBST(SYMBOL) ++AC_SUBST(SYMBOL_XML) + dnl - define GETTEXT_* variables GETTEXT_PACKAGE=ibus-anthy AC_SUBST(GETTEXT_PACKAGE) -@@ -146,3 +177,15 @@ m4/Makefile +@@ -146,3 +179,15 @@ m4/Makefile ]) AC_OUTPUT @@ -51,17 +53,17 @@ +ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE +KASUMI_EXEC_FILE $KASUMI_EXEC_FILE +KASUMI_ICON_FILE $KASUMI_ICON_FILE -+HOTKEYS $HOTKEYS -+SYMBOL $SYMBOL ++HOTKEYS_XML $HOTKEYS_XML ++SYMBOL_XML $SYMBOL_XML +" --- 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-30 17:37:45.000000000 +0900 ++++ ibus-anthy-1.2.4/engine/anthy.xml.in.in 2011-07-29 23:36:19.000000000 +0900 @@ -22,6 +22,8 @@ Anthy Anthy Input Method 99 -+ @HOTKEYS@ -+ @SYMBOL@ ++ @HOTKEYS_XML@ ++ @SYMBOL_XML@ diff --git a/ibus-anthy.spec b/ibus-anthy.spec index f1fef9c..d54a60c 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -1,27 +1,29 @@ %{!?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 + +%if 0%{?fedora} > 15 %define have_bridge_hotkey 1 +%else +%define have_bridge_hotkey 0 +%endif + Name: ibus-anthy Version: 1.2.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy 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-anthy-HEAD.patch -%if %have_bridge_hotkey Patch1: ibus-anthy-xx-icon-symbol.patch -%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: anthy-devel BuildRequires: gettext-devel -%if %have_bridge_hotkey BuildRequires: ibus -%endif BuildRequires: intltool BuildRequires: libtool BuildRequires: pkgconfig @@ -40,14 +42,11 @@ libanthy. %prep %setup -q # %patch0 -p1 -%if %have_bridge_hotkey %patch1 -p1 -b .icon-symbol -%endif %build -%if %have_bridge_hotkey +# for .icon-symbol patch autoreconf -%endif %configure \ %if %have_bridge_hotkey --with-hotkeys \ @@ -77,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ibus/component/* %changelog -* Mon Jul 04 2011 Takao Fujiwara - 1.2.6-2 +* Fri Jul 29 2011 Takao Fujiwara - 1.2.6-3 - Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys. * Mon May 16 2011 Takao Fujiwara - 1.2.6-1