summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/kid3/files/kid3-3.8.5-tests-optional.patch37
-rw-r--r--media-sound/kid3/kid3-3.8.5.ebuild1
2 files changed, 37 insertions, 1 deletions
diff --git a/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch b/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch
index 4db47a2f1aff..d5b74ca56137 100644
--- a/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch
+++ b/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch
@@ -1,7 +1,7 @@
From 4efe62089eff54ac844c70382d432f2abb24c06e Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Sun, 31 Jan 2021 20:38:41 +0100
-Subject: [PATCH] Use include(CTest) and BUILD_TESTING to make Qt5Test and
+Subject: [PATCH 1/2] Use include(CTest) and BUILD_TESTING to make Qt5Test and
Python optional
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
@@ -62,3 +62,38 @@ index 92d50265..557a208d 100644
--
2.30.0
+
+From 1e264e918686d5d09a5457513f3aadeea25d6e5e Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 31 Jan 2021 23:43:49 +0100
+Subject: [PATCH 2/2] Use CMake FindPython3 module if available (CMake >=3.12)
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 557a208d..706167e6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -213,8 +213,14 @@ set(CFG_QMLSRCDIR "${kid3_SOURCE_DIR}/src/qml")
+ find_package(Threads)
+ include(CTest)
+ if(BUILD_TESTING)
+- set(Python_ADDITIONAL_VERSIONS 3)
+- find_package(PythonInterp REQUIRED)
++ if(CMAKE_VERSION VERSION_LESS 3.12.0)
++ set(Python_ADDITIONAL_VERSIONS 3)
++ find_package(PythonInterp REQUIRED)
++ # PythonInterp sets PYTHON_EXECUTABLE
++ else()
++ find_package(Python3 COMPONENTS Interpreter REQUIRED)
++ set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
++ endif()
+ endif()
+ include (CheckCXXSourceCompiles)
+ include (CheckCXXCompilerFlag)
+--
+2.30.0
+
diff --git a/media-sound/kid3/kid3-3.8.5.ebuild b/media-sound/kid3/kid3-3.8.5.ebuild
index 40385027d97a..734a8c024651 100644
--- a/media-sound/kid3/kid3-3.8.5.ebuild
+++ b/media-sound/kid3/kid3-3.8.5.ebuild
@@ -91,6 +91,7 @@ src_configure() {
-DBUILD_TESTING=$(usex test)
-DWITH_VORBIS=$(usex vorbis)
)
+ use test && mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
if use kde ; then
mycmakeargs+=( "-DWITH_APPS=KDE;CLI" )