# Description: Displays keys being pressed on a Wayland session
# URL: https://git.sr.ht/~sircmpwn/wshowkeys
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: libinput libxkbcommon pango wayland-protocols

name=wshowkeys
version=1.0.0
release=1
_commit=6388a49e0f431d6d5fcbd152b8ae4fa8e87884ee
source=(https://github.com/ammgws/wshowkeys/archive/$_commit/$name-$version.tar.gz
  35b6f15bd088511c28bcb3f2e36cbc4eb3621588.patch)
renames=($name-$version.tar.gz SKIP)

build() {
  patch -Np1 -d $name-$_commit -i $SRC/35b6f15bd088511c28bcb3f2e36cbc4eb3621588.patch

  meson setup $name-$_commit build \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true
  meson compile -C build
  DESTDIR=$PKG meson install -C build

  chmod a+s $PKG/usr/bin/$name
}
