# Recipe for version 0.7.5 by Leandro Motta Barros <lmb@stackedboxes.org>, on Thu Sep 22 18:41:13 BRT 2011
# Recipe (MakeRecipe) for FFmpeg by Maglan C. Diemer, maglan@univates.br, on Qui Ago 25 16:03:06 BRT 20.7.5
compile_version=1.12.1
url="http://www.ffmpeg.org/releases/ffmpeg-0.7.5.tar.bz2"
file_size=4526277
file_md5=4e85037d1a94ff8cbcf5a0a133181a48
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
}
