commit: ac7535cce2ad786c5ec95d8c68902afd64a3cbca
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 11 23:23:57 2017 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 23:34:46 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac7535cc
kde-apps/cantor: Fix build w/ USE=python and KF-5.31
Package-Manager: portage-2.3.3
kde-apps/cantor/cantor-16.12.2.ebuild | 5 +++-
.../files/cantor-16.12.2-python-kf-5.31.patch | 28 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/kde-apps/cantor/cantor-16.12.2.ebuild
b/kde-apps/cantor/cantor-16.12.2.ebuild
index 19314488a8..669532f809 100644
--- a/kde-apps/cantor/cantor-16.12.2.ebuild
+++ b/kde-apps/cantor/cantor-16.12.2.ebuild
@@ -56,7 +56,10 @@ RDEPEND="${RDEPEND}"
RESTRICT+=" test"
-PATCHES=( "${FILESDIR}"/${P}-bashism.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-bashism.patch
+ "${FILESDIR}"/${P}-python-kf-5.31.patch
+)
pkg_pretend() {
kde5_pkg_pretend
diff --git a/kde-apps/cantor/files/cantor-16.12.2-python-kf-5.31.patch
b/kde-apps/cantor/files/cantor-16.12.2-python-kf-5.31.patch
new file mode 100644
index 0000000000..b8c5161b49
--- /dev/null
+++ b/kde-apps/cantor/files/cantor-16.12.2-python-kf-5.31.patch
@@ -0,0 +1,28 @@
+commit 4b8ef6bed62daced90c7826985650c2a813d2996
+Author: Jonathan Riddell <[email protected]>
+Date: Wed Feb 8 14:56:48 2017 +0000
+
+ remove modern C++ use to fix compile with current KDE policy
+
+diff --git a/src/backends/python/pythonhighlighter.cpp
b/src/backends/python/pythonhighlighter.cpp
+index 4064524..87b10dd 100644
+--- a/src/backends/python/pythonhighlighter.cpp
++++ b/src/backends/python/pythonhighlighter.cpp
+@@ -87,7 +87,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ while (pos < text.length()) {
+ // Trying to close current environments
+ bool triggered = false;
+- for (int i = 0; i < flags.size() and not triggered; i++) {
++ for (int i = 0; i < flags.size() && !triggered; i++) {
+ int flag = flags[i];
+ QRegExp ®exp = regexps[i];
+ QTextCharFormat &format = formats[i];
+@@ -126,7 +126,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ singleLineCommentStart.indexIn(text, pos);
+
+ if (singleLineCommentStartPos != -1
+- and singleLineCommentStartPos < minPos) {
++ && singleLineCommentStartPos < minPos) {
+ setFormat(pos, text.length() - pos, commentFormat());
+ break;
+ } else if (minRegexp) {