name=libxkbcommon
version=1.7.0
revision=1
tarball_url="https://xkbcommon.org/download/libxkbcommon-${version}.tar.xz"
tarball_blake2b="b85cd8a78fce3c624e0c64c26a37b6d99bb8b8f3de489c6909826f53bdb6d33842f7ffcf955f6a9a8eb57cad53fc9756bd15d05aeb813b0f92985827243949a8"
imagedeps="meson ninja"
hostdeps="gcc pkg-config"
deps="core-libs libxcb libxml xkeyboard-config"

build() {
    meson_configure \
        -Dxkb-config-root="$prefix"/share/X11/xkb \
        -Denable-x11=true \
        -Denable-wayland=false

    ninja -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" ninja install

    mkdir -p "${dest_dir}${prefix}/share/X11/xkb"

    post_package_strip
}
