public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ros/image_publisher/files/, dev-ros/image_publisher/
@ 2017-01-23 12:28 Alexis Ballier
  0 siblings, 0 replies; 3+ messages in thread
From: Alexis Ballier @ 2017-01-23 12:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2f934bb189f6267f1815f853403c84de934e3235
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 12:24:26 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 12:28:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f934bb1

dev-ros/image_publisher: Backport upstream patches to build with gcc6.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-ros/image_publisher/files/gcc6-1.patch         | 44 ++++++++++++++++++++++
 dev-ros/image_publisher/files/gcc6.patch           | 32 ++++++++++++++++
 .../image_publisher/image_publisher-1.12.19.ebuild |  3 +-
 3 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/dev-ros/image_publisher/files/gcc6-1.patch b/dev-ros/image_publisher/files/gcc6-1.patch
new file mode 100644
index 00000000..74e238b
--- /dev/null
+++ b/dev-ros/image_publisher/files/gcc6-1.patch
@@ -0,0 +1,44 @@
+commit 562332df73781c1e56ce9123542334cc1d91b143
+Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
+Date:   Thu Oct 6 08:55:27 2016 +0200
+
+    explicitly cast to std::vector<double> to make gcc6 happy
+    
+    With gcc6, compiling image_publisher fails with this error:
+    ```
+    /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()':
+    /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:43: error: ambiguous overload for 'operator=' (operand types are 'sensor_msgs::CameraInfo_<std::allocator<void> >::_D_type {aka std::vector<double>}' and 'boost::assign_detail::generic_list<int>')
+         camera_info_.D = list_of(0)(0)(0)(0)(0);
+    ```
+    
+    After adding an initial explicit type cast for the assignment,
+    compiling fails further with:
+    ```
+    | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()':
+    | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:65: error: call of overloaded 'vector(boost::assign_detail::generic_list<int>&)' is ambiguous
+    |      camera_info_.D = std::vector<double> (list_of(0)(0)(0)(0)(0));
+    ```
+    
+    Various sources on the internet [1, 2, 3] point to use the
+    `convert_to_container` method; hence, this commit follows those
+    suggestions and with that image_publisher compiles with gcc6.
+    
+    [1] http://stackoverflow.com/questions/16211410/ambiguity-when-using-boostassignlist-of-to-construct-a-stdvector
+    [2] http://stackoverflow.com/questions/12352692/ambiguous-call-with-list-of-in-vs2010/12362548#12362548
+    [3] http://stackoverflow.com/questions/13285272/using-boostassignlist-of?rq=1
+    
+    Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
+
+diff --git a/image_publisher/src/nodelet/image_publisher_nodelet.cpp b/image_publisher/src/nodelet/image_publisher_nodelet.cpp
+index 4102d0d..26e1352 100644
+--- a/image_publisher/src/nodelet/image_publisher_nodelet.cpp
++++ b/image_publisher/src/nodelet/image_publisher_nodelet.cpp
+@@ -177,7 +177,7 @@ public:
+     camera_info_.width = image_.cols;
+     camera_info_.height = image_.rows;
+     camera_info_.distortion_model = "plumb_bob";
+-    camera_info_.D = list_of(0)(0)(0)(0)(0);
++    camera_info_.D = list_of(0)(0)(0)(0)(0).convert_to_container<std::vector<double> >();
+     camera_info_.K = list_of(1)(0)(camera_info_.width/2)(0)(1)(camera_info_.height/2)(0)(0)(1);
+     camera_info_.R = list_of(1)(0)(0)(0)(1)(0)(0)(0)(1);
+     camera_info_.P = list_of(1)(0)(camera_info_.width/2)(0)(0)(1)(camera_info_.height/2)(0)(0)(0)(1)(0);

diff --git a/dev-ros/image_publisher/files/gcc6.patch b/dev-ros/image_publisher/files/gcc6.patch
new file mode 100644
index 00000000..4815e9e
--- /dev/null
+++ b/dev-ros/image_publisher/files/gcc6.patch
@@ -0,0 +1,32 @@
+commit 6c2d65452bd5fe62723988a1a570789921900d59
+Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
+Date:   Fri Sep 30 15:39:47 2016 +0200
+
+    address gcc6 build error
+    
+    With gcc6, compiling fails with `stdlib.h: No such file or directory`,
+    as including '-isystem /usr/include' breaks with gcc6, cf.,
+    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129.
+    
+    This commit addresses this issue for this package in the same way
+    it was addressed in various other ROS packages. A list of related
+    commits and pull requests is at:
+    
+      https://github.com/ros/rosdistro/issues/12783
+    
+    Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
+
+diff --git a/image_publisher/CMakeLists.txt b/image_publisher/CMakeLists.txt
+index 8015a45..431109c 100644
+--- a/image_publisher/CMakeLists.txt
++++ b/image_publisher/CMakeLists.txt
+@@ -8,8 +8,7 @@ generate_dynamic_reconfigure_options(cfg/ImagePublisher.cfg)
+ 
+ catkin_package()
+ 
+-# add the executable
+-include_directories(SYSTEM ${catkin_INCLUDE_DIRS})
++include_directories(${catkin_INCLUDE_DIRS})
+ 
+ add_library(${PROJECT_NAME} SHARED src/nodelet/image_publisher_nodelet.cpp)
+ target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

diff --git a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild b/dev-ros/image_publisher/image_publisher-1.12.19.ebuild
index c7d3a65..782fa09 100644
--- a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild
+++ b/dev-ros/image_publisher/image_publisher-1.12.19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -25,3 +25,4 @@ RDEPEND="
 	dev-ros/sensor_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
 "
 DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/gcc6-1.patch" )


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ros/image_publisher/files/, dev-ros/image_publisher/
@ 2017-09-12 11:59 Alexis Ballier
  0 siblings, 0 replies; 3+ messages in thread
From: Alexis Ballier @ 2017-09-12 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     8969e0ec3ebd337fccbb9523f2f71722528bafbc
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 11:57:15 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 11:59:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8969e0ec

dev-ros/image_publisher: Remove old

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-ros/image_publisher/Manifest                   |  1 -
 dev-ros/image_publisher/files/gcc6-1.patch         | 44 ----------------------
 dev-ros/image_publisher/files/gcc6.patch           | 32 ----------------
 .../image_publisher/image_publisher-1.12.19.ebuild | 28 --------------
 4 files changed, 105 deletions(-)

diff --git a/dev-ros/image_publisher/Manifest b/dev-ros/image_publisher/Manifest
index b50ff7ba4d9..f6e12d8df50 100644
--- a/dev-ros/image_publisher/Manifest
+++ b/dev-ros/image_publisher/Manifest
@@ -1,2 +1 @@
-DIST image_pipeline-1.12.19.tar.gz 130635 SHA256 fc3073428fc930523efd6ed4a86d838ab0f0ff04a312eb4188c72a854d300e97 SHA512 f0677e4a811622ffc19792af828f4766408b6a051d271950a8a096d064b043dae1457b2a6f2d59fe5c2971795db04e7abf5e0878ead1428a4da19033693829ba WHIRLPOOL ecb1cdcc07109d3781bb82e88c0fe7e91754b2dfac0bfc7f5d053e6df9ce78b95b4131a9b65715fbce1b44b0acab6f833bd9c0d4f2fb68718fee4f4bfd586c63
 DIST image_pipeline-1.12.20.tar.gz 137888 SHA256 b69307689c7fb4e62464254fc24ede26c85087b51519f0b43a33e995dabe1a53 SHA512 37a45cfcc8bdb8b40477860e29f72671d423d4531156f5901128c32a6c41d27f235cdac216502d614ab7ddab5e66c2f343baaa0fd22cf83cb38e667fbbc111c5 WHIRLPOOL 8dda5d84af0929a983e6a2cb54697ee50d3036399a05bff50ae711fb4e8638e8763de407b65beb14d65b2cd48e3b200c84af95cee7da48609448f102d0bfdadc

diff --git a/dev-ros/image_publisher/files/gcc6-1.patch b/dev-ros/image_publisher/files/gcc6-1.patch
deleted file mode 100644
index 74e238b0012..00000000000
--- a/dev-ros/image_publisher/files/gcc6-1.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-commit 562332df73781c1e56ce9123542334cc1d91b143
-Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-Date:   Thu Oct 6 08:55:27 2016 +0200
-
-    explicitly cast to std::vector<double> to make gcc6 happy
-    
-    With gcc6, compiling image_publisher fails with this error:
-    ```
-    /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()':
-    /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:43: error: ambiguous overload for 'operator=' (operand types are 'sensor_msgs::CameraInfo_<std::allocator<void> >::_D_type {aka std::vector<double>}' and 'boost::assign_detail::generic_list<int>')
-         camera_info_.D = list_of(0)(0)(0)(0)(0);
-    ```
-    
-    After adding an initial explicit type cast for the assignment,
-    compiling fails further with:
-    ```
-    | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()':
-    | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:65: error: call of overloaded 'vector(boost::assign_detail::generic_list<int>&)' is ambiguous
-    |      camera_info_.D = std::vector<double> (list_of(0)(0)(0)(0)(0));
-    ```
-    
-    Various sources on the internet [1, 2, 3] point to use the
-    `convert_to_container` method; hence, this commit follows those
-    suggestions and with that image_publisher compiles with gcc6.
-    
-    [1] http://stackoverflow.com/questions/16211410/ambiguity-when-using-boostassignlist-of-to-construct-a-stdvector
-    [2] http://stackoverflow.com/questions/12352692/ambiguous-call-with-list-of-in-vs2010/12362548#12362548
-    [3] http://stackoverflow.com/questions/13285272/using-boostassignlist-of?rq=1
-    
-    Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-
-diff --git a/image_publisher/src/nodelet/image_publisher_nodelet.cpp b/image_publisher/src/nodelet/image_publisher_nodelet.cpp
-index 4102d0d..26e1352 100644
---- a/image_publisher/src/nodelet/image_publisher_nodelet.cpp
-+++ b/image_publisher/src/nodelet/image_publisher_nodelet.cpp
-@@ -177,7 +177,7 @@ public:
-     camera_info_.width = image_.cols;
-     camera_info_.height = image_.rows;
-     camera_info_.distortion_model = "plumb_bob";
--    camera_info_.D = list_of(0)(0)(0)(0)(0);
-+    camera_info_.D = list_of(0)(0)(0)(0)(0).convert_to_container<std::vector<double> >();
-     camera_info_.K = list_of(1)(0)(camera_info_.width/2)(0)(1)(camera_info_.height/2)(0)(0)(1);
-     camera_info_.R = list_of(1)(0)(0)(0)(1)(0)(0)(0)(1);
-     camera_info_.P = list_of(1)(0)(camera_info_.width/2)(0)(0)(1)(camera_info_.height/2)(0)(0)(0)(1)(0);

diff --git a/dev-ros/image_publisher/files/gcc6.patch b/dev-ros/image_publisher/files/gcc6.patch
deleted file mode 100644
index 4815e9e682c..00000000000
--- a/dev-ros/image_publisher/files/gcc6.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit 6c2d65452bd5fe62723988a1a570789921900d59
-Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-Date:   Fri Sep 30 15:39:47 2016 +0200
-
-    address gcc6 build error
-    
-    With gcc6, compiling fails with `stdlib.h: No such file or directory`,
-    as including '-isystem /usr/include' breaks with gcc6, cf.,
-    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129.
-    
-    This commit addresses this issue for this package in the same way
-    it was addressed in various other ROS packages. A list of related
-    commits and pull requests is at:
-    
-      https://github.com/ros/rosdistro/issues/12783
-    
-    Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-
-diff --git a/image_publisher/CMakeLists.txt b/image_publisher/CMakeLists.txt
-index 8015a45..431109c 100644
---- a/image_publisher/CMakeLists.txt
-+++ b/image_publisher/CMakeLists.txt
-@@ -8,8 +8,7 @@ generate_dynamic_reconfigure_options(cfg/ImagePublisher.cfg)
- 
- catkin_package()
- 
--# add the executable
--include_directories(SYSTEM ${catkin_INCLUDE_DIRS})
-+include_directories(${catkin_INCLUDE_DIRS})
- 
- add_library(${PROJECT_NAME} SHARED src/nodelet/image_publisher_nodelet.cpp)
- target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

diff --git a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild b/dev-ros/image_publisher/image_publisher-1.12.19.ebuild
deleted file mode 100644
index 2987189745d..00000000000
--- a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-ROS_REPO_URI="https://github.com/ros-perception/image_pipeline"
-KEYWORDS="~amd64 ~arm"
-PYTHON_COMPAT=( python2_7 )
-ROS_SUBDIR=${PN}
-
-inherit ros-catkin
-
-DESCRIPTION="Publish an image stream from single image file or avi file."
-LICENSE="BSD"
-SLOT="0"
-IUSE=""
-
-RDEPEND="
-	dev-ros/cv_bridge
-	media-libs/opencv:=
-	dev-ros/dynamic_reconfigure
-	dev-ros/camera_info_manager
-	dev-ros/image_transport
-	dev-ros/nodelet
-	dev-ros/roscpp
-	dev-ros/sensor_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/gcc6-1.patch" )


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ros/image_publisher/files/, dev-ros/image_publisher/
@ 2019-12-10 17:35 Alexis Ballier
  0 siblings, 0 replies; 3+ messages in thread
From: Alexis Ballier @ 2019-12-10 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     20876cac2bee175d06017b2ea32ae562d3483faf
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 10 16:11:58 2019 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 17:34:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20876cac

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 <AT> gentoo.org>

 dev-ros/image_publisher/files/ocv4.patch           | 44 ++++++++++++++++++++++
 .../image_publisher/image_publisher-1.13.0.ebuild  |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/dev-ros/image_publisher/files/ocv4.patch b/dev-ros/image_publisher/files/ocv4.patch
new file mode 100644
index 00000000000..12baac2d847
--- /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 98088db1be9..dd6ff1f0df2 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" )


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-10 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 12:28 [gentoo-commits] repo/gentoo:master commit in: dev-ros/image_publisher/files/, dev-ros/image_publisher/ Alexis Ballier
  -- strict thread matches above, loose matches on Subject: below --
2017-09-12 11:59 Alexis Ballier
2019-12-10 17:35 Alexis Ballier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox