# $Id: Portfile,v 1.2 2005/08/11 21:33:22 rshaw Exp $
PortSystem 1.0

name		mpeg2vidcodec
version		1.2
categories	multimedia
maintainers	darwinports@opendarwin.org
description	MPEG-2 Video Encoder / Decoder
long_description	Contains an implementation of an ISO/IEC DIS \
			13818-2 codec.  It converts uncompressed video \
			frames into MPEG-1 and MPEG-2 video coded \
			bitstream sequences, and vice versa.
homepage	http://www.mpeg.org/MSSG/
master_sites	ftp://ftp.mpeg.org/pub/mpeg/mssg/
distname	mpeg2
distfiles	${name}_v12${extract.suffix}
checksums	md5 4a66565979be0818bd8a41d948943451
platforms	darwin

default_variants	+x11

variant x11	{ depends_lib	lib:libX11:XFree86
		  build.args	USE_DISP=-DDISPLAY \
			  	USE_SHMEM=-DSH_MEM \
				LIBS="-lXext -lX11" \
				INCLUDEDIR=-I${x11prefix}/include \
				LIBRARYDIR=-L${x11prefix}/lib }

use_configure	no

destroot	{ system "install -m 0755 ${worksrcpath}/src/mpeg2dec/mpeg2decode ${destroot}${prefix}/bin/"
		  system "install -m 0755 ${worksrcpath}/src/mpeg2enc/mpeg2encode ${destroot}${prefix}/bin/"
		  file mkdir ${destroot}${prefix}/share/doc/${name}
		  file copy ${worksrcpath}/README \
			  ${worksrcpath}/doc/ARCHITECTURE \
			  ${worksrcpath}/doc/BUGS \
			  ${worksrcpath}/doc/m2d_old.doc \
			  ${worksrcpath}/doc/mpeg2enc.doc \
			  ${destroot}${prefix}/share/doc/${name}/ }

test.run	yes

