diff options
author | Milan Pässler <me@pbb.lc> | 2020-05-21 17:28:14 +0200 |
---|---|---|
committer | Milan <me@pbb.lc> | 2020-07-31 18:50:58 +0200 |
commit | ae358bc93564c8af4f8a2d61871ce95578f80d93 (patch) | |
tree | 1f42b2296acc2734b0ea422977dda03fc7f7383a /pkgs/applications/networking/irc | |
parent | d4c607aa715086f265f7a711c9dcb9e90a063a92 (diff) |
quassel: fix build with qt5 5.14.x
Diffstat (limited to 'pkgs/applications/networking/irc')
-rw-r--r-- | pkgs/applications/networking/irc/quassel/0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch | 37 | ||||
-rw-r--r-- | pkgs/applications/networking/irc/quassel/default.nix | 6 |
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/networking/irc/quassel/0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch b/pkgs/applications/networking/irc/quassel/0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch new file mode 100644 index 0000000000000..6c40dc8dd8954 --- /dev/null +++ b/pkgs/applications/networking/irc/quassel/0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch @@ -0,0 +1,37 @@ +From ac9387271b2420a71f7d172f44354fc35adac504 Mon Sep 17 00:00:00 2001 +From: Manuel Nickschas <sputnick@quassel-irc.org> +Date: Tue, 7 Jan 2020 18:34:54 +0100 +Subject: [PATCH] common: Disable enum type stream operators for Qt >= 5.14 + +Starting from version 5.14, Qt provides stream operators for enum +types, which collide with the ones we ship in types.h. Disable +Quassel's stream operators when compiling against Qt 5.14 or later. + +(cherry-picked from 579e559a6322209df7cd51c34801fecff5fe734b) +--- + src/common/types.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/common/types.h b/src/common/types.h +index 467d9fb2..c4b9f364 100644 +--- a/src/common/types.h ++++ b/src/common/types.h +@@ -140,6 +140,7 @@ Q_DECLARE_METATYPE(QHostAddress) + typedef QList<MsgId> MsgIdList; + typedef QList<BufferId> BufferIdList; + ++#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + /** + * Catch-all stream serialization operator for enum types. + * +@@ -169,6 +170,7 @@ QDataStream &operator>>(QDataStream &in, T &value) { + value = static_cast<T>(v); + return in; + } ++#endif + + // Exceptions + +-- +2.26.2 + diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix index 86f7793819b0a..76743621fc74c 100644 --- a/pkgs/applications/networking/irc/quassel/default.nix +++ b/pkgs/applications/networking/irc/quassel/default.nix @@ -43,6 +43,12 @@ in (if !buildClient then stdenv.mkDerivation else mkDerivation) rec { sha256 = "0z8p7iv90yrrjbh31cyxhpr6hsynfmi23rlayn7p2f6ki5az7yc3"; }; + patches = [ + # fixes build with Qt 5.14 + # source: https://github.com/quassel/quassel/pull/518/commits/8a46d983fc99204711cdff1e4c542e272fef45b9 + ./0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch + ]; + enableParallelBuilding = true; # Prevent ``undefined reference to `qt_version_tag''' in SSL check |