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

# source: post BLFS 7.8 2016-01-06
TARBALL=gst-plugins-bad-$PKGVER.tar.xz
MD5SUM=7c73bec1d389f0e184ebbbbb9e9f883d
SRC_URL=http://gstreamer.freedesktop.org/src/gst-plugins-bad/$TARBALL
BUNDLE=

SLACKREQ='gstreamer2_32 gst2-plugins-base32 curl32 liborc32 libfaad2_32 libfaac32 libjasper32 \
libmodplug32 librsvg32 libsndfile32 librtmp32 libschroedinger32 libSDL32 libxvidcore32 \
libopus32 libvpx32 libass32 mjpegtools32 libvdpau32 libneon32'
SLACKDESC="gst2-plugins-bad32: gst2-plugins-bad32 $PKGVER (Gstreamer bad plugins)  
gst2-plugins-bad32:  
gst2-plugins-bad32: The GStreamer Bad Plug-ins package contains a set a set of 
gst2-plugins-bad32: plug-ins that aren'\''t up to par compared to the rest. They 
gst2-plugins-bad32: might be close to being good quality, but they'\''re missing 
gst2-plugins-bad32: something - be it a good code review, some documentation, a 
gst2-plugins-bad32: set of tests, a real live maintainer, or some actual wide 
gst2-plugins-bad32: use.  
gst2-plugins-bad32: 
gst2-plugins-bad32: This set of plugins are for gstreamer2 framework.
gst2-plugins-bad32: This contains 32-bit version of the library.
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cp $CHROOT_DIR/tmp/pkg/ladspa.h usr/include &&
	cd tmp/gst* &&
	patch -Np1 -i $CHROOT_DIR/tmp/pkg/gst-plugins-bad-1.4.3-neon-ssl.patch
}

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	export NEON_CFLAGS=$(pkg-config --cflags neon) NEON_LIBS=$(pkg-config --libs neon)
	CONFFLAGS="$CONFFLAGS --disable-static --disable-schemas-compile "
	
	cd /tmp/gst-*
	./configure $CONFFLAGS --with-package-name="GStreamer Bad Plugins $PKGVER BLFS"  \
            --with-package-origin="http://www.linuxfromscratch.org/blfs/view/svn/" \
            --host=${CLFS_TARGET32} &&
    make $MAKEFLAGS && make install &&
	
	pkg_build_slackdesc &&
	rm -f /usr/include/ladspa.h
}


