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/konsole/files/, kde-apps/konsole/
Date: Sun, 31 Jul 2022 15:12:07
Message-Id: 1659280249.de56cc11b5be214fba43b3c265aba76b4c69d280.asturm@gentoo
1 commit: de56cc11b5be214fba43b3c265aba76b4c69d280
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 30 08:33:05 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 31 15:10:49 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=de56cc11
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.07.80.ebuild | 4 +-
17 kde-apps/konsole/konsole-22.08.49.9999.ebuild | 4 +-
18 3 files changed, 52 insertions(+), 2 deletions(-)
19
20 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
21 new file mode 100644
22 index 0000000000..ed396fcf20
23 --- /dev/null
24 +++ b/kde-apps/konsole/files/konsole-22.04.3-without_x11.patch
25 @@ -0,0 +1,46 @@
26 +From 0aa39e22a2bb1bbcb8a02dfd6635ffe4d8a0bbb1 Mon Sep 17 00:00:00 2001
27 +From: Andreas Sturmlechner <asturm@g.o>
28 +Date: Sat, 27 Nov 2021 14:43:18 +0100
29 +Subject: [PATCH] Add CMake option to build WITHOUT_X11
30 +
31 +We want to be able to build without X11 support even if some of the used
32 +libraries may not work w/o X11 themselves yet or need to be built with
33 +X11 support for other reverse dependencies.
34 +
35 +HAVE_X11 already exists and is set automagically so far, but using
36 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
37 +as required in their cmake config.
38 +
39 +Introducing this option means there is no behavior change by default,
40 +cmake will just skip finding X11 or adding unwanted features if the
41 +option is enabled.
42 +
43 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
44 +---
45 + CMakeLists.txt | 9 ++++++---
46 + 1 file changed, 6 insertions(+), 3 deletions(-)
47 +
48 +diff --git a/CMakeLists.txt b/CMakeLists.txt
49 +index 61ed70cd7..565682848 100644
50 +--- a/CMakeLists.txt
51 ++++ b/CMakeLists.txt
52 +@@ -103,10 +103,13 @@ set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
53 + )
54 +
55 + if(NOT APPLE)
56 +- find_package(X11)
57 +- set_package_properties(X11 PROPERTIES TYPE OPTIONAL)
58 ++ option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
59 ++ if (NOT WITHOUT_X11)
60 ++ find_package(X11)
61 ++ set_package_properties(X11 PROPERTIES TYPE OPTIONAL)
62 ++ set(HAVE_X11 ${X11_FOUND})
63 ++ endif()
64 + endif()
65 +-set(HAVE_X11 ${X11_FOUND})
66 +
67 + # Check for function GETPWUID
68 + check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID)
69 +--
70 +GitLab
71 +
72
73 diff --git a/kde-apps/konsole/konsole-22.07.80.ebuild b/kde-apps/konsole/konsole-22.07.80.ebuild
74 index a0a71ba6f8..b2ba161347 100644
75 --- a/kde-apps/konsole/konsole-22.07.80.ebuild
76 +++ b/kde-apps/konsole/konsole-22.07.80.ebuild
77 @@ -50,9 +50,11 @@ DEPEND="
78 "
79 RDEPEND="${DEPEND}"
80
81 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
82 +
83 src_configure() {
84 local mycmakeargs=(
85 - $(cmake_use_find_package X X11)
86 + -DWITHOUT_X11=$(usex !X)
87 )
88
89 ecm_src_configure
90
91 diff --git a/kde-apps/konsole/konsole-22.08.49.9999.ebuild b/kde-apps/konsole/konsole-22.08.49.9999.ebuild
92 index 059873271c..0a92af7f86 100644
93 --- a/kde-apps/konsole/konsole-22.08.49.9999.ebuild
94 +++ b/kde-apps/konsole/konsole-22.08.49.9999.ebuild
95 @@ -50,9 +50,11 @@ DEPEND="
96 "
97 RDEPEND="${DEPEND}"
98
99 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
100 +
101 src_configure() {
102 local mycmakeargs=(
103 - $(cmake_use_find_package X X11)
104 + -DWITHOUT_X11=$(usex !X)
105 )
106
107 ecm_src_configure