media-libs/opencv: respect CUDA vars

`local -x <var>` unsets the already set option...

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41967
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Paul Zander
2025-05-08 07:26:48 +01:00
committed by Sam James
parent 9074ea31b2
commit 7879e8cd60
+2 -3
View File
@@ -367,7 +367,6 @@ cuda_get_host_compiler() {
local compiler compiler_type compiler_version
local package package_version
local -x NVCC_CCBIN
local NVCC_CCBIN_default
compiler_type="$(tc-get-compiler-type)"
@@ -648,7 +647,7 @@ multilib_src_configure() {
# NOTE set this via MYCMAKEARGS if needed
-DWITH_NVCUVID="no" # TODO needs NVIDIA Video Codec SDK
-DWITH_NVCUVENC="no" # TODO needs NVIDIA Video Codec SDK
-DCUDA_NPP_LIBRARY_ROOT_DIR="$(usex cuda "${CUDA_PATH:=${EPREFIX}/opt/cuda}" "")"
-DCUDA_NPP_LIBRARY_ROOT_DIR="$(usex cuda "${CUDA_PATH:-${ESYSROOT}/opt/cuda}" "")"
# ===================================================
# OpenCV build components
# ===================================================
@@ -857,8 +856,8 @@ multilib_src_configure() {
)
fi
else
local -x CUDAARCHS
: "${CUDAARCHS:="$(cuda_get_host_native_arch)"}"
export CUDAARCHS
fi
local -x CUDAHOSTCXX CUDAHOSTLD