Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/yakuake/, kde-apps/yakuake/files/
Date: Sun, 31 Jul 2022 18:04:29
Message-Id: 1659290636.8914f0f3d54236bc6696f11e457293ba4315c895.asturm@gentoo
1 commit: 8914f0f3d54236bc6696f11e457293ba4315c895
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 31 14:01:18 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 31 18:03:56 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=8914f0f3
7
8 kde-apps/yakuake: Fix build with USE -X
9
10 Upstream commit 1213c6dfd34583b005d0a2dbe7876951a13361a2
11
12 Bug: https://bugs.gentoo.org/813450
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/yakuake-22.04.3-without_x11.patch | 87 ++++++++++++++++++++++
16 kde-apps/yakuake/yakuake-22.07.80.ebuild | 4 +-
17 kde-apps/yakuake/yakuake-22.08.49.9999.ebuild | 4 +-
18 kde-apps/yakuake/yakuake-9999.ebuild | 2 +-
19 4 files changed, 94 insertions(+), 3 deletions(-)
20
21 diff --git a/kde-apps/yakuake/files/yakuake-22.04.3-without_x11.patch b/kde-apps/yakuake/files/yakuake-22.04.3-without_x11.patch
22 new file mode 100644
23 index 0000000000..2d46600e3d
24 --- /dev/null
25 +++ b/kde-apps/yakuake/files/yakuake-22.04.3-without_x11.patch
26 @@ -0,0 +1,87 @@
27 +From 1213c6dfd34583b005d0a2dbe7876951a13361a2 Mon Sep 17 00:00:00 2001
28 +From: Andreas Sturmlechner <asturm@g.o>
29 +Date: Sat, 27 Nov 2021 14:49:51 +0100
30 +Subject: [PATCH] Add CMake option to build WITHOUT_X11
31 +
32 +We want to be able to build without X11 support even if some of the used
33 +libraries may not work w/o X11 themselves yet or need to be built with
34 +X11 support for other reverse dependencies.
35 +
36 +HAVE_X11 already exists and is set automagically so far, but using
37 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
38 +as required in their cmake config.
39 +
40 +Introducing this option means there is no behavior change by default,
41 +cmake will just skip finding X11 or adding unwanted features if the
42 +option is enabled.
43 +
44 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
45 +---
46 + CMakeLists.txt | 30 ++++++++++++++++--------------
47 + app/CMakeLists.txt | 4 ++--
48 + 2 files changed, 18 insertions(+), 16 deletions(-)
49 +
50 +diff --git a/CMakeLists.txt b/CMakeLists.txt
51 +index eafad24..f9a8167 100644
52 +--- a/CMakeLists.txt
53 ++++ b/CMakeLists.txt
54 +@@ -51,20 +51,22 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
55 + )
56 +
57 + if(NOT APPLE)
58 +- find_package(X11)
59 +- set(HAVE_X11 ${X11_FOUND})
60 +-
61 +- if(X11_FOUND)
62 +- if (QT_MAJOR_VERSION EQUAL "5")
63 +- find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
64 +- else()
65 +- find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
66 +- endif()
67 +- endif(X11_FOUND)
68 +-
69 +- find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
70 +- set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
71 +-endif(NOT APPLE)
72 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
73 ++ if(NOT WITHOUT_X11)
74 ++ find_package(X11)
75 ++ set(HAVE_X11 ${X11_FOUND})
76 ++ if(X11_FOUND)
77 ++ if (QT_MAJOR_VERSION EQUAL "5")
78 ++ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
79 ++ else()
80 ++ find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
81 ++ endif()
82 ++ endif()
83 ++ endif()
84 ++
85 ++ find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
86 ++ set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
87 ++endif()
88 +
89 + add_subdirectory(app)
90 + add_subdirectory(data)
91 +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
92 +index b2838ec..6ada125 100644
93 +--- a/app/CMakeLists.txt
94 ++++ b/app/CMakeLists.txt
95 +@@ -63,13 +63,13 @@ target_link_libraries(yakuake
96 + KF5::WidgetsAddons
97 + KF5::WindowSystem)
98 +
99 +-if(X11_FOUND)
100 ++if(HAVE_X11)
101 + if (TARGET Qt5::X11Extras)
102 + target_link_libraries(yakuake Qt5::X11Extras)
103 + elseif (TARGET Qt6::Gui)
104 + target_link_libraries(yakuake Qt6::GuiPrivate) # qtx11extras_p.h in knotificationrestrictions
105 + endif()
106 +-endif(X11_FOUND)
107 ++endif()
108 +
109 + if(KF5Wayland_FOUND)
110 + target_link_libraries(yakuake KF5::WaylandClient)
111 +--
112 +GitLab
113 +
114
115 diff --git a/kde-apps/yakuake/yakuake-22.07.80.ebuild b/kde-apps/yakuake/yakuake-22.07.80.ebuild
116 index 20e43fc401..6a9e7e182e 100644
117 --- a/kde-apps/yakuake/yakuake-22.07.80.ebuild
118 +++ b/kde-apps/yakuake/yakuake-22.07.80.ebuild
119 @@ -48,10 +48,12 @@ DEPEND="
120 "
121 RDEPEND="${DEPEND}"
122
123 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
124 +
125 src_configure() {
126 local mycmakeargs=(
127 $(cmake_use_find_package absolute-position KF5Wayland)
128 - $(cmake_use_find_package X X11)
129 + -DWITHOUT_X11=$(usex !X)
130 )
131
132 ecm_src_configure
133
134 diff --git a/kde-apps/yakuake/yakuake-22.08.49.9999.ebuild b/kde-apps/yakuake/yakuake-22.08.49.9999.ebuild
135 index 208be77172..2c2169a81b 100644
136 --- a/kde-apps/yakuake/yakuake-22.08.49.9999.ebuild
137 +++ b/kde-apps/yakuake/yakuake-22.08.49.9999.ebuild
138 @@ -48,10 +48,12 @@ DEPEND="
139 "
140 RDEPEND="${DEPEND}"
141
142 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
143 +
144 src_configure() {
145 local mycmakeargs=(
146 $(cmake_use_find_package absolute-position KF5Wayland)
147 - $(cmake_use_find_package X X11)
148 + -DWITHOUT_X11=$(usex !X)
149 )
150
151 ecm_src_configure
152
153 diff --git a/kde-apps/yakuake/yakuake-9999.ebuild b/kde-apps/yakuake/yakuake-9999.ebuild
154 index 208be77172..cc3cc8a1b2 100644
155 --- a/kde-apps/yakuake/yakuake-9999.ebuild
156 +++ b/kde-apps/yakuake/yakuake-9999.ebuild
157 @@ -51,7 +51,7 @@ RDEPEND="${DEPEND}"
158 src_configure() {
159 local mycmakeargs=(
160 $(cmake_use_find_package absolute-position KF5Wayland)
161 - $(cmake_use_find_package X X11)
162 + -DWITHOUT_X11=$(usex !X)
163 )
164
165 ecm_src_configure