commit:     7879e8cd60471f3319f12abc27d45fcdfdcec6ef
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri May  2 19:04:03 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  8 06:26:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7879e8cd

media-libs/opencv: respect CUDA vars

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

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41967
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/opencv/opencv-4.10.0.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/media-libs/opencv/opencv-4.10.0.ebuild 
b/media-libs/opencv/opencv-4.10.0.ebuild
index 59d751cc4e9d..31035e61e328 100644
--- a/media-libs/opencv/opencv-4.10.0.ebuild
+++ b/media-libs/opencv/opencv-4.10.0.ebuild
@@ -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

Reply via email to