NAME="lcms2"
DESC="The Little Color Management System"
VERSION="2.14"
FILES=("https://github.com/mm2/Little-CMS/releases/download/lcms2.14/lcms2-$VERSION.tar.gz")
HASHES=("7f7baa3e605c961b9301135105ee9a34")
DEPENDS=()

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

  sed '/BufferSize < TagSize/,+1 s/goto Error/TagSize = BufferSize/' \
    -i src/cmsio0.c

  ./configure --prefix=/usr --disable-static
  make && make DESTDIR=${ROOTDIR} install

  cd .. && rm -rf $NAME-$VERSION
}
