app=libtheora
version=1.1.1
build=1sml
homepage="https://www.theora.org/"
download="http://downloads.xiph.org/releases/theora/libtheora-$version.tar.bz2"
desc="Theora video codec library"
requires="libogg libvorbis"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  applypatch $srcdir/libpng16.patch

  ./configure \
    --prefix="" \
    --disable-static \
    --disable-examples \
    $builddist

  make
  make install DESTDIR=$pkg

  cp COPYING LICENSE $pkgdocs/

  mkfinalpkg
}

sha512sums="
715cc8265125168eb50e28a476a63ec3292486e7e6c61884caebefcf8d074efe9fbd1fa0ff4e1ce798f4f6a72051008e93f1e5c8109f24437a9a21a38f7103ba  libtheora-1.1.1.tar.lz
5ed8c35eee6fb533fbbfc835fe62eddea18ddc956b453b1062a4d1534b6d69db2e70a03bdf3300a8b1a5832feef2c7536bfad4274e8e89769e07a8a3f635b1b5  libpng16.patch
"
