APP=ace
VERSION=1.4
BUILD=1sml
HOMEPAGE="https://www.delorie.com/store/ace/"
DOWNLOAD="https://www.delorie.com/store/ace/ace-1.4.tar.gz"
DESC="A set of Xorg solitaire games"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  patch -p1 < $SRCDIR/ace14_fixes.patch

  LDFLAGS="-lpng -lz -lm" \
  ./configure \
    --prefix="" \
    --disable-static \
    $BUILDDIST

  make
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkdir -p $PKG/share/applications
  cp $SRCDIR/*.desktop $PKG/share/applications/

  mkfinalpkg
}

SHA512SUMS="
3be9ac04faa48e1464f1877553ff2717829ae5aa0398dd99d044fbf4a55f5a62e4443a3fc71f9a5f7ceb7a1bd02c126098b2f2b9f70c1315e86e465d3e556bec  ace-1.4.tar.lz
16fa23cd3d30c8044ba35244f75d7d234eb7f4baaf0904ccd3412d0cd084315fb0691f0ea4da1084482bd47875a21cc423b29f83f501c93249430f89c01c6a2d  ace14_fixes.patch
"
