kdePackages.krfb: fix build
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
mkKdeDerivation,
|
||||
fetchpatch,
|
||||
qtwayland,
|
||||
libvncserver,
|
||||
xorg,
|
||||
@@ -7,6 +8,18 @@
|
||||
mkKdeDerivation {
|
||||
pname = "krfb";
|
||||
|
||||
# Backports.
|
||||
# FIXME: remove in next release
|
||||
patches = [
|
||||
# Build fix for Qt 6.7.1
|
||||
./fix-build-with-qt-6.7.1.diff
|
||||
# Wayland crash fix
|
||||
(fetchpatch {
|
||||
url = "https://invent.kde.org/network/krfb/-/commit/6e7a5ba56966ea1b67400be9ab7c82885abb76be.diff";
|
||||
hash = "sha256-kqD4B2Nixw8KMCOc4RpoEmvII2JZYBPxog6TT/BPuFs=";
|
||||
})
|
||||
];
|
||||
|
||||
extraCmakeFlags = [
|
||||
"-DQtWaylandScanner_EXECUTABLE=${qtwayland}/libexec/qtwaylandscanner"
|
||||
];
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
diff --git a/framebuffers/pipewire/CMakeLists.txt b/framebuffers/pipewire/CMakeLists.txt
|
||||
index 99f4562..3bf5f63 100644
|
||||
--- a/framebuffers/pipewire/CMakeLists.txt
|
||||
+++ b/framebuffers/pipewire/CMakeLists.txt
|
||||
@@ -9,11 +9,6 @@ set (krfb_framebuffer_pw_SRCS
|
||||
screencasting.cpp
|
||||
)
|
||||
|
||||
-ecm_add_qtwayland_client_protocol(krfb_framebuffer_pw_SRCS
|
||||
- PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml
|
||||
- BASENAME zkde-screencast-unstable-v1
|
||||
-)
|
||||
-
|
||||
ecm_qt_declare_logging_category(krfb_framebuffer_pw_SRCS
|
||||
HEADER krfb_fb_pipewire_debug.h
|
||||
IDENTIFIER KRFB_FB_PIPEWIRE
|
||||
@@ -38,6 +33,18 @@ add_library(krfb_framebuffer_pw
|
||||
MODULE
|
||||
${krfb_framebuffer_pw_SRCS}
|
||||
)
|
||||
+
|
||||
+if (Qt6_VERSION VERSION_LESS "6.7.1")
|
||||
+ ecm_add_qtwayland_client_protocol(krfb_framebuffer_pw
|
||||
+ PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml
|
||||
+ BASENAME zkde-screencast-unstable-v1
|
||||
+ )
|
||||
+else()
|
||||
+ qt6_generate_wayland_protocol_client_sources(krfb_framebuffer_pw
|
||||
+ FILES ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
set_property(TARGET krfb_framebuffer_pw PROPERTY C_STANDARD 99)
|
||||
|
||||
target_link_libraries(krfb_framebuffer_pw
|
||||
diff --git a/framebuffers/pipewire/screencasting.cpp b/framebuffers/pipewire/screencasting.cpp
|
||||
index 3c4d1ab..c338699 100644
|
||||
--- a/framebuffers/pipewire/screencasting.cpp
|
||||
+++ b/framebuffers/pipewire/screencasting.cpp
|
||||
@@ -5,7 +5,11 @@
|
||||
*/
|
||||
|
||||
#include "screencasting.h"
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(6, 7, 1)
|
||||
#include "qwayland-zkde-screencast-unstable-v1.h"
|
||||
+#else
|
||||
+#include "qwayland-screencast.h"
|
||||
+#endif
|
||||
#include <KWayland/Client/registry.h>
|
||||
#include <QDebug>
|
||||
#include <QRect>
|
||||
Reference in New Issue
Block a user