APP=libtiff
VERSION=4.0.10
BUILD=1sml
HOMEPAGE="http://www.simplesystems.org/libtiff/"
DOWNLOAD="https://download.osgeo.org/libtiff/tiff-4.0.10.tar.gz"
DESC="a library for reading and writing TIFF files"
REQUIRES="xz zlib libjpeg-turbo glu "

build() {
  mkandenterbuilddir
  rm -rf "tiff-$VERSION"

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

  CFLAGS="$CFLAGS -D_GNU_SOURCE" \
  ./configure \
    --prefix="" \
    --libdir="/lib" \
    --with-pic \
    --enable-shared \
    --disable-static

  make
  make install DESTDIR=$PKG

  cp COPYRIGHT $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
2ea696ac44738d32d40c05efcc033eac6cc39c289ee9dc312e9846397f28623823755aea0ef414fc6538c4b68c311c39e409b83068ffb61b61e5612bcd1970ff  tiff-4.0.10.tar.lz
"
