From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4F79915808B for ; Tue, 22 Feb 2022 06:46:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52F29E0AF6; Tue, 22 Feb 2022 06:46:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3108DE0AF6 for ; Tue, 22 Feb 2022 06:46:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D1EA2342F18 for ; Tue, 22 Feb 2022 06:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F0EF5250 for ; Tue, 22 Feb 2022 06:46:31 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1645511990.23fce11f0b9f85285e880516c9f5646dfd7594c7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/chromaprint/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild X-VCS-Directories: media-libs/chromaprint/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 23fce11f0b9f85285e880516c9f5646dfd7594c7 X-VCS-Branch: master Date: Tue, 22 Feb 2022 06:46:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 248d516c-4fe5-4693-a6a8-6a264042a9d6 X-Archives-Hash: 458c0286bb28a4f26e158c2971691376 commit: 23fce11f0b9f85285e880516c9f5646dfd7594c7 Author: Sam James gentoo org> AuthorDate: Tue Feb 22 06:39:50 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Feb 22 06:39:50 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23fce11f media-libs/chromaprint: make ffmpeg support optional Unconditional dependence on ffmpeg leads to awkward circular dependencies between ffmpeg and chromaprint. Let's use fftw unless tools are requested (for which ffmpeg is actually required) to break the cycle in the common case. Bug: https://bugs.gentoo.org/625210 Closes: https://bugs.gentoo.org/833821 Signed-off-by: Sam James gentoo.org> media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild b/media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild new file mode 100644 index 000000000000..41f811d616ad --- /dev/null +++ b/media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 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 ~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:=[${MULTILIB_USEDEP}] ) + !tools? ( sci-libs/fftw:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )" + +DOCS=( NEWS.txt README.md ) + +multilib_src_configure() { + export GTEST_ROOT="${WORKDIR}/googletest-${GTEST_DIR_VERSION}/googletest/" + + local mycmakeargs=( + -DBUILD_TESTS=$(usex test) + + -DFFT_LIB=$(usex tools 'avfft' 'fftw3') + + $(usev 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=$(usex !tools) + ) + + cmake_src_configure +} + +multilib_src_test() { + cd tests && (./all_tests || die "Tests failed") +}