1 |
commit: 40bd6e2359a77d2044ae00dca10c5f646e02e9ca |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 22 10:55:01 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 11:18:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40bd6e23 |
7 |
|
8 |
sci-electronics/ktechlab: Drop unused DEPENDs |
9 |
|
10 |
- Dropping kde-frameworks/khtml and kde-frameworks/solid |
11 |
- Also cutting non-test build targets by a third |
12 |
|
13 |
Closes: https://bugs.gentoo.org/759781 |
14 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
.../ktechlab/files/ktechlab-0.50.0-deps.patch | 317 +++++++++++++++++++++ |
18 |
sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild | 4 +- |
19 |
2 files changed, 319 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/sci-electronics/ktechlab/files/ktechlab-0.50.0-deps.patch b/sci-electronics/ktechlab/files/ktechlab-0.50.0-deps.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..67ded56c959 |
24 |
--- /dev/null |
25 |
+++ b/sci-electronics/ktechlab/files/ktechlab-0.50.0-deps.patch |
26 |
@@ -0,0 +1,317 @@ |
27 |
+From 76764e7f7b64d36fc4f650516838662b406aa8ac Mon Sep 17 00:00:00 2001 |
28 |
+From: Pino Toscano <pino@×××.org> |
29 |
+Date: Mon, 2 Nov 2020 18:53:22 +0100 |
30 |
+Subject: [PATCH 1/4] cmake: stop requiring the Solid framework |
31 |
+ |
32 |
+It is not used. |
33 |
+ |
34 |
+(cherry picked from commit aaf83474c8a145ad67ed03074dd4033f5a12c2ab) |
35 |
+--- |
36 |
+ CMakeLists.txt | 1 - |
37 |
+ README | 2 +- |
38 |
+ 2 files changed, 1 insertion(+), 2 deletions(-) |
39 |
+ |
40 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
41 |
+index 15efb196..73e40695 100644 |
42 |
+--- a/CMakeLists.txt |
43 |
++++ b/CMakeLists.txt |
44 |
+@@ -41,7 +41,6 @@ find_package(KF5 REQUIRED COMPONENTS |
45 |
+ Parts |
46 |
+ TextEditor |
47 |
+ TextWidgets |
48 |
+- Solid |
49 |
+ WidgetsAddons |
50 |
+ WindowSystem |
51 |
+ XmlGui |
52 |
+diff --git a/README b/README |
53 |
+index 940e2b3b..9f91740d 100644 |
54 |
+--- a/README |
55 |
++++ b/README |
56 |
+@@ -122,7 +122,7 @@ Required dependencies |
57 |
+ - Extra Cmake Modules (ECM) |
58 |
+ - KDE Frameworks 5 libraries -dev (at the time of writing: |
59 |
+ Config CoreAddons DocTools IconThemes I18n KDELibs4Support |
60 |
+- KHtml KIO Parts TextEditor TextWidgets Solid WidgetsAddons |
61 |
++ KHtml KIO Parts TextEditor TextWidgets WidgetsAddons |
62 |
+ WindowSystem XmlGui) |
63 |
+ |
64 |
+ Optional dependencies |
65 |
+-- |
66 |
+2.29.2 |
67 |
+ |
68 |
+ |
69 |
+From 672dc6a1d4b8d1fd8f44b64779a43f0e4b65e946 Mon Sep 17 00:00:00 2001 |
70 |
+From: Pino Toscano <pino@×××.org> |
71 |
+Date: Mon, 2 Nov 2020 13:10:45 +0100 |
72 |
+Subject: [PATCH 2/4] cmake: build test_ktechlab only if testing is enabled |
73 |
+ |
74 |
+The test_ktechlab static library basically builds almost all the |
75 |
+ktechlab sources, resulting in a "double build" in case testing is |
76 |
+enabled. Considering that is used only by test binaries built only |
77 |
+when testing is enabled, then limit its build accordingly. |
78 |
+ |
79 |
+(cherry picked from commit f3a754ddcbc8a086ca48920bd33e96082cef699c) |
80 |
+--- |
81 |
+ src/CMakeLists.txt | 26 +++++++++++++++----------- |
82 |
+ 1 file changed, 15 insertions(+), 11 deletions(-) |
83 |
+ |
84 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
85 |
+index e84f737d..1a9af964 100644 |
86 |
+--- a/src/CMakeLists.txt |
87 |
++++ b/src/CMakeLists.txt |
88 |
+@@ -379,19 +379,23 @@ install(TARGETS ktechlab ${INSTALL_TARGETS_DEFAULT_ARGS}) |
89 |
+ |
90 |
+ # for helping testing |
91 |
+ |
92 |
+-add_library(test_ktechlab STATIC ${ktechlab_SRCS}) |
93 |
++if(BUILD_TESTING) |
94 |
+ |
95 |
+-target_link_libraries(test_ktechlab |
96 |
+- KF5::TextEditor |
97 |
+- KF5::IconThemes |
98 |
+- KF5::Parts |
99 |
+- KF5::KHtml |
100 |
+- KF5::WidgetsAddons |
101 |
+- KF5::WindowSystem |
102 |
++ add_library(test_ktechlab STATIC ${ktechlab_SRCS}) |
103 |
+ |
104 |
+- Qt5::Widgets |
105 |
+- Qt5::PrintSupport |
106 |
+-) |
107 |
++ target_link_libraries(test_ktechlab |
108 |
++ KF5::TextEditor |
109 |
++ KF5::IconThemes |
110 |
++ KF5::Parts |
111 |
++ KF5::KHtml |
112 |
++ KF5::WidgetsAddons |
113 |
++ KF5::WindowSystem |
114 |
++ |
115 |
++ Qt5::Widgets |
116 |
++ Qt5::PrintSupport |
117 |
++ ) |
118 |
++ |
119 |
++endif() |
120 |
+ |
121 |
+ ########### install files ############### |
122 |
+ |
123 |
+-- |
124 |
+2.29.2 |
125 |
+ |
126 |
+ |
127 |
+From 1d416ac6e3191eefca0f7e98487ae912d8bafe23 Mon Sep 17 00:00:00 2001 |
128 |
+From: Pino Toscano <pino@×××.org> |
129 |
+Date: Wed, 4 Nov 2020 13:13:44 +0100 |
130 |
+Subject: [PATCH 3/4] cmake: explicitly require and link to KCompletion |
131 |
+ |
132 |
+It is already used (because of KLineEdit), so make sure to explicitly |
133 |
+use it. |
134 |
+ |
135 |
+(cherry picked from commit 852f94f4e6f3cb8d4e4ec60c2c77dfd5ae4b6fc0) |
136 |
+--- |
137 |
+ CMakeLists.txt | 1 + |
138 |
+ src/CMakeLists.txt | 2 ++ |
139 |
+ 2 files changed, 3 insertions(+) |
140 |
+ |
141 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
142 |
+index 73e40695..45442519 100644 |
143 |
+--- a/CMakeLists.txt |
144 |
++++ b/CMakeLists.txt |
145 |
+@@ -31,6 +31,7 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS |
146 |
+ ) |
147 |
+ |
148 |
+ find_package(KF5 REQUIRED COMPONENTS |
149 |
++ Completion |
150 |
+ Config |
151 |
+ CoreAddons |
152 |
+ DocTools |
153 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
154 |
+index 1a9af964..ac6e487a 100644 |
155 |
+--- a/src/CMakeLists.txt |
156 |
++++ b/src/CMakeLists.txt |
157 |
+@@ -343,6 +343,7 @@ target_link_libraries( ktechlab |
158 |
+ #itemeditor math |
159 |
+ KF5::TextEditor |
160 |
+ KF5::Parts |
161 |
++ KF5::Completion |
162 |
+ KF5::ConfigCore |
163 |
+ KF5::ConfigGui |
164 |
+ KF5::CoreAddons |
165 |
+@@ -390,6 +391,7 @@ if(BUILD_TESTING) |
166 |
+ KF5::KHtml |
167 |
+ KF5::WidgetsAddons |
168 |
+ KF5::WindowSystem |
169 |
++ KF5::Completion |
170 |
+ |
171 |
+ Qt5::Widgets |
172 |
+ Qt5::PrintSupport |
173 |
+-- |
174 |
+2.29.2 |
175 |
+ |
176 |
+ |
177 |
+From 56fb8dde63c19f6c4bc0decda879843e552fad85 Mon Sep 17 00:00:00 2001 |
178 |
+From: "Martin T. H. Sandsmark" <martin.sandsmark@×××.org> |
179 |
+Date: Tue, 22 Dec 2020 11:46:54 +0100 |
180 |
+Subject: [PATCH 4/4] replace khtml with qtextbrowser |
181 |
+ |
182 |
+Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
183 |
+--- |
184 |
+ CMakeLists.txt | 1 - |
185 |
+ src/CMakeLists.txt | 2 -- |
186 |
+ src/gui/contexthelp.cpp | 33 +++++++++++------------------- |
187 |
+ src/gui/contexthelp.h | 6 ++---- |
188 |
+ tests/tests_app/CMakeLists.txt | 1 - |
189 |
+ tests/tests_compile/CMakeLists.txt | 1 - |
190 |
+ 6 files changed, 14 insertions(+), 30 deletions(-) |
191 |
+ |
192 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
193 |
+index 45442519..5adaec45 100644 |
194 |
+--- a/CMakeLists.txt |
195 |
++++ b/CMakeLists.txt |
196 |
+@@ -37,7 +37,6 @@ find_package(KF5 REQUIRED COMPONENTS |
197 |
+ DocTools |
198 |
+ IconThemes |
199 |
+ I18n |
200 |
+- KHtml |
201 |
+ KIO |
202 |
+ Parts |
203 |
+ TextEditor |
204 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
205 |
+index ac6e487a..e09d9070 100644 |
206 |
+--- a/src/CMakeLists.txt |
207 |
++++ b/src/CMakeLists.txt |
208 |
+@@ -349,7 +349,6 @@ target_link_libraries( ktechlab |
209 |
+ KF5::CoreAddons |
210 |
+ KF5::IconThemes |
211 |
+ KF5::KIOCore |
212 |
+- KF5::KHtml |
213 |
+ KF5::XmlGui |
214 |
+ KF5::WidgetsAddons |
215 |
+ KF5::WindowSystem |
216 |
+@@ -388,7 +387,6 @@ if(BUILD_TESTING) |
217 |
+ KF5::TextEditor |
218 |
+ KF5::IconThemes |
219 |
+ KF5::Parts |
220 |
+- KF5::KHtml |
221 |
+ KF5::WidgetsAddons |
222 |
+ KF5::WindowSystem |
223 |
+ KF5::Completion |
224 |
+diff --git a/src/gui/contexthelp.cpp b/src/gui/contexthelp.cpp |
225 |
+index 567c0c3d..cce84617 100644 |
226 |
+--- a/src/gui/contexthelp.cpp |
227 |
++++ b/src/gui/contexthelp.cpp |
228 |
+@@ -20,8 +20,6 @@ |
229 |
+ |
230 |
+ #include <KParts/ReadWritePart> |
231 |
+ #include <KParts/BrowserExtension> |
232 |
+-#include <KHTMLView> |
233 |
+-#include <KHTMLPart> |
234 |
+ #include <KIO/Global> |
235 |
+ #include <KIconLoader> |
236 |
+ #include <KLocalizedString> |
237 |
+@@ -43,6 +41,7 @@ |
238 |
+ // #include <q3widgetstack.h> |
239 |
+ #include <QMimeData> |
240 |
+ #include <QStandardPaths> |
241 |
++#include <QTextBrowser> |
242 |
+ |
243 |
+ #include <cassert> |
244 |
+ |
245 |
+@@ -81,15 +80,13 @@ ContextHelp::ContextHelp( KateMDI::ToolView * parent ) |
246 |
+ m_pNameLabel->setFont( font ); |
247 |
+ m_pNameLabel->setTextFormat( Qt::RichText ); |
248 |
+ |
249 |
+- m_pBrowser = new KHTMLPart( m_pWidgetStack->widget( 0 ) ); |
250 |
+- m_pBrowserView = m_pBrowser->view(); |
251 |
++ m_pBrowserView = new QTextBrowser; |
252 |
++ m_pBrowserView->setOpenLinks(false); |
253 |
++ |
254 |
+ m_pBrowserView->setFocusPolicy( Qt::NoFocus ); |
255 |
+ m_pBrowserLayout->addWidget( m_pBrowserView ); |
256 |
+- connect(m_pBrowser->browserExtension(), &KParts::BrowserExtension::openUrlRequest, |
257 |
+- this, &ContextHelp::openURL); |
258 |
+ |
259 |
+- // Adjust appearance of browser |
260 |
+- m_pBrowserView->setMarginWidth( 4 ); |
261 |
++ connect(m_pBrowserView, &QTextBrowser::anchorClicked, this, &ContextHelp::openURL); |
262 |
+ |
263 |
+ m_pEditor = new RichTextEditor( m_pWidgetStack->widget( 1 ), "ContextHelpEditor" ); |
264 |
+ m_pTopLayout->addWidget( m_pEditor ); |
265 |
+@@ -280,20 +277,14 @@ void ContextHelp::setContextHelp( QString name, QString help ) |
266 |
+ addLinkTypeAppearances( & help ); |
267 |
+ //END modify help string as appropriate |
268 |
+ |
269 |
+- // HACK Adjust top spacing according to whether the item description uses <p>. |
270 |
+- // This is because the help editor uses paragraphs, but old item help stored |
271 |
+- // in the items just uses <br> |
272 |
+- QFont f; |
273 |
+- int fontPixelSize = QFontInfo( f ).pixelSize(); |
274 |
+- if ( help.contains( "<p>" ) ) |
275 |
+- m_pBrowserView->setMarginHeight( 3-fontPixelSize ); |
276 |
+- else |
277 |
+- m_pBrowserView->setMarginHeight( 3 ); |
278 |
+- |
279 |
+ m_pNameLabel->setText( name ); |
280 |
+- m_pBrowser->begin( QUrl::fromLocalFile( itemLibrary()->itemDescriptionsDirectory() ) ); |
281 |
+- m_pBrowser->write( help ); |
282 |
+- m_pBrowser->end(); |
283 |
++ m_pBrowserView->setSearchPaths({itemLibrary()->itemDescriptionsDirectory()}); |
284 |
++ m_pBrowserView->clear(); |
285 |
++ if (help.startsWith("<html>")) { |
286 |
++ m_pBrowserView->insertHtml(help); |
287 |
++ } else { |
288 |
++ m_pBrowserView->insertPlainText(help); |
289 |
++ } |
290 |
+ } |
291 |
+ |
292 |
+ |
293 |
+diff --git a/src/gui/contexthelp.h b/src/gui/contexthelp.h |
294 |
+index fe992deb..7190ea81 100644 |
295 |
+--- a/src/gui/contexthelp.h |
296 |
++++ b/src/gui/contexthelp.h |
297 |
+@@ -20,8 +20,7 @@ class Item; |
298 |
+ class ContextHelp; |
299 |
+ class RichTextEditor; |
300 |
+ |
301 |
+-class KHTMLPart; |
302 |
+-class KHTMLView; |
303 |
++class QTextBRowser; |
304 |
+ class QUrl; |
305 |
+ class QLabel; |
306 |
+ class QTextBrowser; |
307 |
+@@ -123,8 +122,7 @@ class ContextHelp : public QWidget, public Ui::ContextHelpWidget |
308 |
+ bool isEditChanged(); |
309 |
+ QString m_currentLanguage; |
310 |
+ QString m_lastItemType; |
311 |
+- KHTMLPart * m_pBrowser; |
312 |
+- KHTMLView * m_pBrowserView; |
313 |
++ QTextBrowser *m_pBrowserView; |
314 |
+ RichTextEditor * m_pEditor; |
315 |
+ |
316 |
+ private slots: |
317 |
+diff --git a/tests/tests_app/CMakeLists.txt b/tests/tests_app/CMakeLists.txt |
318 |
+index b0a505d4..c93137a4 100644 |
319 |
+--- a/tests/tests_app/CMakeLists.txt |
320 |
++++ b/tests/tests_app/CMakeLists.txt |
321 |
+@@ -36,7 +36,6 @@ target_link_libraries( tests_app |
322 |
+ KF5::ConfigCore |
323 |
+ KF5::ConfigGui |
324 |
+ KF5::KIOCore |
325 |
+- KF5::KHtml |
326 |
+ KF5::CoreAddons |
327 |
+ KF5::XmlGui |
328 |
+ KF5::TextEditor |
329 |
+diff --git a/tests/tests_compile/CMakeLists.txt b/tests/tests_compile/CMakeLists.txt |
330 |
+index 424692be..bec8b864 100644 |
331 |
+--- a/tests/tests_compile/CMakeLists.txt |
332 |
++++ b/tests/tests_compile/CMakeLists.txt |
333 |
+@@ -37,7 +37,6 @@ target_link_libraries( test_compile |
334 |
+ KF5::ConfigCore |
335 |
+ KF5::ConfigGui |
336 |
+ KF5::KIOCore |
337 |
+- KF5::KHtml |
338 |
+ KF5::CoreAddons |
339 |
+ KF5::XmlGui |
340 |
+ KF5::TextEditor |
341 |
+-- |
342 |
+2.29.2 |
343 |
+ |
344 |
|
345 |
diff --git a/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild b/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild |
346 |
index 0a0f99c58e3..47f9f7469ef 100644 |
347 |
--- a/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild |
348 |
+++ b/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild |
349 |
@@ -30,7 +30,6 @@ DEPEND=" |
350 |
>=kde-frameworks/kconfig-${KFMIN}:5 |
351 |
>=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
352 |
>=kde-frameworks/kcoreaddons-${KFMIN}:5 |
353 |
- >=kde-frameworks/khtml-${KFMIN}:5 |
354 |
>=kde-frameworks/ki18n-${KFMIN}:5 |
355 |
>=kde-frameworks/kiconthemes-${KFMIN}:5 |
356 |
>=kde-frameworks/kio-${KFMIN}:5 |
357 |
@@ -41,7 +40,8 @@ DEPEND=" |
358 |
>=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
359 |
>=kde-frameworks/kwindowsystem-${KFMIN}:5 |
360 |
>=kde-frameworks/kxmlgui-${KFMIN}:5 |
361 |
- >=kde-frameworks/solid-${KFMIN}:5 |
362 |
gpsim? ( dev-embedded/gpsim ) |
363 |
" |
364 |
RDEPEND="${DEPEND}" |
365 |
+ |
366 |
+PATCHES=( "${FILESDIR}"/${P}-deps.patch ) |