#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=mjpegtools
pkgver=1.9.0
pkgrel=3gv
source=("http://sourceforge.net/projects/mjpeg/files/mjpegtools/mjpegtools-1.9.0.tar.gz" " mjpegtools-1.9.0-glibc-2.10.patch" "png2yuv-fix-memleak.patch")
docs=("readme*" "install*" "copying" "changes" "authors" "news" "todo" "hints")
url=http://sourceforge.net/projects/mjpeg/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"mjpegtools - edit, playback and compress MPEG video"
"Mjpeg tools is a suite of programs which support video capture,"
"editing, playback, and compression to MPEG of MJPEG video. Edit, play"
"and compression software is hardware independent. Capture supports"
"MJPEG hardware (Buz, Miro DC10+ etc)."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	
	sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure || exit 1
	patch -p1 < $startdir/src/mjpegtools-1.9.0-glibc-2.10.patch || exit 1
	patch -p1 < $startdir/src/png2yuv-fix-memleak.patch || exit 1

	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --disable-static --without-libquicktime --build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg
}