APP=libomxil-bellagio
VERSION=0.9.3
BUILD=1sml
HOMEPAGE="http://omxil.sourceforge.net/"
DOWNLOAD="http://sourceforge.net/projects/omxil/files/omxil/Bellagio%200.9.3/libomxil-bellagio-0.9.3.tar.gz"
DESC="opensource implementation of the OpenMAX Integration Layer API"
REQUIRES="musl"

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

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

  patch -p1 < $SRCDIR/fedora-fixes.patch
  sed -e 's/-Werror//' -i configure.ac
  autoreconf -vif

  CFLAGS="$CFLAGS -Wno-error=array-bounds" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --disable-static \
    $BUILDDIST

  make
  make install DESTDIR=$PKG 

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
72b4c8c639f8cf767ba6323fdfc42b90ad4b62f0ece3ba786ae38afc7c5d64cb0ba464b7993a588c1c7fa2daafe2ac773c9c4367a154c32632e87ba0d6341d16  libomxil-bellagio-0.9.3.tar.gz
6a763c164ed21ad9a8c0da01e02e823ed40f2539b68ef96d8052739dd433daa472c7d05f86bb06b95269a819403aa2e27670d37475ecf108f808bf9fa3ede413  fedora-fixes.patch
"
