# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gst-plugins-good
pkgver=1.16.0
pkgrel=1
pkgdesc="GStreamer open-source multimedia framework good plugins"
url="https://gstreamer.freedesktop.org/"
arch=(x86_64)
license=(LGPL)
depends=(libpulse libsoup gst-plugins-base-libs wavpack aalib taglib libdv libshout libvpx
         gdk-pixbuf2 libcaca libavc1394 libiec61883 libxdamage v4l-utils cairo libgudev speex flac
         libraw1394 lame mpg123 twolame)
makedepends=(python gtk-doc git gtk3 qt5-declarative qt5-x11extras qt5-wayland meson jack2)
checkdepends=(gst-plugins-base)
_commit=646dc1ef9b92841e235d10a8262882b6e7d97422  # tags/1.16.0^0
source=("git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git#commit=$_commit"
        "gst-common::git+https://gitlab.freedesktop.org/gstreamer/common.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git config --local submodule.common.url "$srcdir/gst-common"
  git submodule update
}

build() {
  arch-meson $pkgname build \
    -D gobject-cast-checks=disabled \
    -D glib-asserts=disabled \
    -D glib-checks=disabled \
    -D package-name="GStreamer Good Plugins (Arch Linux)" \
    -D package-origin="https://www.archlinux.org/"
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
