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/yakuake/, kde-apps/yakuake/files/
Date: Sat, 06 Aug 2022 07:45:11
Message-Id: 1659771104.670ad97b10d0f7fbde3f5ff14ef07f3420945da5.asturm@gentoo
1 commit: 670ad97b10d0f7fbde3f5ff14ef07f3420945da5
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 27 13:51:30 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 6 07:31:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=670ad97b
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 | 78 ++++++++++++++++++++++
16 kde-apps/yakuake/yakuake-22.04.3.ebuild | 4 +-
17 2 files changed, 81 insertions(+), 1 deletion(-)
18
19 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
20 new file mode 100644
21 index 000000000000..5daf29c35da4
22 --- /dev/null
23 +++ b/kde-apps/yakuake/files/yakuake-22.04.3-without_x11.patch
24 @@ -0,0 +1,78 @@
25 +From 68bee7bce59bed1def66518bc254ecf7ae8985c5 Mon Sep 17 00:00:00 2001
26 +From: Andreas Sturmlechner <asturm@g.o>
27 +Date: Sat, 27 Nov 2021 14:49:51 +0100
28 +Subject: [PATCH] Add CMake option to build WITHOUT_X11
29 +
30 +We want to be able to build without X11 support even if some of the used
31 +libraries may not work w/o X11 themselves yet or need to be built with
32 +X11 support for other reverse dependencies.
33 +
34 +HAVE_X11 already exists and is set automagically so far, but using
35 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
36 +as required in their cmake config.
37 +
38 +Introducing this option means there is no behavior change by default,
39 +cmake will just skip finding X11 or adding unwanted features if the
40 +option is enabled.
41 +
42 +* backported to release/22.04
43 +
44 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
45 +---
46 + CMakeLists.txt | 22 ++++++++++++----------
47 + app/CMakeLists.txt | 6 +++---
48 + 2 files changed, 15 insertions(+), 13 deletions(-)
49 +
50 +diff --git a/CMakeLists.txt b/CMakeLists.txt
51 +index 14f6842..0ec65b9 100644
52 +--- a/CMakeLists.txt
53 ++++ b/CMakeLists.txt
54 +@@ -51,16 +51,18 @@ 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 +- find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
63 +- endif(X11_FOUND)
64 +-
65 +- find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
66 +- set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
67 +-endif(NOT APPLE)
68 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
69 ++ if(NOT WITHOUT_X11)
70 ++ find_package(X11)
71 ++ set(HAVE_X11 ${X11_FOUND})
72 ++ if(X11_FOUND)
73 ++ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras)
74 ++ endif()
75 ++ endif()
76 ++
77 ++ find_package(KF5Wayland ${KF5_MIN_VERSION} CONFIG)
78 ++ set(HAVE_KWAYLAND ${KF5Wayland_FOUND})
79 ++endif()
80 +
81 + add_subdirectory(app)
82 + add_subdirectory(data)
83 +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
84 +index 69aedcd..994d36f 100644
85 +--- a/app/CMakeLists.txt
86 ++++ b/app/CMakeLists.txt
87 +@@ -63,9 +63,9 @@ target_link_libraries(yakuake
88 + KF5::WidgetsAddons
89 + KF5::WindowSystem)
90 +
91 +-if(X11_FOUND)
92 +- target_link_libraries(yakuake Qt5::X11Extras ${X11_X11_LIB})
93 +-endif(X11_FOUND)
94 ++if(HAVE_X11)
95 ++ target_link_libraries(yakuake Qt5::X11Extras)
96 ++endif()
97 +
98 + if(KF5Wayland_FOUND)
99 + target_link_libraries(yakuake KF5::WaylandClient)
100 +--
101 +2.35.1
102 +
103
104 diff --git a/kde-apps/yakuake/yakuake-22.04.3.ebuild b/kde-apps/yakuake/yakuake-22.04.3.ebuild
105 index 0db7a4d76d4b..556269d0a620 100644
106 --- a/kde-apps/yakuake/yakuake-22.04.3.ebuild
107 +++ b/kde-apps/yakuake/yakuake-22.04.3.ebuild
108 @@ -48,10 +48,12 @@ DEPEND="
109 "
110 RDEPEND="${DEPEND}"
111
112 +PATCHES=( "${FILESDIR}/${P}-without_x11.patch" )
113 +
114 src_configure() {
115 local mycmakeargs=(
116 $(cmake_use_find_package absolute-position KF5Wayland)
117 - $(cmake_use_find_package X X11)
118 + -DWITHOUT_X11=$(usex !X)
119 )
120
121 ecm_src_configure