# Copyright 2011 Calvin Walton # Distributed under the terms of the GNU General Public License v2 require github [ user=acoustid release=v${PV} suffix=tar.gz ] cmake ffmpeg SUMMARY="A library that implements an algorithm for extracting fingerprints from any audio source" HOMEPAGE="https://acoustid.org/${PN} ${HOMEPAGE}" LICENCES="LGPL-2.1 MIT" SLOT="0" PLATFORMS="~amd64" MYOPTIONS="" DEPENDENCIES=" test: dev-cpp/gtest " CMAKE_SRC_CONFIGURE_PARAMS=( -DCMAKE_FIND_ROOT_PATH:PATH="$(ffmpeg_alternatives_prefix);/usr/$(exhost --target)" -DBUILD_SHARED_LIBS:BOOL=TRUE -DBUILD_TOOLS:BOOL=TRUE -DFFT_LIB:STRING=avfft ) CMAKE_SRC_CONFIGURE_TESTS=( '-DBUILD_TESTS:BOOL=TRUE -DBUILD_TESTS:BOOL=FALSE' ) src_prepare() { cmake_src_prepare # Patches have to be applied conditionally, since they remove compatibility with ffmpeg:4 if ! optionq ffmpeg_abis:4 ; then expatch "${FILES}"/chromaprint-ffmpeg5.1-PR-120.patch \ "${FILES}"/chromaprint-ffmpeg5.1-PR-125.patch fi }