From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/kalarm/files/, kde-apps/kalarm/
Date: Sun, 27 Feb 2022 23:22:14 +0000 (UTC) [thread overview]
Message-ID: <1646004049.32a86d5ca4fe16e46a1acf2777bd16d5ea38557d.asturm@gentoo> (raw)
commit: 32a86d5ca4fe16e46a1acf2777bd16d5ea38557d
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 23:19:37 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 23:20:49 2022 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=32a86d5c
kde-apps/kalarm: 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/kalarm-21.12.3-speech-optional.patch | 124 +++++++++++++++++++++
kde-apps/kalarm/kalarm-21.12.49.9999.ebuild | 6 +-
kde-apps/kalarm/kalarm-9999.ebuild | 4 +-
kde-apps/kalarm/metadata.xml | 3 +
4 files changed, 133 insertions(+), 4 deletions(-)
diff --git a/kde-apps/kalarm/files/kalarm-21.12.3-speech-optional.patch b/kde-apps/kalarm/files/kalarm-21.12.3-speech-optional.patch
new file mode 100644
index 0000000000..ce4f45c376
--- /dev/null
+++ b/kde-apps/kalarm/files/kalarm-21.12.3-speech-optional.patch
@@ -0,0 +1,124 @@
+From 53a299c513c447afc57c7f520ac35aea2dffc277 Mon Sep 17 00:00:00 2001
+From: Laurent Montel <montel@kde.org>
+Date: Fri, 25 Feb 2022 07:29:19 +0100
+Subject: [PATCH] Make build without texttospeech support
+
+---
+ src/commandoptions.cpp | 7 +++++++
+ src/messagedisplayhelper.cpp | 5 +++++
+ src/prefdlg.cpp | 5 +++++
+ src/soundpicker.cpp | 5 +++++
+ 4 files changed, 22 insertions(+)
+
+diff --git a/src/commandoptions.cpp b/src/commandoptions.cpp
+index a564fbb3..a6bbded1 100644
+--- a/src/commandoptions.cpp
++++ b/src/commandoptions.cpp
+@@ -14,7 +14,10 @@
+ #include "kalarm_debug.h"
+
+ #include <KAlarmCal/Identities>
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+ #include <KLocalizedString>
+
+ #include <QCommandLineParser>
+@@ -570,7 +573,11 @@ void CommandOptions::process()
+ {
+ if (mParser->isSet(*mOptions.at(BEEP)))
+ setErrorIncompatible(BEEP, SPEAK);
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ else if (!KPIMTextEdit::TextToSpeech::self()->isReady())
++#else
++ else
++#endif
+ setError(xi18nc("@info:shell", "<icode>%1</icode> requires KAlarm to be compiled with QTextToSpeech support", optionName(SPEAK)));
+ }
+ const bool onceOnly = mParser->isSet(*mOptions.at(REMINDER_ONCE));
+diff --git a/src/messagedisplayhelper.cpp b/src/messagedisplayhelper.cpp
+index 0f6b9680..6e80e8ca 100644
+--- a/src/messagedisplayhelper.cpp
++++ b/src/messagedisplayhelper.cpp
+@@ -21,7 +21,10 @@
+ #include "lib/synchtimer.h"
+ #include "kalarm_debug.h"
+
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+
+ #include <KLocalizedString>
+ #include <KConfig>
+@@ -831,6 +834,7 @@ void MessageDisplayHelper::playAudio()
+ */
+ void MessageDisplayHelper::slotSpeak()
+ {
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ KPIMTextEdit::TextToSpeech* tts = KPIMTextEdit::TextToSpeech::self();
+ if (!tts->isReady())
+ {
+@@ -840,6 +844,7 @@ void MessageDisplayHelper::slotSpeak()
+ }
+
+ tts->say(mMessage);
++#endif
+ }
+
+ /******************************************************************************
+diff --git a/src/prefdlg.cpp b/src/prefdlg.cpp
+index ea32116e..d3cf48ae 100644
+--- a/src/prefdlg.cpp
++++ b/src/prefdlg.cpp
+@@ -48,7 +48,10 @@
+ #include <KHolidays/HolidayRegion>
+ using namespace KHolidays;
+
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+
+ #include <KLocalizedString>
+ #include <KShell>
+@@ -1355,8 +1358,10 @@ EditPrefTab::EditPrefTab(StackedScrollGroup* scrollGroup)
+ mSound->addItem(SoundPicker::i18n_combo_None()); // index 0
+ mSound->addItem(SoundPicker::i18n_combo_Beep()); // index 1
+ mSound->addItem(SoundPicker::i18n_combo_File()); // index 2
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ if (KPIMTextEdit::TextToSpeech::self()->isReady())
+ mSound->addItem(SoundPicker::i18n_combo_Speak()); // index 3
++#endif
+ mSound->setMinimumSize(mSound->sizeHint());
+ mSound->setWhatsThis(defsetting.subs(SoundPicker::i18n_label_Sound()).toString());
+ hlayout->addWidget(mSound);
+diff --git a/src/soundpicker.cpp b/src/soundpicker.cpp
+index 426baf96..f85071ea 100644
+--- a/src/soundpicker.cpp
++++ b/src/soundpicker.cpp
+@@ -16,7 +16,10 @@
+ #include "lib/pushbutton.h"
+ #include "kalarm_debug.h"
+
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ #include <KPIMTextEdit/TextToSpeech>
++#endif
+
+ #include <KLocalizedString>
+ #include <phonon/backendcapabilities.h>
+@@ -130,7 +133,9 @@ void SoundPicker::showFile(bool show)
+ */
+ void SoundPicker::showSpeak(bool show)
+ {
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ if (!KPIMTextEdit::TextToSpeech::self()->isReady())
++#endif
+ show = false; // speech capability is not installed or configured
+ if (show != mSpeakShowing)
+ {
+--
+GitLab
+
diff --git a/kde-apps/kalarm/kalarm-21.12.49.9999.ebuild b/kde-apps/kalarm/kalarm-21.12.49.9999.ebuild
index 8ff08c36c0..96894ed98f 100644
--- a/kde-apps/kalarm/kalarm-21.12.49.9999.ebuild
+++ b/kde-apps/kalarm/kalarm-21.12.49.9999.ebuild
@@ -15,7 +15,7 @@ HOMEPAGE="https://apps.kde.org/kalarm/ https://userbase.kde.org/KAlarm"
LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
SLOT="5"
KEYWORDS=""
-IUSE="X"
+IUSE="speech X"
DEPEND="
>=dev-qt/qtdbus-${QTMIN}:5
@@ -31,7 +31,7 @@ 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/pimcommon-${PVCUT}:5
>=kde-frameworks/kauth-${KFMIN}:5
>=kde-frameworks/kcalendarcore-${KFMIN}:5
@@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
>=kde-apps/kdepim-runtime-${PVCUT}:5
"
+PATCHES=( "${FILESDIR}"/${PN}-21.12.3-speech-optional.patch )
+
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package X Qt5X11Extras)
diff --git a/kde-apps/kalarm/kalarm-9999.ebuild b/kde-apps/kalarm/kalarm-9999.ebuild
index 8ff08c36c0..7578bf3b12 100644
--- a/kde-apps/kalarm/kalarm-9999.ebuild
+++ b/kde-apps/kalarm/kalarm-9999.ebuild
@@ -15,7 +15,7 @@ HOMEPAGE="https://apps.kde.org/kalarm/ https://userbase.kde.org/KAlarm"
LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
SLOT="5"
KEYWORDS=""
-IUSE="X"
+IUSE="speech X"
DEPEND="
>=dev-qt/qtdbus-${QTMIN}:5
@@ -31,7 +31,7 @@ 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/pimcommon-${PVCUT}:5
>=kde-frameworks/kauth-${KFMIN}:5
>=kde-frameworks/kcalendarcore-${KFMIN}:5
diff --git a/kde-apps/kalarm/metadata.xml b/kde-apps/kalarm/metadata.xml
index d925f24397..fa80953797 100644
--- a/kde-apps/kalarm/metadata.xml
+++ b/kde-apps/kalarm/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>
next reply other threads:[~2022-02-27 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 23:22 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-06 7:46 [gentoo-commits] proj/kde:master commit in: kde-apps/kalarm/files/, kde-apps/kalarm/ Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1646004049.32a86d5ca4fe16e46a1acf2777bd16d5ea38557d.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox