app=libjpeg-turbo
version=2.0.4
build=1sml
homepage="https://github.com/libjpeg-turbo/libjpeg-turbo"
desc="JPEG library on steroids"
requires="nasm"

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="" \
    -DCMAKE_INSTALL_LIBDIR="/lib" \
    -DENABLE_STATIC=OFF

  make
  make install DESTDIR=$pkg

  mkfinalpkg
}

sha512sums="
f2d693ccb4e4c78bf989f069679b6dda5d4261f3375c955e183952d4a3d6e4b8d80e36ec366d730b3bb9372b4210f530f43c17a3034467c0cc2e8fde9799553a  libjpeg-turbo-2.0.4.tar.lz
"
