# Description: rofi like application launcher written for wayland
# URL: https://hg.sr.ht/~scoopta/wofi
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: gtk3 libxkbcommon wayland-protocols

name=wofi
version=1.3
release=1
source=(https://hg.sr.ht/~scoopta/wofi/archive/v$version.tar.gz)
renames=($name-$version.tar.gz)

build() {
  ls /usr/include/gtk-3.0/gdk/gdkwayland.h || (printf '\e[1;31m%-6s\e[m\n' "gtk3 is missing wayland libraries, rebuild mesa, then gtk3 to install $name" ; exit 1)

  meson setup $name-v$version 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
}
