# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-session
pkgver=3.34.0+2+g9d8b0709
pkgrel=1
pkgdesc="The GNOME Session Handler"
url="https://gitlab.gnome.org/GNOME/gnome-session"
arch=(x86_64)
license=(GPL)
depends=(systemd dconf gsettings-desktop-schemas gtk3 gnome-desktop
         json-glib libgl libsm libxtst systemd)
makedepends=(mesa gtk-doc xtrans git python xmlto docbook-xsl meson)
groups=(gnome)
_commit=9d8b070982403ff8e608d4c7cce313bc2a7dce4a  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-session.git#commit=$_commit"
        neuter-debugging.diff)
sha256sums=('SKIP'
            '1970f676ff510d2c169d9252f69733412206d0d6a082e587e6a0fd6073e483a1')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  # Stopgap for https://gitlab.gnome.org/GNOME/gnome-session/issues/31
  git apply -3 ../neuter-debugging.diff
}
  
build() {
  arch-meson $pkgname build
  ninja -C build
}

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

package() {
  DESTDIR="$pkgdir" meson install -C build
}
