commit:     ed5d0a390a90af5320dbf3c0929753be4fdd820d
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 10 16:21:52 2019 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 17:34:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5d0a39

dev-ros/compressed_depth_image_transport: fix build with opencv4

Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 .../compressed_depth_image_transport-1.9.5-r1.ebuild        |  5 +++--
 dev-ros/compressed_depth_image_transport/files/ocv4.patch   | 13 +++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git 
a/dev-ros/compressed_depth_image_transport/compressed_depth_image_transport-1.9.5-r1.ebuild
 
b/dev-ros/compressed_depth_image_transport/compressed_depth_image_transport-1.9.5-r1.ebuild
index d4ef693e9dd..d3bccdcdc1c 100644
--- 
a/dev-ros/compressed_depth_image_transport/compressed_depth_image_transport-1.9.5-r1.ebuild
+++ 
b/dev-ros/compressed_depth_image_transport/compressed_depth_image_transport-1.9.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -18,8 +18,9 @@ RDEPEND="
        dev-ros/cv_bridge
        dev-ros/dynamic_reconfigure[${PYTHON_USEDEP}]
        dev-ros/image_transport
-       media-libs/opencv:=
+       >=media-libs/opencv-4:=
        dev-libs/boost:=
        dev-libs/console_bridge:=
 "
 DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/ocv4.patch" )

diff --git a/dev-ros/compressed_depth_image_transport/files/ocv4.patch 
b/dev-ros/compressed_depth_image_transport/files/ocv4.patch
new file mode 100644
index 00000000000..9d1c7d79ce6
--- /dev/null
+++ b/dev-ros/compressed_depth_image_transport/files/ocv4.patch
@@ -0,0 +1,13 @@
+Index: compressed_depth_image_transport/src/codec.cpp
+===================================================================
+--- compressed_depth_image_transport.orig/src/codec.cpp
++++ compressed_depth_image_transport/src/codec.cpp
+@@ -135,7 +135,7 @@ sensor_msgs::Image::Ptr decodeCompressed
+       // Decode raw image
+       try
+       {
+-        cv_ptr->image = cv::imdecode(imageData, CV_LOAD_IMAGE_UNCHANGED);
++        cv_ptr->image = cv::imdecode(imageData, cv::IMREAD_UNCHANGED);
+       }
+       catch (cv::Exception& e)
+       {

Reply via email to