summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-04-17 21:54:23 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-04-17 22:58:45 +0200
commit50aa962977df4cf074391356df6737c593aff7bf (patch)
tree75bb246f8d34323702ed495b1a3eae96f7a8d643 /net-irc
parentkde-apps/krdc: Set ISE="+vnc" (diff)
downloadgentoo-50aa962977df4cf074391356df6737c593aff7bf.tar.gz
gentoo-50aa962977df4cf074391356df6737c593aff7bf.tar.bz2
gentoo-50aa962977df4cf074391356df6737c593aff7bf.zip
net-irc/konversation: Port to QElapsedTimer
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/konversation/files/konversation-1.7.5-QElapsedTimer.patch81
-rw-r--r--net-irc/konversation/konversation-1.7.5-r2.ebuild81
2 files changed, 162 insertions, 0 deletions
diff --git a/net-irc/konversation/files/konversation-1.7.5-QElapsedTimer.patch b/net-irc/konversation/files/konversation-1.7.5-QElapsedTimer.patch
new file mode 100644
index 000000000000..74fd23e58d3c
--- /dev/null
+++ b/net-irc/konversation/files/konversation-1.7.5-QElapsedTimer.patch
@@ -0,0 +1,81 @@
+From 0efede7857a86f729bec0fdfd1789f7faf23d957 Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Thu, 28 Nov 2019 17:41:33 +0100
+Subject: Port to QElapsedTimer; remove unused default constructor
+
+Tested by printing out the value of age(), works like before.
+---
+ src/irc/ircqueue.cpp | 8 ++++++++
+ src/irc/ircqueue.h | 18 +++++++-----------
+ 2 files changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/src/irc/ircqueue.cpp b/src/irc/ircqueue.cpp
+index 1101623..3cc33a5 100644
+--- a/src/irc/ircqueue.cpp
++++ b/src/irc/ircqueue.cpp
+@@ -19,6 +19,14 @@
+
+ #include "server.h"
+
++IRCMessage::IRCMessage(const QString &str)
++ : s(str) //, codec(QTextCodec::codecForName("utf8"))
++{
++ t.start();
++}
++
++////
++
+ int IRCQueue::EmptyingRate::nextInterval(int, int elapsed)
+ {
+ if (!isValid())
+diff --git a/src/irc/ircqueue.h b/src/irc/ircqueue.h
+index 3f7f0c8..7a91776 100644
+--- a/src/irc/ircqueue.h
++++ b/src/irc/ircqueue.h
+@@ -19,6 +19,7 @@
+ #include <QObject>
+ #include <QList>
+ #include <QTime>
++#include <QElapsedTimer>
+
+ class QTimer;
+ class Server;
+@@ -34,29 +35,24 @@ class Server;
+ */
+ struct IRCMessage
+ {
+- IRCMessage() : t(QTime::currentTime()) //, codec(QTextCodec::codecForName("utf8"))
+- {} ///< this constructor required for QValueList, do not use
+-
+ /**
+ Make a new IRCMessage with timestamp of QTime::currentTime().
+
+ Note the constructor takes a QString, not a const QString& or a QString *. If you want to modify the
+ contained text, put it back with setText.
+ */
+- IRCMessage(QString i) : s(i), t(QTime::currentTime()) //, codec(QTextCodec::codecForName("utf8"))
+- {}
++ IRCMessage(const QString &str);
+
+- QString text() { return s; }
+- int age() { return t.elapsed(); }
+- QTime time() { return t; }
+- void setText(QString text) { s=text; }
++ QString text() const { return s; }
++ int age() const { return t.elapsed(); } // in milliseconds
++ void setText(const QString &text) { s=text; }
+ private:
+ QString s;
+- QTime t;
++ QElapsedTimer t;
+
+ //FIXME wire this up
+ //QTextCodec* codec;
+- //operator const char * () const { return codec->fromUnicode(text()); }
++ //operator QByteArray () const { return codec->fromUnicode(text()); }
+
+ };
+
+--
+cgit v1.1
+
diff --git a/net-irc/konversation/konversation-1.7.5-r2.ebuild b/net-irc/konversation/konversation-1.7.5-r2.ebuild
new file mode 100644
index 000000000000..f43ed032dde1
--- /dev/null
+++ b/net-irc/konversation/konversation-1.7.5-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="forceoptional"
+KFMIN=5.60.0
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="User friendly IRC Client"
+HOMEPAGE="https://konversation.kde.org
+https://kde.org/applications/internet/org.kde.konversation"
+SRC_URI="mirror://kde/stable/${PN}/${PV/_/-}/src/${P/_/-}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="+crypt"
+
+BDEPEND="sys-devel/gettext"
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/karchive-${KFMIN}:5
+ >=kde-frameworks/kbookmarks-${KFMIN}:5
+ >=kde-frameworks/kcodecs-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kemoticons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kidletime-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemviews-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwallet-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ media-libs/phonon[qt5(+)]
+ crypt? ( app-crypt/qca:2[qt5(+)] )
+"
+RDEPEND="${DEPEND}
+ crypt? ( app-crypt/qca:2[ssl] )
+"
+
+PATCHES=(
+ # 1.7 branch
+ "${FILESDIR}"/${P}-fix-regex-for-cap-ack.patch
+ "${FILESDIR}"/${P}-missing-header.patch
+ "${FILESDIR}"/${P}-QElapsedTimer.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package crypt Qca-qt5)
+ )
+
+ ecm_src_configure
+}
+
+src_install() {
+ ecm_src_install
+
+ # Bug 616162
+ insinto /etc/xdg
+ doins "${FILESDIR}"/konversationrc
+}