From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/kjots/, app-text/kjots/files/
Date: Sun, 20 Mar 2022 13:53:34 +0000 (UTC) [thread overview]
Message-ID: <1647784404.adbd03782c2bbd20bccf44822a10d390c3680936.asturm@gentoo> (raw)
commit: adbd03782c2bbd20bccf44822a10d390c3680936
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 13:52:58 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 13:53:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adbd0378
app-text/kjots: Add IUSE speech
Closes: https://bugs.gentoo.org/835128
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../kjots/files/kjots-5.1.0-speech-optional.patch | 82 ++++++++++++++++++++++
app-text/kjots/kjots-5.1.0-r2.ebuild | 54 ++++++++++++++
app-text/kjots/metadata.xml | 3 +
3 files changed, 139 insertions(+)
diff --git a/app-text/kjots/files/kjots-5.1.0-speech-optional.patch b/app-text/kjots/files/kjots-5.1.0-speech-optional.patch
new file mode 100644
index 000000000000..95c3309bd5b9
--- /dev/null
+++ b/app-text/kjots/files/kjots-5.1.0-speech-optional.patch
@@ -0,0 +1,82 @@
+From c552b158e46ccdefc5c8382911aca907e177d63d Mon Sep 17 00:00:00 2001
+From: Igor Poboiko <igor.poboiko@gmail.com>
+Date: Sat, 19 Mar 2022 15:44:50 +0100
+Subject: [PATCH] Allow compiling without KPIMTextEdit/TextToSpeech
+
+---
+ src/kjotsbrowser.cpp | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/src/kjotsbrowser.cpp b/src/kjotsbrowser.cpp
+index fd6e6dd..8864f79 100644
+--- a/src/kjotsbrowser.cpp
++++ b/src/kjotsbrowser.cpp
+@@ -15,9 +15,13 @@
+ #include "kjotsmodel.h"
+
+ #include <KPIMTextEdit/RichTextEditFindBar>
+-#include <KPIMTextEdit/TextToSpeechWidget>
+ #include <KPIMTextEdit/SlideContainer>
+
++#include <kpimtextedit/kpimtextedit-texttospeech.h>
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
++#include <KPIMTextEdit/TextToSpeechWidget>
++#endif
++
+ #include <QHelpEvent>
+ #include <QToolTip>
+ #include <QVBoxLayout>
+@@ -37,14 +41,18 @@ public:
+ : mBrowser(std::move(browser))
+ , mSliderContainer(widget)
+ , mFindBar(mBrowser.get(), &mSliderContainer)
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ , mTextToSpeechWidget(widget)
++#endif
+ {
+ }
+
+ std::unique_ptr<KJotsBrowser> mBrowser;
+ KPIMTextEdit::SlideContainer mSliderContainer;
+ KPIMTextEdit::RichTextEditFindBar mFindBar;
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ KPIMTextEdit::TextToSpeechWidget mTextToSpeechWidget;
++#endif
+ };
+
+ KJotsBrowserWidget::KJotsBrowserWidget(std::unique_ptr<KJotsBrowser> browser, QWidget *parent)
+@@ -56,11 +64,15 @@ KJotsBrowserWidget::KJotsBrowserWidget(std::unique_ptr<KJotsBrowser> browser, QW
+ d->mFindBar.setHideWhenClose(false);
+
+ connect(&d->mFindBar, &KPIMTextEdit::RichTextEditFindBar::hideFindBar, this, &KJotsBrowserWidget::slotHideFindBar);
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ connect(d->mBrowser.get(), &KJotsBrowser::say, &d->mTextToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say);
++#endif
+
+ QVBoxLayout *lay = new QVBoxLayout(this);
+ lay->setContentsMargins(0, 0, 0, 0);
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ lay->addWidget(&d->mTextToSpeechWidget);
++#endif
+ lay->addWidget(d->mBrowser.get());
+ lay->addWidget(&d->mSliderContainer);
+ }
+@@ -129,6 +141,7 @@ void KJotsBrowser::contextMenuEvent(QContextMenuEvent *event)
+ popup->addSeparator();
+ popup->addAction(m_actionCollection->action(QString::fromLatin1(KStandardAction::name(KStandardAction::Find))));
+ popup->addSeparator();
++#if KPIMTEXTEDIT_TEXT_TO_SPEECH
+ if (!document()->isEmpty() && KPIMTextEdit::TextToSpeech::self()->isReady()) {
+ QAction *speakAction = popup->addAction(i18nc("@info:action", "Speak Text"));
+ speakAction->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-text-to-speech")));
+@@ -137,6 +150,7 @@ void KJotsBrowser::contextMenuEvent(QContextMenuEvent *event)
+ Q_EMIT say(text);
+ });
+ }
++#endif
+ popup->exec(event->globalPos());
+ delete popup;
+ }
+--
+GitLab
+
diff --git a/app-text/kjots/kjots-5.1.0-r2.ebuild b/app-text/kjots/kjots-5.1.0-r2.ebuild
new file mode 100644
index 000000000000..d7b50e76ebf6
--- /dev/null
+++ b/app-text/kjots/kjots-5.1.0-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_CATEGORY="pim"
+KFMIN=5.82.0
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Note taking utility by KDE"
+HOMEPAGE="https://userbase.kde.org/KJots https://community.kde.org/PIM/KJots"
+
+if [[ ${KDE_BUILD_TYPE} != live ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="5"
+IUSE="speech"
+
+DEPEND="
+ dev-libs/grantlee:5
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-apps/akonadi-20.12.2:5
+ >=kde-apps/akonadi-notes-20.12.2:5
+ >=kde-apps/kmime-20.12.2:5
+ >=kde-apps/kontactinterface-20.12.2:5
+ >=kde-apps/kpimtextedit-20.12.2:5[speech=]
+ >=kde-frameworks/kbookmarks-${KFMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-unused-dep.patch"
+ "${FILESDIR}/${P}-implicit-dep.patch"
+ "${FILESDIR}/${P}-missing-lib.patch"
+ "${FILESDIR}/${P}-akonadi-21.12.0.patch" # bug 830580
+ "${FILESDIR}/${P}-speech-optional.patch" # bug 835128
+)
diff --git a/app-text/kjots/metadata.xml b/app-text/kjots/metadata.xml
index d925f2439758..fa80953797d0 100644
--- a/app-text/kjots/metadata.xml
+++ b/app-text/kjots/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-03-20 13:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 13:53 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-30 14:04 [gentoo-commits] repo/gentoo:master commit in: app-text/kjots/, app-text/kjots/files/ Andreas Sturmlechner
2022-08-28 13:05 Andreas Sturmlechner
2022-05-09 0:34 Andreas Sturmlechner
2020-09-20 8:42 Andreas Sturmlechner
2020-04-21 14:41 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=1647784404.adbd03782c2bbd20bccf44822a10d390c3680936.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