APP=jasper
VERSION=2.0.16
BUILD=1sml
HOMEPAGE="http://www.ece.uvic.ca/~mdadams/jasper/"
DOWNLOAD="https://github.com/jasper-software/jasper/archive/refs/tags/version-2.0.16.tar.gz"
REQUIRES="cmake libjpeg-turbo libxmu glew freeglut"
DESC="free implementation of the JPEG-2000 standard"

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

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

  mkdir -p smbuild && cd smbuild
  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DLATEX_FOUND=NO

  make
  make install DESTDIR=$PKG 

  cp ../LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
309ee468bb5fdf6ad26e60a8990c94726ee1c9cf2d744d7496026de2460d68a6dcbfb551c02c3cdcaddcbd2ff85e804b29fa9c2df75a6e4c7a215f96b3fd80db  jasper-2.0.16.tar.lz
"
