public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/kdevelop-pg-qt/files/, dev-util/kdevelop-pg-qt/
@ 2019-10-26 12:41 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2019-10-26 12:41 UTC (permalink / raw
  To: gentoo-commits

commit:     1e51a6db7655c2933200fd427dd4c364b358291d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 26 12:15:57 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 26 12:41:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e51a6db

dev-util/kdevelop-pg-qt: Fix build against Qt 5.14.0

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

 .../files/kdevelop-pg-qt-2.2.0-qt-5.14.patch       | 60 ++++++++++++++++++++++
 .../kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild     |  2 +
 2 files changed, 62 insertions(+)

diff --git a/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch
new file mode 100644
index 00000000000..5a4dec36d88
--- /dev/null
+++ b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch
@@ -0,0 +1,60 @@
+From d05d0b19e9d6f47fee3e11d837c2c21125589763 Mon Sep 17 00:00:00 2001
+From: Alexey Min <alexey.min@gmail.com>
+Date: Thu, 24 Oct 2019 14:34:45 +0300
+Subject: Fix build with Qt 5.14
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Summary:
+Trying to build kdevelop-pg-qt with Qt 5.14 results in an error:
+```
+.../kdev-pg/kdev-pg-regexp.cpp:44:23: error: redefinition of ‘struct std::hash<QBitArray>’
+     template<> struct hash< type >                          \
+                       ^~~~~~~~~~~~
+.../kdev-pg/kdev-pg-regexp.cpp:53:1: note: in expansion of macro ‘q_Hash_to_tr1_hash’
+ q_Hash_to_tr1_hash(QBitArray)
+ ^~~~~~~~~~~~~~~~~~
+In file included from .../prefix514/include/QtCore/qvector.h:47:0,
+                 from .../prefix514/include/QtCore/QVector:1,
+                 from .../kdevelop-pg-qt/include/kdev-pg-char-sets.h:36,
+                 from .../kdevelop-pg-qt/kdev-pg/kdev-pg-regexp.cpp:20:
+.../prefix514/include/QtCore/qhashfunctions.h:209:1: note: previous definition of ‘struct std::hash<QBitArray>’
+ QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF(QBitArray)
+ ^
+```
+
+std::hash<QBitArray> is already specialized in Qt 5.14, so avoid redefinition with conditional compilation
+
+Test Plan: try to build with Qt 5.14
+
+Reviewers: apol
+
+Reviewed By: apol
+
+Subscribers: kdevelop-devel
+
+Tags: #kdevelop
+
+Differential Revision: https://phabricator.kde.org/D24914
+---
+ kdev-pg/kdev-pg-regexp.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/kdev-pg/kdev-pg-regexp.cpp b/kdev-pg/kdev-pg-regexp.cpp
+index 8cc0b95..9fee81c 100644
+--- a/kdev-pg/kdev-pg-regexp.cpp
++++ b/kdev-pg/kdev-pg-regexp.cpp
+@@ -50,7 +50,10 @@ namespace std                                               \
+     };                                                      \
+ }
+ 
++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
++// Qt >= 5.14 already has std::hash for QBitArray
+ q_Hash_to_tr1_hash(QBitArray)
++#endif
+ 
+ namespace KDevPG
+ {
+-- 
+cgit v1.1

diff --git a/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild
index 05aa96fc8af..4fac1ce848d 100644
--- a/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild
+++ b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild
@@ -16,6 +16,8 @@ HOMEPAGE="https://www.kdevelop.org/"
 LICENSE="LGPL-2+ LGPL-2.1+"
 IUSE=""
 
+PATCHES=( "${FILESDIR}/${P}-qt-5.14.patch" )
+
 BDEPEND="
 	sys-devel/bison
 	sys-devel/flex


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/kdevelop-pg-qt/files/, dev-util/kdevelop-pg-qt/
@ 2024-07-21 17:32 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2024-07-21 17:32 UTC (permalink / raw
  To: gentoo-commits

commit:     c7a6125e5b7532c2a0cb5df55562289e293e1987
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 16:37:07 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 21 17:31:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7a6125e

dev-util/kdevelop-pg-qt: Port away from deprecated QString::midRef

Upstream commit c210967f753b33db48dbf942c7b32e67363ca204

Required by >=dev-util/kdevelop-24.08.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-2.2.2-port-away-from-depr-QString_midRef.patch | 53 ++++++++++++++++++++++
 .../kdevelop-pg-qt/kdevelop-pg-qt-2.2.2-r1.ebuild  | 22 +++++++++
 2 files changed, 75 insertions(+)

diff --git a/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.2-port-away-from-depr-QString_midRef.patch b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.2-port-away-from-depr-QString_midRef.patch
new file mode 100644
index 000000000000..360010c49cb3
--- /dev/null
+++ b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.2-port-away-from-depr-QString_midRef.patch
@@ -0,0 +1,53 @@
+From c210967f753b33db48dbf942c7b32e67363ca204 Mon Sep 17 00:00:00 2001
+From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
+Date: Sun, 30 Oct 2022 11:56:59 +0100
+Subject: [PATCH] Port away from deprecated QString::midRef
+
+GIT_SILENT
+---
+ kdev-pg/kdev-pg-debug-visitor-gen.cpp | 2 +-
+ kdev-pg/kdev-pg-regexp.cpp            | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/kdev-pg/kdev-pg-debug-visitor-gen.cpp b/kdev-pg/kdev-pg-debug-visitor-gen.cpp
+index 418d044..d4394f7 100644
+--- a/kdev-pg/kdev-pg-debug-visitor-gen.cpp
++++ b/kdev-pg/kdev-pg-debug-visitor-gen.cpp
+@@ -72,7 +72,7 @@ void GenerateDebugVisitor::operator()()
+   out << "                tokenString += QStringLiteral(\" ...\");" << endl;
+   out << "                tokenString += QStringLiteral(\"%1 more\").arg(end-begin-20);" << endl;
+   out << "                tokenString += QStringLiteral(\"... \");" << endl;
+-  out << "                tokenString += m_content.midRef(end-10, 10);" << endl;
++  out << "                tokenString += QStringView(m_content).mid(end-10, 10);" << endl;
+   out << "            }" << endl;
+   out << "            else {" << endl;
+   out << "                tokenString = m_content.mid(begin, end-begin+1);" << endl;
+diff --git a/kdev-pg/kdev-pg-regexp.cpp b/kdev-pg/kdev-pg-regexp.cpp
+index fda19f9..808018f 100644
+--- a/kdev-pg/kdev-pg-regexp.cpp
++++ b/kdev-pg/kdev-pg-regexp.cpp
+@@ -71,10 +71,10 @@ inline QString codeForDot(QString str)
+     int npos = str.indexOf("\n\01!ASIgnore\"!!\n# ", pos);
+     if(npos == -1)
+     {
+-      out += str.midRef(pos);
++      out += QStringView(str).mid(pos);
+       break;
+     }
+-    out += str.midRef(pos, npos - pos);
++    out += QStringView(str).mid(pos, npos - pos);
+     int nlpos = str.indexOf('\n', npos + 17);
+     int codeendpos = str.indexOf("\n\01!AS/Ignore\"!!\n", nlpos);
+     if(nlpos == -1 || codeendpos == -1)
+@@ -82,7 +82,7 @@ inline QString codeForDot(QString str)
+       out += "<junk>";
+       break;
+     }
+-    out += str.midRef(nlpos + 1, codeendpos - nlpos - 1);
++    out += QStringView(str).mid(nlpos + 1, codeendpos - nlpos - 1);
+     pos = codeendpos + 17;
+   }
+   return out.replace('\"', "\\\"").replace('\n', '\t').trimmed();
+-- 
+GitLab
+

diff --git a/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.2-r1.ebuild b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.2-r1.ebuild
new file mode 100644
index 000000000000..1d77f74d84fc
--- /dev/null
+++ b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.2-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+inherit ecm kde.org
+
+DESCRIPTION="LL(1) parser generator used mainly by KDevelop language plugins"
+HOMEPAGE="https://www.kdevelop.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2+ LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+BDEPEND="
+	app-alternatives/yacc
+	app-alternatives/lex
+"
+
+PATCHES=( "${FILESDIR}/${P}-port-away-from-depr-QString_midRef.patch" )


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-21 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-21 17:32 [gentoo-commits] repo/gentoo:master commit in: dev-util/kdevelop-pg-qt/files/, dev-util/kdevelop-pg-qt/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2019-10-26 12:41 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox