app=aisleriot
version=3.22.9
build=1sml
homepage="https://wiki.gnome.org/Apps/Aisleriot"
download="https://gitlab.gnome.org/GNOME/aisleriot/-/archive/3.22.9/aisleriot-3.22.9.tar.bz2"
desc="Card games collection written in guile"
requires="guile gtk3 libcanberra librsvg "

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z* 
  cd $app-$version 
  fixbuilddirpermissions

  patch -p1  < $srcdir/guile3.diff

  CONFIG_SHELL=bash \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --enable-sound \
    --with-card-theme-formats=svg \
    --disable-schemas-install \
    --with-platform=gtk-only

  make
  make install DESTDIR=$pkg 

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

sha512sums="
a93779fea92542caa29117bd76c3df524924fa8a0aae0ae2b4d831c311acbaa6c061cbb98e269937b694e99c98226d58e84ce266fe34cf4261602f4bb4e7906e  aisleriot-3.22.9.tar.xz
637410e68bfaea366830d9d6e9ef3b2f03153b8406a209163c694d0a0e26b1f4bd87cfe1868c2ad25913ca73bdf75fbb1a00e001a053bfee286521c9e5d8feef  guile3.diff
"