[ibus-anthy/f15] Added --with-hotkeys for f16 or later.

Takao Fujiwara fujiwara at fedoraproject.org
Fri Jul 29 15:09:46 UTC 2011


commit 3f615590d2e2c7201db4677523b1a4cd2f3aa452
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date:   Sat Jul 30 00:09:04 2011 +0900

    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>Control+space,Zenkaku_Hankaku</hotkeys> -->"
++    HOTKEYS_XML="<!-- <hotkeys>Control+space,Zenkaku_Hankaku</hotkeys> -->"
 +elif test x"$HOTKEYS" = x"yes"; then
-+    HOTKEYS="<hotkeys>Control+space,Zenkaku_Hankaku</hotkeys>"
++    HOTKEYS_XML="<hotkeys>Control+space,Zenkaku_Hankaku</hotkeys>"
 +elif test x"$HOTKEYS" = x; then
-+    HOTKEYS="<hotkeys>Control+space,Zenkaku_Hankaku</hotkeys>"
++    HOTKEYS_XML="<hotkeys>Control+space,Zenkaku_Hankaku</hotkeys>"
++elif test x"$HOTKEYS" = xnull; then
++    HOTKEYS_XML="<hotkeys></hotkeys>"
 +else
-+    HOTKEYS="<hotkeys>${HOTKEYS}</hotkeys>"
++    HOTKEYS_XML="<hotkeys>${HOTKEYS}</hotkeys>"
 +fi
-+AC_SUBST(HOTKEYS)
++AC_SUBST(HOTKEYS_XML)
 +
++SYMBOL_CHAR='&#x3042;'
 +SYMBOL_TEST="import ibus
 +engine = ibus.EngineDesc('test')
 +exit(not hasattr(engine, 'symbol'))
 +"
 +$PYTHON -c "$SYMBOL_TEST"
 +if test $? -eq 0; then
-+    SYMBOL="<symbol>\xe3\x81\x82</symbol>"
++    SYMBOL_XML="<symbol>${SYMBOL_CHAR}</symbol>"
 +else
-+    SYMBOL="<!-- <symbol>\xe3\x81\x82</symbol> -->"
++    SYMBOL_XML="<!-- <symbol>${SYMBOL_CHAR}</symbol> -->"
 +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 @@
  			<longname>Anthy</longname>
  			<description>Anthy Input Method</description>
  			<rank>99</rank>
-+			@HOTKEYS@
-+			@SYMBOL@
++			@HOTKEYS_XML@
++			@SYMBOL_XML@
  		</engine>
  	</engines>
  </component>
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 <tfujiwar at redhat.com> - 1.2.6-2
+* Fri Jul 29 2011 Takao Fujiwara <tfujiwar at redhat.com> - 1.2.6-3
 - Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys.
 
 * Mon May 16 2011 Takao Fujiwara <tfujiwar at redhat.com> - 1.2.6-1


More information about the scm-commits mailing list