commit:     88ed7290978643f3864f4fff93b2e4ade74b444c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 06:43:03 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 06:43:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88ed7290

dev-vcs/kdesvn: EAPI-7 bump, upstream fixes

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kdesvn-2.0.0-askpass-porting-fix.patch   | 42 +++++++++
 dev-vcs/kdesvn/files/kdesvn-2.0.0-cmake.patch      | 26 ++++++
 .../files/kdesvn-2.0.0-fix-outofbounds.patch       | 99 ++++++++++++++++++++++
 .../files/kdesvn-2.0.0-fix-runtime-warning.patch   | 28 ++++++
 dev-vcs/kdesvn/kdesvn-2.0.0-r1.ebuild              | 68 +++++++++++++++
 5 files changed, 263 insertions(+)

diff --git a/dev-vcs/kdesvn/files/kdesvn-2.0.0-askpass-porting-fix.patch 
b/dev-vcs/kdesvn/files/kdesvn-2.0.0-askpass-porting-fix.patch
new file mode 100644
index 00000000000..8e95270f429
--- /dev/null
+++ b/dev-vcs/kdesvn/files/kdesvn-2.0.0-askpass-porting-fix.patch
@@ -0,0 +1,42 @@
+From 8be5c9f4f27d3312715c0d60ea6c088ae32283b7 Mon Sep 17 00:00:00 2001
+From: Luigi Toscano <luigi.tosc...@tiscali.it>
+Date: Tue, 31 Jan 2017 01:29:58 +0100
+Subject: Fix porting issues with kdesvn-askpass
+
+- properly setup and run the command line parser, fixing the order
+  of the operations;
+- set the translation catalog;
+- remove a porting-related comment.
+---
+ src/askpass/kdesvn-askpass.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/askpass/kdesvn-askpass.cpp b/src/askpass/kdesvn-askpass.cpp
+index aea5986..030fa9c 100644
+--- a/src/askpass/kdesvn-askpass.cpp
++++ b/src/askpass/kdesvn-askpass.cpp
+@@ -30,7 +30,8 @@
+ 
+ int main(int argc, char **argv)
+ {
+-    QApplication app(argc, argv); // PORTING SCRIPT: move this to before the 
KAboutData initialization
++    QApplication app(argc, argv);
++    KLocalizedString::setApplicationDomain("kdesvn");
+     KAboutData aboutData(QStringLiteral("kdesvnaskpass"), 
i18n("kdesvnaskpass"), QStringLiteral("0.2"),
+                          i18n("ssh-askpass for kdesvn"),
+                          KAboutLicense::LicenseKey::LGPL,
+@@ -39,10 +40,10 @@ int main(int argc, char **argv)
+     KAboutData::setApplicationData(aboutData);
+     parser.addVersionOption();
+     parser.addHelpOption();
+-    aboutData.setupCommandLine(&parser);
+-    aboutData.processCommandLine(&parser);
+     parser.addPositionalArgument(QStringLiteral("[prompt]"), i18n("Prompt"));
++    aboutData.setupCommandLine(&parser);
+     parser.process(app);
++    aboutData.processCommandLine(&parser);
+     // no need for session management
+     //app.disableSessionManagement();
+ 
+-- 
+cgit v1.1

diff --git a/dev-vcs/kdesvn/files/kdesvn-2.0.0-cmake.patch 
b/dev-vcs/kdesvn/files/kdesvn-2.0.0-cmake.patch
new file mode 100644
index 00000000000..f331cdb49da
--- /dev/null
+++ b/dev-vcs/kdesvn/files/kdesvn-2.0.0-cmake.patch
@@ -0,0 +1,26 @@
+From 18039eb7a3a6c5a24cd58b3e9c924ba63d60ca61 Mon Sep 17 00:00:00 2001
+From: David Faure <fa...@kde.org>
+Date: Sat, 3 Feb 2018 11:32:44 +0100
+Subject: Fix cmake syntax, this was adding -I settingsdlgs -I PUBLIC to the
+ command line
+
+(detected by -Wmissing-include-dirs)
+---
+ src/settings/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/settings/CMakeLists.txt b/src/settings/CMakeLists.txt
+index a983484..259a256 100644
+--- a/src/settings/CMakeLists.txt
++++ b/src/settings/CMakeLists.txt
+@@ -56,7 +56,7 @@ target_link_libraries(settingsdlgs
+         KF5::Completion
+         KF5::I18n
+ )
+-include_directories(settingsdlgs
++target_include_directories(settingsdlgs
+     PUBLIC
+         ${CMAKE_CURRENT_SOURCE_DIR}/../
+         ${CMAKE_CURRENT_BINARY_DIR}/../
+-- 
+cgit v1.1

diff --git a/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-outofbounds.patch 
b/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-outofbounds.patch
new file mode 100644
index 00000000000..fa12c2db868
--- /dev/null
+++ b/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-outofbounds.patch
@@ -0,0 +1,99 @@
+From f87f3c9cfc5924742236bee606cc2107475968ce Mon Sep 17 00:00:00 2001
+From: David Faure <fa...@kde.org>
+Date: Fri, 15 Feb 2019 16:22:50 +0100
+Subject: Fix ASSERTs when calling beginRemoveRows with out of bounds
+ parameters.
+
+The last param must be the last row, not the row count.
+---
+ src/ksvnwidgets/models/commitmodel.cpp  | 49 +++++++++++++++++++--------------
+ src/svnfrontend/models/svnitemmodel.cpp |  6 ++--
+ 2 files changed, 33 insertions(+), 22 deletions(-)
+
+diff --git a/src/ksvnwidgets/models/commitmodel.cpp 
b/src/ksvnwidgets/models/commitmodel.cpp
+index 4b5be8a..ac9d1ff 100644
+--- a/src/ksvnwidgets/models/commitmodel.cpp
++++ b/src/ksvnwidgets/models/commitmodel.cpp
+@@ -46,33 +46,42 @@ CommitModel::~CommitModel()
+ 
+ void CommitModel::setCommitData(const svn::CommitItemList &aList)
+ {
+-    beginRemoveRows(QModelIndex(), 0, m_List.count());
+-    m_List.clear();
+-    endRemoveRows();
+-
+-    m_List.reserve(aList.size());
+-    beginInsertRows(QModelIndex(), 0, aList.size() - 1);
+-    for (int j = 0; j < aList.size(); ++j) {
+-        m_List.append(CommitModelNodePtr(new CommitModelNode(aList[j])));
++    if (!m_List.isEmpty()) {
++        beginRemoveRows(QModelIndex(), 0, m_List.count() - 1);
++        m_List.clear();
++        endRemoveRows();
++    }
++
++    if (!aList.isEmpty()) {
++        m_List.reserve(aList.size());
++        beginInsertRows(QModelIndex(), 0, aList.size() - 1);
++        for (int j = 0; j < aList.size(); ++j) {
++            m_List.append(CommitModelNodePtr(new CommitModelNode(aList[j])));
++        }
++        endInsertRows();
+     }
+-    endInsertRows();
+ }
+ 
+ void CommitModel::setCommitData(const CommitActionEntries &checked, const 
CommitActionEntries &notchecked)
+ {
+-    beginRemoveRows(QModelIndex(), 0, m_List.count());
+-    m_List.clear();
+-    endRemoveRows();
+-
+-    m_List.reserve(checked.size() + notchecked.size());
+-    beginInsertRows(QModelIndex(), 0, checked.size() + notchecked.size() - 1);
+-    for (int j = 0; j < checked.size(); ++j) {
+-        m_List.append(CommitModelNodePtr(new CommitModelNode(checked[j], 
true)));
++    if (!m_List.isEmpty()) {
++        beginRemoveRows(QModelIndex(), 0, m_List.count() - 1);
++        m_List.clear();
++        endRemoveRows();
+     }
+-    for (int j = 0; j < notchecked.size(); ++j) {
+-        m_List.append(CommitModelNodePtr(new CommitModelNode(notchecked[j], 
false)));
++
++    const int totalSize = checked.size() + notchecked.size();
++    if (totalSize > 0) {
++        m_List.reserve(totalSize);
++        beginInsertRows(QModelIndex(), 0, totalSize - 1);
++        for (int j = 0; j < checked.size(); ++j) {
++            m_List.append(CommitModelNodePtr(new CommitModelNode(checked[j], 
true)));
++        }
++        for (int j = 0; j < notchecked.size(); ++j) {
++            m_List.append(CommitModelNodePtr(new 
CommitModelNode(notchecked[j], false)));
++        }
++        endInsertRows();
+     }
+-    endInsertRows();
+ }
+ 
+ int CommitModel::ActionColumn()const
+diff --git a/src/svnfrontend/models/svnitemmodel.cpp 
b/src/svnfrontend/models/svnitemmodel.cpp
+index 0c76e50..8e99e64 100644
+--- a/src/svnfrontend/models/svnitemmodel.cpp
++++ b/src/svnfrontend/models/svnitemmodel.cpp
+@@ -173,9 +173,11 @@ void SvnItemModel::setRootNodeStat(const svn::StatusPtr 
&stat)
+ void SvnItemModel::clear()
+ {
+     int numRows = m_Data->m_rootNode->childList().count();
+-    beginRemoveRows(QModelIndex(), 0, numRows);
++    if (numRows > 0)
++        beginRemoveRows(QModelIndex(), 0, numRows - 1);
+     m_Data->clear();
+-    endRemoveRows();
++    if (numRows > 0)
++        endRemoveRows();
+ }
+ 
+ void SvnItemModel::beginRemoveRows(const QModelIndex &parent, int first, int 
last)
+-- 
+cgit v1.1

diff --git a/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-runtime-warning.patch 
b/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-runtime-warning.patch
new file mode 100644
index 00000000000..6b9dda46c81
--- /dev/null
+++ b/dev-vcs/kdesvn/files/kdesvn-2.0.0-fix-runtime-warning.patch
@@ -0,0 +1,28 @@
+From f81a246839b459c57ed89e2d267ae7e07c8c73c1 Mon Sep 17 00:00:00 2001
+From: David Faure <fa...@kde.org>
+Date: Fri, 15 Feb 2019 16:24:07 +0100
+Subject: Fix copy/paste typo on variable name
+
+Detected by this Qt warning showing up:
+QObject::connect: Cannot connect (null)::checkModifiedFinished() to 
SvnActions::checkUpdateThread()
+
+CCMAIL: ch.ehrlic...@gmx.de
+---
+ src/svnfrontend/svnactions.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/svnfrontend/svnactions.cpp b/src/svnfrontend/svnactions.cpp
+index 0f27fed..9a5b4e3 100644
+--- a/src/svnfrontend/svnactions.cpp
++++ b/src/svnfrontend/svnactions.cpp
+@@ -2675,7 +2675,7 @@ bool SvnActions::createUpdateCache(const QString &what)
+         return false;
+     }
+     m_UThread = new CheckModifiedThread(this, what, true);
+-    connect(m_CThread, SIGNAL(checkModifiedFinished()),
++    connect(m_UThread, SIGNAL(checkModifiedFinished()),
+             this, SLOT(checkUpdateThread()));
+     m_UThread->start();
+     emit sigExtraStatusMessage(i18n("Checking for updates started in 
background"));
+-- 
+cgit v1.1

diff --git a/dev-vcs/kdesvn/kdesvn-2.0.0-r1.ebuild 
b/dev-vcs/kdesvn/kdesvn-2.0.0-r1.ebuild
new file mode 100644
index 00000000000..f1d2ad8f8de
--- /dev/null
+++ b/dev-vcs/kdesvn/kdesvn-2.0.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KDE_HANDBOOK="forceoptional"
+inherit kde5
+
+DESCRIPTION="A frontend to the subversion vcs"
+HOMEPAGE="https://kdesvn.alwins-world.de/ https://cgit.kde.org/kdesvn.git";
+if [[ ${PV} != 9999* ]]; then
+       SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="+man"
+
+DEPEND="
+       $(add_frameworks_dep kbookmarks)
+       $(add_frameworks_dep kcodecs)
+       $(add_frameworks_dep kcompletion)
+       $(add_frameworks_dep kconfig)
+       $(add_frameworks_dep kconfigwidgets)
+       $(add_frameworks_dep kcoreaddons)
+       $(add_frameworks_dep kdbusaddons)
+       $(add_frameworks_dep ki18n)
+       $(add_frameworks_dep kiconthemes)
+       $(add_frameworks_dep kio)
+       $(add_frameworks_dep kitemviews)
+       $(add_frameworks_dep kjobwidgets)
+       $(add_frameworks_dep knotifications)
+       $(add_frameworks_dep kparts)
+       $(add_frameworks_dep kservice)
+       $(add_frameworks_dep ktextwidgets)
+       $(add_frameworks_dep kwallet)
+       $(add_frameworks_dep kwidgetsaddons)
+       $(add_frameworks_dep kxmlgui)
+       $(add_qt_dep qtdbus)
+       $(add_qt_dep qtgui)
+       $(add_qt_dep qtsql 'sqlite')
+       $(add_qt_dep qtwidgets)
+       $(add_qt_dep qtxml)
+       dev-libs/apr:1
+       dev-libs/apr-util:1
+       dev-vcs/subversion
+"
+RDEPEND="${DEPEND}
+       !kde-apps/kdesdk-kioslaves:4[subversion(-)]
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-desktop.patch"
+       "${FILESDIR}/${P}-deps.patch"
+       "${FILESDIR}/${P}-qt-5.11.patch"
+       "${FILESDIR}/${P}-askpass-porting-fix.patch"
+       "${FILESDIR}/${P}-cmake.patch"
+       "${FILESDIR}/${P}-fix-outofbounds.patch"
+       "${FILESDIR}/${P}-fix-runtime-warning.patch"
+)
+
+src_prepare(){
+       kde5_src_prepare
+
+       if ! use man ; then
+               sed -i -e "/kdoctools_create_manpage/ s/^/#/" 
doc/CMakeLists.txt || die
+       fi
+}

Reply via email to