Added --with-hotkeys for f16 or later.

This commit is contained in:
Takao Fujiwara 2011-07-30 00:09:04 +09:00
parent 9e42bdb217
commit 3f615590d2
2 changed files with 28 additions and 27 deletions

View File

@ -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.orig 2011-06-21 18:25:58.000000000 +0900
+++ ibus-anthy-1.2.4/configure.ac 2011-06-30 18:10:50.000000000 +0900 +++ ibus-anthy-1.2.4/configure.ac 2011-07-29 23:37:19.000000000 +0900
@@ -122,6 +122,37 @@ AC_ARG_WITH(kasumi-icon, @@ -122,6 +122,39 @@ AC_ARG_WITH(kasumi-icon,
[KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"]) [KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"])
AC_SUBST(KASUMI_ICON_FILE) AC_SUBST(KASUMI_ICON_FILE)
@ -12,33 +12,35 @@
+ [HOTKEYS="$withval"], + [HOTKEYS="$withval"],
+ [HOTKEYS="no"]) + [HOTKEYS="no"])
+if test x"$HOTKEYS" = x"no"; then +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 +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 +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 +else
+ HOTKEYS="<hotkeys>${HOTKEYS}</hotkeys>" + HOTKEYS_XML="<hotkeys>${HOTKEYS}</hotkeys>"
+fi +fi
+AC_SUBST(HOTKEYS) +AC_SUBST(HOTKEYS_XML)
+ +
+SYMBOL_CHAR='&#x3042;'
+SYMBOL_TEST="import ibus +SYMBOL_TEST="import ibus
+engine = ibus.EngineDesc('test') +engine = ibus.EngineDesc('test')
+exit(not hasattr(engine, 'symbol')) +exit(not hasattr(engine, 'symbol'))
+" +"
+$PYTHON -c "$SYMBOL_TEST" +$PYTHON -c "$SYMBOL_TEST"
+if test $? -eq 0; then +if test $? -eq 0; then
+ SYMBOL="<symbol>\xe3\x81\x82</symbol>" + SYMBOL_XML="<symbol>${SYMBOL_CHAR}</symbol>"
+else +else
+ SYMBOL="<!-- <symbol>\xe3\x81\x82</symbol> -->" + SYMBOL_XML="<!-- <symbol>${SYMBOL_CHAR}</symbol> -->"
+fi +fi
+SYMBOL=`printf "$SYMBOL"` +AC_SUBST(SYMBOL_XML)
+AC_SUBST(SYMBOL)
+ +
dnl - define GETTEXT_* variables dnl - define GETTEXT_* variables
GETTEXT_PACKAGE=ibus-anthy GETTEXT_PACKAGE=ibus-anthy
AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(GETTEXT_PACKAGE)
@@ -146,3 +177,15 @@ m4/Makefile @@ -146,3 +179,15 @@ m4/Makefile
]) ])
AC_OUTPUT AC_OUTPUT
@ -51,17 +53,17 @@
+ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE +ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE
+KASUMI_EXEC_FILE $KASUMI_EXEC_FILE +KASUMI_EXEC_FILE $KASUMI_EXEC_FILE
+KASUMI_ICON_FILE $KASUMI_ICON_FILE +KASUMI_ICON_FILE $KASUMI_ICON_FILE
+HOTKEYS $HOTKEYS +HOTKEYS_XML $HOTKEYS_XML
+SYMBOL $SYMBOL +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.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 @@ @@ -22,6 +22,8 @@
<longname>Anthy</longname> <longname>Anthy</longname>
<description>Anthy Input Method</description> <description>Anthy Input Method</description>
<rank>99</rank> <rank>99</rank>
+ @HOTKEYS@ + @HOTKEYS_XML@
+ @SYMBOL@ + @SYMBOL_XML@
</engine> </engine>
</engines> </engines>
</component> </component>

View File

@ -1,27 +1,29 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?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_ibus_version 1.2.0.20100111
%define require_pygtk2_version 2.15.2 %define require_pygtk2_version 2.15.2
%if 0%{?fedora} > 15
%define have_bridge_hotkey 1 %define have_bridge_hotkey 1
%else
%define have_bridge_hotkey 0
%endif
Name: ibus-anthy Name: ibus-anthy
Version: 1.2.6 Version: 1.2.6
Release: 2%{?dist} Release: 3%{?dist}
Summary: The Anthy engine for IBus input platform Summary: The Anthy engine for IBus input platform
License: GPLv2+ License: GPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/ URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
# Patch0: ibus-anthy-HEAD.patch # Patch0: ibus-anthy-HEAD.patch
%if %have_bridge_hotkey
Patch1: ibus-anthy-xx-icon-symbol.patch Patch1: ibus-anthy-xx-icon-symbol.patch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: anthy-devel BuildRequires: anthy-devel
BuildRequires: gettext-devel BuildRequires: gettext-devel
%if %have_bridge_hotkey
BuildRequires: ibus BuildRequires: ibus
%endif
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
@ -40,14 +42,11 @@ libanthy.
%prep %prep
%setup -q %setup -q
# %patch0 -p1 # %patch0 -p1
%if %have_bridge_hotkey
%patch1 -p1 -b .icon-symbol %patch1 -p1 -b .icon-symbol
%endif
%build %build
%if %have_bridge_hotkey # for .icon-symbol patch
autoreconf autoreconf
%endif
%configure \ %configure \
%if %have_bridge_hotkey %if %have_bridge_hotkey
--with-hotkeys \ --with-hotkeys \
@ -77,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/ibus/component/* %{_datadir}/ibus/component/*
%changelog %changelog
* Mon Jul 04 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.2.6-2 * Fri Jul 29 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.2.6-3
- Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys. - Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys.
* Mon May 16 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.2.6-1 * Mon May 16 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.2.6-1