diff --git a/local/recipes/kde/sddm/recipe.toml b/local/recipes/kde/sddm/recipe.toml index c892c1693f..5bb387d791 100644 --- a/local/recipes/kde/sddm/recipe.toml +++ b/local/recipes/kde/sddm/recipe.toml @@ -9,7 +9,11 @@ version = "0.1.0" [source] git = "https://github.com/sddm/sddm.git" rev = "63780fcd79f1dbf81a30eef48c28c699ab15aded" -patches = [] +patches = [ + # Redox has no Linux/FreeBSD VT subsystem (VT_ACTIVATE/VT_WAITACTIVE/KDSETMODE + # etc.); stub SDDM::VirtualTerminal to no-ops (greeter runs on the compositor). + "redox-virtualterminal-stub.patch", +] [build] template = "custom" diff --git a/local/recipes/kde/sddm/redox-virtualterminal-stub.patch b/local/recipes/kde/sddm/redox-virtualterminal-stub.patch new file mode 100644 index 0000000000..6b7b0761f3 --- /dev/null +++ b/local/recipes/kde/sddm/redox-virtualterminal-stub.patch @@ -0,0 +1,33 @@ +--- a/src/common/VirtualTerminal.cpp ++++ b/src/common/VirtualTerminal.cpp +@@ -29,7 +29,7 @@ + #include + #ifdef __FreeBSD__ + #include +-#else ++#elif !defined(__redox__) + #include + #include + #endif +@@ -42,6 +42,14 @@ + + namespace SDDM { + namespace VirtualTerminal { ++#if defined(__redox__) ++ // Redox has no Linux/FreeBSD VT subsystem; the greeter runs directly on ++ // the compositor/framebuffer, so VT enumeration/switching is a no-op. ++ QString path(int vt) { return QStringLiteral("/dev/tty%1").arg(vt); } ++ int currentVt() { return 1; } ++ int setUpNewVt() { return 1; } ++ void jumpToVt(int, bool) { } ++#else + #ifdef __FreeBSD__ + static const char *defaultVtPath = "/dev/ttyv0"; + +@@ -254,5 +262,6 @@ + if (vtFd != -1) + close(vtFd); + } ++#endif // !__redox__ + } + }