APP=mesa-demos
VERSION=8.4.0
BUILD=1sml
HOMEPAGE="https://www.mesa3d.org/"
DOWNLOAD="https://archive.mesa3d.org//demos/mesa-demos-8.4.0.tar.bz2"
DESC="Mesa demo applications"
REQUIRES="mesa glew freeglut"

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

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

  ./configure \
    --prefix="" \
    --disable-gles1 \
    --with-system-data-files=/share/mesa-demos

  make
  make install DESTDIR=$PKG 

  install -m 0755 src/egl/opengl/{eglgears_x11,eglinfo,eglkms,egltri_x11,peglgears,xeglgears,xeglthreads} "$PKG/bin/"

  cp $SRCDIR/LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
b72d03cad36e0535ff18dcfb222ec4200064b9264f6da51a6e5f03b0dd912abe188bc1d600b6698de3ce6f63b28d2ce01565886ca8e7079edc4967fbf2fb0957  mesa-demos-8.4.0.tar.bz2
"
