spf_url home  'http://ffmpeg.org/' &&
prj_u2 prj_capture pkg_version prj_sedarg1 \
  's/^\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)[0-9][0-9]$/\1-\2/' \
  "${spf_version?}" &&
spf_url watch 'http://ffmpeg.org/download.html' &&
#  "http://www.haque.net/software/ffmpeg/svn-snapshots/${pkg_version?}/" &&
#spf_url watch_add 'http://www.haque.net/software/ffmpeg/svn-snapshots/' &&
case ${spf_version?} in
  [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
    spf_url src "http://www.haque.net/software/ffmpeg/svn-snapshots/${pkg_version?}/ffmpeg-svn-snapshot-${spf_version?}.tar.bz2" &&
    spf_srcdir ffmpeg-svn;;
  *)
    spf_url src "http://ffmpeg.org/releases/ffmpeg-${spf_version?}.tar.bz2";;
esac &&
spf_depend freetype  degree optional &&
spf_depend sdl       degree optional &&
spf_depend zlib      degree optional &&
spf_depend libogg    degree optional &&
spf_depend libvorbis degree optional &&
spf_depend faad      degree optional &&
spf_depend libtheora degree optional &&
case ${spf_version?} in
  2007*|20080*) spf_depend a52dec degree optional;;
  *) :;;
esac &&
spf_cc_ cpp_args && # -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
spf_cc_ cc_args &&
spf_cc_ ld_args &&
spf_cc_ make_args &&
spf_cc_ configure_args '--enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-swscale' &&
spf_hack_self_rpath && #### report this
#spf_link + include include/ffmpeg &&
#spf_link + include include/postproc &&
spf_do_install() {
  spf_args configure --prefix="${spf_path_prefix?}" &&
  spf_args configure --extra-cflags="${spf_args_cpp?} ${spf_args_cc?}" &&
  spf_args configure --extra-ldflags="${spf_args_cc?} ${spf_args_ld?}" &&
  case ${spf_version?} in
    20070*|200710*)
      if test -d "${spf_path_conf?}"/libogg/.
        then spf_args configure --enable-libogg
        else :
      fi;;
    *) :;;
  esac &&
  if test -d "${spf_path_conf?}"/libvorbis/.
    then spf_args configure --enable-libvorbis
    else :
  fi &&
  case ${spf_version?} in
    200[78]*)
      if test -d "${spf_path_conf?}"/a52dec/. &&
         prj_match '2007*|20080*' "${spf_version?}"
        then spf_args configure --enable-liba52
        else :
      fi;;
    *) :;;
  esac &&
  if test -d "${spf_path_conf?}"/faad/.
    then spf_args configure --enable-libfaad
    else :
  fi &&
  if test -d "${spf_path_conf?}"/libtheora/.
    then spf_args configure --enable-libtheora
    else :
  fi &&
  eval "./configure ${spf_args_configure?}" &&
  eval "make ${spf_args_make?} all install"
} &&
spf_no_check &&
spf_tested_version 0.6.3 &&
spf_tested_version 0.6.1 &&
spf_tested_version 0.6 &&
spf_tested_version 0.5.1 &&
spf_tested_version 0.5 &&
#spf_tested_version 20081022 &&
spf_tested_version 20080908 &&
spf_tested_version 20080801 &&
spf_tested_version 20080623 &&
spf_tested_version 20080425 &&
spf_tested_version 20080309 &&
spf_tested_version 20080101 &&
spf_tested_version 20071210 &&
spf_tested_version 20071028 &&
spf_tested_version 20071013 &&
spf_tested_version 20070910 &&
spf_tested_version 20070810 &&
spf_tested_version 20070716 &&
spf_tested_version 20070628 &&
spf_tested_version 20070501 &&
spf_tested_version 20070428

