# Maintainer: PktSurf <smlinux@pktsurf.in>
app=glew
version=2.1.0
build=1sml
homepage="https://github.com/nigels-com/glew"
download="https://github.com/nigels-com/glew/archive/refs/tags/glew-$version.tar.gz"
desc="The OpenGL Extension Wrangler Library"
requires="mesa"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  # Remove the DOS linefeeds from config.guess
  TEMPFILE=$(mktemp)
  fromdos < config/config.guess ; rm -f $TEMPFILE

  make install.all GLEW_DEST="$pkg" LIBDIR="$pkg"/lib

  cp LICENSE.txt $pkgdocs/

  mkfinalpkg
}

sha512sums="
6259f4fe42ffecfa77ddca30f61f3bd009d94bb57634db32b494dafcf4f5f6129fae46ed3325b0cd0d7c6ed53a6ac2be53de2ab54c79525e0a5f98288cd89d12  glew-2.1.0.tar.lz
"
