summaryrefslogtreecommitdiff
path: root/media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
commitdb70871b2044b9bfde346d6f4027dafb0a013c4c (patch)
tree34548aee54e5458d3754bd8c8f987acdb5ee444c /media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild
parent1c382dc5dbc52576ac2300fee0498af8af44e7b4 (diff)
gentoo auto-resync : 15:06:2023 - 13:38:09
Diffstat (limited to 'media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild')
-rw-r--r--media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild b/media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild
new file mode 100644
index 000000000000..c18875469243
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-1.5.1-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GTEST_VERSION="1.10.0"
+GTEST_DIR_VERSION="1.10.x"
+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
+ test? ( https://github.com/google/googletest/archive/v$(ver_cut 1-2 ${GTEST_VERSION}).x.tar.gz -> gtest-${GTEST_VERSION}.tar.gz )
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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}"/ffmpeg-5.patch )
+
+multilib_src_configure() {
+ export GTEST_ROOT="${WORKDIR}/googletest-${GTEST_DIR_VERSION}/googletest/"
+
+ local mycmakeargs=(
+ -DBUILD_TESTS=$(usex test)
+
+ -DBUILD_TOOLS=$(multilib_native_usex tools)
+ -DFFT_LIB=$(usex tools 'avfft' 'fftw3')
+ $(multilib_native_usex tools '-DAUDIO_PROCESSOR_LIB=swresample' '')
+ # 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
+}
+
+multilib_src_test() {
+ cd tests && (./all_tests || die "Tests failed")
+}