# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-plugins-bad
pkgver=1.12.3
pkgrel=3
pkgdesc="GStreamer bad plugins"
url="https://gstreamer.freedesktop.org/"
arch="all"
license="LGPL GPL"
depends=""
replaces="gst-plugins-bad1"
options="!check" # most fail because: XDG_RUNTIME_DIR not set in the env.
makedepends="
	alsa-lib-dev
	bluez-dev
	bzip2-dev
	curl-dev
	faac-dev
	faad2-dev
	flite-dev
	glib-dev
	glu-dev
	gsm-dev
	gst-plugins-base-dev
	gstreamer-dev
	jasper-dev
	libdc1394-dev
	libexif-dev
	libmms-dev
	libmodplug-dev
	liboil-dev
	libressl-dev
	librsvg-dev
	libvdpau-dev
	libx11-dev
	mesa-dev
	neon-dev
	orc-dev
	sdl2-dev
	spandsp-dev
	libwebp-dev
	x265-dev
	xvidcore-dev
	"
checkdepends="orc-compiler"
subpackages="$pkgname-lang $pkgname-dev $pkgname-doc"
source="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$pkgver.tar.xz"
ldpath="/usr/lib/gstreamer-.0"
builddir="$srcdir"/gst-plugins-bad-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--enable-experimental \
		--disable-fatal-warnings \
		--with-package-name="GStreamer Bad Plugins (Alpine Linux)" \
		--with-package-origin="http://alpinelinux.org/"
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

doc() {
	default_doc
	replaces="${pkgname}1-doc"
}

sha512sums="6df47381de3a2f4286d047c1e7de2c76dd4312c9806636e2012717282cde0f3e5b2d0ffa910c564c8e122b19363e842b663cce1eda7ae95a05d63d1dbbd52661  gst-plugins-bad-1.12.3.tar.xz"
