SOURCES: xdtv-ffmpeg.patch - add --with-external-ffmpeg from gentoo

glen glen at pld-linux.org
Thu Dec 14 23:51:31 CET 2006


Author: glen                         Date: Thu Dec 14 22:51:31 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add --with-external-ffmpeg from gentoo

---- Files affected:
SOURCES:
   xdtv-ffmpeg.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/xdtv-ffmpeg.patch
diff -u SOURCES/xdtv-ffmpeg.patch:1.1 SOURCES/xdtv-ffmpeg.patch:1.2
--- SOURCES/xdtv-ffmpeg.patch:1.1	Thu Dec 14 23:31:20 2006
+++ SOURCES/xdtv-ffmpeg.patch	Thu Dec 14 23:51:26 2006
@@ -1,13 +1,63 @@
-FFMPEG_VERSION is not defined in ffmpeg 20061204
-
---- xdtv-2.3.2/src/divx.c~	2006-01-21 00:05:36.000000000 +0200
-+++ xdtv-2.3.2/src/divx.c	2006-12-14 10:33:58.552860560 +0200
-@@ -1172,7 +1172,7 @@
-     {div_t A_div, B_div;
-     A_div=div(LIBAVCODEC_BUILD,65536);
-     B_div=div(A_div.rem,256); 
--    sprintf(xawmesstmp, translate("divx_init: initializing %s version %s (build %i.%i.%i)\n"), codec_name, FFMPEG_VERSION, A_div.quot, B_div.quot, B_div.rem);}
-+    sprintf(xawmesstmp, translate("divx_init: initializing %s version %s (build %i.%i.%i)\n"), codec_name, avcodec_version(), A_div.quot, B_div.quot, B_div.rem);}
- #endif
-     strcat(xawmessage,xawmesstmp);
-     switch(divx.codec) {
+--- xdtv-2.3.3/configure.in.old	2006-10-21 20:58:44.000000000 +0200
++++ xdtv-2.3.3/configure.in	2006-10-21 20:59:53.000000000 +0200
+@@ -151,6 +151,7 @@
+ AC_ARG_ENABLE(smallfont,
+   [  --enable-smallfont      enables AleVT Small Font
+   --disable-smallfont     disables AleVT Small Font (default)])
++AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
+ 
+ dnl ---------------------------------------------------------------------
+ dnl Checks for programs.
+@@ -985,15 +986,20 @@
+     LIBDL="",)
+ AC_SUBST(LIBDL)
+ 
+-dnl --------------------------------------------------
+-dnl Checks for ffmpeg inside distribution
+-if test "$enable_ffmpeg" != "no"; then
+-  AC_MSG_CHECKING(for ffmpeg inside distribution)
+-  if test -f libavcodec/allcodecs.c; then
++ dnl --------------------------------------------------
++ dnl Checks for ffmpeg inside distribution
++ if test "$enable_ffmpeg" != "no"; then
++  if test "x$with_external_ffmpeg" = "xyes"; then
++     PKG_CHECK_MODULES([FFMPEG], [libavformat libavutil libpostproc libavcodec])
+      enable_ffmpeg=yes
+   else
+-     enable_ffmpeg=no
+-  fi
++     AC_MSG_CHECKING(for ffmpeg inside distribution)
++     if test -f libavcodec/allcodecs.c; then
++        enable_ffmpeg=yes
++     else
++        enable_ffmpeg=no
++     fi
++   fi
+   AC_MSG_RESULT($enable_ffmpeg)
+   if test "$enable_ffmpeg" = "no"; then
+     AC_MSG_WARN(*** xdtv compiled WITHOUT ffmpeg many capabilities are disabled !!)
+@@ -1413,11 +1419,19 @@
+     cp -f configure.make config.mak.in
+ 
+     dnl ---------xdtv flag--------------------------------------------
+-    AC_DEFINE(HAVE_FFMPEG,1,FFMPEG is inside XdTV now!)
+-    AC_DEFINE(HAVE_FFMPEG_AC3,1,FFMPEG is inside XdTV now!)
+-    FFMPEGFOLDER="libavutil libpostproc libavcodec libavformat"
+-    FFMPEGLINK="../libavformat/libavformat.a ../libavutil/libavutil.a ../libpostproc/libpostproc.a ../libavcodec/libavcodec.a"
+-    FFMPEGINC="-I../libavutil -I../libpostproc -I../libavformat -I../libavcodec"
++    if test "x$with_external_ffmpeg" = "xyes"; then
++       AC_DEFINE(HAVE_FFMPEG,1,FFMPEG is external)
++       AC_DEFINE(HAVE_FFMPEG_AC3,1,FFMPEG is external)
++       FFMPEGFOLDER=""
++       FFMPEGINC=$FFMPEG_CFLAGS
++       FFMPEGLINK=$FFMPEG_LIBS
++    else
++       AC_DEFINE(HAVE_FFMPEG,1,FFMPEG is inside XdTV now!)
++       AC_DEFINE(HAVE_FFMPEG_AC3,1,FFMPEG is inside XdTV now!)
++       FFMPEGFOLDER="libavutil libpostproc libavcodec libavformat"
++       FFMPEGLINK="../libavformat/libavformat.a ../libavutil/libavutil.a ../libpostproc/libpostproc.a ../libavcodec/libavcodec.a"
++       FFMPEGINC="-I../libavutil -I../libpostproc -I../libavformat -I../libavcodec"
++    fi
+     AC_SUBST(FFMPEGLINK)
+     AC_SUBST(FFMPEGINC)
+     AC_SUBST(FFMPEGFOLDER)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/xdtv-ffmpeg.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list