diff options
author | 2020-10-18 22:59:46 +0800 | |
---|---|---|
committer | 2020-11-03 07:18:26 +0000 | |
commit | c92eaa6a7d93400503334e9c65df2b8e400ab90f (patch) | |
tree | 57344e42b594fc512bea012d87232c434637ec75 /media-libs/opencv/files | |
parent | virtual/lapacke: add sci-libs/openblas as an alternative (diff) | |
download | gentoo-c92eaa6a7d93400503334e9c65df2b8e400ab90f.tar.gz gentoo-c92eaa6a7d93400503334e9c65df2b8e400ab90f.tar.bz2 gentoo-c92eaa6a7d93400503334e9c65df2b8e400ab90f.zip |
media-libs/opencv: various fixes
- Explicitly depends on virtual/lapacke to prevent its cmake build scripts from
implicitly disabling lapack support when it can't find lapacke.h.
- Link with cblas when sci-libs/lapack is supplimented as the default lapack
implementation.
- examples USE requires contribdnn USE to be enabled to prevent build failure.
Closes: https://bugs.gentoo.org/700176
Closes: https://bugs.gentoo.org/749681
Closes: https://bugs.gentoo.org/717812
Closes: https://bugs.gentoo.org/701790
Closes: https://bugs.gentoo.org/704518
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/17964
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/opencv/files')
-rw-r--r-- | media-libs/opencv/files/opencv-4.5.0-link-with-cblas-for-lapack.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/media-libs/opencv/files/opencv-4.5.0-link-with-cblas-for-lapack.patch b/media-libs/opencv/files/opencv-4.5.0-link-with-cblas-for-lapack.patch new file mode 100644 index 000000000000..acee677052d6 --- /dev/null +++ b/media-libs/opencv/files/opencv-4.5.0-link-with-cblas-for-lapack.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake +index 342bebc..9ebd206 100644 +--- a/cmake/OpenCVFindLAPACK.cmake ++++ b/cmake/OpenCVFindLAPACK.cmake +@@ -136,10 +136,12 @@ if(WITH_LAPACK) + ocv_lapack_check() + endif() + if(NOT HAVE_LAPACK) +- if(LAPACKE_INCLUDE_DIR) ++ find_package(CBLAS) ++ if(LAPACKE_INCLUDE_DIR AND CBLAS_FOUND) + set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR}) + set(LAPACK_CBLAS_H "cblas.h") + set(LAPACK_LAPACKE_H "lapacke.h") ++ set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES} ${CBLAS_LIBRARIES}) + set(LAPACK_IMPL "LAPACK/Generic") + ocv_lapack_check() + elseif(APPLE) |