Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kalarm/files/
Date: Tue, 23 Aug 2022 11:05:51
Message-Id: 1661252464.462eed65e8bfa0380704852d616e2d210e9c41b7.asturm@gentoo
1 commit: 462eed65e8bfa0380704852d616e2d210e9c41b7
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 23 11:01:04 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 11:01:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=462eed65
7
8 kde-apps/kalarm: Add missing patch
9
10 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
11
12 .../kalarm/files/kalarm-22.07.90-without_x11.patch | 75 ++++++++++++++++++++++
13 1 file changed, 75 insertions(+)
14
15 diff --git a/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch b/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch
16 new file mode 100644
17 index 000000000000..6dc0d4e02d0d
18 --- /dev/null
19 +++ b/kde-apps/kalarm/files/kalarm-22.07.90-without_x11.patch
20 @@ -0,0 +1,75 @@
21 +From 308aa74653acc86cd6a206599a56500c827927ef Mon Sep 17 00:00:00 2001
22 +From: Andreas Sturmlechner <asturm@g.o>
23 +Date: Sat, 27 Nov 2021 12:59:32 +0100
24 +Subject: [PATCH] Add CMake option to build WITHOUT_X11
25 +
26 +We want to be able to build without X11 support even if some of the used
27 +libraries may not work w/o X11 themselves yet or need to be built with
28 +X11 support for other reverse dependencies.
29 +
30 +KDEPIM_HAVE_X11 already exists and is set automagically so far, but using
31 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
32 +as required in their cmake config.
33 +
34 +Introducing this option means there is no behavior change by default,
35 +cmake will just skip finding X11 or adding unwanted features if the
36 +option is enabled.
37 +
38 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
39 +---
40 + CMakeLists.txt | 21 +++++++++++++--------
41 + src/CMakeLists.txt | 2 +-
42 + 2 files changed, 14 insertions(+), 9 deletions(-)
43 +
44 +diff --git a/CMakeLists.txt b/CMakeLists.txt
45 +index 05ef5181..c1849f2a 100644
46 +--- a/CMakeLists.txt
47 ++++ b/CMakeLists.txt
48 +@@ -127,18 +127,23 @@ endif()
49 + configure_file(kalarm-version-string.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kalarm-version-string.h @ONLY)
50 +
51 + if (NOT APPLE)
52 +- find_package(X11)
53 +-endif()
54 +-if (X11_FOUND)
55 +- if (QT_MAJOR_VERSION STREQUAL "5")
56 +- find_package(Qt5X11Extras ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
57 +- else()
58 +- find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui) # qtx11extras_p.h for Qt6 < 6.2
59 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
60 ++ if (NOT WITHOUT_X11)
61 ++ find_package(X11)
62 ++ set(KDEPIM_HAVE_X11 ${X11_FOUND})
63 ++ if (X11_FOUND)
64 ++ if (QT_MAJOR_VERSION STREQUAL "5")
65 ++ find_package(Qt5X11Extras ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE)
66 ++ else()
67 ++ find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui) # qtx11extras_p.h for Qt6 < 6.2
68 ++ endif()
69 ++ endif()
70 + endif()
71 ++ add_feature_info(WITHOUT_X11 ${WITHOUT_X11} "Build without X11 integration")
72 + endif()
73 ++
74 + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
75 +
76 +-set(KDEPIM_HAVE_X11 ${X11_FOUND})
77 + configure_file(src/config-kalarm.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kalarm.h)
78 +
79 + include_directories(${kalarm_SOURCE_DIR} ${kalarm_BINARY_DIR})
80 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
81 +index 6bb3e5ba..9a3fb73c 100644
82 +--- a/src/CMakeLists.txt
83 ++++ b/src/CMakeLists.txt
84 +@@ -335,7 +335,7 @@ if (ENABLE_WAKE_FROM_SUSPEND)
85 + target_link_libraries(kalarm_bin KF5::AuthCore)
86 + endif()
87 +
88 +-if(X11_FOUND)
89 ++if(KDEPIM_HAVE_X11)
90 + if (QT_MAJOR_VERSION STREQUAL "5")
91 + target_link_libraries(kalarm_bin Qt${QT_MAJOR_VERSION}::X11Extras ${X11_X11_LIB})
92 + elseif (Qt6_VERSION_MINOR LESS 2)
93 +--
94 +GitLab
95 +