pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/opencv opencv: Fix netbsd-8 build failure. St...
details: https://anonhg.NetBSD.org/pkgsrc/rev/05e29f5a63e2
branches: trunk
changeset: 458888:05e29f5a63e2
user: nia <nia%pkgsrc.org@localhost>
date: Wed Sep 22 13:40:41 2021 +0000
description:
opencv: Fix netbsd-8 build failure. Still does not link, due to libstdc++
diffstat:
graphics/opencv/distinfo | 4 +-
graphics/opencv/patches/patch-cmake_checks_lapack__check.cpp | 20 +
graphics/opencv/patches/patch-modules_core_src_hal__internal.cpp | 111 ++++++++++
3 files changed, 134 insertions(+), 1 deletions(-)
diffs (162 lines):
diff -r cb71f7ecde52 -r 05e29f5a63e2 graphics/opencv/distinfo
--- a/graphics/opencv/distinfo Wed Sep 22 12:57:49 2021 +0000
+++ b/graphics/opencv/distinfo Wed Sep 22 13:40:41 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.50 2021/07/08 21:27:39 markd Exp $
+$NetBSD: distinfo,v 1.51 2021/09/22 13:40:41 nia Exp $
SHA1 (opencv-3.4.9.tar.gz) = bcd0fafc9f1a240d92af9007c9f8098da601d7a5
RMD160 (opencv-3.4.9.tar.gz) = 2ab36f669a70c876e739736e6b9daacabc5933fe
@@ -11,11 +11,13 @@
SHA1 (patch-cmake_OpenCVDetectCXXCompiler.cmake) = ac7deccedcc5071d3785c7827a06419713ba0529
SHA1 (patch-cmake_OpenCVDetectPython.cmake) = 4f3bfe574edf083ebc7e78d347355c58461b2c6b
SHA1 (patch-cmake_OpenCVFindOpenEXR.cmake) = 202d0fdc84464d563dead955d5299b42098d52a6
+SHA1 (patch-cmake_checks_lapack__check.cpp) = dd25d34fff25e0d46651789cf5577391d7b48c81
SHA1 (patch-modules_core_include_opencv2_core_bindings__utils.hpp) = 9018a6124fb840be5213450b1bbe353078b37029
SHA1 (patch-modules_core_include_opencv2_core_opencl_opencl__info.hpp) = f0cff24b2a760086f54ab66536bdfee4f4f1a6d7
SHA1 (patch-modules_core_include_opencv2_core_types_c.h) = 75444e65677be99af8167f9060419d7970a7adaa
SHA1 (patch-modules_core_src_check.cpp) = c8dac4e0fb6fa4a0dca6a2794bd598ba114e78b6
SHA1 (patch-modules_core_src_downhill__simplex.cpp) = 1ad7c2fa126d15050b87785e8eec20dbe796b471
+SHA1 (patch-modules_core_src_hal__internal.cpp) = 22beba5ee93fc468999479227d7ef07397848b22
SHA1 (patch-modules_core_src_rand.cpp) = aa87ee5a538deb1a2ed3e89dd3dd4ee9b86ae0de
SHA1 (patch-modules_core_src_system.cpp) = 3b7ac545585a430d28c7077f360357079f127580
SHA1 (patch-modules_dnn_src_tensorflow_tf__importer.cpp) = 9b3628d91c2217c4b1ed77413efd4c0bf85758c4
diff -r cb71f7ecde52 -r 05e29f5a63e2 graphics/opencv/patches/patch-cmake_checks_lapack__check.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/opencv/patches/patch-cmake_checks_lapack__check.cpp Wed Sep 22 13:40:41 2021 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-cmake_checks_lapack__check.cpp,v 1.1 2021/09/22 13:40:41 nia Exp $
+
+https://bugs.gentoo.org/800539
+https://github.com/opencv/opencv/issues/19846
+
+--- cmake/checks/lapack_check.cpp.orig 2019-12-19 15:16:47.000000000 +0000
++++ cmake/checks/lapack_check.cpp
+@@ -2,9 +2,9 @@
+ #include "opencv_lapack.h"
+
+ static char* check_fn1 = (char*)sgesv_;
+-static char* check_fn2 = (char*)sposv_;
+-static char* check_fn3 = (char*)spotrf_;
+-static char* check_fn4 = (char*)sgesdd_;
++static char* check_fn2 = (char*)LAPACK_sposv_;
++static char* check_fn3 = (char*)LAPACK_spotrf_;
++static char* check_fn4 = (char*)LAPACK_sgesdd_;
+
+ int main(int argc, char* argv[])
+ {
diff -r cb71f7ecde52 -r 05e29f5a63e2 graphics/opencv/patches/patch-modules_core_src_hal__internal.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/opencv/patches/patch-modules_core_src_hal__internal.cpp Wed Sep 22 13:40:41 2021 +0000
@@ -0,0 +1,111 @@
+$NetBSD: patch-modules_core_src_hal__internal.cpp,v 1.1 2021/09/22 13:40:41 nia Exp $
+
+https://bugs.gentoo.org/800539
+https://github.com/opencv/opencv/issues/19846
+
+--- modules/core/src/hal_internal.cpp.orig 2019-12-19 15:16:47.000000000 +0000
++++ modules/core/src/hal_internal.cpp
+@@ -162,9 +162,9 @@ lapack_Cholesky(fptype* a, size_t a_step
+ if(n == 1 && b_step == sizeof(fptype))
+ {
+ if(typeid(fptype) == typeid(float))
+- sposv_(L, &m, &n, (float*)a, &lda, (float*)b, &m, &lapackStatus);
++ LAPACK_sposv_(L, &m, &n, (float*)a, &lda, (float*)b, &m, &lapackStatus);
+ else if(typeid(fptype) == typeid(double))
+- dposv_(L, &m, &n, (double*)a, &lda, (double*)b, &m, &lapackStatus);
++ LAPACK_dposv_(L, &m, &n, (double*)a, &lda, (double*)b, &m, &lapackStatus);
+ }
+ else
+ {
+@@ -173,9 +173,9 @@ lapack_Cholesky(fptype* a, size_t a_step
+ transpose(b, ldb, tmpB, m, m, n);
+
+ if(typeid(fptype) == typeid(float))
+- sposv_(L, &m, &n, (float*)a, &lda, (float*)tmpB, &m, &lapackStatus);
++ LAPACK_sposv_(L, &m, &n, (float*)a, &lda, (float*)tmpB, &m, &lapackStatus);
+ else if(typeid(fptype) == typeid(double))
+- dposv_(L, &m, &n, (double*)a, &lda, (double*)tmpB, &m, &lapackStatus);
++ LAPACK_dposv_(L, &m, &n, (double*)a, &lda, (double*)tmpB, &m, &lapackStatus);
+
+ transpose(tmpB, m, b, ldb, n, m);
+ delete[] tmpB;
+@@ -184,9 +184,9 @@ lapack_Cholesky(fptype* a, size_t a_step
+ else
+ {
+ if(typeid(fptype) == typeid(float))
+- spotrf_(L, &m, (float*)a, &lda, &lapackStatus);
++ LAPACK_spotrf_(L, &m, (float*)a, &lda, &lapackStatus);
+ else if(typeid(fptype) == typeid(double))
+- dpotrf_(L, &m, (double*)a, &lda, &lapackStatus);
++ LAPACK_dpotrf_(L, &m, (double*)a, &lda, &lapackStatus);
+ }
+
+ if(lapackStatus == 0) *info = true;
+@@ -226,17 +226,17 @@ lapack_SVD(fptype* a, size_t a_step, fpt
+ }
+
+ if(typeid(fptype) == typeid(float))
+- sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)&work1, &lwork, iworkBuf, info);
++ LAPACK_sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)&work1, &lwork, iworkBuf, info);
+ else if(typeid(fptype) == typeid(double))
+- dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)&work1, &lwork, iworkBuf, info);
++ LAPACK_dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)&work1, &lwork, iworkBuf, info);
+
+ lwork = (int)round(work1); //optimal buffer size
+ fptype* buffer = new fptype[lwork + 1];
+
+ if(typeid(fptype) == typeid(float))
+- sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)buffer, &lwork, iworkBuf, info);
++ LAPACK_sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)buffer, &lwork, iworkBuf, info);
+ else if(typeid(fptype) == typeid(double))
+- dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)buffer, &lwork, iworkBuf, info);
++ LAPACK_dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)buffer, &lwork, iworkBuf, info);
+
+ if(!(flags & CV_HAL_SVD_NO_UV))
+ transpose_square_inplace(vt, ldv, n);
+@@ -287,18 +287,18 @@ lapack_QR(fptype* a, size_t a_step, int
+ if (k == 1 && b_step == sizeof(fptype))
+ {
+ if (typeid(fptype) == typeid(float))
+- sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)&work1, &lwork, info);
++ LAPACK_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);
+ fptype* buffer = &workBufMemHolder.front();
+
+ if (typeid(fptype) == typeid(float))
+- sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)buffer, &lwork, info);
++ LAPACK_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
+ {
+@@ -308,18 +308,18 @@ lapack_QR(fptype* a, size_t a_step, int
+ transpose(b, ldb, tmpB, m, m, k);
+
+ if (typeid(fptype) == typeid(float))
+- sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)&work1, &lwork, info);
++ LAPACK_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);
+ fptype* buffer = &workBufMemHolder.front();
+
+ if (typeid(fptype) == typeid(float))
+- sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)buffer, &lwork, info);
++ LAPACK_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);
+ }
Home |
Main Index |
Thread Index |
Old Index