diff options
author | Paul Zander <negril.nx+gentoo@gmail.com> | 2024-04-12 15:08:34 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-04-21 13:49:40 +0100 |
commit | cebb6e2fdce12a8c5f81f1b19bd494469ace2786 (patch) | |
tree | 920e558d849de94f4f1bed04a5b8eebd93eb5c87 /media-libs/opencv | |
parent | app-misc/recoll: Stabilize 1.37.4-r1 amd64, #930369 (diff) | |
download | gentoo-cebb6e2fdce12a8c5f81f1b19bd494469ace2786.tar.gz gentoo-cebb6e2fdce12a8c5f81f1b19bd494469ace2786.tar.bz2 gentoo-cebb6e2fdce12a8c5f81f1b19bd494469ace2786.zip |
media-libs/opencv: bugfixes
Closes: https://bugs.gentoo.org/929972
Closes: https://bugs.gentoo.org/928516
Closes: https://bugs.gentoo.org/928747
Closes: https://bugs.gentoo.org/927992
Closes: https://bugs.gentoo.org/927917
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36248
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/opencv')
-rw-r--r-- | media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch | 70 | ||||
-rw-r--r-- | media-libs/opencv/opencv-4.8.1-r1.ebuild | 1 | ||||
-rw-r--r-- | media-libs/opencv/opencv-4.9.0.ebuild | 5 |
3 files changed, 75 insertions, 1 deletions
diff --git a/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch b/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch new file mode 100644 index 000000000000..f3b5c7b36b50 --- /dev/null +++ b/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch @@ -0,0 +1,70 @@ +From: https://gitlab.archlinux.org/archlinux/packaging/packages/opencv/-/blob/main/fix-nppi-bufsize-type.patch?ref_type=heads +--- a/modules/cudaarithm/src/reductions.cpp 2023-12-26 22:24:58.000000000 +0100 ++++ b/modules/cudaarithm/src/reductions.cpp 2024-03-18 16:51:32.108049155 +0100 +@@ -151,7 +151,7 @@ + sz.width = gsrc.cols; + sz.height = gsrc.rows; + +- int bufSize; ++ size_t bufSize; + #if (CUDA_VERSION <= 4020) + nppSafeCall( nppiMeanStdDev8uC1RGetBufferHostSize(sz, &bufSize) ); + #else +@@ -227,7 +227,7 @@ + sz.width = gsrc.cols; + sz.height = gsrc.rows; + +- int bufSize; ++ size_t bufSize; + #if (CUDA_VERSION <= 4020) + nppSafeCall( nppiMeanStdDev8uC1MRGetBufferHostSize(sz, &bufSize) ); + #else +--- a/modules/cudaimgproc/src/histogram.cpp 2023-12-26 22:24:58.000000000 +0100 ++++ b/modules/cudaimgproc/src/histogram.cpp 2024-03-18 17:51:37.005208948 +0100 +@@ -281,8 +281,8 @@ + + namespace + { +- typedef NppStatus (*get_buf_size_c1_t)(NppiSize oSizeROI, int nLevels, int* hpBufferSize); +- typedef NppStatus (*get_buf_size_c4_t)(NppiSize oSizeROI, int nLevels[], int* hpBufferSize); ++ typedef NppStatus (*get_buf_size_c1_t)(NppiSize oSizeROI, int nLevels, size_t* hpBufferSize); ++ typedef NppStatus (*get_buf_size_c4_t)(NppiSize oSizeROI, int nLevels[], size_t* hpBufferSize); + + template<int SDEPTH> struct NppHistogramEvenFuncC1 + { +@@ -315,7 +315,7 @@ + sz.width = src.cols; + sz.height = src.rows; + +- int buf_size; ++ size_t buf_size; + get_buf_size(sz, levels, &buf_size); + + BufferPool pool(stream); +@@ -349,7 +349,7 @@ + + Npp32s* pHist[] = {hist[0].ptr<Npp32s>(), hist[1].ptr<Npp32s>(), hist[2].ptr<Npp32s>(), hist[3].ptr<Npp32s>()}; + +- int buf_size; ++ size_t buf_size; + get_buf_size(sz, levels, &buf_size); + + BufferPool pool(stream); +@@ -419,7 +419,7 @@ + sz.width = src.cols; + sz.height = src.rows; + +- int buf_size; ++ size_t buf_size; + get_buf_size(sz, levels.cols, &buf_size); + + BufferPool pool(stream); +@@ -460,7 +460,7 @@ + sz.width = src.cols; + sz.height = src.rows; + +- int buf_size; ++ size_t buf_size; + get_buf_size(sz, nLevels, &buf_size); + + BufferPool pool(stream); diff --git a/media-libs/opencv/opencv-4.8.1-r1.ebuild b/media-libs/opencv/opencv-4.8.1-r1.ebuild index 0f6ed3e6a080..0756ee648856 100644 --- a/media-libs/opencv/opencv-4.8.1-r1.ebuild +++ b/media-libs/opencv/opencv-4.8.1-r1.ebuild @@ -568,6 +568,7 @@ multilib_src_configure() { if multilib_is_native_abi && use cuda; then cuda_add_sandbox -w + sandbox_write "/proc/self/task" if [[ -n "${CUDA_GENERATION}" ]]; then mycmakeargs+=( diff --git a/media-libs/opencv/opencv-4.9.0.ebuild b/media-libs/opencv/opencv-4.9.0.ebuild index 5ad9e4eabaaa..9c1ac20be8c5 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-12.4:0= ) + cuda? ( dev-util/nvidia-cuda-toolkit:= ) cudnn? ( dev-libs/cudnn:= ) contribdnn? ( dev-libs/flatbuffers:= ) contribhdf? ( sci-libs/hdf5:= ) @@ -217,6 +217,7 @@ RDEPEND=" dev-qt/qtbase:6[gui,widgets,concurrent,opengl?] ) ) + quirc? ( media-libs/quirc ) tesseract? ( app-text/tesseract[opencl=,${MULTILIB_USEDEP}] ) tbb? ( dev-cpp/tbb:=[${MULTILIB_USEDEP}] ) tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] ) @@ -591,6 +592,7 @@ multilib_src_configure() { # =================================================== # configure modules to be build # =================================================== + -DBUILD_opencv_gapi="$(usex ffmpeg yes "$(usex gstreamer)")" -DBUILD_opencv_features2d="$(usex features2d)" -DBUILD_opencv_java_bindings_generator="$(usex java)" -DBUILD_opencv_js="no" @@ -678,6 +680,7 @@ multilib_src_configure() { if multilib_is_native_abi && use cuda; then cuda_add_sandbox -w + sandbox_write "/proc/self/task" CUDAHOSTCXX="$(cuda_get_cuda_compiler)" CUDAARCHS="$(cuda_get_host_native_arch)" export CUDAHOSTCXX |