1 |
commit: 0f12049c25dcf32f404ff8e65b34c10b0552d02f |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 6 12:28:25 2020 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 6 12:28:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f12049c |
7 |
|
8 |
dev-ros/laser_cb_detector: fix tests with ocv4 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/735584 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
13 |
|
14 |
dev-ros/laser_cb_detector/files/ocv4-2.patch | 34 ++++++++++++++++++++++ |
15 |
.../laser_cb_detector-0.10.14.ebuild | 2 +- |
16 |
.../laser_cb_detector-9999.ebuild | 2 +- |
17 |
3 files changed, 36 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/dev-ros/laser_cb_detector/files/ocv4-2.patch b/dev-ros/laser_cb_detector/files/ocv4-2.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..3cc51c45d7d |
22 |
--- /dev/null |
23 |
+++ b/dev-ros/laser_cb_detector/files/ocv4-2.patch |
24 |
@@ -0,0 +1,34 @@ |
25 |
+Index: laser_cb_detector/test/laser_cb_detector_unittest.cpp |
26 |
+=================================================================== |
27 |
+--- laser_cb_detector.orig/test/laser_cb_detector_unittest.cpp |
28 |
++++ laser_cb_detector/test/laser_cb_detector_unittest.cpp |
29 |
+@@ -37,7 +37,7 @@ |
30 |
+ |
31 |
+ #include <laser_cb_detector/ConfigGoal.h> |
32 |
+ #include <laser_cb_detector/laser_cb_detector.h> |
33 |
+-#include <opencv/highgui.h> |
34 |
++#include <opencv2/highgui.hpp> |
35 |
+ |
36 |
+ using namespace laser_cb_detector; |
37 |
+ using namespace std; |
38 |
+@@ -55,8 +55,9 @@ static const string test_path = xstr(TES |
39 |
+ |
40 |
+ calibration_msgs::DenseLaserSnapshot getSnapshot(const string& filename) |
41 |
+ { |
42 |
+- IplImage* image; |
43 |
+- image = cvLoadImage(filename.c_str(), 0); // 0 -> Force image to grayscale |
44 |
++ cv::Mat mat = cv::imread(filename.c_str(), 0); |
45 |
++ IplImage image_v = cvIplImage(mat); |
46 |
++ IplImage* image = &image_v; |
47 |
+ EXPECT_TRUE(image) << "could not open image file [" << filename << "]" << endl; |
48 |
+ |
49 |
+ |
50 |
+@@ -92,7 +93,7 @@ calibration_msgs::DenseLaserSnapshot get |
51 |
+ } |
52 |
+ |
53 |
+ cvReleaseImage(&float_image); |
54 |
+- cvReleaseImage(&image); |
55 |
++ //cvReleaseImage(&image); |
56 |
+ |
57 |
+ return snapshot; |
58 |
+ } |
59 |
|
60 |
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 |
61 |
index eaa01802cc3..682fde80756 100644 |
62 |
--- a/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild |
63 |
+++ b/dev-ros/laser_cb_detector/laser_cb_detector-0.10.14.ebuild |
64 |
@@ -32,4 +32,4 @@ DEPEND="${RDEPEND} |
65 |
dev-cpp/gtest |
66 |
) |
67 |
" |
68 |
-PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" ) |
69 |
+PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" "${FILESDIR}/ocv4-2.patch" ) |
70 |
|
71 |
diff --git a/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild b/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild |
72 |
index eaa01802cc3..682fde80756 100644 |
73 |
--- a/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild |
74 |
+++ b/dev-ros/laser_cb_detector/laser_cb_detector-9999.ebuild |
75 |
@@ -32,4 +32,4 @@ DEPEND="${RDEPEND} |
76 |
dev-cpp/gtest |
77 |
) |
78 |
" |
79 |
-PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" ) |
80 |
+PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/boost170.patch" "${FILESDIR}/ocv4.patch" "${FILESDIR}/ocv4-2.patch" ) |