347.7. fcitx5-hangul-5.1.11
Korean input for fcitx5, via libhangul
| Version | 5.1.11, release 1 |
| Shelf | input — Input-device libraries, keyboard data, input methods and on-screen keyboards |
| Phase | 50_desktop (Desktop), 20 of 92 in build order |
| Licence | LGPL-2.1-or-later |
| Homepage | https://github.com/fcitx/fcitx5-hangul |
| Build time | 0.3 SBU |
| Installed size | 199.5 KiB in 32 files |
| Recipe | ports/core/input/fcitx5-hangul/kpkgbuild |
About
The Korean engine for fcitx5: Hangul input on the Korean keyboard layouts, and Hanja conversion, through libhangul. 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
fcitx5-hangul-5.1.11.tar.zst(50.2 KiB)
sha25694f5f9b4d69aed88c735ca27e60d63c63b65679824d011a0559da8e95f329b8c
upstream: https://download.fcitx-im.org/fcitx5/fcitx5-hangul/fcitx5-hangul-5.1.11.tar.zst
archive copy: sources-3/input--fcitx5-hangul-5.1.11.tar.zst
Dependencies
Depends on: cmake, extra-cmake-modules, fcitx5, libhangul, 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-hangul'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/input/fcitx5-hangul.
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-hangul
echo '94f5f9b4d69aed88c735ca27e60d63c63b65679824d011a0559da8e95f329b8c fcitx5-hangul-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-hangul
SRC=$SRC_ROOT/fcitx5-hangul-5.1.11
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
cp fcitx5-hangul-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-hangul, 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-hangul-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-hangul, and runs the triggers its paths call for.
Contents
Installed directories: /usr/share/fcitx5/hangul, /usr/share/licenses/fcitx5-hangul.
Notes
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. It reads libhangul’s version from pkg-config and compiles against the newer libhangul interface when the library is new enough, so a libhangul update can change the code this port compiles.
kpkg does not unpack a .tar.zst, so build.sh unpacks the source archive itself.