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/kpimtextedit/, kde-apps/kpimtextedit/files/
Date: Mon, 07 Feb 2022 09:06:28
Message-Id: 1644224744.b9474d9f97470699189ec2aa8d3604b8f5348f53.asturm@gentoo
1 commit: b9474d9f97470699189ec2aa8d3604b8f5348f53
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 7 09:03:45 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 7 09:05:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9474d9f
7
8 kde-apps/kpimtextedit: Revert "Re-add IUSE=speech"
9
10 This reverts commit cefc29423b72bf03dd5f548d0da560cef04f2635.
11
12 Bug: https://bugs.gentoo.org/832776
13 Closes: https://bugs.gentoo.org/832841
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../kpimtextedit-21.12.2-speech-optional-1.patch | 289 ---------------------
17 .../kpimtextedit-21.12.2-speech-optional-2.patch | 25 --
18 ....2-r1.ebuild => kpimtextedit-21.12.2-r2.ebuild} | 13 +-
19 kde-apps/kpimtextedit/metadata.xml | 1 -
20 4 files changed, 2 insertions(+), 326 deletions(-)
21
22 diff --git a/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-1.patch b/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-1.patch
23 deleted file mode 100644
24 index d7fa7474a4bf..000000000000
25 --- a/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-1.patch
26 +++ /dev/null
27 @@ -1,289 +0,0 @@
28 -From 53f187315f51e7d53a03c4ed464812b388465c10 Mon Sep 17 00:00:00 2001
29 -From: Laurent Montel <montel@×××.org>
30 -Date: Mon, 27 Dec 2021 07:53:16 +0100
31 -Subject: [PATCH] Add support for building without texttospeech as for the
32 - moment we don't
33 -
34 -have it in qt6
35 ----
36 - CMakeLists.txt | 10 +++++-
37 - src/CMakeLists.txt | 34 ++++++++++++++-----
38 - .../plaintexteditor/plaintexteditor.cpp | 4 +++
39 - .../plaintexteditor/plaintexteditorwidget.cpp | 10 ++++--
40 - .../richtexteditor/richtexteditor.cpp | 5 ++-
41 - .../richtexteditor/richtexteditorwidget.cpp | 9 ++++-
42 - 6 files changed, 59 insertions(+), 13 deletions(-)
43 -
44 -diff --git a/CMakeLists.txt b/CMakeLists.txt
45 -index ae59804..d1a0181 100644
46 ---- a/CMakeLists.txt
47 -+++ b/CMakeLists.txt
48 -@@ -76,7 +76,15 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
49 - add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055A00)
50 -
51 -
52 --find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS TextToSpeech)
53 -+find_package(Qt5TextToSpeech ${QT_REQUIRED_VERSION} CONFIG)
54 -+set_package_properties(Qt5TextToSpeech PROPERTIES DESCRIPTION
55 -+ "Add support for texttospeed"
56 -+ TYPE OPTIONAL
57 -+)
58 -+if(TARGET Qt5::TextToSpeech)
59 -+ set(HAVE_TEXT_TO_SPEECH_SUPPORT TRUE)
60 -+ add_definitions(-DHAVE_TEXT_TO_SPEECH_SUPPORT)
61 -+endif()
62 -
63 - if(BUILD_TESTING)
64 - find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test)
65 -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
66 -index 2720e0a..98e2854 100644
67 ---- a/src/CMakeLists.txt
68 -+++ b/src/CMakeLists.txt
69 -@@ -53,7 +53,7 @@ target_sources(KF5PimTextEdit PRIVATE
70 - composer-ng/richtextcomposeremailquotehighlighter.h
71 - composer-ng/richtextcomposerwidget.h
72 - )
73 --
74 -+if (HAVE_TEXT_TO_SPEECH_SUPPORT)
75 - target_sources(KF5PimTextEdit PRIVATE
76 - texttospeech/texttospeech.cpp
77 - texttospeech/texttospeechwidget.cpp
78 -@@ -76,6 +76,7 @@ target_sources(KF5PimTextEdit PRIVATE
79 - texttospeech/texttospeechlanguagecombobox.h
80 - texttospeech/texttospeechactions.h
81 - )
82 -+endif()
83 -
84 - target_sources(KF5PimTextEdit PRIVATE
85 - grantleebuilder/plaintextmarkupbuilder.cpp
86 -@@ -168,7 +169,12 @@ target_link_libraries(KF5PimTextEdit
87 - KF5::SyntaxHighlighting
88 - Qt::TextToSpeech
89 - )
90 --
91 -+if (HAVE_TEXT_TO_SPEECH_SUPPORT)
92 -+ target_link_libraries(KF5PimTextEdit
93 -+ PRIVATE
94 -+ Qt::TextToSpeech
95 -+ )
96 -+endif()
97 - set_target_properties(KF5PimTextEdit PROPERTIES
98 - VERSION ${KPIMTEXTEDIT_VERSION}
99 - SOVERSION ${KPIMTEXTEDIT_SOVERSION}
100 -@@ -240,7 +246,7 @@ ecm_generate_headers(KPimTextEdit_CamelCasetexteditor_commonwidget_HEADERS
101 - )
102 -
103 -
104 --
105 -+if (HAVE_TEXT_TO_SPEECH_SUPPORT)
106 - ecm_generate_headers(KPimTextEdit_CamelCasetexttospeechs_HEADERS
107 - HEADER_NAMES
108 - TextToSpeech
109 -@@ -252,7 +258,7 @@ ecm_generate_headers(KPimTextEdit_CamelCasetexttospeechs_HEADERS
110 - PREFIX KPIMTextEdit
111 - RELATIVE texttospeech
112 - )
113 --
114 -+endif()
115 - ecm_generate_headers(KPimTextEdit_Camelcasecomposerng_HEADERS
116 - HEADER_NAMES
117 - RichTextComposer
118 -@@ -269,11 +275,22 @@ ecm_generate_headers(KPimTextEdit_Camelcasecomposerng_HEADERS
119 -
120 -
121 - ########### install files ###############
122 -+if (HAVE_TEXT_TO_SPEECH_SUPPORT)
123 -+ install(FILES
124 -+ ${KPimTextEdit_texttospeechs_HEADERS}
125 -+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPIMTextEdit/kpimtextedit
126 -+ COMPONENT Devel
127 -+ )
128 -+ install(FILES
129 -+ ${KPimTextEdit_CamelCasetexttospeechs_HEADERS}
130 -+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPIMTextEdit/KPIMTextEdit/
131 -+ COMPONENT Devel
132 -+ )
133 -+endif()
134 -
135 - install(FILES
136 - ${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit_export.h
137 - ${kpimtextedit_HEADERS}
138 -- ${KPimTextEdit_texttospeechs_HEADERS}
139 - ${KPimTextEdit_richtexteditor_HEADERS}
140 - ${KPimTextEdit_texteditor_commonwidget_HEADERS}
141 - ${KPimTextEdit_plaintexteditor_HEADERS}
142 -@@ -288,7 +305,6 @@ install(FILES
143 - ${KPimTextEdit_CamelCase_HEADERS}
144 - ${KPimTextEdit_CamelCasetextrichtexteditor_HEADERS}
145 - ${KPimTextEdit_CamelCaseplaintexteditor_HEADERS}
146 -- ${KPimTextEdit_CamelCasetexttospeechs_HEADERS}
147 - ${KPimTextEdit_CamelCasetexteditor_commonwidget_HEADERS}
148 - ${KPimTextEdit_Camelcasecomposerng_HEADERS}
149 - ${KPimTextEdit_CamelCaseemoticon_HEADERS}
150 -@@ -306,8 +322,10 @@ if (BUILD_TESTING)
151 - add_subdirectory(texteditor/commonwidget/autotests)
152 - add_subdirectory(texteditor/plaintexteditor/tests)
153 - add_subdirectory(texteditor/richtexteditor/tests)
154 -- add_subdirectory(texttospeech/autotests)
155 -- add_subdirectory(texttospeech/tests)
156 -+ if (HAVE_TEXT_TO_SPEECH_SUPPORT)
157 -+ add_subdirectory(texttospeech/autotests)
158 -+ add_subdirectory(texttospeech/tests)
159 -+ endif()
160 - add_subdirectory(composer-ng/autotests)
161 - add_subdirectory(composer-ng/tests)
162 - add_subdirectory(grantleebuilder/autotests)
163 -diff --git a/src/texteditor/plaintexteditor/plaintexteditor.cpp b/src/texteditor/plaintexteditor/plaintexteditor.cpp
164 -index cfa0741..4559568 100644
165 ---- a/src/texteditor/plaintexteditor/plaintexteditor.cpp
166 -+++ b/src/texteditor/plaintexteditor/plaintexteditor.cpp
167 -@@ -18,7 +18,9 @@
168 - #include <QActionGroup>
169 - #include <QIcon>
170 -
171 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
172 - #include "texttospeech/texttospeech.h"
173 -+#endif
174 - #include <Sonnet/Dialog>
175 - #include <sonnet/backgroundchecker.h>
176 -
177 -@@ -181,6 +183,7 @@ void PlainTextEditor::contextMenuEvent(QContextMenuEvent *event)
178 - }
179 - }
180 - if (d->supportFeatures & TextToSpeech) {
181 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
182 - if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
183 - if (!emptyDocument) {
184 - QAction *speakAction = popup->addAction(i18n("Speak Text"));
185 -@@ -188,6 +191,7 @@ void PlainTextEditor::contextMenuEvent(QContextMenuEvent *event)
186 - connect(speakAction, &QAction::triggered, this, &PlainTextEditor::slotSpeakText);
187 - }
188 - }
189 -+#endif
190 - }
191 - if (webShortcutSupport() && textCursor().hasSelection()) {
192 - popup->addSeparator();
193 -diff --git a/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp b/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
194 -index 3251ea3..77a9b45 100644
195 ---- a/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
196 -+++ b/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
197 -@@ -8,8 +8,9 @@
198 - #include "plaintexteditfindbar.h"
199 - #include "plaintexteditor.h"
200 - #include "slidecontainer.h"
201 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
202 - #include "texttospeech/texttospeechwidget.h"
203 --
204 -+#endif
205 - #include <QTextCursor>
206 - #include <QVBoxLayout>
207 -
208 -@@ -21,7 +22,9 @@ public:
209 -
210 - KPIMTextEdit::PlainTextEditFindBar *mFindBar = nullptr;
211 - PlainTextEditor *mEditor = nullptr;
212 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
213 - KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
214 -+#endif
215 - KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
216 - };
217 -
218 -@@ -75,16 +78,19 @@ void PlainTextEditorWidget::init(PlainTextEditor *customEditor)
219 - {
220 - auto lay = new QVBoxLayout(this);
221 - lay->setContentsMargins({});
222 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
223 - d->mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this);
224 - lay->addWidget(d->mTextToSpeechWidget);
225 -+#endif
226 - if (customEditor) {
227 - d->mEditor = customEditor;
228 - } else {
229 - d->mEditor = new PlainTextEditor;
230 - }
231 - lay->addWidget(d->mEditor);
232 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
233 - connect(d->mEditor, &PlainTextEditor::say, d->mTextToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say);
234 --
235 -+#endif
236 - d->mSliderContainer = new KPIMTextEdit::SlideContainer(this);
237 -
238 - d->mFindBar = new KPIMTextEdit::PlainTextEditFindBar(d->mEditor, this);
239 -diff --git a/src/texteditor/richtexteditor/richtexteditor.cpp b/src/texteditor/richtexteditor/richtexteditor.cpp
240 -index dfdf7c5..a004434 100644
241 ---- a/src/texteditor/richtexteditor/richtexteditor.cpp
242 -+++ b/src/texteditor/richtexteditor/richtexteditor.cpp
243 -@@ -26,7 +26,9 @@
244 - #include <sonnet/backgroundchecker.h>
245 - #include <sonnet/spellcheckdecorator.h>
246 - #include <sonnet/speller.h>
247 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
248 - #include <texttospeech/texttospeech.h>
249 -+#endif
250 -
251 - #include <QApplication>
252 - #include <QClipboard>
253 -@@ -247,7 +249,7 @@ QMenu *RichTextEditor::mousePopupMenu(QPoint pos)
254 - allowTabAction->setChecked(!tabChangesFocus());
255 - connect(allowTabAction, &QAction::triggered, this, &RichTextEditor::slotAllowTab);
256 - }
257 --
258 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
259 - if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
260 - if (!emptyDocument) {
261 - QAction *speakAction = popup->addAction(i18n("Speak Text"));
262 -@@ -255,6 +257,7 @@ QMenu *RichTextEditor::mousePopupMenu(QPoint pos)
263 - connect(speakAction, &QAction::triggered, this, &RichTextEditor::slotSpeakText);
264 - }
265 - }
266 -+#endif
267 - if (webShortcutSupport() && textCursor().hasSelection()) {
268 - popup->addSeparator();
269 - const QString selectedText = textCursor().selectedText();
270 -diff --git a/src/texteditor/richtexteditor/richtexteditorwidget.cpp b/src/texteditor/richtexteditor/richtexteditorwidget.cpp
271 -index d0d8e14..d84cf3f 100644
272 ---- a/src/texteditor/richtexteditor/richtexteditorwidget.cpp
273 -+++ b/src/texteditor/richtexteditor/richtexteditorwidget.cpp
274 -@@ -10,8 +10,9 @@
275 -
276 - #include <QTextCursor>
277 - #include <QVBoxLayout>
278 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
279 - #include <texttospeech/texttospeechwidget.h>
280 --
281 -+#endif
282 - #include "slidecontainer.h"
283 -
284 - using namespace KPIMTextEdit;
285 -@@ -23,7 +24,9 @@ public:
286 -
287 - KPIMTextEdit::RichTextEditFindBar *mFindBar = nullptr;
288 - RichTextEditor *mEditor = nullptr;
289 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
290 - KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
291 -+#endif
292 - KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
293 - };
294 -
295 -@@ -97,14 +100,18 @@ void RichTextEditorWidget::init(RichTextEditor *customEditor)
296 - {
297 - auto lay = new QVBoxLayout(this);
298 - lay->setContentsMargins({});
299 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
300 - d->mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this);
301 - lay->addWidget(d->mTextToSpeechWidget);
302 -+#endif
303 - if (customEditor) {
304 - d->mEditor = customEditor;
305 - } else {
306 - d->mEditor = new RichTextEditor;
307 - }
308 -+#ifdef HAVE_TEXT_TO_SPEECH_SUPPORT
309 - connect(d->mEditor, &RichTextEditor::say, d->mTextToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say);
310 -+#endif
311 - lay->addWidget(d->mEditor);
312 -
313 - d->mSliderContainer = new KPIMTextEdit::SlideContainer(this);
314 ---
315 -GitLab
316 -
317
318 diff --git a/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-2.patch b/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-2.patch
319 deleted file mode 100644
320 index a078840af05c..000000000000
321 --- a/kde-apps/kpimtextedit/files/kpimtextedit-21.12.2-speech-optional-2.patch
322 +++ /dev/null
323 @@ -1,25 +0,0 @@
324 -From 3596c0a90f590c409654a9aec2b087809cff0a79 Mon Sep 17 00:00:00 2001
325 -From: David Faure <faure@×××.org>
326 -Date: Tue, 28 Dec 2021 12:26:25 +0100
327 -Subject: [PATCH] Fix build without TextToSpeech available
328 -
329 -(the linking happens again further down, inside the if)
330 ----
331 - src/CMakeLists.txt | 1 -
332 - 1 file changed, 1 deletion(-)
333 -
334 -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
335 -index 98e2854..a08978e 100644
336 ---- a/src/CMakeLists.txt
337 -+++ b/src/CMakeLists.txt
338 -@@ -167,7 +167,6 @@ target_link_libraries(KF5PimTextEdit
339 - KF5::XmlGui
340 - KF5::I18n
341 - KF5::SyntaxHighlighting
342 -- Qt::TextToSpeech
343 - )
344 - if (HAVE_TEXT_TO_SPEECH_SUPPORT)
345 - target_link_libraries(KF5PimTextEdit
346 ---
347 -GitLab
348 -
349
350 diff --git a/kde-apps/kpimtextedit/kpimtextedit-21.12.2-r1.ebuild b/kde-apps/kpimtextedit/kpimtextedit-21.12.2-r2.ebuild
351 similarity index 80%
352 rename from kde-apps/kpimtextedit/kpimtextedit-21.12.2-r1.ebuild
353 rename to kde-apps/kpimtextedit/kpimtextedit-21.12.2-r2.ebuild
354 index e9ea2a17981a..8ef4a064d94b 100644
355 --- a/kde-apps/kpimtextedit/kpimtextedit-21.12.2-r1.ebuild
356 +++ b/kde-apps/kpimtextedit/kpimtextedit-21.12.2-r2.ebuild
357 @@ -16,12 +16,13 @@ DESCRIPTION="Extended text editor for PIM applications"
358 LICENSE="LGPL-2.1+"
359 SLOT="5"
360 KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
361 -IUSE="speech"
362 +IUSE=""
363
364 RESTRICT="test"
365
366 RDEPEND="
367 >=dev-qt/qtgui-${QTMIN}:5
368 + >=dev-qt/qtspeech-${QTMIN}:5
369 >=dev-qt/qtwidgets-${QTMIN}:5
370 >=kde-frameworks/kcompletion-${KFMIN}:5
371 >=kde-frameworks/kconfig-${KFMIN}:5
372 @@ -34,17 +35,7 @@ RDEPEND="
373 >=kde-frameworks/kxmlgui-${KFMIN}:5
374 >=kde-frameworks/sonnet-${KFMIN}:5
375 >=kde-frameworks/syntax-highlighting-${KFMIN}:5
376 - speech? ( >=dev-qt/qtspeech-${QTMIN}:5 )
377 "
378 DEPEND="${RDEPEND}
379 test? ( >=kde-frameworks/ktextwidgets-${KFMIN}:5 )
380 "
381 -
382 -PATCHES=( "${FILESDIR}"/${PN}-21.12.2-speech-optional-{1,2}.patch )
383 -
384 -src_configure() {
385 - local mycmakeargs=(
386 - $(cmake_use_find_package speech Qt5TextToSpeech)
387 - )
388 - ecm_src_configure
389 -}
390
391 diff --git a/kde-apps/kpimtextedit/metadata.xml b/kde-apps/kpimtextedit/metadata.xml
392 index c28e75b42460..0bc83685a440 100644
393 --- a/kde-apps/kpimtextedit/metadata.xml
394 +++ b/kde-apps/kpimtextedit/metadata.xml
395 @@ -10,6 +10,5 @@
396 </upstream>
397 <use>
398 <flag name="designer">Build plugins for <pkg>dev-qt/designer</pkg></flag>
399 - <flag name="speech">Enable text-to-speech support</flag>
400 </use>
401 </pkgmetadata>