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

347.5. fcitx5-anthy-5.1.11

Japanese input for fcitx5, via anthy-unicode

Version 5.1.11, release 1
Shelf input — Input-device libraries, keyboard data, input methods and on-screen keyboards
Phase 50_desktop (Desktop), 18 of 92 in build order
Licence GPL-2.0-or-later
Homepage https://github.com/fcitx/fcitx5-anthy
Build time 0.4 SBU
Installed size 808.0 KiB in 41 files
Recipe ports/core/input/fcitx5-anthy/kpkgbuild

About

The Japanese engine for fcitx5: kana input and kana-to-kanji conversion through anthy-unicode. It is one of the language engines KDOS builds for the input method; see Input methods for how fcitx5 reaches applications. The build is upstream’s CMake build with its tests off.

Sources

Dependencies

Depends on: cmake, extra-cmake-modules, fcitx5, anthy-unicode, gettext.

Required by (1): kde-plasma.

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 fcitx5-anthy'

What kpkg does

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

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/fcitx5-anthy
echo '9e59a151ab7c3a613fce137ed3dbd278a56ef87f69b6c1ec295c835b1977f356  fcitx5-anthy-5.1.11.tar.zst' | 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/fcitx5-anthy
SRC=$SRC_ROOT/fcitx5-anthy-5.1.11
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
cp fcitx5-anthy-5.1.11.tar.zst "$SRC"

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:

tar -xf "$PORT_SRC/$name-$version.tar.zst" --strip-components=1

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D ENABLE_TEST=Off \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

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/fcitx5-anthy, 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 fcitx5-anthy-5.1.11-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/fcitx5-anthy, and runs the triggers its paths call for.

Contents

Installed directories: /usr/share/fcitx5/anthy, /usr/share/licenses/fcitx5-anthy.

Notes

CMake looks for anthy-unicode.pc first and falls back to the original Anthy’s anthy.pc; only anthy-unicode is a port, so the engine always links it.

The engine asks for fcitx5’s TestFrontend module with a REQUIRED find_package, whether or not its own tests are built, so it configures only against an fcitx5 built with ENABLE_TESTING_ADDONS=On, which fcitx5 is. It also names the lowest fcitx5 version it builds against, so a new release of the engine can need a new fcitx5 first.

kpkg does not unpack a .tar.zst, so build.sh unpacks the source archive itself.