APP=giflib
VERSION=5.2.1
BUILD=1sml
HOMEPAGE='http://giflib.sourceforge.net/'
DOWNLOAD='https://sourceforge.net/projects/giflib/files/giflib-5.2.1.tar.gz'
DESC="library for manipulating GIF files"
REQUIRES="musl"

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

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

  patch -p1 < $SRCDIR/giflib-5.1.9-fix-missing-quantize-API-symbols.patch

  make
  make install DESTDIR=$PKG PREFIX="/"

  cp COPYING $PKGDOCS/
  removestaticlibs

  mkfinalpkg
}

SHA512SUMS="
b87cbea325d0b13ee75ea55adc63e7ebeea7ae77af395847a38c88892a8b308fed248a57c2ec95da8cb8b3fec9efe3b2e4890006f59bb64866abe86b91ebf895  giflib-5.2.1.tar.lz
5de1e8724f5221fa3637b4e6a482f650f7608673e2c9200233290018ec8a0bf1beea049b3979b5f57dbf2b2a5fda409324e636e9af10582fd01c71d92d4de3b3  giflib-5.1.9-fix-missing-quantize-API-symbols.patch
"
