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/kio-extras/, kde-apps/kio-extras/files/
Date: Sat, 06 Aug 2022 07:45:10
Message-Id: 1659770806.b56ec81c56cd13fca4f34fc632d275560c5c4dbe.asturm@gentoo
1 commit: b56ec81c56cd13fca4f34fc632d275560c5c4dbe
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 27 13:10:40 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=b56ec81c
7
8 kde-apps/kio-extras: Fix build with USE -X
9
10 Upstream commit b8dda4b3129f42323e1f6ccb37c16cb62a740d39
11
12 Bug: https://bugs.gentoo.org/813450
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/kio-extras-22.04.3-without_x11.patch | 62 ++++++++++++++++++++++
16 kde-apps/kio-extras/kio-extras-22.04.3.ebuild | 4 +-
17 2 files changed, 65 insertions(+), 1 deletion(-)
18
19 diff --git a/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch
20 new file mode 100644
21 index 000000000000..4c97ab5187c6
22 --- /dev/null
23 +++ b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch
24 @@ -0,0 +1,62 @@
25 +From b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Mon Sep 17 00:00:00 2001
26 +From: Andreas Sturmlechner <asturm@g.o>
27 +Date: Sat, 27 Nov 2021 14:07:32 +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 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
35 +as required in their cmake config, also X11_FOUND could be set by
36 +cascading cmake dependencies.
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 + thumbnail/CMakeLists.txt | 19 +++++++++++--------
45 + 1 file changed, 11 insertions(+), 8 deletions(-)
46 +
47 +diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt
48 +index f6f38992d..ee322a1bf 100644
49 +--- a/thumbnail/CMakeLists.txt
50 ++++ b/thumbnail/CMakeLists.txt
51 +@@ -21,13 +21,16 @@ set_package_properties(libappimage PROPERTIES
52 + PURPOSE "Provides support for AppImage thumbnails"
53 + )
54 +
55 +-find_package(X11)
56 +-set_package_properties(X11 PROPERTIES
57 +- DESCRIPTION "X11 libraries"
58 +- URL "https://www.x.org"
59 +- TYPE OPTIONAL
60 +- PURPOSE "Provides support for XCursor thumbnails"
61 +-)
62 ++option(WITHOUT_X11 "Build without support for XCursor thumbnails (disables finding X11)" OFF)
63 ++if (NOT WITHOUT_X11)
64 ++ find_package(X11)
65 ++ set_package_properties(X11 PROPERTIES
66 ++ DESCRIPTION "X11 libraries"
67 ++ URL "https://www.x.org"
68 ++ TYPE OPTIONAL
69 ++ PURPOSE "Provides support for XCursor thumbnails"
70 ++ )
71 ++endif()
72 +
73 + find_package(Taglib 1.11)
74 + set_package_properties(Taglib PROPERTIES
75 +@@ -210,7 +213,7 @@ endif()
76 +
77 + ########### next target ###############
78 +
79 +-if(X11_Xcursor_FOUND)
80 ++if(X11_Xcursor_FOUND AND NOT WITHOUT_X11)
81 +
82 + add_library(cursorthumbnail MODULE cursorcreator.cpp cursorcreatorplugin.cpp)
83 +
84 +--
85 +GitLab
86 +
87
88 diff --git a/kde-apps/kio-extras/kio-extras-22.04.3.ebuild b/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
89 index abf5c1450dcd..dd98f82228bd 100644
90 --- a/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
91 +++ b/kde-apps/kio-extras/kio-extras-22.04.3.ebuild
92 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
93 "
94 BDEPEND="man? ( dev-util/gperf )"
95
96 +PATCHES=( "${FILESDIR}/${P}-without_x11.patch" )
97 +
98 src_configure() {
99 local mycmakeargs=(
100 $(cmake_use_find_package activities KF5Activities)
101 @@ -83,7 +85,7 @@ src_configure() {
102 $(cmake_use_find_package samba Samba)
103 $(cmake_use_find_package sftp libssh)
104 $(cmake_use_find_package taglib Taglib)
105 - $(cmake_use_find_package X X11)
106 + -DWITHOUT_X11=$(usex !X)
107 )
108 use samba && mycmakeargs+=(
109 -DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff