Merge pull request #169180 from K900/fix-tdesktop-build

tdesktop: fix build with kwayland 5.94
This commit is contained in:
Artturi 2022-04-19 03:08:38 +03:00 committed by GitHub
commit a035e679a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 65 additions and 0 deletions

View file

@ -82,6 +82,14 @@ env.mkDerivation rec {
sha256 = "0zcjm08nfdlxrsv0fi6dqg3lk52bcvsxnsf6jm5fv6gf5v9ia3hq";
};
patches = [
# fix build with KWayland 5.94+
# cf. https://invent.kde.org/frameworks/kwayland/-/commit/de442e4a94e249a29cf2e005db8e0a5e4a6a13ed
# upstream bug: https://github.com/telegramdesktop/tdesktop/issues/24375
# FIXME remove when no longer necessary
./kf594.diff
];
postPatch = ''
substituteInPlace Telegram/CMakeLists.txt \
--replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"'

View file

@ -0,0 +1,57 @@
diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
index 7641579aa..3c195e397 100644
--- a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
+++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
@@ -9,10 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
-#include <connection_thread.h>
-#include <registry.h>
-#include <surface.h>
-#include <plasmashell.h>
+#include <KWayland/Client/connection_thread.h>
+#include <KWayland/Client/registry.h>
+#include <KWayland/Client/surface.h>
+#include <KWayland/Client/plasmashell.h>
using namespace KWayland::Client;
Submodule Telegram/lib_base contains modified content
diff --git a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
index 32f0de6..30a087f 100644
--- a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
@@ -13,11 +13,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QPointer>
#include <QtGui/QWindow>
-#include <connection_thread.h>
-#include <registry.h>
-#include <surface.h>
-#include <xdgforeign.h>
-#include <idleinhibit.h>
+#include <KWayland/Client/connection_thread.h>
+#include <KWayland/Client/registry.h>
+#include <KWayland/Client/surface.h>
+#include <KWayland/Client/xdgforeign.h>
+#include <KWayland/Client/idleinhibit.h>
using namespace KWayland::Client;
Submodule Telegram/lib_ui contains modified content
diff --git a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
index 01f1e80..163cb6a 100644
--- a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
+++ b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
@@ -24,8 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <private/qwaylandwindow_p.h>
#include <private/qwaylandshellsurface_p.h>
-#include <connection_thread.h>
-#include <registry.h>
+#include <KWayland/Client/connection_thread.h>
+#include <KWayland/Client/registry.h>
Q_DECLARE_METATYPE(QMargins);