[buildout]
extends =
  ../bzip2/buildout.cfg
  ../libpng/buildout.cfg
  ../patch/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../zlib/buildout.cfg

parts =
  ffmpeg

[ffmpeg]
<= ffmpeg-0.8

[libogg]
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/ogg/libogg-1.2.2.tar.gz
md5sum = 5a9fcabc9a1b7c6f1cd75ddc78f36c56
configure-options =
  --disable-static

[libvorbis]
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
md5sum = 798a4211221073c1409f26eac4567e8b
configure-options =
  --disable-static
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig

[libtheora]
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
md5sum = 292ab65cedd5021d6b7ddd117e07cd8e
patches =
  ${:_profile_base_location_}/libtheora-png_sizeof.patch#eaa1454081b50f05b59495a12f52b0d5

patch-options = -p1
configure-options =
  --disable-static
environment =
  PATH=${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig

[yasm]
recipe = slapos.recipe.cmmi
url = http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz

[libvpx]
recipe = slapos.recipe.cmmi
url = http://webm.googlecode.com/files/libvpx-v0.9.6.tar.bz2
md5sum = 383f3f07a76099682abb43f79b692b72
configure-options =
 --enable-shared
environment =
  PATH=${yasm:location}/bin:%(PATH)s

[libx264]
recipe = slapos.recipe.cmmi
url = ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20111005-2245-stable.tar.bz2
md5sum = f86260b2ea6d6cb5186937c9363891d7
configure-options =
  --enable-shared
  --enable-pic
environment =
  PATH=${yasm:location}/bin:%(PATH)s

[lame]
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/lame/lame-3.98.4.tar.gz
md5sum = 8e9866ad6b570c6c95c8cba48060473f
configure-options =
  --disable-static
  --disable-gtktest

[opencore-amr]
recipe = slapos.recipe.cmmi
url = http://prdownloads.sourceforge.net/opencore-amr/opencore-amr/opencore-amr-0.1.2.tar.gz
md5sum = 8e8b8b253eb046340ff7b6bf7a6ccd3e
configure-options =
  --disable-static

[ffmpeg-0.8]
recipe = slapos.recipe.cmmi
url = http://ffmpeg.org/releases/ffmpeg-0.8.5.tar.bz2
md5sum = 726877b19ece7ea64def8b7e6727e182
configure-options =
 --enable-gpl
 --enable-version3
 --enable-postproc
 --enable-bzlib
 --enable-libtheora
 --enable-libvorbis
 --enable-libvpx
 --enable-libx264
 --enable-libmp3lame
 --enable-libopencore-amrnb
 --enable-libopencore-amrwb
 --enable-shared
 --enable-zlib
 --disable-static
 --extra-ldflags="-Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib"
environment =
  CPPFLAGS=-I${bzip2:location}/include -I${libogg:location}/include -I${libvorbis:location}/include -I${libtheora:location}/include -I${libvpx:location}/include -I${libx264:location}/include -I${lame:location}/include -I${opencore-amr:location}/include -I${zlib:location}/include
  LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${libogg:location}/lib -Wl,-rpath=${libogg:location}/lib -L${libvorbis:location}/lib -Wl,-rpath=${libvorbis:location}/lib -L${libtheora:location}/lib -Wl,-rpath=${libtheora:location}/lib -L${libvpx:location}/lib -Wl,-rpath=${libvpx:location}/lib -L${libx264:location}/lib -Wl,-rpath=${libx264:location}/lib -L${lame:location}/lib -Wl,-rpath=${lame:location}/lib -L${opencore-amr:location}/lib -Wl,-rpath=${opencore-amr:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
  PATH=${yasm:location}/bin:%(PATH)s
