From 4a6106b7a6ace022aaa3a91388115b7085511abf Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Mon, 18 May 2020 13:22:13 +0200 Subject: [PATCH] sci-libs/rtabmap: Bump to 0.19.7 Fixes build with: - PCL 1.11 - Boost 1.73 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alexis Ballier --- sci-libs/rtabmap/Manifest | 1 + sci-libs/rtabmap/files/boost173.patch | 13 +++++ sci-libs/rtabmap/files/ocv.patch | 24 +++++++++ sci-libs/rtabmap/files/pcl111.patch | 49 ++++++++++++++++++ sci-libs/rtabmap/rtabmap-0.19.7.ebuild | 69 ++++++++++++++++++++++++++ 5 files changed, 156 insertions(+) create mode 100644 sci-libs/rtabmap/files/boost173.patch create mode 100644 sci-libs/rtabmap/files/ocv.patch create mode 100644 sci-libs/rtabmap/files/pcl111.patch create mode 100644 sci-libs/rtabmap/rtabmap-0.19.7.ebuild diff --git a/sci-libs/rtabmap/Manifest b/sci-libs/rtabmap/Manifest index 58164b23bff5..e9ed362ac601 100644 --- a/sci-libs/rtabmap/Manifest +++ b/sci-libs/rtabmap/Manifest @@ -1 +1,2 @@ DIST rtabmap-0.19.3.tar.gz 19818629 BLAKE2B f732a02db6ef8434b1457234211a128e3050236590e0f6a1e08e36bbb5899b9d3de9409d7d7329f346d29874d440bd86835c1501fb638e3802e2663907e7b04d SHA512 bda72596911b1c35d757322c7e5acd7e43ec1f4e984bfb0599cfb39597bee79e470d1bc11b492f244f39c35812ae570d023848cdcbd011eeb78e347727045509 +DIST rtabmap-0.19.7.tar.gz 19936131 BLAKE2B ec640bb8dddb2acac9eb70e828edc88e76d90b287dc5be0c99f0943dac3df448b0a06bde79b1288e0b84a1b2a022e5713346f87e68f11a6f25be486e3122b62a SHA512 d02fec1db427092867b32d464e4b2450a729923260088b75dd0a813fc6d3e2539b3694035cddffc33b8fcd5a56a2a5c3dedb7c7a998b72f2094e1916f2a99084 diff --git a/sci-libs/rtabmap/files/boost173.patch b/sci-libs/rtabmap/files/boost173.patch new file mode 100644 index 000000000000..4549e9bc8426 --- /dev/null +++ b/sci-libs/rtabmap/files/boost173.patch @@ -0,0 +1,13 @@ +Index: rtabmap-0.19.7/corelib/src/camera/CameraOpenni.cpp +=================================================================== +--- rtabmap-0.19.7.orig/corelib/src/camera/CameraOpenni.cpp ++++ rtabmap-0.19.7/corelib/src/camera/CameraOpenni.cpp +@@ -126,7 +126,7 @@ bool CameraOpenni::init(const std::strin + boost::function&, + const boost::shared_ptr&, +- float)> f = boost::bind (&CameraOpenni::image_cb, this, _1, _2, _3); ++ float)> f = boost::bind (&CameraOpenni::image_cb, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3); + connection_ = interface_->registerCallback (f); + + interface_->start (); diff --git a/sci-libs/rtabmap/files/ocv.patch b/sci-libs/rtabmap/files/ocv.patch new file mode 100644 index 000000000000..0802b7899a26 --- /dev/null +++ b/sci-libs/rtabmap/files/ocv.patch @@ -0,0 +1,24 @@ +From 7041d5fd34fb34851ad3287891aa5c383d73b5c2 Mon Sep 17 00:00:00 2001 +From: matlabbe +Date: Sun, 3 May 2020 22:59:35 -0400 +Subject: [PATCH] Fixed #541 + +--- + corelib/include/rtabmap/core/stereo/stereoRectifyFisheye.h | 3 --- + 1 file changed, 3 deletions(-) + +Index: rtabmap-0.19.7/corelib/include/rtabmap/core/stereo/stereoRectifyFisheye.h +=================================================================== +--- rtabmap-0.19.7.orig/corelib/include/rtabmap/core/stereo/stereoRectifyFisheye.h ++++ rtabmap-0.19.7/corelib/include/rtabmap/core/stereo/stereoRectifyFisheye.h +@@ -37,10 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI + #include + + #if CV_MAJOR_VERSION >= 4 +- +-#if CV_MINOR_VERSION >= 3 + #include +-#endif + + // Opencv4 doesn't expose those functions below anymore, we should recopy all of them! + int cvRodrigues2( const CvMat* src, CvMat* dst, CvMat* jacobian CV_DEFAULT(0)) diff --git a/sci-libs/rtabmap/files/pcl111.patch b/sci-libs/rtabmap/files/pcl111.patch new file mode 100644 index 000000000000..3ff5d6be452d --- /dev/null +++ b/sci-libs/rtabmap/files/pcl111.patch @@ -0,0 +1,49 @@ +Index: rtabmap-0.19.7/corelib/src/Graph.cpp +=================================================================== +--- rtabmap-0.19.7.orig/corelib/src/Graph.cpp ++++ rtabmap-0.19.7/corelib/src/Graph.cpp +@@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI + #include + #include + #include ++#include + #include + #include + #include +Index: rtabmap-0.19.7/corelib/src/clams/frame_projector.cpp +=================================================================== +--- rtabmap-0.19.7.orig/corelib/src/clams/frame_projector.cpp ++++ rtabmap-0.19.7/corelib/src/clams/frame_projector.cpp +@@ -33,6 +33,7 @@ RTAB-Map integration: Mathieu Labbe + #include + #include + #include ++#include + + using namespace std; + using namespace Eigen; +Index: rtabmap-0.19.7/corelib/src/util3d_correspondences.cpp +=================================================================== +--- rtabmap-0.19.7.orig/corelib/src/util3d_correspondences.cpp ++++ rtabmap-0.19.7/corelib/src/util3d_correspondences.cpp +@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI + #include + #include + #include ++#include + + namespace rtabmap + { +Index: rtabmap-0.19.7/corelib/src/util3d_features.cpp +=================================================================== +--- rtabmap-0.19.7.orig/corelib/src/util3d_features.cpp ++++ rtabmap-0.19.7/corelib/src/util3d_features.cpp +@@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI + + #include + ++#include ++ + namespace rtabmap + { + diff --git a/sci-libs/rtabmap/rtabmap-0.19.7.ebuild b/sci-libs/rtabmap/rtabmap-0.19.7.ebuild new file mode 100644 index 000000000000..4640d13e9cf0 --- /dev/null +++ b/sci-libs/rtabmap/rtabmap-0.19.7.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/introlab/rtabmap" +fi + +inherit ${SCM} cmake-utils multilib + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64" + SRC_URI="https://github.com/introlab/rtabmap/archive/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${P}" +fi + +DESCRIPTION="Real-Time Appearance-Based Mapping (RGB-D Graph SLAM)" +HOMEPAGE="http://introlab.github.io/rtabmap/" +LICENSE="BSD" +SLOT="0" +IUSE="examples ieee1394 openni2 qt5" + +RDEPEND=" + media-libs/opencv:=[qt5(-)?] + sci-libs/pcl:=[openni,vtk,qt5(-)?] + sci-libs/vtk:=[qt5(-)?] + sys-libs/zlib + sci-libs/octomap:= + dev-libs/boost:= + ieee1394? ( media-libs/libdc1394 ) + openni2? ( dev-libs/OpenNI2 ) + qt5? ( + dev-qt/qtwidgets:5 + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtsvg:5 + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}/pcl111.patch" + "${FILESDIR}/boost173.patch" + "${FILESDIR}/ocv.patch" +) + +src_configure() { + local mycmakeargs=( + "-DWITH_QT=$(usex qt5 ON OFF)" + "-DWITH_DC1394=$(usex ieee1394 ON OFF)" + "-DWITH_OPENNI2=$(usex openni2 ON OFF)" + "-DBUILD_EXAMPLES=$(usex examples ON OFF)" + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + # Needed since we force ros crawling to be done only in + # /usr/share/ros_packages/ + insinto /usr/share/ros_packages/${PN} + doins "${ED}/usr/share/${PN}/package.xml" +} -- 2.26.2