Revert https://gitlab.com/kwinft/disman/-/commit/78771e145b7f
and    https://gitlab.com/kwinft/disman/-/commit/18d0a3aa7940
to support disabling build dependencies at configure (CMake) time.

CMake Error at backends/wayland/plugins/kwayland/CMakeLists.txt:21 (target_link_libraries):
  Target "disman-kwayland" links to:

    KF5::WaylandClient

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  find_package for module Qt5X11Extras called with REQUIRED, but
  CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras is enabled.  A REQUIRED package
  cannot be disabled.
Call Stack (most recent call first):
  CMakeLists.txt:32 (find_package)

--- CMakeLists.txt.orig	2022-06-14 20:05:24 UTC
+++ CMakeLists.txt
@@ -34,9 +34,14 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
     Core
     DBus
     Gui
+)
+
+# XXX REQUIRED negates TYPE OPTIONAL
+find_package(Qt5 ${QT_MIN_VERSION} CONFIG
   OPTIONAL_COMPONENTS
     X11Extras
 )
+
 set_package_properties(Qt5X11Extras PROPERTIES
   PURPOSE "Required for X11/RandR backend"
 )
--- backends/CMakeLists.txt.orig	2022-06-14 20:05:24 UTC
+++ backends/CMakeLists.txt
@@ -35,4 +35,10 @@ add_subdirectory(wayland)
 add_subdirectory(fake)
 add_subdirectory(qscreen)
 add_subdirectory(wayland)
-add_subdirectory(xrandr)
+
+if(${XCB_RANDR_FOUND})
+  message(STATUS "Will build xrandr backend.")
+  add_subdirectory(xrandr)
+else()
+  message(STATUS "Not building xrandr backend, no XCB_RANDR_FOUND set.")
+endif()
--- backends/wayland/plugins/CMakeLists.txt.orig	2022-06-14 20:05:24 UTC
+++ backends/wayland/plugins/CMakeLists.txt
@@ -1,3 +1,8 @@
-add_subdirectory(kwayland)
-add_subdirectory(kwinft)
-add_subdirectory(wlroots)
+if(KF5Wayland_FOUND)
+  add_subdirectory(kwayland)
+endif()
+
+if(Wrapland_FOUND)
+  add_subdirectory(kwinft)
+  add_subdirectory(wlroots)
+endif()
--- backends/xrandr/CMakeLists.txt.orig	2022-06-14 20:05:24 UTC
+++ backends/xrandr/CMakeLists.txt
@@ -1,3 +1,7 @@
+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
+  X11Extras
+)
+
 set(xrandr_SRCS
   xrandr.cpp
   xrandrconfig.cpp
