mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
extra/opencv to 4.9.0-10
This commit is contained in:
parent
5f1138a318
commit
8e81077dc5
3 changed files with 16 additions and 90 deletions
|
@ -1,7 +1,7 @@
|
|||
pkgbase = opencv
|
||||
pkgdesc = Open Source Computer Vision Library
|
||||
pkgver = 4.9.0
|
||||
pkgrel = 8
|
||||
pkgrel = 10
|
||||
url = https://opencv.org/
|
||||
arch = x86_64
|
||||
license = Apache-2.0
|
||||
|
@ -58,16 +58,10 @@ pkgbase = opencv
|
|||
optdepends = java-runtime: Java interface
|
||||
source = git+https://github.com/opencv/opencv#tag=4.9.0
|
||||
source = git+https://github.com/opencv/opencv_contrib#tag=4.9.0
|
||||
source = opencv-cccl-2.2.0.zip::https://github.com/NVIDIA/cccl/archive/refs/tags/v2.2.0.zip
|
||||
source = vtk9.patch
|
||||
source = fix-nppi-bufsize-type.patch
|
||||
source = opencv-cudnn9.patch::https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/25412.patch
|
||||
sha256sums = b0d2012628b4224c7dd79aa98010586544e16858617c88c807014e11696b2ca3
|
||||
sha256sums = 36ddaddd6f50cf13115ecf1a4777940739c4727e64135a52e768fa28ac163d4a
|
||||
sha256sums = f0899311b537614f3bb79fcb20e5fa09e72b857ba3e5ef5d13ef64c6710483e7
|
||||
sha256sums = f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e
|
||||
sha256sums = 993032a43a62faecc56f3f7aeaed29e471605dabdf28579fbeb36d52ecaa4060
|
||||
sha256sums = db2a2dd99e52560e4c8b2ef7d578120f4bdc4232f71c871e732097232c83e2d4
|
||||
|
||||
pkgname = opencv
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ pkgname=(opencv
|
|||
opencv-samples
|
||||
python-opencv)
|
||||
pkgver=4.9.0
|
||||
pkgrel=8
|
||||
pkgrel=10
|
||||
pkgdesc='Open Source Computer Vision Library'
|
||||
arch=(x86_64)
|
||||
license=(Apache-2.0)
|
||||
|
@ -67,25 +67,26 @@ optdepends=('opencv-samples: samples'
|
|||
'java-runtime: Java interface')
|
||||
source=(git+https://github.com/opencv/opencv#tag=$pkgver
|
||||
git+https://github.com/opencv/opencv_contrib#tag=$pkgver
|
||||
$pkgname-cccl-2.2.0.zip::https://github.com/NVIDIA/cccl/archive/refs/tags/v2.2.0.zip
|
||||
vtk9.patch
|
||||
fix-nppi-bufsize-type.patch
|
||||
opencv-cudnn9.patch::https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/25412.patch)
|
||||
vtk9.patch)
|
||||
sha256sums=('b0d2012628b4224c7dd79aa98010586544e16858617c88c807014e11696b2ca3'
|
||||
'36ddaddd6f50cf13115ecf1a4777940739c4727e64135a52e768fa28ac163d4a'
|
||||
'f0899311b537614f3bb79fcb20e5fa09e72b857ba3e5ef5d13ef64c6710483e7'
|
||||
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e'
|
||||
'993032a43a62faecc56f3f7aeaed29e471605dabdf28579fbeb36d52ecaa4060'
|
||||
'db2a2dd99e52560e4c8b2ef7d578120f4bdc4232f71c871e732097232c83e2d4')
|
||||
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e')
|
||||
|
||||
prepare() {
|
||||
patch -d $pkgname -p1 < vtk9.patch # Don't require all vtk optdepends
|
||||
pushd opencv
|
||||
patch -p1 < ../vtk9.patch # Don't require all vtk optdepends
|
||||
|
||||
# fix type of several buffer size variables (NPP from CUDA 12.4 has breaking API change
|
||||
# as several function parameters were changed from `int*` to `size_t*`)
|
||||
patch -d opencv_contrib -Np1 < fix-nppi-bufsize-type.patch
|
||||
# fix build with cudnn 9
|
||||
git cherry-pick -n 05e48605a0aea00d3a89b9ab5e25cdf89568aa28
|
||||
# fix build with CUDA 12.4
|
||||
git cherry-pick -n 1668203a1c6474b8368e27c55abc10ae7f17c841
|
||||
popd
|
||||
|
||||
patch -d opencv -p1 < opencv-cudnn9.patch # Fix build with CUDNN 9
|
||||
pushd opencv_contrib
|
||||
# fix build with CUDA 12.4
|
||||
git cherry-pick -n 4e766a039eda04b75f28f6905e4192d99b7874c7
|
||||
git cherry-pick -n 1ed3dd2c53888e3289afdb22ec4e9ebbff3dba87
|
||||
git cherry-pick -n 8c16a489a1fa9e2ccf21ce8eeb7fbb1affe548b1
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
--- 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);
|
Loading…
Reference in a new issue