public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/kdevelop-pg-qt/files/, dev-util/kdevelop-pg-qt/
Date: Sat, 26 Oct 2019 12:41:31 +0000 (UTC)	[thread overview]
Message-ID: <1572093683.1e51a6db7655c2933200fd427dd4c364b358291d.asturm@gentoo> (raw)

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


             reply	other threads:[~2019-10-26 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 12:41 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=1572093683.1e51a6db7655c2933200fd427dd4c364b358291d.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