diff options
author | Alexis Ballier <aballier@gentoo.org> | 2020-08-06 14:28:25 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2020-08-06 14:28:34 +0200 |
commit | 0f12049c25dcf32f404ff8e65b34c10b0552d02f (patch) | |
tree | e28507ab548685f393dd4ac2b0afd9e74a2a770f /dev-ros/laser_cb_detector | |
parent | dev-ros/actionlib: add missing test dep (diff) | |
download | gentoo-0f12049c25dcf32f404ff8e65b34c10b0552d02f.tar.gz gentoo-0f12049c25dcf32f404ff8e65b34c10b0552d02f.tar.bz2 gentoo-0f12049c25dcf32f404ff8e65b34c10b0552d02f.zip |
dev-ros/laser_cb_detector: fix tests with ocv4
Closes: https://bugs.gentoo.org/735584
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/laser_cb_detector')
-rw-r--r-- | dev-ros/laser_cb_detector/files/ocv4-2.patch | 34 | ||||
-rw-r--r-- | dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild | 2 | ||||
-rw-r--r-- | dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild | 2 |
3 files changed, 36 insertions, 2 deletions
diff --git a/dev-ros/laser_cb_detector/files/ocv4-2.patch b/dev-ros/laser_cb_detector/files/ocv4-2.patch new file mode 100644 index 000000000000..3cc51c45d7dd --- /dev/null +++ b/dev-ros/laser_cb_detector/files/ocv4-2.patch @@ -0,0 +1,34 @@ +Index: laser_cb_detector/test/laser_cb_detector_unittest.cpp +=================================================================== +--- laser_cb_detector.orig/test/laser_cb_detector_unittest.cpp ++++ laser_cb_detector/test/laser_cb_detector_unittest.cpp +@@ -37,7 +37,7 @@ + + #include <laser_cb_detector/ConfigGoal.h> + #include <laser_cb_detector/laser_cb_detector.h> +-#include <opencv/highgui.h> ++#include <opencv2/highgui.hpp> + + using namespace laser_cb_detector; + using namespace std; +@@ -55,8 +55,9 @@ static const string test_path = xstr(TES + + calibration_msgs::DenseLaserSnapshot getSnapshot(const string& filename) + { +- IplImage* image; +- image = cvLoadImage(filename.c_str(), 0); // 0 -> Force image to grayscale ++ cv::Mat mat = cv::imread(filename.c_str(), 0); ++ IplImage image_v = cvIplImage(mat); ++ IplImage* image = &image_v; + EXPECT_TRUE(image) << "could not open image file [" << filename << "]" << endl; + + +@@ -92,7 +93,7 @@ calibration_msgs::DenseLaserSnapshot get + } + + cvReleaseImage(&float_image); +- cvReleaseImage(&image); ++ //cvReleaseImage(&image); + + return snapshot; + } diff --git a/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild b/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild index eaa01802cc3c..682fde80756a 100644 --- a/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild +++ b/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild @@ -32,4 +32,4 @@ DEPEND="${RDEPEND} dev-cpp/gtest ) " -PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" ) +PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" "${FILESDIR}/ocv4-2.patch" ) diff --git a/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild b/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild index eaa01802cc3c..682fde80756a 100644 --- a/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild +++ b/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild @@ -32,4 +32,4 @@ DEPEND="${RDEPEND} dev-cpp/gtest ) " -PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" ) +PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" "${FILESDIR}/ocv4-2.patch" ) |