# $Id: Portfile,v 1.2 2006/03/24 22:52:06 takanori Exp $

PortSystem 1.0
name		mjpegtools
version		1.6.2	
revision	1
categories	multimedia
maintainers 	filippo.natali@gmail.com	
platforms	darwin
description	Set of tools to record/playback/edit videos in MPEG format	
long_description	Programs for MJPEG recording and playback and simple cut-and-paste \
			editing and MPEG compression of audio and video. 

homepage	http://mjpeg.sourceforge.net/	
master_sites	sourceforge:mjpeg	

checksums	md5 01c0120b0182de67f182ef99ad855daa

depends_build	port:libtool
depends_lib	lib:libpng:libpng lib:libjpeg:jpeg

patch.pre_args	-p1

configure.args  --mandir=${prefix}/share/man --disable-glibtest --disable-gtktest --disable-sdltest

configure.env   CPPFLAGS="-L${prefix}/lib -I${prefix}/include" \
                CFLAGS="-L${prefix}/lib" CC=gcc CXX=g++

build.args	LIBTOOL=${prefix}/bin/glibtool ASFLAGS="-f macho"

platform darwin 8 {
	patchfiles mjpegtools.patch
}

platform i386 {
	 configure.args-append	--disable-simd-accel
}

platform powerpc {
	 configure.args-append	--enable-simd-accel
}

variant gtk {
	configure.args-delete	--disable-glibtest --disable-gtktest
	depends_lib-append	lib:libgtk.1:gtk1
}

variant sdl {
	configure.args-delete	--disable-sdltest
	depends_lib-append	lib:libSDL:libsdl
}

variant libdv {
        depends_lib-append      lib:libdv:libdv
}

variant pal requires libdv {
	configure.args-append	--with-dv-yv12
}
