Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/yakuake/files/
Date: Mon, 22 Aug 2022 21:56:26
Message-Id: 1661205366.7259054dc8ec790e33f40816fb96a0875d1e4cf2.sam@gentoo
1 commit: 7259054dc8ec790e33f40816fb96a0875d1e4cf2
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 22 21:56:06 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 22 21:56:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7259054d
7
8 kde-apps/yakuake: add missing patch from ::kde
9
10 Closes: https://bugs.gentoo.org/866073
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../files/yakuake-22.07.90-without_x11.patch | 87 ++++++++++++++++++++++
14 1 file changed, 87 insertions(+)
15
16 diff --git a/kde-apps/yakuake/files/yakuake-22.07.90-without_x11.patch b/kde-apps/yakuake/files/yakuake-22.07.90-without_x11.patch
17 new file mode 100644
18 index 000000000000..2d46600e3dc2
19 --- /dev/null
20 +++ b/kde-apps/yakuake/files/yakuake-22.07.90-without_x11.patch
21 @@ -0,0 +1,87 @@
22 +From 1213c6dfd34583b005d0a2dbe7876951a13361a2 Mon Sep 17 00:00:00 2001
23 +From: Andreas Sturmlechner <asturm@g.o>
24 +Date: Sat, 27 Nov 2021 14:49:51 +0100
25 +Subject: [PATCH] Add CMake option to build WITHOUT_X11
26 +
27 +We want to be able to build without X11 support even if some of the used
28 +libraries may not work w/o X11 themselves yet or need to be built with
29 +X11 support for other reverse dependencies.
30 +
31 +HAVE_X11 already exists and is set automagically so far, but using
32 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
33 +as required in their cmake config.
34 +
35 +Introducing this option means there is no behavior change by default,
36 +cmake will just skip finding X11 or adding unwanted features if the
37 +option is enabled.
38 +
39 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
40 +---
41 + CMakeLists.txt | 30 ++++++++++++++++--------------
42 + app/CMakeLists.txt | 4 ++--
43 + 2 files changed, 18 insertions(+), 16 deletions(-)
44 +
45 +diff --git a/CMakeLists.txt b/CMakeLists.txt
46 +index eafad24..f9a8167 100644
47 +--- a/CMakeLists.txt
48 ++++ b/CMakeLists.txt
49 +@@ -51,20 +51,22 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
50 + )
51 +
52 + if(NOT APPLE)
53 +- find_package(X11)
54 +- set(HAVE_X11 ${X11_FOUND})
55 +-
56 +- if(X11_FOUND)
57 +- if (QT_MAJOR_VERSION EQUAL "5")
58 +- find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
59 +- else()
60 +- find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
61 +- endif()
62 +- endif(X11_FOUND)
63 +-
64 +- find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
65 +- set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
66 +-endif(NOT APPLE)
67 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
68 ++ if(NOT WITHOUT_X11)
69 ++ find_package(X11)
70 ++ set(HAVE_X11 ${X11_FOUND})
71 ++ if(X11_FOUND)
72 ++ if (QT_MAJOR_VERSION EQUAL "5")
73 ++ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
74 ++ else()
75 ++ find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
76 ++ endif()
77 ++ endif()
78 ++ endif()
79 ++
80 ++ find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
81 ++ set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
82 ++endif()
83 +
84 + add_subdirectory(app)
85 + add_subdirectory(data)
86 +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
87 +index b2838ec..6ada125 100644
88 +--- a/app/CMakeLists.txt
89 ++++ b/app/CMakeLists.txt
90 +@@ -63,13 +63,13 @@ target_link_libraries(yakuake
91 + KF5::WidgetsAddons
92 + KF5::WindowSystem)
93 +
94 +-if(X11_FOUND)
95 ++if(HAVE_X11)
96 + if (TARGET Qt5::X11Extras)
97 + target_link_libraries(yakuake Qt5::X11Extras)
98 + elseif (TARGET Qt6::Gui)
99 + target_link_libraries(yakuake Qt6::GuiPrivate) # qtx11extras_p.h in knotificationrestrictions
100 + endif()
101 +-endif(X11_FOUND)
102 ++endif()
103 +
104 + if(KF5Wayland_FOUND)
105 + target_link_libraries(yakuake KF5::WaylandClient)
106 +--
107 +GitLab
108 +