Source: vtk6 Version: 6.1.0+dfsg-8 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/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..52db5b2 --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,59 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2014-05-19> + +--- vtk6-6.1.0+dfsg.orig/CMake/FindFFMPEG.cmake ++++ vtk6-6.1.0+dfsg/CMake/FindFFMPEG.cmake +@@ -55,17 +55,37 @@ endif() + # uses relative includes such as <ffmpeg/avformat.h> or <libavcodec/avformat.h> + get_filename_component(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR} ABSOLUTE) + +-find_library(FFMPEG_avformat_LIBRARY avformat ++find_package(PkgConfig REQUIRED) ++ ++pkg_check_modules(FFMPEG_avf libavformat) ++string(REPLACE "-l" "" avf_name "${FFMPEG_avf_LIBRARIES}") ++ ++pkg_check_modules(FFMPEG_avc libavcodec) ++string(REPLACE "-l" "" avc_name "${FFMPEG_avc_LIBRARIES}") ++ ++pkg_check_modules(FFMPEG_avu libavutil) ++string(REPLACE "-l" "" avu_name "${FFMPEG_avu_LIBRARIES}") ++ ++pkg_check_modules(FFMPEG_sws libswscale) ++string(REPLACE "-l" "" sws_name "${FFMPEG_sws_LIBRARIES}") ++ ++find_library(FFMPEG_avformat_LIBRARY ++ NAMES ${avf_name} avformat ++ PATH + /usr/local/lib + /usr/lib + ) + +-find_library(FFMPEG_avcodec_LIBRARY avcodec ++find_library(FFMPEG_avcodec_LIBRARY ++ NAMES ${avc_name} avcodec ++ PATH + /usr/local/lib + /usr/lib + ) + +-find_library(FFMPEG_avutil_LIBRARY avutil ++find_library(FFMPEG_avutil_LIBRARY ++ NAMES ${avu_name} avutil ++ PATH + /usr/local/lib + /usr/lib + ) +@@ -100,7 +120,9 @@ find_library(FFMPEG_gsm_LIBRARY gsm + /usr/lib + ) + +-find_library(FFMPEG_swscale_LIBRARY swscale ++find_library(FFMPEG_swscale_LIBRARY ++ NAMES ${sws_name} swscale ++ PATH + /usr/local/lib + /usr/lib + ) diff --git a/debian/patches/series b/debian/patches/series index e663e65..6f801bd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,6 +10,7 @@ docs.patch fix_ftbfs_gcc49.patch use_system_xdmf.patch use_system_sqlite.patch +pkg-config.patch # Temporarly disable system_alglib # use_system_alglib.patch
-- debian-science-maintainers mailing list debian-science-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers