app=mesa-demos
version=8.4.0
build=1sml
homepage="https://www.mesa3d.org/"
download="https://archive.mesa3d.org//demos/mesa-demos-$version.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
"
