### this file is sourced not run
PKGVER=1.22.4
PKGBUILD=1
PKGARCH=i686

# source: BLFS 11.3 updated to SVN r890
TARBALL=gst-plugins-base-$PKGVER.tar.xz
MD5SUM=7d495970b0b7078c50d064d228b8d93f
SRC_URL=http://gstreamer.freedesktop.org/src/gst-plugins-base/$TARBALL
BUNDLE=

SLACKREQ='gstreamer2_32 pango32 alsa-lib32 libogg32 libtheora32 libvorbis32'
SLACKDESC="gst2-plugins-base32: gst2-plugins-base32 $PKGVER (Basic Gstreamer plugins)  
gst2-plugins-base32:  
gst2-plugins-base32: The GStreamer Base Plug-ins is a well-groomed and 
gst2-plugins-base32: well-maintained collection of GStreamer plug-ins and 
gst2-plugins-base32: elements, spanning the range of possible types of elements 
gst2-plugins-base32: one would want to write for GStreamer. It also contains 
gst2-plugins-base32: helper libraries and base classes useful for writing 
gst2-plugins-base32: elements. A wide range of video and audio decoders, 
gst2-plugins-base32: encoders, and filters are included.  
gst2-plugins-base32: This set of plugins are for gstreamer2 framework.
gst2-plugins-base32: This contains 32-bit version of the libraries.
"

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
	mkdir -p usr/share &&
	if [ -d tmp/gir ]; then
		mv -v tmp/*-32 usr/bin
		mv -v tmp/gir usr/share/gir-1.0-$USE_ARCH
	fi
}

### build
pkg_build() {
	cd /tmp/gst*

	mkdir build &&
	cd build &&
	meson setup $MESONFLAGS \
		-Dpackage-origin=https://www.linuxfromscratch.org/blfs/view/11.3/ \
		-Dpackage-name="GStreamer $PKGVER BLFS" \
		--wrap-mode=nodownload           \
		-Dintrospection=disabled         \
		--libexec=/usr/$LIBDIR/gstreamer \
	.. &&
	ninja $NINJAFLAGS &&
	ninja $NINJAINSTALLFLAGS install &&

	pkg_build_slackdesc &&

	# multilib
	if [ -d /usr/share/gir-1.0-32 ]; then
		mkdir -p /tmp/gir && mv -v /usr/share/gir-1.0/* /tmp/gir
	fi
}


