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/kdialog/, kde-apps/kdialog/files/
Date: Wed, 24 Aug 2022 14:17:15
Message-Id: 1661350610.ab1ac64cf03474ccc6ba854478e9eb1ed3183670.asturm@gentoo
1 commit: ab1ac64cf03474ccc6ba854478e9eb1ed3183670
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 27 12:55:09 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 24 14:16:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab1ac64c
7
8 kde-apps/kdialog: Fix build with USE -X
9
10 Upstream commit 0a50669e229a965a61039e5f9f20c345d72231b5
11
12 Bug: https://bugs.gentoo.org/813450
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/kdialog-22.04.3-without_x11.patch | 44 ++++++++++++++++++++++
16 kde-apps/kdialog/kdialog-22.04.3.ebuild | 4 +-
17 kde-apps/kdialog/kdialog-22.08.0.ebuild | 4 +-
18 3 files changed, 50 insertions(+), 2 deletions(-)
19
20 diff --git a/kde-apps/kdialog/files/kdialog-22.04.3-without_x11.patch b/kde-apps/kdialog/files/kdialog-22.04.3-without_x11.patch
21 new file mode 100644
22 index 000000000000..d0b7cd2a25f7
23 --- /dev/null
24 +++ b/kde-apps/kdialog/files/kdialog-22.04.3-without_x11.patch
25 @@ -0,0 +1,44 @@
26 +From 0a50669e229a965a61039e5f9f20c345d72231b5 Mon Sep 17 00:00:00 2001
27 +From: Andreas Sturmlechner <asturm@g.o>
28 +Date: Sat, 27 Nov 2021 13:52:23 +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 | 8 ++++----
46 + 1 file changed, 4 insertions(+), 4 deletions(-)
47 +
48 +diff --git a/CMakeLists.txt b/CMakeLists.txt
49 +index 2bb478129..8449057db 100644
50 +--- a/CMakeLists.txt
51 ++++ b/CMakeLists.txt
52 +@@ -26,10 +26,10 @@ include(FeatureSummary)
53 + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS TextWidgets Notifications GuiAddons IconThemes WindowSystem KIO DBusAddons)
54 + find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS DBus)
55 +
56 +-
57 +-find_package(X11)
58 +-if(X11_FOUND)
59 +- set(HAVE_X11 1)
60 ++option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
61 ++if (NOT WITHOUT_X11)
62 ++ find_package(X11)
63 ++ set(HAVE_X11 ${X11_FOUND})
64 + endif()
65 +
66 + add_definitions(
67 +--
68 +GitLab
69 +
70
71 diff --git a/kde-apps/kdialog/kdialog-22.04.3.ebuild b/kde-apps/kdialog/kdialog-22.04.3.ebuild
72 index e2d42a868e72..2deab7e89818 100644
73 --- a/kde-apps/kdialog/kdialog-22.04.3.ebuild
74 +++ b/kde-apps/kdialog/kdialog-22.04.3.ebuild
75 @@ -34,9 +34,11 @@ DEPEND="
76 "
77 RDEPEND="${DEPEND}"
78
79 +PATCHES=( "${FILESDIR}/${P}-without_x11.patch" )
80 +
81 src_configure() {
82 local mycmakeargs=(
83 - $(cmake_use_find_package X X11)
84 + -DWITH_X11=$(usex X)
85 )
86 ecm_src_configure
87 }
88
89 diff --git a/kde-apps/kdialog/kdialog-22.08.0.ebuild b/kde-apps/kdialog/kdialog-22.08.0.ebuild
90 index ca75d0c43665..271d8693ebe1 100644
91 --- a/kde-apps/kdialog/kdialog-22.08.0.ebuild
92 +++ b/kde-apps/kdialog/kdialog-22.08.0.ebuild
93 @@ -34,9 +34,11 @@ DEPEND="
94 "
95 RDEPEND="${DEPEND}"
96
97 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
98 +
99 src_configure() {
100 local mycmakeargs=(
101 - $(cmake_use_find_package X X11)
102 + -DWITH_X11=$(usex X)
103 )
104 ecm_src_configure
105 }