# Description: Gstreamer is a library that allows the construction of graphs of media-handling components.
# URL: https://gstreamer.freedesktop.org/
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
# Depends on: glib-32 gstreamer libcap-32 libgmp-32

name=gstreamer-32
version=1.24.11
release=1
source=(https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$version.tar.xz
	x86-linux-gnu x86-linux-gnu-ccache)

build() {
	prt-get isinst ccache && local _cross_file='x86-linux-gnu-ccache' || local _cross_file='x86-linux-gnu'

	meson setup build gstreamer-$version \
		--cross-file=$SRC/$_cross_file \
		--prefix=/usr \
		--libdir=/usr/lib32 \
		--libexecdir=/usr/lib32 \
		-D buildtype=plain \
		-D nls=disabled \
		-D introspection=disabled \
		-D package-name="GStreamer (CRUX Linux)" \
		-D package-origin="https://crux.nu/"

	meson compile -C build -j ${JOBS:-1}
	DESTDIR=$PKG ninja -C build install

	rm -r $PKG/usr/{bin,include,share/man,share}
}