# Contributor: Rasmus Thomsen <oss@cogitri.dev>
maintainer="Krassy Boykinov <kboykinov@teamcentrixx.com>"
pkgname=gst-editing-services
pkgver=1.24.11
pkgrel=0
pkgdesc="GStreamer Editing Services Library"
url="https://gstreamer.freedesktop.org"
# s390x blocked by 7 failing tests
arch="all !s390x"
license="LGPL-2.0-or-later"
makedepends="
	flex
	glib-dev
	gobject-introspection-dev
	gst-plugins-bad-dev
	gst-plugins-base-dev
	gst-plugins-good
	gstreamer-dev
	gtk-doc
	libxml2-dev
	meson
	py3-gobject3-dev
	python3
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-$pkgver.tar.xz"
options="!check" # https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/125

build() {
	CFLAGS="$CFLAGS -O2" \
	CXXFLAGS="$CXXFLAGS -O2" \
	CPPFLAGS="$CPPFLAGS -O2" \
	abuild-meson \
		-Db_lto=true \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
04535b53aa6120d944ad10beec717fc10a5241d62d3277922750a6523dc0f2e939b2eb4e87b8d7bed615c1920b9cc97e1a40bc25b5b5b7427251541904e4eaa8  gst-editing-services-1.24.11.tar.xz
"
