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/kio-extras/files/, kde-apps/kio-extras/
Date: Sun, 31 Jul 2022 15:12:07
Message-Id: 1659280153.f4ca7e64ce2ed768bb1ff43d6a0ae9f2a7f8d330.asturm@gentoo
1 commit: f4ca7e64ce2ed768bb1ff43d6a0ae9f2a7f8d330
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 28 19:23:36 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 31 15:09:13 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=f4ca7e64
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.07.80.ebuild | 4 +-
17 .../kio-extras/kio-extras-22.08.49.9999.ebuild | 4 +-
18 3 files changed, 68 insertions(+), 2 deletions(-)
19
20 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
21 new file mode 100644
22 index 0000000000..4c97ab5187
23 --- /dev/null
24 +++ b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch
25 @@ -0,0 +1,62 @@
26 +From b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Mon Sep 17 00:00:00 2001
27 +From: Andreas Sturmlechner <asturm@g.o>
28 +Date: Sat, 27 Nov 2021 14:07:32 +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 +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11
36 +as required in their cmake config, also X11_FOUND could be set by
37 +cascading cmake dependencies.
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 + thumbnail/CMakeLists.txt | 19 +++++++++++--------
46 + 1 file changed, 11 insertions(+), 8 deletions(-)
47 +
48 +diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt
49 +index f6f38992d..ee322a1bf 100644
50 +--- a/thumbnail/CMakeLists.txt
51 ++++ b/thumbnail/CMakeLists.txt
52 +@@ -21,13 +21,16 @@ set_package_properties(libappimage PROPERTIES
53 + PURPOSE "Provides support for AppImage thumbnails"
54 + )
55 +
56 +-find_package(X11)
57 +-set_package_properties(X11 PROPERTIES
58 +- DESCRIPTION "X11 libraries"
59 +- URL "https://www.x.org"
60 +- TYPE OPTIONAL
61 +- PURPOSE "Provides support for XCursor thumbnails"
62 +-)
63 ++option(WITHOUT_X11 "Build without support for XCursor thumbnails (disables finding X11)" OFF)
64 ++if (NOT WITHOUT_X11)
65 ++ find_package(X11)
66 ++ set_package_properties(X11 PROPERTIES
67 ++ DESCRIPTION "X11 libraries"
68 ++ URL "https://www.x.org"
69 ++ TYPE OPTIONAL
70 ++ PURPOSE "Provides support for XCursor thumbnails"
71 ++ )
72 ++endif()
73 +
74 + find_package(Taglib 1.11)
75 + set_package_properties(Taglib PROPERTIES
76 +@@ -210,7 +213,7 @@ endif()
77 +
78 + ########### next target ###############
79 +
80 +-if(X11_Xcursor_FOUND)
81 ++if(X11_Xcursor_FOUND AND NOT WITHOUT_X11)
82 +
83 + add_library(cursorthumbnail MODULE cursorcreator.cpp cursorcreatorplugin.cpp)
84 +
85 +--
86 +GitLab
87 +
88
89 diff --git a/kde-apps/kio-extras/kio-extras-22.07.80.ebuild b/kde-apps/kio-extras/kio-extras-22.07.80.ebuild
90 index e6f3cbd701..5b21318900 100644
91 --- a/kde-apps/kio-extras/kio-extras-22.07.80.ebuild
92 +++ b/kde-apps/kio-extras/kio-extras-22.07.80.ebuild
93 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
94 "
95 BDEPEND="man? ( dev-util/gperf )"
96
97 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
98 +
99 src_configure() {
100 local mycmakeargs=(
101 $(cmake_use_find_package activities KF5Activities)
102 @@ -83,7 +85,7 @@ src_configure() {
103 $(cmake_use_find_package samba Samba)
104 $(cmake_use_find_package sftp libssh)
105 $(cmake_use_find_package taglib Taglib)
106 - $(cmake_use_find_package X X11)
107 + -DWITHOUT_X11=$(usex !X)
108 )
109 use samba && mycmakeargs+=(
110 -DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff
111
112 diff --git a/kde-apps/kio-extras/kio-extras-22.08.49.9999.ebuild b/kde-apps/kio-extras/kio-extras-22.08.49.9999.ebuild
113 index dbdf736e08..fd4e30eb56 100644
114 --- a/kde-apps/kio-extras/kio-extras-22.08.49.9999.ebuild
115 +++ b/kde-apps/kio-extras/kio-extras-22.08.49.9999.ebuild
116 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
117 "
118 BDEPEND="man? ( dev-util/gperf )"
119
120 +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" )
121 +
122 src_configure() {
123 local mycmakeargs=(
124 $(cmake_use_find_package activities KF5Activities)
125 @@ -83,7 +85,7 @@ src_configure() {
126 $(cmake_use_find_package samba Samba)
127 $(cmake_use_find_package sftp libssh)
128 $(cmake_use_find_package taglib Taglib)
129 - $(cmake_use_find_package X X11)
130 + -DWITHOUT_X11=$(usex !X)
131 )
132 use samba && mycmakeargs+=(
133 -DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff