# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Patrick Griffis <tingping@tingping.se>

pkgname=xdg-desktop-portal-gtk
pkgver=1.15.3
pkgrel=1.1 # Holo: Drop the gtk-portal.conf that Arch adds
pkgdesc="A backend implementation for xdg-desktop-portal using GTK"
url="https://github.com/flatpak/xdg-desktop-portal-gtk"
arch=(x86_64)
license=(LGPL-2.0-or-later)
depends=(
  fontconfig
  gcc-libs
  gdk-pixbuf2
  glib2
  glibc
  gsettings-desktop-schemas
  gtk3
  xdg-desktop-portal
)
makedepends=(
  git
  glib2-devel
  meson
  python
  python-packaging
)
optdepends=("evince: Print preview")
provides=(xdg-desktop-portal-impl)
source=("git+$url#tag=$pkgver")
b2sums=('5acf381c294f59542268b888f543871e178679604ca5d22aa7b60882916ee0b274b5374d99910341aef27e2e9dfc8c1f047505bae2acd7c238ab9f0abf553a5a')

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D wallpaper=disabled
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"

  # Holo: we do not need the gtk-portals.conf that Arch adds
}

# vim:set sw=2 sts=-1 et:
