Steps to build

The one of the easy way to build from source is using ABS.
First, install ABS:

# pacman -S abs

Update ABS:

# abs

Then, copy uim's directory to under your $HOME. For example:

$ cp -R /var/abs/extra/uim ~/sources/

Edit PKGBUILD.

Finally, run makepkg under uim directory to make and install package:

$ makepkg -s -i

Input method

Anthy

Anthy is one of the most popular Japanese input methods in the open source world. However, it has not been maintained for a long time. Debian succeeds it from May 2010.

To install Anthy :

# pacman -S anthy

Extra dictionary

Anthy's default dictionary does not include several characters which are not specified on EUC-JP (JIS X 0208) such as "①", "♥", etc. alt-cannadic provides extra dictionaries including those characters.

(Though this step repeats the same commands twice, it is not mistypes.)

Anthy Kaomoji

Anthy Kaomoji is a modified version of Anthy that converts Hiragana text to Kana Kanji mixed text and has emoticon (顔文字) and 2ch dictionaries.
It can be found in the AUR (anthy-kaomojiAUR).

Mozc

Mozc (on AUR) is a Japanese open source input method that originates from Google Japanese Input. It is considered to have better conversion quality than Anthy as for multi segments conversion (e.g. one sentence) in a lump but the dictionary is not as complete as Google Japanese Input. Though Mozc adapts to only ibus input method framework, macuim provides uim-mozc plugin and you can use it with mozc-svnAUR or mozc-utAUR on AUR.

mozc-svn builds with the published svn repository instead of source tarball and can build uim-mozc plugin.

Note: If you do not use uim (use ibus), you should not use mozc-svn. It is exactly similar to mozc (published svn repository is not actually trunk) and run-time of makepkg of mozc-svn will be longer than mozc.

Edit PKGBUILD

First, you get mozc-svnAUR or mozc-utAUR tarball from the AUR and edit the PKGBUILD to enable uim-mozc. That is, uncomment _uim_mozc line and you can comment out _ibus_mozc line to disable ibus module if unnecessary:

## You can choose the input method framework to use either ibus, uim or both.
## If you will be not using ibus, comment out below.
#_ibus_mozc="yes"
## If you will be using uim, uncomment below.
_uim_mozc="yes"

If you will be using mozc.el on Emacs instead of uim.el, uncomment _emacs_mozc line.

## If you will be using mozc.el on Emacs, uncomment below.
_emacs_mozc="yes"

Build and install

Finally, build and install:

$ makepkg -s -i

Re-register Mozc on uim

You must run the following command whenever you upgrade or (re-)install uim.

# uim-module-manager --register mozc

Tips

Use CapsLock as Eisu_toggle key on ASCII layout keyboard

Most of the preset keymap styles of Mozc, command 'ToggleAlphanumericMode' on 'Composition' mode is assigned to only Eisu (Eisu_toggle) key, but the ASCII keyboard has no Eisu keys.

One of the solution for it is to use CapsLock as Eisu_toggle key (because it is easy to use and effective). The following is way to assign the Eisu_toggle to CapsLock (without any modifier keys) and the CapsLock to Shift + CapsLock (like JIS keyboard layout).

Using uim.el

LEIM or minor-mode

You can call uim.el from Emacs in two ways; directly or with the LEIM (Library of Emacs Input Method) framework. Though settings of them are different, basic functions are same. If you want to switch between uim.el and other Emacs IMs frequently, you should use LEIM framework.

Settings for the minor-mode

If you will be using on minor-mode, write the following settings into your .emacs.d/init.el or some other file for Emacs customizing.

Ignoring C-SPC on uim.el

When you are assigning activation/deactivation of input method to C-SPC, C-SPC is stolen to switch input mode by uim.el while it is activated. To prevent the stealing and use for set-mark-command, add the followings into your .emacs.d/init.el or some other file for Emacs customizing.

mozc.el provides "overlay" mode in the styles of showing candidates (from mozc r77) similar to the inline candidates displaying mode of uim.el. If you want to use overlay mode, add the following.

(setq mozc-candidate-style 'overlay)

Using anthy.el

If you use Anthy, you can use anthy.el. Write the following settings into your .emacs.d/init.el or some other file for Emacs customizing.

(load-library "anthy")
(setq default-input-method "japanese-anthy")

Note: anthy.el may not support UTF-8 properly.

Disabling XIM on Emacs

When you are using input method on your desktop and assigning activation/deactivation of input method to C-SPC, you will be not able to use C-SPC/C-@ as set-mark-command on Emacs. To avoid this problem, add the following into your ~/.Xresources or ~/.Xdefaults. xim will be disabled on Emacs.

Emacs*UseXIM: false

Troubleshooting

Cannot input Japanese on Opera

If you use Opera and cannot input Japanese with uim, try to edit environment variable as follows:

export QT_IM_MODULE='xim'

uim-toolbar-gtk-systray: tray icon is crushed

Though some of DE, WM or panel application may provide only one icon space per application on system-tray/notification-area, uim-toolbar-gtk-systray displays some icons on it by default so those icons are crushed. Choose just one of them to solve it. The steps to display only 'Input mode' icon for example as follows:

Run uim-pref-gtk.

Click 'Toolbar' on 'Group' list.

Take the all checkmarks off.

Click 'Anthy', 'Anthy (UTF-8)' or 'Mozc' which you are using on 'Group' list.

Click Edit button in 'Toolbar' box -> 'Enable toolbar buttons' line.

Enable only 'Input mode' and click 'Close' button.

Click 'OK' button to close uim-pref-gtk.

The tray icon will be displayed "あ" (Hiragana mode) or "ー" (Direct mode).