commit:     4edaafa9cf27632b52d1cd385621943c12cb58f9
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Apr 26 15:41:05 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 19:49:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4edaafa9

media-libs/opencv: limit cuda-12.4 again

Still requires fixes from https://github.com/NVIDIA/cccl/pull/1522

Bug: https://bugs.gentoo.org/928747
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36437
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 ...v-4.9.0-cuda-12.4.patch => opencv_contrib-4.9.0-cuda-12.4.patch} | 0
 media-libs/opencv/opencv-4.9.0.ebuild                               | 6 +++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch 
b/media-libs/opencv/files/opencv_contrib-4.9.0-cuda-12.4.patch
similarity index 100%
rename from media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch
rename to media-libs/opencv/files/opencv_contrib-4.9.0-cuda-12.4.patch

diff --git a/media-libs/opencv/opencv-4.9.0.ebuild 
b/media-libs/opencv/opencv-4.9.0.ebuild
index 36bf72aa8718..dbf8b20165fd 100644
--- a/media-libs/opencv/opencv-4.9.0.ebuild
+++ b/media-libs/opencv/opencv-4.9.0.ebuild
@@ -145,7 +145,7 @@ RDEPEND="
        app-arch/bzip2[${MULTILIB_USEDEP}]
        dev-libs/protobuf:=[${MULTILIB_USEDEP}]
        sys-libs/zlib[${MULTILIB_USEDEP}]
-       cuda? ( dev-util/nvidia-cuda-toolkit:= )
+       cuda? ( <dev-util/nvidia-cuda-toolkit-12.4:0= )
        cudnn? ( dev-libs/cudnn:= )
        contribdnn? ( dev-libs/flatbuffers:= )
        contribhdf? ( sci-libs/hdf5:= )
@@ -341,6 +341,10 @@ src_prepare() {
                cd "${WORKDIR}/${PN}_contrib-${PV}" || die
                eapply "${FILESDIR}/${PN}_contrib-4.8.1-rgbd.patch"
                eapply 
"${FILESDIR}/${PN}_contrib-4.8.1-NVIDIAOpticalFlowSDK-2.0.tar.gz.patch"
+               if has_version ">=dev-util/nvidia-cuda-toolkit-12.4" && use 
cuda; then
+                       # TODO https://github.com/NVIDIA/cccl/pull/1522
+                       eapply "${FILESDIR}/${PN}_contrib-4.9.0-cuda-12.4.patch"
+               fi
                cd "${S}" || die
 
                ! use contribcvv && { rm -R 
"${WORKDIR}/${PN}_contrib-${PV}/modules/cvv" || die; }

Reply via email to