Portfile

# $Id: Portfile 22201 2007-02-21 18:48:37Z pipping@macports.org $

PortSystem 1.0
name ffmpeg
version 0.4.9-pre1
categories multimedia
maintainers ocheron@noos.fr
description Digital VCR and streaming server
long_description FFmpeg is a complete solution to record, convert and \
stream audio and video. It includes libavcodec, the \
leading audio/video codec library. \
\
The project is made of several components: \
\
ffmpeg is a command line tool to convert one video \
file format to another. It also supports grabbing and \
encoding in real time from a TV card. \
\
ffserver is an HTTP (RTSP is being developped) \
multimedia streaming server for live broadcasts. Time \
shifting of live broadcast is also supported. \
\
ffplay is a simple media player based on SDL and on \
the ffmpeg libraries. \
\
libavcodec is a library containing all the ffmpeg \
audio/video encoders and decoders. Most codecs were \
developped from scratch to ensure best performances \
and high code reusability. \
\
libavformat is a library containing parsers and \
generators for all common audio/video formats.
homepage http://ffmpeg.sourceforge.net/

fetch.type svn
svn.url svn://svn.mplayerhq.hu/ffmpeg/trunk
svn.tag 6399
worksrcdir trunk

platforms darwin
configure.env CFLAGS="-I${prefix}/include"
configure.args --prefix=${prefix} --disable-vhook \
--mandir=${prefix}/share/man \
--extra-cflags="-DHAVE_LRINTF" \
--extra-ldflags="-d -L${prefix}/lib" \
--enable-gpl

post-destroot {
file mkdir ${destroot}/${prefix}/share/doc/${name}
file copy ${worksrcpath}/doc/TODO ${destroot}/${prefix}/share/doc/${name}
foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
file copy $f ${destroot}/${prefix}/share/doc/${name}
}
}

# Adds MP3 support
variant lame {
depends_lib-append port:lame
configure.args-append --enable-mp3lame
}

variant libogg {
depends_lib-append port:libogg
configure.args-append --enable-libogg
}

variant vorbis {
depends_lib-append port:libvorbis
configure.args-append --enable-vorbis
}

variant theora {
depends_lib-append port:libtheora
configure.args-append --enable-theora
}

variant faac {
depends_lib-append port:faac
configure.args-append --enable-faac
}

variant faad {
depends_lib-append port:faad2
configure.args-append --enable-faad
}

variant xvid {
depends_lib-append port:XviD
configure.args-append --enable-xvid
}

variant x264 {
depends_lib-append port:x264
configure.args-append --enable-x264
}

variant a52 {
depends_lib-append port:a52dec
configure.args-append --enable-a52
}

variant dts {
depends_lib-append port:libdts
configure.args-append --enable-dts
}

files