Permalink
Browse files

Port to Vala from Python using libskk.

  • Loading branch information...
1 parent 543f599 commit ad0b820ff14d7fd8f85e8f8fb8b4c83c9b4d03f8 @ueno committed Nov 17, 2011
View
@@ -0,0 +1,2 @@
+((c-mode . ((indent-tabs-mode . nil)))
+ (vala-mode . ((indent-tabs-mode . nil))))
View
@@ -20,8 +20,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
SUBDIRS = \
- engine \
- setup \
+ src \
icons \
m4 \
po \
@@ -30,18 +29,30 @@ SUBDIRS = \
ACLOCAL_AMFLAGS = -I m4
+component_DATA = skk.xml
+componentdir = $(datadir)/ibus/component
+
+skk.xml: skk.xml.in
+ $(AM_V_GEN) \
+ ( \
+ libexecdir=${libexecdir}; \
+ pkgdatadir=${pkgdatadir}; \
+ s=`cat $<`; \
+ eval "echo \"$${s}\""; \
+ ) > $@
+
EXTRA_DIST = \
autogen.sh \
+ skk.xml.in.in \
ibus-skk.spec.in \
- python-config.py \
- ibus-skk.json.example \
$(NULL)
-noinst_DIST = \
+CLEANFILES = \
+ skk.xml \
$(NULL)
-
DISTCLEANFILES = \
+ skk.xml.in \
po/stamp-it \
$(NULL)
View
46 README
@@ -1,42 +1,34 @@
ibus-skk -- a Japanese SKK input engine for IBus
-* What's it?
+* What's this?
ibus-skk is an implementation of the SKK (Simple Kana-Kanji) input
-method on the IBus input method framework. Since SKK is quite
-different from other Japanese input methods, if you haven't heard of
-it, please consult the following Web pages before complaining about
-the differences:
+method on the IBus input method framework. To learn about SKK, see:
http://openlab.jp/skk/
https://secure.wikimedia.org/wikipedia/ja/wiki/SKK
* How to install
-$ sudo apt-get install libibus-dev skkdic
-$ ./configure --prefix=/usr # --libdir=/usr/lib64
-$ make
-$ sudo make install
+You will need libskk, a library which implements SKK algorithm, from:
-* Configuration
+http://github.com/ueno/libskk.git
-There is a GUI setup tool to customize ibus-skk. It can be started
-from the command line by "ibus-setup-m17n", or from the language
-panel.
+Since libskk and ibus-skk are written in Vala, you will need valac.
-For complex settings, such as romaji-to-kana conversion table, you can
-use configuration file located at ~/.config/ibus-skk.json. Use
-ibus-skk.json.example as a template.
+$ sudo apt-get install valac
+$ git clone git://github.com/ueno/libskk.git
+$ cd libskk && ./autogen.sh --prefix=/usr && make && sudo make install
-* Thumb shift keyboard support
+$ sudo apt-get install libibus-dev skkdic
+$ git clone git://github.com/ueno/ibus-skk.git
+$ cd ibus-skk && ./autogen.sh --prefix=/usr && make && sudo make install
-Since the version 1.3.4, ibus-skk supports thumb shift typing method
-(aka NICOLA). Currently the keymap is fixed and cannot be changed:
-Left Shift is assigned to Muhenkan and Right Shift is assigned to
-Henkan.
+* Configuration
-See the following blog entry for detail:
-http://blog.du-a.org/?p=74
+There is a GUI setup tool to customize ibus-skk. It can be started
+from the command line by "ibus-setup-skk", or from the IBus language
+panel.
* How to report bugs
@@ -46,9 +38,5 @@ http://github.com/ueno/ibus-skk/issues
https://bugzilla.redhat.com/buglist.cgi?component=ibus-skk&product=Fedora
http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=ibus-skk;dist=unstable
-Even though some developers read Japanese, please write in plain
-English so that we can forward it to other components when your
-problem is not specific to ibus-skk.
-
-If you can write Python, it would be helpful to add some failure test
-cases in engine/test.py and to attach the diff to the bug reports.
+Please write in plain English so that we can forward some bugs to
+other components.
View
@@ -21,10 +21,10 @@
# if not 1, append datestamp to the version number.
m4_define([package_name], [ibus-skk])
-m4_define([ibus_released], [1])
+m4_define([ibus_released], [0])
m4_define([ibus_major_version], [1])
m4_define([ibus_minor_version], [3])
-m4_define([ibus_micro_version], [9])
+m4_define([ibus_micro_version], [99])
m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
@@ -57,22 +57,20 @@ m4_define([ibus_datedisplay], ibus_maybe_datedisplay)
DATE_DISPLAY="ibus_datedisplay"
AC_SUBST(DATE_DISPLAY)
-# check python
-AM_PATH_PYTHON([2.5])
+# check libskk
+PKG_CHECK_MODULES(IBUS_SKK, [ibus-1.0 >= 1.4.0 libskk], ,
+ AC_MSG_ERROR([can't find libskk]))
-AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
-if test x"$PYTHON_CONFIG" = x""; then
- AC_PATH_PROG(PYTHON_CONFIG, python-config)
-fi
-if test x"$PYTHON_CONFIG" != x""; then
- PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
- PYTHON_LIBS=`$PYTHON_CONFIG --libs`
-else
- PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
- PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
-fi
-AC_SUBST(PYTHON_CFLAGS)
-AC_SUBST(PYTHON_LIBS)
+# check gtk+
+PKG_CHECK_MODULES(GTK, [gtk+-3.0], ,
+ AC_MSG_ERROR([can't find gtk+-3.0]))
+
+# check vala
+AM_PROG_VALAC([0.10.0])
+
+AC_PATH_PROG(VALAC, valac, valac)
+AC_SUBST(VALAC)
+AC_SUBST(VALAFLAGS)
# define GETTEXT_* variables
GETTEXT_PACKAGE=ibus-skk
@@ -87,12 +85,9 @@ IBUS_SET_SYMBOL([&#x3042;])
AC_CONFIG_FILES([ po/Makefile.in
Makefile
ibus-skk.spec
-engine/Makefile
-engine/ibus-engine-skk
-engine/skk.xml.in
-setup/Makefile
-setup/ibus-setup-skk
-setup/ibus-skk-preferences.ui
+skk.xml.in
+src/Makefile
+src/ibus-skk-preferences.ui
icons/Makefile
scripts/Makefile
scripts/ibus-skk-convert-jisyo
View
@@ -1,3 +0,0 @@
-ibus-engine-skk
-skk.xml.in
-skk.xml
View
@@ -1,63 +0,0 @@
-# vim:set noet ts=4:
-#
-# ibus-skk - The SKK engine for IBus
-#
-# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-engine_skk_PYTHON = \
- engine.py \
- factory.py \
- main.py \
- skk.py \
- kzik.py \
- nicola.py \
- virtkbd.py \
- $(NULL)
-engine_skkdir = $(pkgdatadir)/engine
-
-libexec_SCRIPTS = ibus-engine-skk
-engine_DATA = skk.xml
-enginedir = $(datadir)/ibus/component
-
-skk.xml: skk.xml.in
- ( \
- libexecdir=${libexecdir}; \
- pkgdatadir=${pkgdatadir}; \
- s=`cat $<`; \
- eval "echo \"$${s}\""; \
- ) > $@
-
-test:
- DBUS_DEBUG=true \
- IBUS_SKK_PKGDATADIR=$(abs_top_srcdir) \
- PYTHONPATH=$(builddir)/.libs:@pyexecdir@ \
- $(PYTHON) \
- $(srcdir)/main.py
-
-EXTRA_DIST = \
- skk.xml.in.in \
- ibus-engine-skk.in \
- test.py \
- $(NULL)
-
-CLEANFILES = \
- skk.xml \
- *.pyc \
- $(NULL)
-
-DISTCLEANFILES = \
- $(NULL)
Oops, something went wrong.

0 comments on commit ad0b820

Please sign in to comment.