Source: chromaprint Version: 1.1-1 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 52ddf8e..8e62bcc 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,8 @@ Build-Depends: libavresample-dev, libfftw3-dev, libgtest-dev, - python-docutils (>= 0.6) + python-docutils (>= 0.6), + pkg-config Standards-Version: 3.9.5 Section: libs Homepage: http://wiki.acoustid.org/wiki/Chromaprint diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..44f8e95 --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,48 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <[email protected]> +Last-Update: <2014-07-27> + +--- chromaprint-1.1.orig/CMakeLists.txt ++++ chromaprint-1.1/CMakeLists.txt +@@ -66,6 +66,7 @@ option(WITH_VDSP "Use vDSP for FFT calcu + set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/) + + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) ++find_package(PkgConfig) + find_package(FFmpeg) + find_package(FFTW3) + if(APPLE) +--- chromaprint-1.1.orig/cmake/modules/FindFFmpeg.cmake ++++ chromaprint-1.1/cmake/modules/FindFFmpeg.cmake +@@ -47,29 +47,7 @@ MACRO(FFMPEG_FIND varname shortname head + DOC "Location of FFMPEG Headers" + ) + +- FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES +- NAMES ${shortname} +- PATHS +- ${FFMPEG_ROOT}/lib +- $ENV{FFMPEG_DIR}/lib +- ~/Library/Frameworks +- /Library/Frameworks +- /usr/local/lib +- /usr/local/lib64 +- /usr/lib +- /usr/lib64 +- /sw/lib +- /opt/local/lib +- /opt/csw/lib +- /opt/lib +- /usr/freeware/lib64 +- NO_DEFAULT_PATH +- DOC "Location of FFMPEG Libraries" +- ) +- FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES +- NAMES ${shortname} +- DOC "Location of FFMPEG Libraries" +- ) ++ pkg_check_modules(FFMPEG_${varname} lib${shortname}) + + IF (FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS) + SET(FFMPEG_${varname}_FOUND 1) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..9937964 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +pkg-config.patch

