NAME="libtiff"
DESC="TIFF libraries and associated utilities"
VERSION="4.6.0"
FILES=("https://download.osgeo.org/libtiff/tiff-$VERSION.tar.gz")
HASHES=("fc7d49a9348b890b29f91a4ecadd5b49")
DEPENDS=("freeglut" "libjpeg-turbo")

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

  mkdir -p libtiff-build
  cd       libtiff-build

  cmake -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libtiff-$VERSION \
      -DCMAKE_INSTALL_PREFIX=/usr -G Ninja .. &&
  ninja && DESTDIR="$ROOTDIR" ninja install

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