1 |
commit: 7ec978e7f9bb50d0353c0bdacc8d278339f51805 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 27 13:45:49 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 6 07:26:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ec978e7 |
7 |
|
8 |
kde-apps/konsole: Fix build with USE -X |
9 |
|
10 |
Upstream commit 0aa39e22a2bb1bbcb8a02dfd6635ffe4d8a0bbb1 |
11 |
|
12 |
Bug: https://bugs.gentoo.org/813450 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
.../files/konsole-22.04.3-without_x11.patch | 46 ++++++++++++++++++++++ |
16 |
kde-apps/konsole/konsole-22.04.3.ebuild | 5 ++- |
17 |
2 files changed, 49 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/kde-apps/konsole/files/konsole-22.04.3-without_x11.patch b/kde-apps/konsole/files/konsole-22.04.3-without_x11.patch |
20 |
new file mode 100644 |
21 |
index 000000000000..ed396fcf20ab |
22 |
--- /dev/null |
23 |
+++ b/kde-apps/konsole/files/konsole-22.04.3-without_x11.patch |
24 |
@@ -0,0 +1,46 @@ |
25 |
+From 0aa39e22a2bb1bbcb8a02dfd6635ffe4d8a0bbb1 Mon Sep 17 00:00:00 2001 |
26 |
+From: Andreas Sturmlechner <asturm@g.o> |
27 |
+Date: Sat, 27 Nov 2021 14:43:18 +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 |
+Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
43 |
+--- |
44 |
+ CMakeLists.txt | 9 ++++++--- |
45 |
+ 1 file changed, 6 insertions(+), 3 deletions(-) |
46 |
+ |
47 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
48 |
+index 61ed70cd7..565682848 100644 |
49 |
+--- a/CMakeLists.txt |
50 |
++++ b/CMakeLists.txt |
51 |
+@@ -103,10 +103,13 @@ set_package_properties(KF5DocTools PROPERTIES DESCRIPTION |
52 |
+ ) |
53 |
+ |
54 |
+ if(NOT APPLE) |
55 |
+- find_package(X11) |
56 |
+- set_package_properties(X11 PROPERTIES TYPE OPTIONAL) |
57 |
++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF) |
58 |
++ if (NOT WITHOUT_X11) |
59 |
++ find_package(X11) |
60 |
++ set_package_properties(X11 PROPERTIES TYPE OPTIONAL) |
61 |
++ set(HAVE_X11 ${X11_FOUND}) |
62 |
++ endif() |
63 |
+ endif() |
64 |
+-set(HAVE_X11 ${X11_FOUND}) |
65 |
+ |
66 |
+ # Check for function GETPWUID |
67 |
+ check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID) |
68 |
+-- |
69 |
+GitLab |
70 |
+ |
71 |
|
72 |
diff --git a/kde-apps/konsole/konsole-22.04.3.ebuild b/kde-apps/konsole/konsole-22.04.3.ebuild |
73 |
index cce03a53b3c6..d02a5534dca2 100644 |
74 |
--- a/kde-apps/konsole/konsole-22.04.3.ebuild |
75 |
+++ b/kde-apps/konsole/konsole-22.04.3.ebuild |
76 |
@@ -50,11 +50,12 @@ DEPEND=" |
77 |
" |
78 |
RDEPEND="${DEPEND}" |
79 |
|
80 |
+PATCHES=( "${FILESDIR}/${P}-without_x11.patch" ) |
81 |
+ |
82 |
src_configure() { |
83 |
local mycmakeargs=( |
84 |
- $(cmake_use_find_package X X11) |
85 |
+ -DWITHOUT_X11=$(usex !X) |
86 |
) |
87 |
- |
88 |
ecm_src_configure |
89 |
} |