summaryrefslogtreecommitdiff
path: root/multimedia/sunshine/files
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/sunshine/files')
-rw-r--r--multimedia/sunshine/files/patch-cmake_targets_common.cmake16
-rw-r--r--multimedia/sunshine/files/patch-src_platform_linux_wlgrab.cpp11
-rw-r--r--multimedia/sunshine/files/patch-src_video.cpp10
3 files changed, 37 insertions, 0 deletions
diff --git a/multimedia/sunshine/files/patch-cmake_targets_common.cmake b/multimedia/sunshine/files/patch-cmake_targets_common.cmake
new file mode 100644
index 0000000..d739eb4
--- /dev/null
+++ b/multimedia/sunshine/files/patch-cmake_targets_common.cmake
@@ -0,0 +1,16 @@
+The port vendors node_modules at fetch time (pre-fetch), so the "npm ci"
+step would fail without network access. Only run the actual web UI build.
+
+--- cmake/targets/common.cmake.orig
++++ cmake/targets/common.cmake
+@@ -54,8 +54,7 @@
+
+ add_custom_target(web-ui ALL
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+- COMMENT "Installing NPM Dependencies and Building the Web UI"
+- COMMAND "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" ci ${NPM_INSTALL_FLAGS}
+- COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
++ COMMENT "Building the Web UI (npm dependencies are vendored by the port)"
++ COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
+ COMMAND_EXPAND_LISTS
+ VERBATIM)
diff --git a/multimedia/sunshine/files/patch-src_platform_linux_wlgrab.cpp b/multimedia/sunshine/files/patch-src_platform_linux_wlgrab.cpp
new file mode 100644
index 0000000..a7349db
--- /dev/null
+++ b/multimedia/sunshine/files/patch-src_platform_linux_wlgrab.cpp
@@ -0,0 +1,11 @@
+--- src/platform/linux/wlgrab.cpp.orig
++++ src/platform/linux/wlgrab.cpp
+@@ -418,7 +418,7 @@
+ return nullptr;
+ }
+
+- if (hwdevice_type == platf::mem_type_e::vaapi || hwdevice_type == platf::mem_type_e::cuda) {
++ if (hwdevice_type == platf::mem_type_e::vaapi) {
+ auto wlr = std::make_shared<wl::wlr_vram_t>();
+ if (wlr->init(hwdevice_type, display_name, config)) {
+ return nullptr;
diff --git a/multimedia/sunshine/files/patch-src_video.cpp b/multimedia/sunshine/files/patch-src_video.cpp
new file mode 100644
index 0000000..e79e664
--- /dev/null
+++ b/multimedia/sunshine/files/patch-src_video.cpp
@@ -0,0 +1,10 @@
+--- src/video.cpp.orig
++++ src/video.cpp
+@@ -134,6 +134,7 @@
+ // Setup the input frame using the caller's img_t
+ sws_input_frame->data[0] = img.data;
+ sws_input_frame->linesize[0] = img.row_pitch;
++ if (!img.data) { return 0; }
+
+ // Perform color conversion and scaling to the final size
+ auto status = sws_scale_frame(sws.get(), requires_padding ? sws_output_frame.get() : sw_frame.get(), sws_input_frame.get());