commit:     3efed313ea323a91df22c6a70d71b4a3d1af5579
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 14:09:39 2020 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 09:51:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3efed313

dev-ros/cv_bridge: Avoid finding all of opencv

The package does not need all modules at all. If opencv useflags change,
revdeps will break.

Closes: https://bugs.gentoo.org/738570
Closes: https://bugs.gentoo.org/738570
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 ...idge-1.15.0.ebuild => cv_bridge-1.15.0-r1.ebuild} |  2 +-
 dev-ros/cv_bridge/cv_bridge-9999.ebuild              |  2 +-
 dev-ros/cv_bridge/files/ocv_leak.patch               | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/dev-ros/cv_bridge/cv_bridge-1.15.0.ebuild 
b/dev-ros/cv_bridge/cv_bridge-1.15.0-r1.ebuild
similarity index 91%
rename from dev-ros/cv_bridge/cv_bridge-1.15.0.ebuild
rename to dev-ros/cv_bridge/cv_bridge-1.15.0-r1.ebuild
index 582de3e58f7..6e6271b0b52 100644
--- a/dev-ros/cv_bridge/cv_bridge-1.15.0.ebuild
+++ b/dev-ros/cv_bridge/cv_bridge-1.15.0-r1.ebuild
@@ -27,4 +27,4 @@ DEPEND="${RDEPEND}
                dev-ros/rostest[${PYTHON_SINGLE_USEDEP}]
        )
 "
-PATCHES=( "${FILESDIR}/boostpython.patch" )
+PATCHES=( "${FILESDIR}/boostpython.patch" "${FILESDIR}/ocv_leak.patch" )

diff --git a/dev-ros/cv_bridge/cv_bridge-9999.ebuild 
b/dev-ros/cv_bridge/cv_bridge-9999.ebuild
index 582de3e58f7..6e6271b0b52 100644
--- a/dev-ros/cv_bridge/cv_bridge-9999.ebuild
+++ b/dev-ros/cv_bridge/cv_bridge-9999.ebuild
@@ -27,4 +27,4 @@ DEPEND="${RDEPEND}
                dev-ros/rostest[${PYTHON_SINGLE_USEDEP}]
        )
 "
-PATCHES=( "${FILESDIR}/boostpython.patch" )
+PATCHES=( "${FILESDIR}/boostpython.patch" "${FILESDIR}/ocv_leak.patch" )

diff --git a/dev-ros/cv_bridge/files/ocv_leak.patch 
b/dev-ros/cv_bridge/files/ocv_leak.patch
new file mode 100644
index 00000000000..32b3fafbe07
--- /dev/null
+++ b/dev-ros/cv_bridge/files/ocv_leak.patch
@@ -0,0 +1,20 @@
+Index: cv_bridge/CMakeLists.txt
+===================================================================
+--- cv_bridge.orig/CMakeLists.txt
++++ cv_bridge/CMakeLists.txt
+@@ -17,14 +17,7 @@ else()
+ find_package(Boost REQUIRED)
+ endif()
+ 
+-set(_opencv_version 4)
+-find_package(OpenCV 4 QUIET)
+-if(NOT OpenCV_FOUND)
+-  message(STATUS "Did not find OpenCV 4, trying OpenCV 3")
+-  set(_opencv_version 3)
+-endif()
+-
+-find_package(OpenCV ${_opencv_version4} REQUIRED
++find_package(OpenCV 4 REQUIRED
+   COMPONENTS
+     opencv_core
+     opencv_imgproc

Reply via email to