# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libomxil-bellagio
pkgver=0.9.3
pkgrel=4
pkgdesc="An opensource implementation of the OpenMAX Integration Layer API"
arch=('x86_64')
url="http://omxil.sourceforge.net"
license=('LGPL')
depends=('glibc')
source=("https://downloads.sourceforge.net/project/omxil/omxil/Bellagio%200.9.3/${pkgname}-${pkgver}.tar.gz"
        fedora-fixes.patch)
sha256sums=('593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c'
            '1683126ba747ae2f711cf352b289a26c17c56e92745a0ddbd5f066d66a9bd007')

prepare() {
  cd ${pkgname}-$pkgver

  # Fixes from fedora repo
  patch -Np1 -i ../fedora-fixes.patch
  sed -e 's/-Werror//' -i configure.ac
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}

  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

  ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/${pkgname}
  make
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
}
