Hello community, here is the log from the commit of package chromaprint for openSUSE:Factory checked in at 2015-12-17 15:53:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chromaprint (Old) and /work/SRC/openSUSE:Factory/.chromaprint.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromaprint" Changes: -------- --- /work/SRC/openSUSE:Factory/chromaprint/chromaprint.changes 2015-12-06 07:36:31.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.chromaprint.new/chromaprint.changes 2015-12-17 15:53:38.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Dec 9 09:16:41 UTC 2015 - o...@aepfle.de + +- Use pkg-config to detect ffmpeg in cmake + chromaprint-ffmpeg-pkgconfig.patch +- Add bcond_without to use ffmpeg unconditional + +------------------------------------------------------------------- +Tue Dec 8 12:56:35 UTC 2015 - o...@aepfle.de + +- Remove broken libffmpeg requires in devel pkg + +------------------------------------------------------------------- New: ---- chromaprint-ffmpeg-pkgconfig.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chromaprint.spec ++++++ --- /var/tmp/diff_new_pack.KrsMxI/_old 2015-12-17 15:53:39.000000000 +0100 +++ /var/tmp/diff_new_pack.KrsMxI/_new 2015-12-17 15:53:39.000000000 +0100 @@ -17,6 +17,8 @@ # +%bcond_without ffmpeg + %define soname 0 Name: chromaprint Version: 1.2 @@ -27,6 +29,7 @@ Url: http://acoustid.org/chromaprint Source0: https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-%{version}.tar.gz Source1: baselibs.conf +Patch0: chromaprint-ffmpeg-pkgconfig.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: fftw3-devel @@ -34,11 +37,11 @@ BuildRequires: libtag-devel BuildRequires: pkgconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?_with_ffmpeg} +%if %{with ffmpeg} BuildRequires: boost-devel BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) -BuildRequires: pkgconfig(libswresample) %endif %description @@ -50,7 +53,7 @@ Summary: Audio Fingerprinting Library License: LGPL-2.1+ Group: System/Libraries -%if 0%{?_with_ffmpeg} +%if %{with ffmpeg} Provides: libchromaprint-with-ffmpeg = %{version} %endif @@ -66,8 +69,7 @@ Requires: fftw3-devel Requires: libchromaprint%{soname} = %{version} Requires: libtag-devel -%if 0%{?_with_ffmpeg} -Requires: libffmpeg-devel +%if %{with ffmpeg} Provides: libchromaprint-devel-with-ffmpeg = %{version} %endif @@ -76,7 +78,7 @@ library that implements a custom algorithm for extracting fingerprints from any audio source. -%if 0%{?_with_ffmpeg} +%if %{with ffmpeg} %package fpcalc Summary: Chromaprint Audio Fingerprinting Command Line Tool License: GPL-2.0+ @@ -94,6 +96,7 @@ %prep %setup -q +%patch0 -p1 %build %cmake \ @@ -104,7 +107,7 @@ -DLIB_SUFFIX="64" \ %endif %endif -%if 0%{?_with_ffmpeg} +%if %{with ffmpeg} -DWITH_AVFFT=ON \ -DBUILD_EXAMPLES=ON \ %endif @@ -130,7 +133,7 @@ %{_libdir}/libchromaprint.so %{_libdir}/pkgconfig/libchromaprint.pc -%if 0%{?_with_ffmpeg} +%if %{with ffmpeg} %files fpcalc %defattr(-,root,root) %{_bindir}/fpcalc ++++++ chromaprint-ffmpeg-pkgconfig.patch ++++++ --- cmake/modules/FindFFmpeg.cmake | 73 ++++------------------------------------- 1 file changed, 8 insertions(+), 65 deletions(-) Index: chromaprint-1.2/cmake/modules/FindFFmpeg.cmake =================================================================== --- chromaprint-1.2.orig/cmake/modules/FindFFmpeg.cmake +++ chromaprint-1.2/cmake/modules/FindFFmpeg.cmake @@ -25,50 +25,15 @@ # example: FFMPEG_FIND(AVFORMAT avformat avformat.h) MACRO(FFMPEG_FIND varname shortname headername) - FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS lib${shortname}/${headername} - PATHS - ${FFMPEG_ROOT}/include - $ENV{FFMPEG_DIR}/include - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include/ - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include - NO_DEFAULT_PATH - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG Headers" - ) - FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS lib${shortname}/${headername} - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG Headers" - ) + PKG_CHECK_MODULES(PC_${shortname} QUIET lib${shortname}) + + set(FFMPEG_${varname}_INCLUDE_DIRS ${PC_${shortname}_INCLUDE_DIRS}) + set(FFMPEG_${varname}_LIB_DIRS ${PC_${shortname}_LIBDIR}) 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" + PATHS FFMPEG_${varname}_LIB_DIRS + DOC "Location of FFMPEG ${shortname} Libraries" ) IF (FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS) @@ -77,38 +42,16 @@ MACRO(FFMPEG_FIND varname shortname head ENDMACRO(FFMPEG_FIND) -SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG") - -# find stdint.h -FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h - PATHS - ${FFMPEG_ROOT}/include - $ENV{FFMPEG_DIR}/include - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG stdint.h Header" -) +find_package(PkgConfig) FFMPEG_FIND(LIBAVFORMAT avformat avformat.h) -FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) FFMPEG_FIND(LIBAVCODEC_FFT avcodec avfft.h) FFMPEG_FIND(LIBAVUTIL avutil avutil.h) -FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. -FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) # not sure about the header to look for here. -FFMPEG_FIND(LIBAVRESAMPLE avresample avresample.h) SET(FFMPEG_FOUND "NO") # Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional. -IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_STDINT_INCLUDE_DIR) +IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND) SET(FFMPEG_FOUND "YES")