public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:master commit in: kde-apps/kmail/, kde-apps/kmail/files/
@ 2022-02-24 17:04 Andreas Sturmlechner
  0 siblings, 0 replies; only message in thread
From: Andreas Sturmlechner @ 2022-02-24 17:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e49b850b1e9c9cae33ebfde2925eda070bd9fd8d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 24 16:58:07 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 24 17:04:23 2022 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=e49b850b

kde-apps/kmail: Add IUSE speech

Bug: https://bugs.gentoo.org/832776
Bug: https://bugs.gentoo.org/832845
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kmail-21.12.3-speech-optional.patch      | 69 ++++++++++++++++++++++
 kde-apps/kmail/kmail-21.12.49.9999.ebuild          |  6 +-
 kde-apps/kmail/kmail-9999.ebuild                   |  4 +-
 kde-apps/kmail/metadata.xml                        |  3 +
 4 files changed, 78 insertions(+), 4 deletions(-)

diff --git a/kde-apps/kmail/files/kmail-21.12.3-speech-optional.patch b/kde-apps/kmail/files/kmail-21.12.3-speech-optional.patch
new file mode 100644
index 0000000000..e0c7a4518c
--- /dev/null
+++ b/kde-apps/kmail/files/kmail-21.12.3-speech-optional.patch
@@ -0,0 +1,69 @@
+From 817515f9278f97b3fa32bb434cb2bd26816a7838 Mon Sep 17 00:00:00 2001
+From: Laurent Montel <montel@kde.org>
+Date: Thu, 24 Feb 2022 17:28:35 +0100
+Subject: [PATCH] Make it compile without texttospeach
+
+---
+ src/kmmainwidget.cpp    | 5 +++++
+ src/kmreadermainwin.cpp | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp
+index d6d0d40ac..37bbe72a2 100644
+--- a/src/kmmainwidget.cpp
++++ b/src/kmmainwidget.cpp
+@@ -36,7 +36,10 @@
+ #include "widgets/collectionpane.h"
+ #include "widgets/kactionmenuaccount.h"
+ #include "widgets/kactionmenutransport.h"
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+ #include <KSieveUi/SieveDebugDialog>
+ #include <MailCommon/FolderTreeView>
+ #include <MailCommon/MailKernel>
+@@ -2707,10 +2710,12 @@ void KMMainWidget::showMessagePopup(const Akonadi::Item &msg,
+         mMsgActions->addWebShortcutsMenu(&menu, selectedText);
+         menu.addSeparator();
+         menu.addActions(mMsgView->viewerPluginActionList(MessageViewer::ViewerPluginInterface::NeedSelection));
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+         if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
+             menu.addSeparator();
+             menu.addAction(mMsgView->speakTextAction());
+         }
++#endif
+         menu.addSeparator();
+         menu.addAction(mMsgView->shareTextAction());
+     } else if (!urlMenuAdded) {
+diff --git a/src/kmreadermainwin.cpp b/src/kmreadermainwin.cpp
+index 4967459cc..85c488f97 100644
+--- a/src/kmreadermainwin.cpp
++++ b/src/kmreadermainwin.cpp
+@@ -54,7 +54,10 @@
+ #include <Akonadi/ItemCreateJob>
+ #include <Akonadi/ItemMoveJob>
+ #include <Akonadi/KMime/MessageFlags>
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+ #include <MailCommon/MailUtil>
+ #include <MessageViewer/DKIMViewerMenu>
+ #include <MessageViewer/DKIMWidgetInfo>
+@@ -736,10 +739,12 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg,
+         mMsgActions->addWebShortcutsMenu(menu, selectedText);
+         menu->addSeparator();
+         menu->addActions(mReaderWin->viewerPluginActionList(MessageViewer::ViewerPluginInterface::NeedSelection));
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+         if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
+             menu->addSeparator();
+             menu->addAction(mReaderWin->speakTextAction());
+         }
++#endif
+         menu->addSeparator();
+         menu->addAction(mReaderWin->shareTextAction());
+     } else if (!urlMenuAdded) {
+-- 
+GitLab
+

diff --git a/kde-apps/kmail/kmail-21.12.49.9999.ebuild b/kde-apps/kmail/kmail-21.12.49.9999.ebuild
index ffbffdd5ea..6833a72d42 100644
--- a/kde-apps/kmail/kmail-21.12.49.9999.ebuild
+++ b/kde-apps/kmail/kmail-21.12.49.9999.ebuild
@@ -18,7 +18,7 @@ https://kontact.kde.org/components/kmail.html"
 LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
 SLOT="5"
 KEYWORDS=""
-IUSE="pch telemetry"
+IUSE="pch speech telemetry"
 
 RESTRICT="test" # bug 616878
 
@@ -38,7 +38,7 @@ COMMON_DEPEND="
 	>=kde-apps/kmailtransport-${PVCUT}:5
 	>=kde-apps/kmime-${PVCUT}:5
 	>=kde-apps/kontactinterface-${PVCUT}:5
-	>=kde-apps/kpimtextedit-${PVCUT}:5
+	>=kde-apps/kpimtextedit-${PVCUT}:5[speech=]
 	>=kde-apps/libgravatar-${PVCUT}:5
 	>=kde-apps/libkdepim-${PVCUT}:5
 	>=kde-apps/libkleo-${PVCUT}:5
@@ -88,6 +88,8 @@ BDEPEND="
 	test? ( >=kde-apps/akonadi-${PVCUT}:5[tools] )
 "
 
+PATCHES=( "${FILESDIR}"/${PN}-21.12.3-speech-optional.patch )
+
 src_prepare() {
 	ecm_src_prepare
 	use handbook || cmake_run_in ktnef cmake_comment_add_subdirectory doc

diff --git a/kde-apps/kmail/kmail-9999.ebuild b/kde-apps/kmail/kmail-9999.ebuild
index ffbffdd5ea..69950079bb 100644
--- a/kde-apps/kmail/kmail-9999.ebuild
+++ b/kde-apps/kmail/kmail-9999.ebuild
@@ -18,7 +18,7 @@ https://kontact.kde.org/components/kmail.html"
 LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
 SLOT="5"
 KEYWORDS=""
-IUSE="pch telemetry"
+IUSE="pch speech telemetry"
 
 RESTRICT="test" # bug 616878
 
@@ -38,7 +38,7 @@ COMMON_DEPEND="
 	>=kde-apps/kmailtransport-${PVCUT}:5
 	>=kde-apps/kmime-${PVCUT}:5
 	>=kde-apps/kontactinterface-${PVCUT}:5
-	>=kde-apps/kpimtextedit-${PVCUT}:5
+	>=kde-apps/kpimtextedit-${PVCUT}:5[speech=]
 	>=kde-apps/libgravatar-${PVCUT}:5
 	>=kde-apps/libkdepim-${PVCUT}:5
 	>=kde-apps/libkleo-${PVCUT}:5

diff --git a/kde-apps/kmail/metadata.xml b/kde-apps/kmail/metadata.xml
index d925f24397..fa80953797 100644
--- a/kde-apps/kmail/metadata.xml
+++ b/kde-apps/kmail/metadata.xml
@@ -8,4 +8,7 @@
 	<upstream>
 		<bugs-to>https://bugs.kde.org/</bugs-to>
 	</upstream>
+	<use>
+		<flag name="speech">Enable text-to-speech support</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-24 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24 17:04 [gentoo-commits] proj/kde:master commit in: kde-apps/kmail/, kde-apps/kmail/files/ Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox