summaryrefslogtreecommitdiff
path: root/media-libs/opencv
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/opencv')
-rw-r--r--media-libs/opencv/Manifest5
-rw-r--r--media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch70
-rw-r--r--media-libs/opencv/opencv-4.8.1-r1.ebuild1
-rw-r--r--media-libs/opencv/opencv-4.9.0.ebuild7
4 files changed, 79 insertions, 4 deletions
diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest
index 942de3a6fa1d..11f11e0e8b21 100644
--- a/media-libs/opencv/Manifest
+++ b/media-libs/opencv/Manifest
@@ -16,6 +16,7 @@ AUX opencv-4.8.1-use-system-flatbuffers.patch 1522 BLAKE2B a9000e3269266cf9e85b6
AUX opencv-4.8.1-use-system-opencl.patch 933 BLAKE2B 557448d74771f6b9fc8b2fa5af79e6287c1dbad9a6c5dabe520080c7481d033002164cbfdd5a767d3b4cc54ec1344423ea8a0bbbd13a873ca955d95787924d10 SHA512 1602b74e829cd8842efbe6535e91a426a88c9ae08280d863bc4150cbe2a9d3ebef02b2abe98ee470f26412bb6fca653529492bf54b87f4d53fe20f242ef03771
AUX opencv-4.9.0-ade-0.1.2d.tar.gz.patch 652 BLAKE2B 80b3d810e31a16413b67a0c0d64991c7fe699240ae67a50ecc7d926af33359eccb6aef52facbba1bea56723698e775f293c8cae57b504e76ec1e287d2c21b810 SHA512 dc88386c96ea882848a18d9336541e525a926d9c9d75c3e9d4dc667e03ea8fe85109f360a310c8ea602c643fcc4e4317b3af81c0f4e50f9057ee0588d433b020
AUX opencv-4.9.0-cmake-cleanup.patch 1298 BLAKE2B 22dd3a47a26bab6545956d24c685792fa2071678db5090377348bdfb6e70dde003db0354fdc6d0dd32f30d5db0cd5df3270080678257590ec7f84f309cd09f95 SHA512 14bea3b5711f66b08b34b9dc1246744ae6385b7ecaadab057e5702769049e8fb318cbed11390517899933c760c42a2f4b25d90d6eeafe11977274a1fef4bf62e
+AUX opencv-4.9.0-cuda-12.4.patch 2397 BLAKE2B 7333533f0818b04f5ec89b593f9bf7710aba496a2ba7a1688043818d4249d4a3d3e3f17c42456d2e5e0aaae728f0b9726f3943ce732f7307b0126adc68147da0 SHA512 442c97b3fbf48f0b5c1176a10b1bbcf7fccad369070b6be2a0e3e6dd2ccba88f0a7662360b108fc4d55b766d0563d5f7eef5a2fb7afa5212aac8cab73e9ad43c
AUX opencv-4.9.0-drop-python2-detection.patch 3270 BLAKE2B bbb4021592e61d1ca99b7c6182d89e7d1adfff7e3ebdb1e810ce7b957001111559968d244416deca4baca44463cef86148d0d0d48b1fd44d91dc9c17b40f5692 SHA512 2386169151d8b8242245f66e4aeb6445bc4dcfc0ff31768417dbc32c8dee0b94e935d1d00d0b40acaad448ef816643b5df563e0a01016913be90a2a0c8b4e7c0
AUX opencv_contrib-4.8.1-NVIDIAOpticalFlowSDK-2.0.tar.gz.patch 1158 BLAKE2B c4b139198ac5c33974d6c4fac8ebcf288f15d9edf09e55b30e47071931abdf8924dc51c2d8cb27103edb3b815ba9f7e5ea334cfb1849be7b59ff4cd076f6771a SHA512 03d4442af9b98115126473cca0a9f581bd0c0e983b8d5b7f34fdd0ea7455d4a73163f853c80438f4390c5da4c7cc419c59c24643529df9eb4222915c80e654fe
AUX opencv_contrib-4.8.1-rgbd.patch 477 BLAKE2B 0120e631199d7099bae437d459f0c950c3cbd11e5f0a900d687ca5aedf1d7602f7faa3be5ba1a9b3e0758f3fd70574450f97bd7429e447df7440d58326ceb99b SHA512 6fe2ef40bf26d40e4f52d84b17183f6e536b2fe51bf65266be6a59865def0b9c074aa5eff58a60d673afec776a7ba03acaba667c917b78751950b77f68759d96
@@ -32,6 +33,6 @@ DIST opencv_3rdparty-b2bfc75f6aea5b1f834ff0f0b865a7c18ff1459f.tar.gz 10036903 BL
DIST opencv_3rdparty-fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d.tar.gz 1470898 BLAKE2B f1794cc8f8684501f670db3d720c02f35c57ebe91f276cc21dea1f1c1426740d03569143fec74380e941703b5086db5f013ca913fb296eda99559115fd53ca30 SHA512 07118b9d688bf0ff34a6e4ca1548006124d80d11e7b48f08c9e1910b64249b1dad0ace460f50adda0ecb69b90871fc59cc25f451570c63f7c6d6ba2b92d8801c
DIST opencv_contrib-4.9.0.tar.gz 59803362 BLAKE2B e6b90e9bd462f96ef010490d45105d7125622d6c49912653c0d387568ae7109b1cbcac4cc0f52c1f997a45ed75923caea90bf4ad9336e689a56742b029789038 SHA512 ebaee3b88bd7ae246727e65a98d9fbc1d9772a4181a1926f3af742410b78dc87d2386bcd96ac67d7fb1a3020c3717a2cdebdcf9304d6dfd9ea494004791cf043
DIST opencv_extra-4.9.0.tar.gz 502141517 BLAKE2B ed7351f29c6fb80d56d5ef383af68322fa805c7689132f7ca9bb43c9a1319c5876ce6d5c40d583c955eb255dd82b876c94ed42625cd71b13830ec94b2cc75dc2 SHA512 f05c1eaed491d15107c858af5b33d0d5856070dcb6f94491ba33a172b2f0caf34905eb5d1787e1247bc888626478647fce0db7f3ccbc6d6faba0ee43fd6b6bfa
-EBUILD opencv-4.8.1-r1.ebuild 29116 BLAKE2B 6e4d371bc1fa8eeb255e469e2a4cbe79ff86e47037dbbd47d7e6532b4a2ca3abd6c27e3bb4428c5e77069d109fe104f336a91efd0d9abb39f47d2357fb3697a7 SHA512 79af1439f643d4ff118e712201af86ee2f687e917ce845fc32219975efb8a5ad04199abd505bc9bdda210e48426d0eb6f4318e2dca8ba550c17f58fc80a70ae5
-EBUILD opencv-4.9.0.ebuild 34323 BLAKE2B 48b4a9338e7c0742c411fa67b2a93759070f5a7e4cd41c64427654a105aa103479b9c9ff65e4a51f74daf1c0e77b2554b227444da93da903f841a1a25cafac81 SHA512 1963a5313145c7a588adb9e80567b9bd0dc60a6b72495f2501207fad18b6751bf7e8143a0701cbb5e497c9796d07b45cbcc175619309d1f0ce2b9f09df27811f
+EBUILD opencv-4.8.1-r1.ebuild 29150 BLAKE2B 815e967e98202eb3a761fb0eaec89fdf3bf5a8e40c91e9f5597cad140653003a5c0ddc785673983863cc48a1f94ccff6696b9c4d14c0791abc519927307df353 SHA512 4d58d097eb26455f4fd6e4fa86aa3df7ab2836aa08661b60323f0c0dad45b7e9c3893f9c3888ab3ae3ec9ea9ce653dcd0eb51159c50c0d5d83cbcf4285177f99
+EBUILD opencv-4.9.0.ebuild 34444 BLAKE2B a4481c9d323ad2ded87104c7728b29dfe9079a5343bfab093c08551a407583176424368f54b24550fc7096d72b03d435449ea392acdb44399eba08d84b1023fd SHA512 29547659e9d4341018efe00480a1606c7765b248a51e1b3e64f2eb55941b60879df45a7777bdfbfe73516b2ba5b07b7d029e836b98d222fcb97c829bda12ef7d
MISC metadata.xml 3718 BLAKE2B 44b00ff4bc94a19f6a1b68cfefb29ce9f1a4ee21ee999b72a258268893ede5274d863d3a6faa325e6f0522c078c6afae53c6de4c46d6ed5a083888e195f34276 SHA512 b6c2f0a27b84afcb576209a3bdc641e81323c01bcac9617086d79821e723ea3c9698e8f3c5db837d46da68e48b6d9d08bdd05977e22d58d6c7ad30fa7b965b52
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..36bf72aa8718 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:= )
@@ -203,7 +203,7 @@ RDEPEND="
png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
python? (
${PYTHON_DEPS}
- dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/numpy:=[${PYTHON_USEDEP}]
)
qt5? (
dev-qt/qtgui:5
@@ -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