# Recipe for version 0.10 by Andreas Köhler <andi5.py@gmx.net>, on Di 28. Feb 01:25:18 CET 2012
# Recipe (MakeRecipe) for FFmpeg by Maglan C. Diemer, maglan@univates.br, on Qui Ago 25 16:03:06 BRT 20.10
compile_version=1.12.1
url="http://ffmpeg.org/releases/ffmpeg-0.10.tar.bz2"
file_size=5778962
file_md5=dc665cc599a739e3c5262ccdac13d129
recipe_type=configure

configure_options=(
    # Enabling this makes the package not redistributable
#    "--enable-nonfree"
    "--enable-gpl"
    "--enable-shared"
    "--enable-postproc"
    "--enable-swscale"
    "--enable-pthreads"
    "--enable-x11grab"
    "--disable-debug"
#    "--cpu=k8"
    "--extra-ldflags=-lm"  # compilation will fail without this
)

make_variables=(
   "MANDIR=$target/man"
)

with_libvorbis="--enable-libvorbis"
with_theora="--enable-libtheora"
with_speex="--enable-libspeex"
with_faad2="--enable-libfaad"
with_faac="--enable-libfaac"
with_x264="--enable-libx264"
with_lame="--enable-libmp3lame"
with_dirac="--enable-libdirac"
with_schroedinger="--enable-libschroedinger"
with_openjpeg="--enable-libopenjpeg"
with_xvid="--enable-libxvid"

pre_link() {
    pushd $target/include
    ln -s libpostproc postproc
    mkdir -p ffmpeg
    cd ffmpeg
    find .. -type f -exec ln -s {} . \;
    popd
}
