Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

347.4. anthy-unicode-1.0.0.20260213

Japanese kana-kanji conversion engine, the maintained Anthy fork

Version 1.0.0.20260213, release 1
Shelf input — Input-device libraries, keyboard data, input methods and on-screen keyboards
Phase 50_desktop (Desktop), 17 of 92 in build order
Licence LGPL-2.0-or-later AND GPL-2.0-or-later
Homepage https://github.com/fujiwarat/anthy-unicode
Build time 0.7 SBU
Installed size 25.5 MiB in 22 files
Recipe ports/core/input/anthy-unicode/kpkgbuild

About

Anthy is a Japanese kana-to-kanji conversion engine, and anthy-unicode is its maintained fork: its internal encoding is UTF-8 rather than EUC-JP, and it keeps a user’s files in $XDG_CONFIG_HOME/anthy (~/.config/anthy when that is unset) rather than ~/.anthy. In KDOS it is the library under fcitx5-anthy, the Japanese engine of the input method; see Input methods. The package also installs the conversion dictionary, which the build compiles from the text dictionaries in the source.

The source is GitHub’s archive of the release tag, not the release tarball upstream attaches to that tag. The name::url form of source = renames it to the $name-$version name kpkg expects. A tag archive has no generated configure, so build.sh runs autogen.sh first, with NOCONFIGURE=1 so that it only generates the scripts.

Sources

Dependencies

Depends on: autoconf, automake, libtool.

Required by (1): fcitx5-anthy.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/50_desktop/phase.env && kpkg install anthy-unicode'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/input/anthy-unicode.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/input/anthy-unicode
echo '136469e2288658a80684b3f05a868b596a835c4adcf3de97ab657423c0132a55  anthy-unicode-1.0.0.20260213.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/anthy-unicode
SRC=$SRC_ROOT/anthy-unicode-1.0.0.20260213
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf anthy-unicode-1.0.0.20260213.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

NOCONFIGURE=1 ./autogen.sh

EMACS=no ./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--sysconfdir=/etc \
	--disable-static
make
make DESTDIR=$PKG install

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/anthy-unicode, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf anthy-unicode-1.0.0.20260213-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/anthy-unicode, and runs the triggers its paths call for.

Contents

Installed programs: anthy-agent-unicode, anthy-dic-tool-unicode, anthy-morphological-analyzer-unicode.

Installed libraries: libanthy-unicode.so, libanthydic-unicode.so, libanthyinput-unicode.so.

Installed directories: /usr/include/anthy-unicode-1.0, /usr/share/anthy-unicode, /usr/share/licenses/anthy-unicode.

Short descriptions

anthy-unicode.pc Japanese conversion engine

Notes

The version string is fixed when autogen.sh runs autoconf, not taken from the tag. The AC_INIT version in configure.ac appends the output of date +.%Y%m%d at the time autoconf runs, unless the source marks itself as a release, and this one does not. The version that anthy-unicode.pc and the library’s version call report therefore ends in the day the port was built, which need not match the date in the tag the recipe names.