public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/, media-libs/opencv/files/
Date: Tue,  3 Nov 2020 07:18:39 +0000 (UTC)	[thread overview]
Message-ID: <1604387906.c92eaa6a7d93400503334e9c65df2b8e400ab90f.sam@gentoo> (raw)

commit:     c92eaa6a7d93400503334e9c65df2b8e400ab90f
Author:     Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
AuthorDate: Sun Oct 18 14:59:46 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  3 07:18:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c92eaa6a

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/17964
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../opencv-4.5.0-link-with-cblas-for-lapack.patch      | 18 ++++++++++++++++++
 media-libs/opencv/opencv-4.5.0.ebuild                  |  8 +++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

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 00000000000..acee677052d
--- /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)

diff --git a/media-libs/opencv/opencv-4.5.0.ebuild b/media-libs/opencv/opencv-4.5.0.ebuild
index 54bb9292356..21f4784aa91 100644
--- a/media-libs/opencv/opencv-4.5.0.ebuild
+++ b/media-libs/opencv/opencv-4.5.0.ebuild
@@ -70,6 +70,7 @@ REQUIRED_USE="
 	contribovis? ( contrib )
 	contribsfm? ( contrib eigen gflags glog )
 	contribxfeatures2d? ( contrib download )
+	examples? ( contribdnn )
 	java? ( python )
 	opengl? ( qt5 )
 	python? ( ${PYTHON_REQUIRED_USE} )
@@ -111,7 +112,11 @@ RDEPEND="
 	java? ( >=virtual/jre-1.6:* )
 	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
 	jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] )
-	lapack? ( virtual/lapack )
+	lapack? (
+		virtual/cblas
+		virtual/lapack
+		virtual/lapacke
+	)
 	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
 	openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] )
 	opengl? (
@@ -274,6 +279,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.4.1-cuda-add-relaxed-constexpr.patch
 	"${FILESDIR}"/${PN}-4.1.2-opencl-license.patch
 	"${FILESDIR}"/${PN}-4.4.0-disable-native-cpuflag-detect.patch
+	"${FILESDIR}"/${PN}-4.5.0-link-with-cblas-for-lapack.patch
 )
 
 pkg_pretend() {


             reply	other threads:[~2020-11-03  7:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  7:18 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-07 21:01 [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/, media-libs/opencv/files/ Sam James
2025-05-22 16:08 Sam James
2025-04-14 18:01 Andreas Sturmlechner
2024-11-05  2:03 Sam James
2024-11-05  2:03 Sam James
2024-02-04 13:15 Andreas Sturmlechner
2024-02-04 12:45 Andreas Sturmlechner
2024-01-10 12:33 Sam James
2023-11-22 11:40 Sam James
2023-08-28  4:05 Sam James
2022-09-14  9:19 Andreas Sturmlechner
2022-04-19  5:50 Matt Turner
2021-05-31 20:53 Michał Górny
2020-06-25 17:08 Andreas Sturmlechner
2019-12-06 20:37 Amy Liffey
2019-03-31 18:52 Amy Liffey
2019-01-24  9:24 Amy Liffey
2019-01-17 18:12 Amy Liffey
2017-09-19 14:00 Amy Liffey
2017-09-19  7:52 Amy Liffey
2017-09-01 11:39 Amy Liffey
2017-06-06 14:45 Amy Liffey
2017-04-16 14:15 Amy Liffey
2016-11-08  7:01 Amy Winston
2016-11-08  7:01 Amy Winston
2016-06-09 18:27 Amy Winston
2016-05-15 13:52 Amy Winston
2016-03-02 12:14 Amy Winston
2016-01-23 17:51 Amy Winston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1604387906.c92eaa6a7d93400503334e9c65df2b8e400ab90f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox