Merge pull request #170173 from ilya-fedin/fix-kotatogram

kotatogram-desktop: fix build with KF5.94
This commit is contained in:
Alexander Bantyev 2022-04-26 17:15:08 +03:00 committed by GitHub
commit 54ca88eaa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 6 deletions

View File

@ -98,6 +98,7 @@ stdenv.mkDerivation rec {
};
patches = [
./kf594.patch
./shortcuts-binary-path.patch
# let it build with nixpkgs 10.12 sdk
./kotato-10.12-sdk.patch

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);

View File

@ -63,12 +63,9 @@ stdenv.mkDerivation {
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace src/modules/desktop_capture/linux/egl_dmabuf.cc \
--replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"'
substituteInPlace src/modules/desktop_capture/linux/egl_dmabuf.cc \
--replace '"libGL.so.1"' '"${libGL}/lib/libGL.so.1"'
substituteInPlace src/modules/desktop_capture/linux/egl_dmabuf.cc \
--replace '"libgbm.so.1"' '"${mesa}/lib/libgbm.so.1"'
substituteInPlace src/modules/desktop_capture/linux/egl_dmabuf.cc \
--replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"' \
--replace '"libGL.so.1"' '"${libGL}/lib/libGL.so.1"' \
--replace '"libgbm.so.1"' '"${mesa}/lib/libgbm.so.1"' \
--replace '"libdrm.so.2"' '"${libdrm}/lib/libdrm.so.2"'
'';