mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/opencv to 4.5.2-1
This commit is contained in:
parent
42fbbd2c73
commit
eeeb2988d5
2 changed files with 50 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
# Maintainer: Ray Rashif <schiv@archlinux.org>
|
||||
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
||||
# Contributor: Ray Rashif <schiv@archlinux.org>
|
||||
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
@ -7,7 +8,7 @@
|
|||
|
||||
pkgbase=opencv
|
||||
pkgname=(opencv opencv-samples)
|
||||
pkgver=4.5.1
|
||||
pkgver=4.5.2
|
||||
pkgrel=1
|
||||
pkgdesc="Open Source Computer Vision Library"
|
||||
arch=(x86_64)
|
||||
|
@ -22,15 +23,18 @@ optdepends=('opencv-samples: samples'
|
|||
'opencl-icd-loader: For coding with OpenCL'
|
||||
'python-numpy: Python bindings'
|
||||
'java-runtime: Java interface')
|
||||
source=("$pkgbase-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.zip"
|
||||
"opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz"
|
||||
source=(https://github.com/opencv/opencv/archive/$pkgver/$pkgname-$pkgver.tar.gz
|
||||
https://github.com/opencv/opencv_contrib/archive/$pkgver/opencv_contrib-$pkgver.tar.gz
|
||||
opencv-lapack-3.9.1.patch
|
||||
0001-link-with-libatomic.patch)
|
||||
sha256sums=('5fbc26ee09e148a4d494b225d04217f7c913ca1a4d46115b70cca3565d7bbe05'
|
||||
'12c3b1ddd0b8c1a7da5b743590a288df0934e5cef243e036ca290c2e45e425f5'
|
||||
sha256sums=('be976b9ef14f1deaa282fb6e30d75aa8016a2d5c1f08e85795c235148940d753'
|
||||
'9f52fd3114ac464cb4c9a2a6a485c729a223afb57b9c24848484e55cef0b5c2a'
|
||||
'5233d9b4b8e3f4600e3f4ebef2b0ad5621faf25efbdfee96ee720a83cc81d0cc'
|
||||
'3376bc87ac7404c6f396f1bee03b76ab0e5cb18829f535bbc97cef71d28ab168')
|
||||
|
||||
|
||||
prepare() {
|
||||
patch -d $pkgname-$pkgver -p1 < opencv-lapack-3.9.1.patch # Fix build with LAPACK 3.9.1
|
||||
cd $pkgname-$pkgver
|
||||
if [[ $CARCH == "arm" || $CARCH == "armv6h" ]]; then
|
||||
patch -p1 -i ../0001-link-with-libatomic.patch
|
||||
|
|
40
extra/opencv/opencv-lapack-3.9.1.patch
Normal file
40
extra/opencv/opencv-lapack-3.9.1.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
diff --git a/modules/core/src/hal_internal.cpp b/modules/core/src/hal_internal.cpp
|
||||
index 483281d1f7..6db47f22d8 100644
|
||||
--- a/modules/core/src/hal_internal.cpp
|
||||
+++ b/modules/core/src/hal_internal.cpp
|
||||
@@ -290,7 +290,7 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
|
||||
if (typeid(fptype) == typeid(float))
|
||||
sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)&work1, &lwork, info);
|
||||
else if (typeid(fptype) == typeid(double))
|
||||
- dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)&work1, &lwork, info);
|
||||
+ LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)&work1, &lwork, info);
|
||||
|
||||
lwork = cvRound(work1); //optimal buffer size
|
||||
std::vector<fptype> workBufMemHolder(lwork + 1);
|
||||
@@ -299,7 +299,7 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
|
||||
if (typeid(fptype) == typeid(float))
|
||||
sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)buffer, &lwork, info);
|
||||
else if (typeid(fptype) == typeid(double))
|
||||
- dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)buffer, &lwork, info);
|
||||
+ LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)buffer, &lwork, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,7 +311,7 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
|
||||
if (typeid(fptype) == typeid(float))
|
||||
sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)&work1, &lwork, info);
|
||||
else if (typeid(fptype) == typeid(double))
|
||||
- dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)&work1, &lwork, info);
|
||||
+ LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)&work1, &lwork, info);
|
||||
|
||||
lwork = cvRound(work1); //optimal buffer size
|
||||
std::vector<fptype> workBufMemHolder(lwork + 1);
|
||||
@@ -320,7 +320,7 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
|
||||
if (typeid(fptype) == typeid(float))
|
||||
sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)buffer, &lwork, info);
|
||||
else if (typeid(fptype) == typeid(double))
|
||||
- dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)buffer, &lwork, info);
|
||||
+ LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)buffer, &lwork, info);
|
||||
|
||||
transpose(tmpB, m, b, ldb, k, m);
|
||||
}
|
Loading…
Reference in a new issue