1 |
commit: c1245e6300f7a054d1ec07c3203de104492fb18d |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 20:18:49 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 21:32:54 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1245e63 |
7 |
|
8 |
kde-apps/cantor: python3_9 via patch to use CMake's Python3 module |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
kde-apps/cantor/cantor-20.08.2.ebuild | 7 ++- |
14 |
kde-apps/cantor/files/cantor-20.08.2-python.patch | 70 +++++++++++++++++++++++ |
15 |
2 files changed, 75 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/kde-apps/cantor/cantor-20.08.2.ebuild b/kde-apps/cantor/cantor-20.08.2.ebuild |
18 |
index 1185cb49e18..5ed83ea2278 100644 |
19 |
--- a/kde-apps/cantor/cantor-20.08.2.ebuild |
20 |
+++ b/kde-apps/cantor/cantor-20.08.2.ebuild |
21 |
@@ -6,7 +6,7 @@ EAPI=7 |
22 |
CMAKE_MAKEFILE_GENERATOR="emake" |
23 |
ECM_HANDBOOK="forceoptional" |
24 |
ECM_TEST="forceoptional" |
25 |
-PYTHON_COMPAT=( python3_{7,8} ) |
26 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
27 |
PVCUT=$(ver_cut 1-3) |
28 |
KFMIN=5.72.0 |
29 |
QTMIN=5.14.2 |
30 |
@@ -74,6 +74,8 @@ RDEPEND="${DEPEND} |
31 |
|
32 |
RESTRICT+=" test" |
33 |
|
34 |
+PATCHES=( "${FILESDIR}/${P}-python.patch" ) |
35 |
+ |
36 |
pkg_setup() { |
37 |
use python && python-single-r1_pkg_setup |
38 |
ecm_pkg_setup |
39 |
@@ -87,10 +89,11 @@ src_configure() { |
40 |
$(cmake_use_find_package julia Julia) |
41 |
$(cmake_use_find_package lua LuaJIT) |
42 |
-DUSE_LIBSPECTRE=$(usex postscript) |
43 |
- $(cmake_use_find_package python PythonLibs3) |
44 |
+ $(cmake_use_find_package python Python3) |
45 |
$(cmake_use_find_package qalculate Qalculate) |
46 |
$(cmake_use_find_package R R) |
47 |
) |
48 |
+ use python && mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) |
49 |
ecm_src_configure |
50 |
} |
51 |
|
52 |
|
53 |
diff --git a/kde-apps/cantor/files/cantor-20.08.2-python.patch b/kde-apps/cantor/files/cantor-20.08.2-python.patch |
54 |
new file mode 100644 |
55 |
index 00000000000..0f3c6774628 |
56 |
--- /dev/null |
57 |
+++ b/kde-apps/cantor/files/cantor-20.08.2-python.patch |
58 |
@@ -0,0 +1,70 @@ |
59 |
+From c09628ae8c08e8ef0e57b801994acd4276b65b02 Mon Sep 17 00:00:00 2001 |
60 |
+From: Andreas Sturmlechner <asturm@g.o> |
61 |
+Date: Sun, 11 Oct 2020 22:47:55 +0200 |
62 |
+Subject: [PATCH] Use CMake FindPython3 module, raises minimum CMake to 3.12 |
63 |
+ |
64 |
+--- |
65 |
+ CMakeLists.txt | 2 +- |
66 |
+ src/backends/CMakeLists.txt | 10 ++++------ |
67 |
+ src/backends/python/CMakeLists.txt | 4 ++-- |
68 |
+ 3 files changed, 7 insertions(+), 9 deletions(-) |
69 |
+ |
70 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
71 |
+index e96e6df0..a90328b5 100644 |
72 |
+--- a/CMakeLists.txt |
73 |
++++ b/CMakeLists.txt |
74 |
+@@ -1,4 +1,4 @@ |
75 |
+-cmake_minimum_required (VERSION 3.5 FATAL_ERROR) |
76 |
++cmake_minimum_required (VERSION 3.12 FATAL_ERROR) |
77 |
+ |
78 |
+ set(CMAKE_CXX_STANDARD 11) |
79 |
+ set(CMAKE_CXX_STANDARD_REQUIRED ON) |
80 |
+diff --git a/src/backends/CMakeLists.txt b/src/backends/CMakeLists.txt |
81 |
+index e99e1731..9b6b615e 100644 |
82 |
+--- a/src/backends/CMakeLists.txt |
83 |
++++ b/src/backends/CMakeLists.txt |
84 |
+@@ -50,15 +50,13 @@ if(QALCULATE_FOUND) |
85 |
+ add_subdirectory(qalculate) |
86 |
+ endif(QALCULATE_FOUND) |
87 |
+ |
88 |
+-set_package_properties(PythonLibs3 PROPERTIES DESCRIPTION "A powerful dynamic programming language." |
89 |
+- URL "https://www.python.org/" |
90 |
+- TYPE OPTIONAL |
91 |
++set_package_properties(Python3 PROPERTIES TYPE OPTIONAL |
92 |
+ PURPOSE "Backend to use Python with Cantor.") |
93 |
+ |
94 |
+-find_package(PythonLibs3) |
95 |
+-if(PYTHONLIBS3_FOUND) |
96 |
++find_package(Python3 COMPONENTS Interpreter Development) |
97 |
++if(Python3_FOUND) |
98 |
+ add_subdirectory(python) |
99 |
+-endif(PYTHONLIBS3_FOUND) |
100 |
++endif() |
101 |
+ |
102 |
+ set_package_properties(LuaJIT PROPERTIES DESCRIPTION "A lightweight, extensible programming language (luajit implementation)." |
103 |
+ URL "https://www.lua.org/" |
104 |
+diff --git a/src/backends/python/CMakeLists.txt b/src/backends/python/CMakeLists.txt |
105 |
+index 04b4c313..ccf76193 100644 |
106 |
+--- a/src/backends/python/CMakeLists.txt |
107 |
++++ b/src/backends/python/CMakeLists.txt |
108 |
+@@ -14,7 +14,7 @@ set(PythonServer_SRCS |
109 |
+ pythonserver.cpp |
110 |
+ ) |
111 |
+ |
112 |
+-include_directories(${PYTHONLIBS3_INCLUDE_DIRS}) |
113 |
++include_directories(${Python3_INCLUDE_DIRS}) |
114 |
+ |
115 |
+ qt5_add_resources(PythonBackend_RSCS python.qrc) |
116 |
+ ki18n_wrap_ui(PythonBackend_SRCS settings.ui) |
117 |
+@@ -34,7 +34,7 @@ set_target_properties(cantor_pythonserver PROPERTIES INSTALL_RPATH_USE_LINK_PATH |
118 |
+ if(MSVC) |
119 |
+ set_property(TARGET cantor_pythonserver PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") |
120 |
+ endif() |
121 |
+-target_link_libraries(cantor_pythonserver ${PYTHONLIBS3_LIBRARIES}) |
122 |
++target_link_libraries(cantor_pythonserver ${Python3_LIBRARIES}) |
123 |
+ |
124 |
+ if(BUILD_TESTING) |
125 |
+ add_executable(testpython testpython.cpp settings.cpp) |
126 |
+-- |
127 |
+2.28.0 |
128 |
+ |