app-i18n/fcitx-osk: new package, add 0.2.1

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Zakk <zakk@gentoozh.org>
This commit is contained in:
Zakk committed 2026-11-26 08:03:48 +11:00
1 parent 3133e965f8
commit ba3ce24c9d
5 files changed
+140

No files matched your search

+7
View File
@@ -428,6 +428,13 @@ github_account = "zakkaus"
#["app-i18n/fcitx-openbangla"]
["app-i18n/fcitx-osk"]
source = "github"
github = "fortime/fcitx5-osk"
use_latest_release = true
github_account = "zakkaus"
deps = "rust"
# develop-branch snapshot; the tagged releases still ship only the Qt5 GUI
#["app-i18n/fcitx-qt"]
+2
View File
@@ -0,0 +1,2 @@
DIST fcitx-osk-0.2.1-crates.tar.xz 57274752 BLAKE2B f3e0c296701510c1a654dc6327c9c7ea7d3b72005206836421f7f3ef175f2cd3b0402349d26c476f16da880839d97fafd5166c4c6d43e22511fdfe05efeeb666 SHA512 79ee15fbe7fbb0d64a56a768d5d0f38f0fff396340b4ca36191ad788f691fc0fe80a3be4301627dd2ba2a3673b5b4eb110117705a3ec41785487af7ee04f0c95
DIST fcitx5-osk-0.2.1.tar.gz 3637432 BLAKE2B 335275e1351c8d391e32c9a46ed61406110fd8850ca322dddae21339a4d1d92756cfd2c53a130fb630d3886fe2f4bcc1be9c4aead88d71f4b364b1e3c7a4a660 SHA512 5edf072d825616903261ea97e93c7ae3d3b01f4d72e388aa28624021d633d82583cdc7fbfd09037dfce6a35a76bf3b692e5745c32f7a52fbcfc00a1c62af6493
+102
View File
@@ -0,0 +1,102 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES=""
MY_PN="fcitx5-osk"
MY_P="${MY_PN}-${PV}"
RUST_MIN_VER="1.88.0"
inherit cargo desktop systemd xdg
DESCRIPTION="On-screen keyboard for Fcitx 5, with a KWin Wayland virtual keyboard launcher"
HOMEPAGE="https://github.com/fortime/fcitx5-osk"
SRC_URI="
https://github.com/fortime/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${MY_P}.tar.gz
https://github.com/gentoo-zh/gentoo-deps/releases/download/${P}/${P}-crates.tar.xz
${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0 BSD-2 BSD Boost-1.0 CC0-1.0 CDLA-Permissive-2.0 ISC MIT
UoI-NCSA Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
# wayland, libxkbcommon, libEGL and libvulkan are loaded with dlopen.
# The KWin launcher runs kreadconfig6 and kwriteconfig6.
DEPEND="
dev-libs/openssl:=
"
RDEPEND="
${DEPEND}
app-i18n/fcitx:5
dev-libs/wayland
kde-frameworks/kconfig:6
media-fonts/symbols-nerd-font
media-libs/fontconfig
media-libs/libglvnd
media-libs/vulkan-loader
sys-apps/dbus
x11-libs/libxkbcommon
"
BDEPEND="
virtual/pkgconfig
"
src_prepare() {
default
local f
for f in \
pkg/share/applications/fyi.fortime.Fcitx5Osk.desktop.in \
pkg/share/applications/fyi.fortime.Fcitx5Osk.KwinLauncher.desktop.in \
pkg/share/dbus-1/services/fyi.fortime.Fcitx5Osk.service.in \
pkg/share/dbus-1/services/fyi.fortime.Fcitx5Osk.KwinLauncher.service.in \
pkg/lib/systemd/system/fcitx5-osk-key-helper.service.in
do
sed -e "s|@INSTALL_BIN_DIR@|${EPREFIX}/usr/bin|g" "${f}" > "${f%.in}" || die
done
}
src_install() {
local bindir="$(cargo_target_dir)"
dobin "${bindir}"/fcitx5-osk{,-key-helper,-kwin-launcher}
domenu pkg/share/applications/fyi.fortime.Fcitx5Osk{,.KwinLauncher}.desktop
insinto /usr/share/dbus-1/services
doins pkg/share/dbus-1/services/fyi.fortime.Fcitx5Osk{,.KwinLauncher}.service
insinto /usr/share/dbus-1/system.d
doins pkg/share/dbus-1/system.d/fyi.fortime.Fcitx5OskKeyHelper.conf
systemd_dounit pkg/lib/systemd/system/fcitx5-osk-key-helper.service
newinitd "${FILESDIR}"/fcitx5-osk-key-helper.initd fcitx5-osk-key-helper
newicon -s scalable assets/icons/fcitx5-osk.svg fyi.fortime.Fcitx5Osk.svg
insinto /usr/share/fcitx5-osk
doins -r pkg/share/fcitx5-osk/.
insinto /usr/share/fcitx5-osk/examples
doins -r assets/layouts assets/key_sets
dosym -r /usr/share/fcitx5-osk/themes/breeze-light.toml \
/etc/xdg/fcitx5-osk/themes/breeze-light.toml
dodoc README.md CHANGELOG.md
}
pkg_postinst() {
xdg_pkg_postinst
elog "Select \"Fcitx 5 Osk Kwin Launcher\" in System Settings > Keyboard > Virtual Keyboard."
elog "With the KWin launcher every key goes through the key helper, so enable it:"
elog " systemd: systemctl enable --now fcitx5-osk-key-helper"
elog " OpenRC: rc-update add fcitx5-osk-key-helper default"
}
@@ -0,0 +1,12 @@
#!/sbin/openrc-run
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Emits key events through uinput for fcitx5-osk"
command="/usr/bin/fcitx5-osk-key-helper"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need dbus
}
+17
View File
@@ -0,0 +1,17 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zakk@gentoozh.org</email>
<name>Zakk</name>
</maintainer>
<longdescription>
Fcitx 5 Osk is an on-screen keyboard for Fcitx 5. It talks to Fcitx 5
over D-Bus, supports rotation-aware landscape and portrait layouts, and
ships fcitx5-osk-kwin-launcher so KWin can use it as its Wayland
virtual keyboard, including on the lock screen.
</longdescription>
<upstream>
<remote-id type="github">fortime/fcitx5-osk</remote-id>
</upstream>
</pkgmetadata>