diff options
author | Alexis Ballier <aballier@gentoo.org> | 2019-12-10 17:11:58 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2019-12-10 18:34:46 +0100 |
commit | 20876cac2bee175d06017b2ea32ae562d3483faf (patch) | |
tree | fce4144754dfae5921c4929e198232018f571f88 /dev-ros/image_publisher | |
parent | ros-meta/image_pipeline: Bump to 1.13.0. (diff) | |
download | gentoo-20876cac2bee175d06017b2ea32ae562d3483faf.tar.gz gentoo-20876cac2bee175d06017b2ea32ae562d3483faf.tar.bz2 gentoo-20876cac2bee175d06017b2ea32ae562d3483faf.zip |
dev-ros/image_publisher: fix build with opencv 4
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/image_publisher')
-rw-r--r-- | dev-ros/image_publisher/files/ocv4.patch | 44 | ||||
-rw-r--r-- | dev-ros/image_publisher/image_publisher-1.13.0.ebuild | 3 |
2 files changed, 46 insertions, 1 deletions
diff --git a/dev-ros/image_publisher/files/ocv4.patch b/dev-ros/image_publisher/files/ocv4.patch new file mode 100644 index 000000000000..12baac2d8473 --- /dev/null +++ b/dev-ros/image_publisher/files/ocv4.patch @@ -0,0 +1,44 @@ +Index: image_publisher/CMakeLists.txt +=================================================================== +--- image_publisher.orig/CMakeLists.txt ++++ image_publisher/CMakeLists.txt +@@ -10,7 +10,7 @@ message(STATUS "opencv version ${OpenCV_ + if(OpenCV_VERSION VERSION_LESS "3.0.0") + find_package(OpenCV 2 REQUIRED COMPONENTS ${opencv_2_components}) + else() +- find_package(OpenCV 3 REQUIRED COMPONENTS ${opencv_3_components}) ++ find_package(OpenCV REQUIRED COMPONENTS ${opencv_3_components}) + endif() + + # generate the dynamic_reconfigure config file +Index: image_publisher/src/nodelet/image_publisher_nodelet.cpp +=================================================================== +--- image_publisher.orig/src/nodelet/image_publisher_nodelet.cpp ++++ image_publisher/src/nodelet/image_publisher_nodelet.cpp +@@ -95,7 +95,7 @@ class ImagePublisherNodelet : public nod + { + if ( cap_.isOpened() ) { + if ( ! cap_.read(image_) ) { +- cap_.set(CV_CAP_PROP_POS_FRAMES, 0); ++ cap_.set(cv::CAP_PROP_POS_FRAMES, 0); + } + } + if (flip_image_) +@@ -136,7 +136,7 @@ public: + nh_.param("filename", filename_, std::string("")); + NODELET_INFO("File name for publishing image is : %s", filename_.c_str()); + try { +- image_ = cv::imread(filename_, CV_LOAD_IMAGE_COLOR); ++ image_ = cv::imread(filename_, cv::IMREAD_COLOR); + if ( image_.empty() ) { // if filename is motion file or device file + try { // if filename is number + int num = boost::lexical_cast<int>(filename_);//num is 1234798797 +@@ -146,7 +146,7 @@ public: + } + CV_Assert(cap_.isOpened()); + cap_.read(image_); +- cap_.set(CV_CAP_PROP_POS_FRAMES, 0); ++ cap_.set(cv::CAP_PROP_POS_FRAMES, 0); + } + CV_Assert(!image_.empty()); + } diff --git a/dev-ros/image_publisher/image_publisher-1.13.0.ebuild b/dev-ros/image_publisher/image_publisher-1.13.0.ebuild index 98088db1be94..dd6ff1f0df2e 100644 --- a/dev-ros/image_publisher/image_publisher-1.13.0.ebuild +++ b/dev-ros/image_publisher/image_publisher-1.13.0.ebuild @@ -16,7 +16,7 @@ IUSE="" RDEPEND=" dev-ros/cv_bridge - media-libs/opencv:= + >=media-libs/opencv-4:= dev-ros/dynamic_reconfigure dev-ros/camera_info_manager dev-ros/image_transport @@ -27,3 +27,4 @@ RDEPEND=" dev-libs/boost:= " DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/ocv4.patch" ) |