gentoo-ebuilds/media-libs/chromaprint/chromaprint-1.6.0-r1.ebuild
Nicolas PARLANT 43387f0cbb
media-libs/chromaprint: restore ffmpeg, unbundle gtest
update metadata : repo is on github, rm googletest

restore ffmpeg (bug 833821) if tools is enabled
remove definition for AUDIO_PROCESSOR_LIB because libavsamplerate is no
longer checked
for FFT_LIB, use avtx instead of avfft, removed in ffmpeg-8.0

remove 3rdparty :
unbundle gtest (and set gnu++17 for that)
remove kissfft, unused and with QA_CMAKE warn

rm custom multilib_src_test, unneeded to launch the testsuite

Bug: https://bugs.gentoo.org/833821
Closes: https://bugs.gentoo.org/938521
Closes: https://bugs.gentoo.org/965538
Closes: https://bugs.gentoo.org/965539
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44757
Signed-off-by: Sam James <sam@gentoo.org>
2025-11-26 02:21:38 +00:00

53 lines
1.4 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib
DESCRIPTION="Library implementing a custom algorithm for extracting audio fingerprints"
HOMEPAGE="https://acoustid.org/chromaprint"
SRC_URI="https://github.com/acoustid/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/1"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test tools"
RESTRICT="!test? ( test )"
# - Default to fftw to avoid awkward circular dependency w/ ffmpeg
# See bug #833821 for an example
RDEPEND="
tools? ( >=media-video/ffmpeg-5:=[${MULTILIB_USEDEP}] )
!tools? ( sci-libs/fftw:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
"
DOCS=( NEWS.txt README.md )
PATCHES=(
"${FILESDIR}"/${PN}-1.6.0-unbundle_gtest.patch
)
src_prepare() {
# remove gtest (unbundled) and fftkiss (unused)
rm -r src/3rdparty || die
cmake_src_prepare
}
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_TESTS=$(usex test)
-DBUILD_TOOLS=$(multilib_native_usex tools)
-DFFT_LIB=$(usex tools 'avtx' 'fftw3')
# Automagicallyish looks for ffmpeg, but there's no point
# even doing the check unless we're building with tools
# (=> without fftw3, and with ffmpeg).
-DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=$(multilib_native_usex !tools)
)
cmake_src_configure
}