1 |
commit: ab14f16dc381de27c34747e413237bd7d6d79994 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 22:52:46 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 22:57:46 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab14f16d |
7 |
|
8 |
media-sound/kid3: Use CMake 3.12's Python3 module to inject PYTHON |
9 |
|
10 |
Bug: https://bugs.gentoo.org/768084 |
11 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../kid3/files/kid3-3.8.5-tests-optional.patch | 37 +++++++++++++++++++++- |
15 |
media-sound/kid3/kid3-3.8.5.ebuild | 1 + |
16 |
2 files changed, 37 insertions(+), 1 deletion(-) |
17 |
|
18 |
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 |
19 |
index 4db47a2f1af..d5b74ca5613 100644 |
20 |
--- a/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch |
21 |
+++ b/media-sound/kid3/files/kid3-3.8.5-tests-optional.patch |
22 |
@@ -1,7 +1,7 @@ |
23 |
From 4efe62089eff54ac844c70382d432f2abb24c06e Mon Sep 17 00:00:00 2001 |
24 |
From: Andreas Sturmlechner <asturm@g.o> |
25 |
Date: Sun, 31 Jan 2021 20:38:41 +0100 |
26 |
-Subject: [PATCH] Use include(CTest) and BUILD_TESTING to make Qt5Test and |
27 |
+Subject: [PATCH 1/2] Use include(CTest) and BUILD_TESTING to make Qt5Test and |
28 |
Python optional |
29 |
|
30 |
Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
31 |
@@ -62,3 +62,38 @@ index 92d50265..557a208d 100644 |
32 |
-- |
33 |
2.30.0 |
34 |
|
35 |
+ |
36 |
+From 1e264e918686d5d09a5457513f3aadeea25d6e5e Mon Sep 17 00:00:00 2001 |
37 |
+From: Andreas Sturmlechner <asturm@g.o> |
38 |
+Date: Sun, 31 Jan 2021 23:43:49 +0100 |
39 |
+Subject: [PATCH 2/2] Use CMake FindPython3 module if available (CMake >=3.12) |
40 |
+ |
41 |
+Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
42 |
+--- |
43 |
+ CMakeLists.txt | 10 ++++++++-- |
44 |
+ 1 file changed, 8 insertions(+), 2 deletions(-) |
45 |
+ |
46 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
47 |
+index 557a208d..706167e6 100644 |
48 |
+--- a/CMakeLists.txt |
49 |
++++ b/CMakeLists.txt |
50 |
+@@ -213,8 +213,14 @@ set(CFG_QMLSRCDIR "${kid3_SOURCE_DIR}/src/qml") |
51 |
+ find_package(Threads) |
52 |
+ include(CTest) |
53 |
+ if(BUILD_TESTING) |
54 |
+- set(Python_ADDITIONAL_VERSIONS 3) |
55 |
+- find_package(PythonInterp REQUIRED) |
56 |
++ if(CMAKE_VERSION VERSION_LESS 3.12.0) |
57 |
++ set(Python_ADDITIONAL_VERSIONS 3) |
58 |
++ find_package(PythonInterp REQUIRED) |
59 |
++ # PythonInterp sets PYTHON_EXECUTABLE |
60 |
++ else() |
61 |
++ find_package(Python3 COMPONENTS Interpreter REQUIRED) |
62 |
++ set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") |
63 |
++ endif() |
64 |
+ endif() |
65 |
+ include (CheckCXXSourceCompiles) |
66 |
+ include (CheckCXXCompilerFlag) |
67 |
+-- |
68 |
+2.30.0 |
69 |
+ |
70 |
|
71 |
diff --git a/media-sound/kid3/kid3-3.8.5.ebuild b/media-sound/kid3/kid3-3.8.5.ebuild |
72 |
index 40385027d97..734a8c02465 100644 |
73 |
--- a/media-sound/kid3/kid3-3.8.5.ebuild |
74 |
+++ b/media-sound/kid3/kid3-3.8.5.ebuild |
75 |
@@ -91,6 +91,7 @@ src_configure() { |
76 |
-DBUILD_TESTING=$(usex test) |
77 |
-DWITH_VORBIS=$(usex vorbis) |
78 |
) |
79 |
+ use test && mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) |
80 |
|
81 |
if use kde ; then |
82 |
mycmakeargs+=( "-DWITH_APPS=KDE;CLI" ) |