Source: linphone Version: 3.6.1-2.3 Severity: wishlist Tags: patch Usertags: reintroducing-ffmpeg
Dear maintainer, I am working on reintroducing FFmpeg to Debian [1-2]. In order to make FFmpeg co-installable with Libav, the libraries were renamed to lib*-ffmpeg. Thus using linker flags like '-lavcodec' doesn't work with the FFmpeg packages. To get the correct linking flags for both FFmpeg and Libav, one can (and should) use pkg-config. Attached patch achieves that for this package. Please apply it to facilitate building your package with FFmpeg in Debian. If you want to facilitate this even further, you can also add lib*-ffmpeg-dev alternatives to the Libav build-dependencies. While the FFmpeg package is still waiting in the NEW queue [3], it can already be built from the git repository [4]. Best regards, Andreas 1: https://lists.debian.org/debian-devel/2014/07/msg01010.html 2: https://bugs.debian.org/729203 3: https://ftp-master.debian.org/new/ffmpeg_7:2.3.1-1.html 4: https://anonscm.debian.org/cgit/collab-maint/ffmpeg.git
diff --git a/debian/control b/debian/control index 4d288fe..9601d3a 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9), libspeex-dev, libspeexdsp-dev, libspandsp-dev, libopus-dev, libogg-dev, libpulse-dev, libgtk2.0-dev, libglew-dev, - libglade2-dev, libtheora-dev, libvpx-dev, + libglade2-dev, libtheora-dev, libvorbis-dev, libvpx-dev, libxv-dev, libtiff-dev, libxext-dev, libatk1.0-dev, diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..3698470 --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,40 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <[email protected]> +Last-Update: <2014-05-14> + +--- linphone-3.6.1.orig/mediastreamer2/acinclude.m4 ++++ linphone-3.6.1/mediastreamer2/acinclude.m4 +@@ -111,7 +111,11 @@ AC_DEFUN([MS_CHECK_VIDEO],[ + AC_MSG_ERROR([Could not find libavcodec (from ffmpeg) headers and library. This is mandatory for video support]) + fi + +- FFMPEG_LIBS="$FFMPEG_LIBS -lavutil" ++ avc_NAME=$(subst -l,,$(FFMPEG_LIBS)) ++ ++ PKG_CHECK_MODULES([avutil], [libavutil ]) ++ ++ FFMPEG_LIBS="$FFMPEG_LIBS $avutil_LIBS" + + PKG_CHECK_MODULES(SWSCALE, [libswscale >= 0.7.0 ],swscale_found=yes , swscale_found=no) + if test x$swscale_found = xno ; then +@@ -125,7 +129,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[ + CPPFLAGS=$CPPFLAGS_save + + dnl to workaround a bug on debian and ubuntu, check if libavcodec needs -lvorbisenc to compile +- AC_CHECK_LIB(avcodec,avcodec_register_all, novorbis=yes , [ ++ AC_CHECK_LIB([$avc_NAME],avcodec_register_all, novorbis=yes , [ + LIBS="$LIBS -lvorbisenc" + ], $FFMPEG_LIBS ) + +@@ -182,7 +186,9 @@ AC_DEFUN([MS_CHECK_VIDEO],[ + AC_CHECK_HEADERS(X11/extensions/Xvlib.h,[] ,[enable_xv=false],[ + #include <X11/Xlib.h> + ]) +- AC_CHECK_LIB(Xv,XvCreateImage,[LIBS="$LIBS -lXv"],[enable_xv=false]) ++ PKG_CHECK_MODULES(XV, xv) ++ LIBS="$LIBS $XV_LIBS" ++# AC_CHECK_LIB(Xv,XvCreateImage,[LIBS="$LIBS -lXv"],[enable_xv=false]) + if test "$enable_xv" = "false" ; then + AC_MSG_ERROR([No X video output API found. Please install X11+Xv headers.]) + fi diff --git a/debian/patches/series b/debian/patches/series index 0cba5f2..205f0ac 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ libav9.patch #add-zrtp-to-ortp-dependencies.patch #kfreebsd.patch libav10.patch +pkg-config.patch

