# Description: Screenshot utility for Wayland
# URL: https://wayland.emersion.fr/grim/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: pango wayland-protocols
# Optional: libjpeg-turbo scdoc

name=grim
version=1.4.1
release=1
source=(https://git.sr.ht/~emersion/grim/archive/v$version.tar.gz)
renames=($name-$version.tar.gz)

build() {
  prt-get isinst bash-completion && PKGMK_GRIM+=' -D bash-completions=true'

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