mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
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>
This commit is contained in:
parent
90a3c08038
commit
43387f0cbb
53
media-libs/chromaprint/chromaprint-1.6.0-r1.ebuild
Normal file
53
media-libs/chromaprint/chromaprint-1.6.0-r1.ebuild
Normal file
@ -0,0 +1,53 @@
|
||||
# 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
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
unbundle gtest
|
||||
set gnu++17 for >=gtest-1.17
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ find_package(Threads)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
|
||||
-set(CMAKE_CXX_STANDARD 14)
|
||||
+set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -1,13 +1,3 @@
|
||||
-include(GoogleTest)
|
||||
-
|
||||
-set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
|
||||
-set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||
-mark_as_advanced(BUILD_GMOCK INSTALL_GTEST GTEST_HAS_ABSL)
|
||||
-
|
||||
-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
-
|
||||
-add_subdirectory("${PROJECT_SOURCE_DIR}/src/3rdparty/googletest" "test/3rdparty/googletest")
|
||||
-
|
||||
add_executable(all_tests
|
||||
$<TARGET_OBJECTS:chromaprint_objs>
|
||||
main.cpp
|
||||
@@ -35,8 +25,10 @@ add_executable(all_tests
|
||||
../src/utils/rolling_integral_image_test.cpp
|
||||
)
|
||||
|
||||
+find_package(GTest REQUIRED)
|
||||
+include(GoogleTest)
|
||||
target_include_directories(all_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
-target_link_libraries(all_tests PRIVATE chromaprint gtest gtest_main)
|
||||
+target_link_libraries(all_tests PRIVATE chromaprint GTest::gtest_main)
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
target_sources(all_tests PRIVATE ../src/audio/ffmpeg_audio_reader_test.cpp)
|
||||
@ -9,7 +9,6 @@
|
||||
<flag name="tools">Build and install fpcalc and fpcollect tools</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="bitbucket">acoustid/chromaprint</remote-id>
|
||||
<remote-id type="github">google/googletest</remote-id>
|
||||
<remote-id type="github">acoustid/chromaprint</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user