mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
net-misc/sunshine: Fix building with USE=cuda
I'm not sure whether I've chosen the most optimal approach here. nvidia-drivers is needed at runtime (only) for libcuda.so.1. nvidia-cuda-toolkit is not required by FFmpeg, but it does seem required by Sunshine itself. You can then use nvcc from the toolkit or clang directly. I have chosen the latter, because the logic needed to set up nvcc is complex (potential addition to cuda.eclass?) and both Gentoo and Sunshine upstream force FFmpeg to build with clang anyway. Closes: https://bugs.gentoo.org/959432 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
@@ -163,6 +163,7 @@ CDEPEND="
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
media-libs/mesa[vaapi?]
|
||||
cuda? ( x11-drivers/nvidia-drivers )
|
||||
X? (
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXfixes
|
||||
@@ -176,6 +177,7 @@ DEPEND="
|
||||
dev-cpp/nlohmann_json
|
||||
media-libs/amf-headers
|
||||
<media-libs/nv-codec-headers-14
|
||||
cuda? ( dev-util/nvidia-cuda-toolkit )
|
||||
wayland? ( dev-libs/wayland-protocols )
|
||||
"
|
||||
|
||||
@@ -183,7 +185,7 @@ BDEPEND="
|
||||
net-libs/nodejs[npm]
|
||||
virtual/pkgconfig
|
||||
cpu_flags_x86_mmx? ( >=dev-lang/nasm-2.13 )
|
||||
cuda? ( dev-util/nvidia-cuda-toolkit )
|
||||
cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] )
|
||||
wayland? ( dev-util/wayland-scanner )
|
||||
"
|
||||
|
||||
@@ -286,6 +288,7 @@ src_configure() {
|
||||
--optflags="${CFLAGS}"
|
||||
--disable-all
|
||||
--disable-autodetect
|
||||
--disable-cuda-nvcc
|
||||
--disable-error-resilience
|
||||
--disable-everything
|
||||
--disable-faan
|
||||
@@ -359,6 +362,8 @@ src_configure() {
|
||||
-DBUILD_DOCS=no
|
||||
-DBUILD_TESTS=no
|
||||
-DCCACHE_FOUND=no
|
||||
-DCMAKE_CUDA_COMPILER=clang++
|
||||
-DCUDA_INHERIT_COMPILE_OPTIONS=no
|
||||
-DFFMPEG_PLATFORM_LIBRARIES="$(usex svt-av1 SvtAv1Enc '');$(usex vaapi 'va;va-drm' '');$(usev x264);$(usev x265)"
|
||||
-DFFMPEG_PREPARED_BINARIES="${S}"/third-party/build-deps/dist
|
||||
-DSUNSHINE_ASSETS_DIR=share/${PN}
|
||||
|
||||
@@ -163,6 +163,7 @@ CDEPEND="
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
media-libs/mesa[vaapi?]
|
||||
cuda? ( x11-drivers/nvidia-drivers )
|
||||
X? (
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXfixes
|
||||
@@ -176,6 +177,7 @@ DEPEND="
|
||||
dev-cpp/nlohmann_json
|
||||
media-libs/amf-headers
|
||||
<media-libs/nv-codec-headers-14
|
||||
cuda? ( dev-util/nvidia-cuda-toolkit )
|
||||
wayland? ( dev-libs/wayland-protocols )
|
||||
"
|
||||
|
||||
@@ -183,7 +185,7 @@ BDEPEND="
|
||||
net-libs/nodejs[npm]
|
||||
virtual/pkgconfig
|
||||
cpu_flags_x86_mmx? ( >=dev-lang/nasm-2.13 )
|
||||
cuda? ( dev-util/nvidia-cuda-toolkit )
|
||||
cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] )
|
||||
wayland? ( dev-util/wayland-scanner )
|
||||
"
|
||||
|
||||
@@ -283,6 +285,7 @@ src_configure() {
|
||||
--optflags="${CFLAGS}"
|
||||
--disable-all
|
||||
--disable-autodetect
|
||||
--disable-cuda-nvcc
|
||||
--disable-error-resilience
|
||||
--disable-everything
|
||||
--disable-faan
|
||||
@@ -356,6 +359,8 @@ src_configure() {
|
||||
-DBUILD_DOCS=no
|
||||
-DBUILD_TESTS=no
|
||||
-DCCACHE_FOUND=no
|
||||
-DCMAKE_CUDA_COMPILER=clang++
|
||||
-DCUDA_INHERIT_COMPILE_OPTIONS=no
|
||||
-DFFMPEG_PLATFORM_LIBRARIES="$(usex svt-av1 SvtAv1Enc '');$(usex vaapi 'va;va-drm' '');$(usev x264);$(usev x265)"
|
||||
-DFFMPEG_PREPARED_BINARIES="${S}"/third-party/build-deps/dist
|
||||
-DSUNSHINE_ASSETS_DIR=share/${PN}
|
||||
|
||||
Reference in New Issue
Block a user