APP=libid3tag
VERSION=0.15.1b
BUILD=1sml
HOMEPAGE='https://sourceforge.net/projects/mad/files/libid3tag/'
DESC="library for reading ID3 tags"
REQUIRES="zlib"

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

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

  patch -p1 < $SRCDIR/CVE-2008-2109.patch

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --disable-static \
    $BUILDDIST

  make
  make install DESTDIR=$PKG

  cp COPY* $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
ade7ce2a43c3646b4c9fdc642095174b9d4938b078b205cd40906d525acd17e87ad76064054a961f391edcba6495441450af2f68be69f116549ca666b069e6d3  libid3tag-0.15.1b.tar.gz
fc79d44ca9d1435ab5b11d4da6b46d3684827a1384a0156cd88242225f98f3a0668c0d6e6a88159f0c4985fcbdc636777c2f100d7f371eef258a6050d6fde567  CVE-2008-2109.patch
"
