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/konqueror/files/, kde-apps/konqueror/
Date: Sat, 06 Aug 2022 07:45:11
Message-Id: 1659771847.d4bedf3b05b25d89a0bf4b6293ac87eeb296ce38.asturm@gentoo
1 commit: d4bedf3b05b25d89a0bf4b6293ac87eeb296ce38
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 27 13:39:13 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 6 07:44:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4bedf3b
7
8 kde-apps/konqueror: Fix build with USE -X
9
10 Upstream commit ff0e19961f8345faea54e4f85057312b7ad7007d
11
12 Bug: https://bugs.gentoo.org/813450
13 Package-Manager: Portage-3.0.28, Repoman-3.0.3
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../files/konqueror-22.04.3-with_x11.patch | 83 ++++++++++++++++++++++
17 kde-apps/konqueror/konqueror-22.04.3.ebuild | 4 +-
18 2 files changed, 86 insertions(+), 1 deletion(-)
19
20 diff --git a/kde-apps/konqueror/files/konqueror-22.04.3-with_x11.patch b/kde-apps/konqueror/files/konqueror-22.04.3-with_x11.patch
21 new file mode 100644
22 index 000000000000..90273b072f0e
23 --- /dev/null
24 +++ b/kde-apps/konqueror/files/konqueror-22.04.3-with_x11.patch
25 @@ -0,0 +1,83 @@
26 +From 69c2186c1a6c4fc0bf7f13b571b581e5f6157063 Mon Sep 17 00:00:00 2001
27 +From: Andreas Sturmlechner <asturm@g.o>
28 +Date: Sat, 27 Nov 2021 14:36:20 +0100
29 +Subject: [PATCH] Add CMake option to build without X11
30 +
31 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
32 +---
33 + CMakeLists.txt | 16 ++++++++++------
34 + client/CMakeLists.txt | 4 ++--
35 + src/CMakeLists.txt | 6 +++---
36 + 3 files changed, 15 insertions(+), 11 deletions(-)
37 +
38 +diff --git a/CMakeLists.txt b/CMakeLists.txt
39 +index 77f5ea645..488ee7dc4 100644
40 +--- a/CMakeLists.txt
41 ++++ b/CMakeLists.txt
42 +@@ -46,12 +46,16 @@ if(Qt5WebEngineWidgets_VERSION VERSION_LESS "5.14.0")
43 + add_definitions(-DWEBENGINEDOWNLOADITEM_USE_PATH)
44 + endif()
45 +
46 +-find_package(X11)
47 +-set(KONQ_HAVE_X11 ${X11_FOUND})
48 +-
49 +-if (X11_FOUND)
50 +- find_package(Qt5 REQUIRED X11Extras)
51 +-endif(X11_FOUND)
52 ++if (NOT WIN32)
53 ++ option(WITH_X11 "Build with X11 integration" ON)
54 ++ if (WITH_X11)
55 ++ find_package(X11 REQUIRED)
56 ++ find_package(Qt5X11Extras NO_MODULE REQUIRED)
57 ++ set(KONQ_HAVE_X11 TRUE)
58 ++ endif()
59 ++else()
60 ++ set(WITH_X11 OFF)
61 ++endif()
62 +
63 + add_definitions(
64 + -DQT_USE_QSTRINGBUILDER
65 +diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
66 +index 24aedb14c..51d2b44d0 100644
67 +--- a/client/CMakeLists.txt
68 ++++ b/client/CMakeLists.txt
69 +@@ -30,9 +30,9 @@ if (WIN32)
70 + else (WIN32)
71 + kf5_add_kdeinit_executable( kfmclient NOGUI ${kfmclient_SRCS})
72 + target_link_libraries(kdeinit_kfmclient ${kfmclient_LIBS})
73 +- if(X11_FOUND)
74 ++ if(WITH_X11)
75 + target_link_libraries(kdeinit_kfmclient Qt5::X11Extras)
76 +- endif(X11_FOUND)
77 ++ endif()
78 + install(TARGETS kdeinit_kfmclient ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
79 + endif (WIN32)
80 +
81 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
82 +index 2113e1c2f..07e64d90f 100644
83 +--- a/src/CMakeLists.txt
84 ++++ b/src/CMakeLists.txt
85 +@@ -33,9 +33,9 @@ target_link_libraries(konquerorprivate
86 + KF5::KIOGui
87 + )
88 +
89 +-if(X11_FOUND)
90 ++if(WITH_X11)
91 + target_link_libraries(konquerorprivate Qt5::X11Extras)
92 +-endif(X11_FOUND)
93 ++endif()
94 +
95 +
96 + set_target_properties(konquerorprivate PROPERTIES VERSION ${KONQUEROR_LIB_VERSION} SOVERSION "5" )
97 +@@ -113,7 +113,7 @@ target_link_libraries(kdeinit_konqueror
98 + KF5::SonnetUi
99 + )
100 +
101 +-if (X11_FOUND)
102 ++if (WITH_X11)
103 + target_link_libraries(kdeinit_konqueror ${X11_LIBRARIES})
104 + endif ()
105 +
106 +--
107 +2.34.1
108 +
109
110 diff --git a/kde-apps/konqueror/konqueror-22.04.3.ebuild b/kde-apps/konqueror/konqueror-22.04.3.ebuild
111 index 6d69ff80806c..05c5705662e8 100644
112 --- a/kde-apps/konqueror/konqueror-22.04.3.ebuild
113 +++ b/kde-apps/konqueror/konqueror-22.04.3.ebuild
114 @@ -63,6 +63,8 @@ RDEPEND="${COMMON_DEPEND}
115 kde-plasma/kde-cli-tools:5
116 "
117
118 +PATCHES=( "${FILESDIR}/${P}-with_x11.patch" )
119 +
120 src_prepare() {
121 [[ ${CHOST} == *-solaris* ]] && append-ldflags -lmalloc
122
123 @@ -74,7 +76,7 @@ src_configure() {
124 -DCMAKE_DISABLE_FIND_PACKAGE_Hunspell=ON # requires fixing bug 634122
125 $(cmake_use_find_package activities KF5Activities)
126 $(cmake_use_find_package speech Qt5TextToSpeech)
127 - $(cmake_use_find_package X X11)
128 + -DWITH_X11=$(usex X)
129 )
130 ecm_src_configure
131 }