tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
looking-glass-client: add patch to fix wayland only build
j-brn
2 years ago
7e409bb2
9f665273
+64
-3
2 changed files
expand all
collapse all
unified
split
pkgs
applications
virtualization
looking-glass-client
0001-client-cmake-move-X11-config-directives-to-displayse.patch
default.nix
+57
pkgs/applications/virtualization/looking-glass-client/0001-client-cmake-move-X11-config-directives-to-displayse.patch
···
1
1
+
From: Geoffrey McRae <geoff@hostfission.com>
2
2
+
Date: Wed, 13 Mar 2024 11:17:25 +1100
3
3
+
Subject: [PATCH] [client] cmake: move X11 config directives to
4
4
+
`displayservers`
5
5
+
6
6
+
---
7
7
+
client/CMakeLists.txt | 7 -------
8
8
+
client/displayservers/CMakeLists.txt | 7 +++++++
9
9
+
2 files changed, 7 insertions(+), 7 deletions(-)
10
10
+
11
11
+
diff --git client/CMakeLists.txt client/CMakeLists.txt
12
12
+
index 3755adcf..eeeb3eb0 100644
13
13
+
--- client/CMakeLists.txt
14
14
+
+++ client/CMakeLists.txt
15
15
+
@@ -42,19 +42,12 @@ add_feature_info(ENABLE_ASAN ENABLE_ASAN "AddressSanitizer support.")
16
16
+
option(ENABLE_UBSAN "Build with UndefinedBehaviorSanitizer" OFF)
17
17
+
add_feature_info(ENABLE_UBSAN ENABLE_UBSAN "UndefinedBehaviorSanitizer support.")
18
18
+
19
19
+
-option(ENABLE_X11 "Build with X11 support" ON)
20
20
+
-add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
21
21
+
-
22
22
+
option(ENABLE_PIPEWIRE "Build with PipeWire audio output support" ON)
23
23
+
add_feature_info(ENABLE_PIPEWIRE ENABLE_PIPEWIRE "PipeWire audio support.")
24
24
+
25
25
+
option(ENABLE_PULSEAUDIO "Build with PulseAudio audio output support" ON)
26
26
+
add_feature_info(ENABLE_PULSEAUDIO ENABLE_PULSEAUDIO "PulseAudio audio support.")
27
27
+
28
28
+
-if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
29
29
+
- message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
30
30
+
-endif()
31
31
+
-
32
32
+
add_compile_options(
33
33
+
"-Wall"
34
34
+
"-Wextra"
35
35
+
diff --git client/displayservers/CMakeLists.txt client/displayservers/CMakeLists.txt
36
36
+
index 5b5f827a..e7c4b25a 100644
37
37
+
--- client/displayservers/CMakeLists.txt
38
38
+
+++ client/displayservers/CMakeLists.txt
39
39
+
@@ -18,9 +18,16 @@ function(add_displayserver name)
40
40
+
add_subdirectory(${name})
41
41
+
endfunction()
42
42
+
43
43
+
+option(ENABLE_X11 "Build with X11 support" ON)
44
44
+
+add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
45
45
+
+
46
46
+
option(ENABLE_WAYLAND "Build with Wayland support" ON)
47
47
+
add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.")
48
48
+
49
49
+
+if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
50
50
+
+ message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
51
51
+
+endif()
52
52
+
+
53
53
+
# Add/remove displayservers here!
54
54
+
if (ENABLE_WAYLAND)
55
55
+
add_displayserver(Wayland)
56
56
+
--
57
57
+
2.43.1
+7
-3
pkgs/applications/virtualization/looking-glass-client/default.nix
···
59
59
fetchSubmodules = true;
60
60
};
61
61
62
62
+
patches = [
63
63
+
# Fix failing cmake assertion when disabling X11 whithout explicitly enabling Wayland.
64
64
+
./0001-client-cmake-move-X11-config-directives-to-displayse.patch
65
65
+
];
66
66
+
62
67
nativeBuildInputs = [ cmake pkg-config ];
63
68
64
64
-
buildInputs = [ libGL freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ]
65
65
-
++ lib.optionals xorgSupport [ libX11 libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr libXdmcp ]
69
69
+
buildInputs = [ libX11 libGL freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ]
70
70
+
++ lib.optionals xorgSupport [ libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr libXdmcp ]
66
71
++ lib.optionals waylandSupport [ libxkbcommon wayland wayland-protocols ]
67
72
++ lib.optionals pipewireSupport [ pipewire libsamplerate ]
68
73
++ lib.optionals pulseSupport [ pulseaudio libsamplerate ];
···
71
76
++ lib.optionals (!openGLSupport) [ "-DENABLE_OPENGL=no" ]
72
77
++ lib.optionals (!xorgSupport) [ "-DENABLE_X11=no" ]
73
78
++ lib.optionals (!waylandSupport) [ "-DENABLE_WAYLAND=no" ]
74
74
-
++ lib.optionals (waylandSupport) [ "-DENABLE_WAYLAND=yes" ]
75
79
++ lib.optionals (!pulseSupport) [ "-DENABLE_PULSEAUDIO=no" ]
76
80
++ lib.optionals (!pipewireSupport) [ "-DENABLE_PIPEWIRE=no" ];
77
81