diff options
author | James Le Cuirot <chewi@gentoo.org> | 2024-02-27 08:58:58 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2024-02-27 08:58:58 +0000 |
commit | fa7f3ac6899777f88462eef4d83a2f55655c737b (patch) | |
tree | bf2bd01834ae419f9135f3a22816ebbdf6a967a9 /net-misc | |
parent | dev-tcltk/tkimg: add 1.4.16, drop 1.4.9, 1.4.13 (diff) | |
download | gentoo-fa7f3ac6899777f88462eef4d83a2f55655c737b.tar.gz gentoo-fa7f3ac6899777f88462eef4d83a2f55655c737b.tar.bz2 gentoo-fa7f3ac6899777f88462eef4d83a2f55655c737b.zip |
net-misc/sunshine: Turns out nlohmann_json is only needed on Windows
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/sunshine/files/sunshine-custom-ffmpeg.patch | 25 | ||||
-rw-r--r-- | net-misc/sunshine/files/sunshine-system-json.patch | 56 | ||||
-rw-r--r-- | net-misc/sunshine/sunshine-9999.ebuild | 3 |
3 files changed, 12 insertions, 72 deletions
diff --git a/net-misc/sunshine/files/sunshine-custom-ffmpeg.patch b/net-misc/sunshine/files/sunshine-custom-ffmpeg.patch index 94febe187c1f..172ae3ff7d59 100644 --- a/net-misc/sunshine/files/sunshine-custom-ffmpeg.patch +++ b/net-misc/sunshine/files/sunshine-custom-ffmpeg.patch @@ -1,4 +1,4 @@ -From 64783df9d7ed22916894387a8ff1f73a97dbb760 Mon Sep 17 00:00:00 2001 +From 20c589554a1b10dad206619e11d143c420aa6c82 Mon Sep 17 00:00:00 2001 From: James Le Cuirot <chewi@gentoo.org> Date: Mon, 1 Jan 2024 11:17:08 +0000 Subject: [PATCH 1/2] Allow a custom FFmpeg build to be provided using CMake @@ -9,11 +9,11 @@ Subject: [PATCH 1/2] Allow a custom FFmpeg build to be provided using CMake 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake -index a1f3512..d921c1b 100644 +index 29bed10..d43a6e0 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake -@@ -23,53 +23,63 @@ include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) - add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json") +@@ -20,53 +20,63 @@ pkg_check_modules(MINIUPNP miniupnpc REQUIRED) + include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) # ffmpeg pre-compiled binaries -if(WIN32) @@ -117,10 +117,9 @@ index a1f3512..d921c1b 100644 # platform specific dependencies if(WIN32) -- -2.43.0 +2.43.2 - -From b7a479b15216900fdc4cbc5587d8fd90e366f5a5 Mon Sep 17 00:00:00 2001 +From 53cd96560114dd700c943db63723e340100446a3 Mon Sep 17 00:00:00 2001 From: James Le Cuirot <chewi@gentoo.org> Date: Mon, 1 Jan 2024 13:34:20 +0000 Subject: [PATCH 2/2] Move numa from general PLATFORM_LIBRARIES to @@ -134,22 +133,22 @@ may be disabled in a custom FFmpeg build. 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/compile_definitions/linux.cmake b/cmake/compile_definitions/linux.cmake -index 613a090..e1fda2c 100644 +index b6d1990..ec668f7 100644 --- a/cmake/compile_definitions/linux.cmake +++ b/cmake/compile_definitions/linux.cmake -@@ -242,7 +242,6 @@ list(APPEND PLATFORM_LIBRARIES +@@ -252,7 +252,6 @@ list(APPEND PLATFORM_TARGET_FILES + list(APPEND PLATFORM_LIBRARIES Boost::dynamic_linking dl - evdev - numa pulse pulse-simple) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake -index d921c1b..23695e3 100644 +index d43a6e0..bddee03 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake -@@ -41,7 +41,7 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES) +@@ -38,7 +38,7 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES) message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR}) endif() elseif(UNIX) @@ -159,5 +158,5 @@ index d921c1b..23695e3 100644 list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx) set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64") -- -2.43.0 +2.43.2 diff --git a/net-misc/sunshine/files/sunshine-system-json.patch b/net-misc/sunshine/files/sunshine-system-json.patch deleted file mode 100644 index 62e405e8546f..000000000000 --- a/net-misc/sunshine/files/sunshine-system-json.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ec7c960954bba6a3aab03ff74fdbd3bc89948d4c Mon Sep 17 00:00:00 2001 -From: James Le Cuirot <chewi@gentoo.org> -Date: Sat, 17 Feb 2024 17:02:45 +0000 -Subject: [PATCH] Optionally allow the system installation of nlohmann_json to - be used - ---- - cmake/compile_definitions/common.cmake | 2 +- - cmake/dependencies/common.cmake | 8 +++++++- - cmake/prep/options.cmake | 1 + - 3 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/cmake/compile_definitions/common.cmake b/cmake/compile_definitions/common.cmake -index 94f1ac5..c65930c 100644 ---- a/cmake/compile_definitions/common.cmake -+++ b/cmake/compile_definitions/common.cmake -@@ -135,4 +135,4 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES - ${OPENSSL_LIBRARIES} - ${CURL_LIBRARIES} - ${PLATFORM_LIBRARIES} -- nlohmann_json::nlohmann_json) -+ ${JSON_LIBRARIES}) -diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake -index a1f3512..849afe7 100644 ---- a/cmake/dependencies/common.cmake -+++ b/cmake/dependencies/common.cmake -@@ -20,7 +20,13 @@ pkg_check_modules(MINIUPNP miniupnpc REQUIRED) - include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) - - # nlohmann_json --add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json") -+if(NOT SUNSHINE_SYSTEM_NLOHMANN_JSON) -+ add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json") -+ set(JSON_LIBRARIES nlohmann_json::nlohmann_json) -+else() -+ pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET) -+ set(JSON_LIBRARIES PkgConfig::NLOHMANN_JSON) -+endif() - - # ffmpeg pre-compiled binaries - if(WIN32) -diff --git a/cmake/prep/options.cmake b/cmake/prep/options.cmake -index 7a8d728..8a7c2f6 100644 ---- a/cmake/prep/options.cmake -+++ b/cmake/prep/options.cmake -@@ -4,6 +4,7 @@ option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF) - option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON) - option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON) - -+option(SUNSHINE_SYSTEM_NLOHMANN_JSON "Use system installation of nlohmann_json rather than the submodule." OFF) - option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF) - - if(APPLE) --- -2.43.0 - diff --git a/net-misc/sunshine/sunshine-9999.ebuild b/net-misc/sunshine/sunshine-9999.ebuild index c9866cae6e67..c88478b1a500 100644 --- a/net-misc/sunshine/sunshine-9999.ebuild +++ b/net-misc/sunshine/sunshine-9999.ebuild @@ -165,7 +165,6 @@ RDEPEND=" DEPEND=" ${CDEPEND} - dev-cpp/nlohmann_json media-libs/amf-headers =media-libs/nv-codec-headers-12* wayland? ( dev-libs/wayland-protocols ) @@ -181,7 +180,6 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-custom-ffmpeg.patch - "${FILESDIR}"/${PN}-system-json.patch "${FILESDIR}"/${PN}-0.22.0-nvcodec.patch ) @@ -346,7 +344,6 @@ src_configure() { -DSUNSHINE_ENABLE_X11=$(usex X) -DSUNSHINE_ENABLE_TRAY=$(usex trayicon) -DSUNSHINE_REQUIRE_TRAY=$(usex trayicon) - -DSUNSHINE_SYSTEM_NLOHMANN_JSON=yes -DSUNSHINE_SYSTEM_WAYLAND_PROTOCOLS=yes -DSYSTEMD_USER_UNIT_INSTALL_DIR=$(systemd_get_userunitdir) -DUDEV_RULES_INSTALL_DIR=$(get_udevdir)/rules.d |