APP=freeglut
VERSION=3.0.0
BUILD=1sml
HOMEPAGE="http://freeglut.sourceforge.net/"
DOWNLOAD="http://prdownloads.sourceforge.net/freeglut/freeglut-3.0.0.tar.gz"
DESC="Provides functionality for small OpenGL programs"
REQUIRES="glu "

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

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

  mkdir -p smbuild && cd smbuild
  cmake .. \
    -DCMAKE_C_COMPILER="$CC" \
    -DCMAKE_INSTALL_PREFIX="" \
    -DFREEGLUT_BUILD_DEMOS=ON \
    -DCMAKE_INSTALL_LIBDIR=/lib \
    -DFREEGLUT_BUILD_SHARED_LIBS=ON \
    -DFREEGLUT_BUILD_STATIC_LIBS=OFF 

  make
  make install DESTDIR=$PKG

  cp ../COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
3b999a7c4cf4050c684c4b62b0b39f040903abb56661255080f9598d3e4b3181aaa5b82eec85bbaa0b78633bb224d825614b0b9ae67f9bea3b4cd966fa83824e  freeglut-3.0.0.tar.xz
"
