Package Details: keyman 16.0.144-1

Git Clone URL: https://aur.archlinux.org/keyman.git (read-only, click to copy)
Package Base: keyman
Description: IBus engine supporting over 1,000 keyboard layouts (former KMFL)
Upstream URL: https://keyman.com/linux/
Licenses: GPL
Conflicts: ibus-kmfl, kmflcomp, libkmfl
Replaces: ibus-kmfl, kmflcomp, libkmfl
Submitter: Vitrum-cnkj34kr8
Maintainer: Vitrum-cnkj34kr8
Last Packager: Vitrum-cnkj34kr8
Votes: 2
Popularity: 0.60
First Submitted: 2019-01-03 14:38 (UTC)
Last Updated: 2023-12-03 21:18 (UTC)

Pinned Comments

Vitrum-cnkj34kr8 commented on 2023-05-30 17:58 (UTC)

Post-install manual: Running Keyman for Linux

Latest Comments

1 2 3 Next › Last »

Vitrum-cnkj34kr8 commented on 2025-04-28 08:06 (UTC)

v18.0.235

Tests

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

Vitrum-cnkj34kr8 commented on 2023-12-07 09:41 (UTC)

@csslayer Yeah, it's reasonable, but till the end of February I don't have much time for it. Maybe some time later I will do it.

csslayer commented on 2023-12-07 05:49 (UTC)

Would you mind make this package a split package that contains keyman's library and ibus-keyman?

Fcitx5 also has keyman support https://github.com/fcitx/fcitx5-keyman/ but I don't want to pull in ibus as dependency when building fcitx5-keyman. Thanks!

Vitrum-cnkj34kr8 commented on 2023-10-28 15:29 (UTC) (edited on 2023-10-28 15:29 (UTC) by Vitrum-cnkj34kr8)

@zoidberg

Done.

zoidberg commented on 2023-10-28 14:59 (UTC)

Could you please add python-installer to the makedepends?