aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-02-24 17:58:07 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-02-24 18:04:23 +0100
commite49b850b1e9c9cae33ebfde2925eda070bd9fd8d (patch)
treea94ecbd4597fdfb008c1678312515a0f1b4f31ff
parentkde-apps/akregator: Add IUSE speech (diff)
downloadkde-e49b850b1e9c9cae33ebfde2925eda070bd9fd8d.tar.gz
kde-e49b850b1e9c9cae33ebfde2925eda070bd9fd8d.tar.bz2
kde-e49b850b1e9c9cae33ebfde2925eda070bd9fd8d.zip
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@gentoo.org>
-rw-r--r--kde-apps/kmail/files/kmail-21.12.3-speech-optional.patch69
-rw-r--r--kde-apps/kmail/kmail-21.12.49.9999.ebuild6
-rw-r--r--kde-apps/kmail/kmail-9999.ebuild4
-rw-r--r--kde-apps/kmail/metadata.xml3
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>