Perhaps the sed command that glottophilos commented should be added to the PKGBUILD. It did not work for me until It was manually added. Is there a reason why it is not included by default?
Search Criteria
Package Details: keyman 18.0.236-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/keyman.git (read-only, click to copy) |
---|---|
Package Base: | keyman |
Description: | IBus engine supporting over 2000 languages |
Upstream URL: | https://keyman.com/linux/ |
Licenses: | GPL |
Submitter: | Vitrum-cnkj34kr8 |
Maintainer: | Vitrum-cnkj34kr8 |
Last Packager: | Vitrum-cnkj34kr8 |
Votes: | 3 |
Popularity: | 1.27 |
First Submitted: | 2019-01-03 14:38 (UTC) |
Last Updated: | 2025-05-14 14:26 (UTC) |
Dependencies (20)
- ibus (ibus-gitAUR)
- libevdev (libevdev-gitAUR)
- python-dbus
- python-fonttools (python-fonttools-gitAUR)
- python-lxml
- python-magic (python-magic-gitAUR)
- python-numpy (python-numpy-gitAUR, python-numpy1AUR, python-numpy-mkl-binAUR, python-numpy-mkl-tbbAUR, python-numpy-mklAUR)
- python-pillow (python-pillow-simd-gitAUR)
- python-pyxdg
- python-qrcode
- python-requests
- python-requests-cacheAUR (python-requests-cache-gitAUR)
- python-sentry_sdk
- cmake (cmake3AUR, cmake-gitAUR) (make)
- help2man (help2man-gitAUR, python-help2manAUR) (make)
- meson (meson-gitAUR) (make)
- python-build (make)
- python-installer (make)
- python-setuptools (make)
- keyman-onboardAUR (optional) – on-screen keyboard
Required by (0)
Sources (2)
Jao commented on 2025-05-20 18:48 (UTC)
csslayer commented on 2025-05-17 22:50 (UTC)
Hi, I created a split package version for it so fcitx user doesn't need to install ibus.
Some additional fixes: 1. Missing dependency found by namcap 2. Split License for keyman & ibus-keyman 3. use /usr/lib instead of /usr/libexec to follow the Arch's guideline. 4. Remove werror in meson which make the compilation fail on my system.
It's slightly 5000 character so I put it on gist, FYI: https://gist.github.com/wengxt/811543a7cd5b77907158a709159902b9
glottophilos commented on 2025-05-15 12:15 (UTC) (edited on 2025-05-15 12:15 (UTC) by glottophilos)
Fantastic! Thank you so much for getting this up and running! For whatever reason I had to make some small changes to the PKGBUILD for the sake of a meson.build file that had a bunch of issues with relative filepaths. In the prepare(), I added:
# Patch the Meson build file for docs
sed -i \
-e "s|'../include/keyman/keyman_core_api.h'|'../../include/keyman/keyman_core_api.h'|" \
-e "s|'../src/jsonpp.hpp'|'../../src/jsonpp.hpp'|" \
-e "s|'../../common/cpp/utfcodec.hpp'|'../../../common/cpp/utfcodec.cpp'|" \
-e "s|--conf-file=doc/hotdoc.json|--conf-file=docs/internal/hotdoc.json|" \
-e "s|--output=doc|--output=docs/internal/html|" \
../core/docs/internal/meson.build
Everything else worked smoothly. I did also need to use specifically the ubuntu url as well for the gpg command, but that was very minor and may be down to my system specifically:
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys C8E614F58F1B65E0
Thanks again, we super appreciate it!
Vitrum-cnkj34kr8 commented on 2025-05-14 14:29 (UTC) (edited on 2025-05-15 13:16 (UTC) by Vitrum-cnkj34kr8)
Keyman was updated to v18, and it should support Wayland and X11 now.
Do not forget to add PGP key:
gpg --recv-keys C8E614F58F1B65E0
Deep thanks to @glottophilos for helping me update the package.
Vitrum-cnkj34kr8 commented on 2025-04-28 08:06 (UTC)
v18.0.235
Plasma, X11 and Wayland
- TEST_IPA_WRITER: pass
- TEST_IPA_GEDIT: pass
- TEST_KO_WRITER: pass
- TEST_KO_GEDIT: fail
- TEST_KM_WRITER: pass
- TEST_KM_GEDIT: pass
- TEST_CONTEXT: pass
The new version works almost perfectly (the gedit's bug to be submitted). I will wait for one week, and if no issues are reported by other users, I will roll out the updated PKGBUILD.
Vitrum-cnkj34kr8 commented on 2025-04-27 17:37 (UTC) (edited on 2025-04-28 08:07 (UTC) by Vitrum-cnkj34kr8)
A draft of a new Keyman v18. First dirty build.
- X11 + IBus: works
- km-config: works
- Wayland: works
- DBus service: works
- Fcitx: not tested
PGP key:
gpg --recv-keys C8E614F58F1B65E0
PKGBUILD:
pkgname=keyman
pkgver=18.0.235
pkgrel=1
pkgdesc="IBus engine supporting over 2000 languages"
arch=('i686' 'x86_64')
url="https://keyman.com/linux/"
license=('GPL')
depends=('ibus' 'python-qrcode' 'python-sentry_sdk' 'python-fonttools')
makedepends=('meson' 'python-setuptools' 'help2man')
optdepends=(
'keyman-onboard: on-screen keyboard'
)
source=("https://downloads.keyman.com/linux/stable/$pkgver/keyman-$pkgver.tar.gz"
https://downloads.keyman.com/linux/stable/$pkgver/keyman-$pkgver.tar.gz.asc)
sha256sums=('2a4473353cf59eec94637fadf5ec45e1a398eedf917e36efd1bfab2fad2bdee5'
'SKIP')
validpgpkeys=('6C8EEADE607D434C74FD34FDC8E614F58F1B65E0')
prepare(){
cd "$srcdir/keyman/linux"
# link to /usr/lib/libicuuc.so
sed -i "s/icu\b/icu, dependency('icu-uc')/" \
ibus-keyman/src/meson.build \
ibus-keyman/src/test/meson.build \
ibus-keyman/tests/meson.build
sed -i 's|--werror --buildtype|--werror --prefix=/usr --buildtype|' \
$srcdir/keyman/core/commands.inc.sh \
$srcdir/keyman/linux/keyman-system-service/build.sh
}
build() {
cd "$srcdir/keyman/linux/keyman-config"
./build.sh configure build
cd "$srcdir/keyman/linux/ibus-keyman"
./build.sh configure -- --prefix=/usr
./build.sh build
}
package() {
# keyboardprocessor
cd "$srcdir/keyman/core/build/arch/release"
meson install --destdir $pkgdir
# ibus-keyman
cd "$srcdir/keyman/linux/build/x86_64/release/"
meson install --destdir $pkgdir
# keyman-system-service
cd "$srcdir/keyman/linux/keyman-system-service/build/x86_64/release/"
meson install --destdir $pkgdir
# keyman-config
# based on linux/keyman-config/build.sh
# add `$pkgdir` prefix, remove `local`
cd "$srcdir/keyman/linux/keyman-config"
python -m installer --destdir="$pkgdir" build/*.whl
# install icons
mkdir -p "$pkgdir/usr/share/keyman/icons"
cp keyman_config/icons/* "$pkgdir/usr/share/keyman/icons"
# install man pages
mkdir -p "$pkgdir/usr/share/man/man1"
cp ../../debian/man/*.1 "$pkgdir/usr/share/man/man1"
# desktop
install -Dm644 --target-directory="$pkgdir/usr/share/applications" resources/km-config.desktop
# mime
install -Dm644 resources/keyman.sharedmimeinfo "$pkgdir/usr/share/mime/packages/keyman.xml"
# icons app
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/24x24/apps" icons/24/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/32x32/apps" icons/32/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/48x48/apps" icons/48/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/64x64/apps" icons/64/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/128x128/apps" icons/128/km-config.png
# icons mime
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/16x16/mimetypes" icons/16/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/24x24/mimetypes" icons/24/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/32x32/mimetypes" icons/32/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/48x48/mimetypes" icons/48/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/64x64/mimetypes" icons/64/application-x-kmp.png
# glib schemas
install -Dm644 --target-directory="$pkgdir/usr/share/glib-2.0/schemas" resources/com.keyman.gschema.xml
# bash completions
install -Dm644 --target-directory="$pkgdir/usr/share/bash-completion/completions/" *.bash-completion
for file in $pkgdir/usr/share/bash-completion/completions/*; do
mv -- "$file" "${file%%.bash-completion}"
done
}
glottophilos commented on 2025-04-26 22:16 (UTC)
Part 2 -- in general you'll notice that I wasn't too concerned with a long-term fix for certain issues given that I was just trying to get it up and running, but hopefully this still helps with identifying problem spots:
check() {
cd "$srcdir/keyman/core"
# meson test -C build
}
package() {
export CXXFLAGS="$CXXFLAGS -O2 -std=c++17"
export LDFLAGS="$LDFLAGS -licuuc -licui18n"
#suppressing errors for C because it complains about Ibus version seemingly incorrectly
export CFLAGS="$CFLAGS -Wno-error"
cd "$srcdir/keyman/core"
meson install -C build --destdir "$pkgdir"
cd "$srcdir/keyman/linux/ibus-keyman"
DESTDIR="$pkgdir" ./build.sh install
cd "$srcdir/keyman/linux/keyman-config"
python -m installer --destdir="$pkgdir" dist/*.whl
# man
install -Dm644 --target-directory="$pkgdir/usr/share/man/man1" ../../debian/man/*.1
install -Dm644 --target-directory="$pkgdir/usr/share/keyman/icons" keyman_config/icons/*
# icons app
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/24x24/apps" icons/24/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/32x32/apps" icons/32/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/48x48/apps" icons/48/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/64x64/apps" icons/64/km-config.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/128x128/apps" icons/128/km-config.png
# icons mime
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/16x16/mimetypes" icons/16/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/24x24/mimetypes" icons/24/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/32x32/mimetypes" icons/32/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/48x48/mimetypes" icons/48/application-x-kmp.png
install -Dm644 --target-directory="$pkgdir/usr/share/icons/hicolor/64x64/mimetypes" icons/64/application-x-kmp.png
# desktop
install -Dm644 --target-directory="$pkgdir/usr/share/applications" resources/km-config.desktop
# mime
install -Dm644 resources/keyman.sharedmimeinfo "$pkgdir/usr/share/mime/packages/keyman.xml"
# glib schemas
install -Dm644 --target-directory="$pkgdir/usr/share/glib-2.0/schemas" resources/com.keyman.gschema.xml
# bash completions
install -Dm644 --target-directory="$pkgdir/usr/share/bash-completion/completions/" *.bash-completion
for file in $pkgdir/usr/share/bash-completion/completions/*; do
mv -- "$file" "${file%%.bash-completion}"
done
}
glottophilos commented on 2025-04-26 22:13 (UTC)
Part 1, character limit issue
pkgname=keyman
pkgver=17.0.335
pkgrel=1
pkgdesc="IBus engine supporting over 1,000 keyboard layouts (former KMFL)"
arch=('i686' 'x86_64')
url="https://keyman.com/linux/"
license=('GPL')
depends=('ibus' 'webkit2gtk' 'python-magic' 'python-requests-cache'
'python-numpy' 'python-pillow' 'python-qrcode' 'python-lxml'
'python-sentry_sdk')
makedepends=('meson' 'git' 'python-setuptools' 'perl-locale-gettext' 'help2man'
'python-build' 'python-installer' 'python-wheel' 'nodejs' 'npm')
optdepends=(
'keyman-onboard: on-screen keyboard'
'hotdoc: C API documentation generation'
)
replaces=('kmflcomp' 'libkmfl' 'ibus-kmfl')
conflicts=('kmflcomp' 'libkmfl' 'ibus-kmfl')
source=("$pkgname-$pkgver.tar.gz::https://downloads.keyman.com/linux/stable/$pkgver/keyman-$pkgver.tar.gz")
sha256sums=('165a31b3c8399e74fe1ae7d223bccac619de9a34960c31d5cac876531b6527cc')
build() {
echo -e "\n\n### build 'keyman' ######\n\n"
cd "$srcdir/keyman/core"
# This works only in this fashion for some reason
pushd "$srcdir/keyman/common/tools/hextobin"
./build.sh configure
./build.sh build
popd
# Fix IBus keyman.xml installation location
pushd "$srcdir/keyman/linux/ibus-keyman/src"
sed -i "s|get_option('datadir') / 'ibus/component'|'/usr/share/ibus/component'|" meson.build
popd
# Comment out bits that are causing a test failure
sed -i '/# Setup kmc/,/endforeach/ s/^/#/' "$srcdir/keyman/core/tests/unit/ldml/keyboards/meson.build"
sed -i '/^foreach kbd : tests_with_testdata/,/^endforeach/ s/^/#/' "$srcdir/keyman/core/tests/unit/ldml/keyboards/meson.build"
sed -i '/^foreach kbd : tests_from_cldr/,/^endforeach/ s/^/#/' "$srcdir/keyman/core/tests/unit/ldml/keyboards/meson.build"
sed -i '/^ldml = executable/,/^)/ s/^/#/' "$srcdir/keyman/core/tests/unit/ldml/meson.build"
sed -i '/test.*ldml/ s/^/#/' "$srcdir/keyman/core/tests/unit/ldml/meson.build"
# Set C++ flags
export CXXFLAGS="$CXXFLAGS -O2 -std=c++17"
# Build the core using Meson
arch-meson ./ build \
--prefix=/usr \
--libexecdir=/usr/lib/ibus \
--datadir=/usr/share
# Compile the project
meson compile -C build
echo -e "\n\n### build 'keyman-config' ######\n\n"
cd "$srcdir/keyman/linux/keyman-config"
./build.sh
python -m build --wheel --no-isolation
make man
}
Vitrum-cnkj34kr8 commented on 2025-04-26 20:35 (UTC)
@glottophilos
I'll check it tomorrow. Could you post, please, your PKGBUILD
here? It will help me to update the building scripts.
glottophilos commented on 2025-04-22 21:15 (UTC) (edited on 2025-04-26 18:22 (UTC) by glottophilos)
Is there any chance we could get this updated to reflect the most recent stable release version which includes Wayland support (v17+)? I have created my own modified PKGBUILD which does a fairly decent job and seems to get all the bits installed, but doesn't properly integrate IBus and Keyman, apparently. If someone who is more proficient than myself could take a look at it, that would be preferable. EDIT: Found the issue, created working PKGBUILD for v17.0.335
Pinned Comments
glottophilos commented on 2025-05-15 12:15 (UTC) (edited on 2025-05-15 12:15 (UTC) by glottophilos)
Fantastic! Thank you so much for getting this up and running! For whatever reason I had to make some small changes to the PKGBUILD for the sake of a meson.build file that had a bunch of issues with relative filepaths. In the prepare(), I added:
Everything else worked smoothly. I did also need to use specifically the ubuntu url as well for the gpg command, but that was very minor and may be down to my system specifically:
Thanks again, we super appreciate it!
Vitrum-cnkj34kr8 commented on 2023-05-30 17:58 (UTC)
Post-install manual: Running Keyman for Linux