NAME="freeglut"
DESC="100% compatible, completely opensourced clone of the GLUT library"
VERSION="3.4.0"
FILES=("https://downloads.sourceforge.net/freeglut/freeglut-$VERSION.tar.gz")
HASHES=("f1621464e6525d0368976870cab8f418")
DEPENDS=("glu")

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  mkdir build
  cd    build

  cmake -DCMAKE_INSTALL_PREFIX=/usr     \
      -DCMAKE_BUILD_TYPE=Release        \
      -DFREEGLUT_BUILD_DEMOS=OFF        \
      -DFREEGLUT_BUILD_STATIC_LIBS=OFF  \
      -Wno-dev ..
  make && make DESTDIR="$ROOTDIR" install

  cd ../.. && rm -rf $NAME-$VERSION
}
