Commit 94f0938e authored by Sean McGovern's avatar Sean McGovern Committed by Jean-Baptiste Kempf

contrib: chromaprint: improve detection of av{codec, util}

(cherry picked from commit a519fa6a)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 38700234
--- chromaprint/src/fft_lib_avfft.h 2012-09-05 20:05:36.000000000 +0200
+++ chromaprint.new/src/fft_lib_avfft.h 2013-04-05 17:21:56.830255210 +0200
@@ -23,6 +23,7 @@
--- chromaprint/src/fft_lib_avfft.h.ORIG 2016-12-28 15:10:42.000000000 -0500
+++ chromaprint/src/fft_lib_avfft.h 2017-12-06 20:37:33.723124874 -0500
@@ -5,6 +5,7 @@
#define CHROMAPRINT_FFT_LIB_AVFFT_H_
#include <math.h>
extern "C" {
+#include <libavutil/mem.h>
#include <libavcodec/avcodec.h>
#include <libavcodec/avfft.h>
}
--- chromaprint/libchromaprint.pc.cmake.orig 2013-04-11 16:03:15.878116880 +0200
+++ chromaprint/libchromaprint.pc.cmake 2013-04-11 16:03:26.178116971 +0200
#include <libavutil/mem.h>
--- chromaprint/libchromaprint.pc.cmake.ORIG 2016-12-28 15:10:42.000000000 -0500
+++ chromaprint/libchromaprint.pc.cmake 2017-12-06 21:11:55.612701955 -0500
@@ -7,6 +7,6 @@
Description: Audio fingerprint library
URL: http://wiki.acoustid.org/wiki/Chromaprint
URL: http://acoustid.org/chromaprint
Version: ${PROJECT_VERSION}
-Libs: -L${LIB_INSTALL_DIR} -lchromaprint
+Libs: -L${LIB_INSTALL_DIR} -lchromaprint -lavcodec -lavutil
+Libs: -L${LIB_INSTALL_DIR} -lchromaprint ${CHROMAPRINT_LIBS_AVFFT}
Cflags: -I${INCLUDE_INSTALL_DIR}
--- chromaprint/CMakeLists.txt.ORIG 2016-12-28 15:10:42.000000000 -0500
+++ chromaprint/CMakeLists.txt 2017-12-06 21:59:26.164398701 -0500
@@ -96,6 +96,9 @@
check_function_exists(av_frame_alloc HAVE_AV_FRAME_ALLOC)
check_function_exists(av_frame_free HAVE_AV_FRAME_FREE)
cmake_pop_check_state()
+ find_package(PkgConfig)
+ pkg_check_modules(AVFFT REQUIRED libavcodec libavutil)
+ string(REPLACE ";" " " CHROMAPRINT_LIBS_AVFFT "${AVFFT_LDFLAGS}")
endif()
if(NOT FFT_LIB OR FFT_LIB STREQUAL "fftw3" OR FFT_LIB STREQUAL "fftw3f")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment