sci-libs/rtabmap: Bump to 0.19.7
authorAlexis Ballier <aballier@gentoo.org>
Mon, 18 May 2020 11:22:13 +0000 (13:22 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 18 May 2020 11:22:29 +0000 (13:22 +0200)
Fixes build with:
- PCL 1.11
- Boost 1.73

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
sci-libs/rtabmap/Manifest
sci-libs/rtabmap/files/boost173.patch [new file with mode: 0644]
sci-libs/rtabmap/files/ocv.patch [new file with mode: 0644]
sci-libs/rtabmap/files/pcl111.patch [new file with mode: 0644]
sci-libs/rtabmap/rtabmap-0.19.7.ebuild [new file with mode: 0644]

index 58164b23bff5ed0c008d7d05730f0e1dcb4b60d9..e9ed362ac601060ccdf7ae4c82f40215771dd998 100644 (file)
@@ -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 (file)
index 0000000..4549e9b
--- /dev/null
@@ -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<void (\r
+                               const boost::shared_ptr<openni_wrapper::Image>&,\r
+                               const boost::shared_ptr<openni_wrapper::DepthImage>&,\r
+-                              float)> f = boost::bind (&CameraOpenni::image_cb, this, _1, _2, _3);\r
++                              float)> f = boost::bind (&CameraOpenni::image_cb, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3);\r
+               connection_ = interface_->registerCallback (f);\r
\r
+               interface_->start ();\r
diff --git a/sci-libs/rtabmap/files/ocv.patch b/sci-libs/rtabmap/files/ocv.patch
new file mode 100644 (file)
index 0000000..0802b78
--- /dev/null
@@ -0,0 +1,24 @@
+From 7041d5fd34fb34851ad3287891aa5c383d73b5c2 Mon Sep 17 00:00:00 2001
+From: matlabbe <matlabbe@gmail.com>
+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 <opencv2/calib3d/calib3d_c.h>
+ #if CV_MAJOR_VERSION >= 4
+-
+-#if CV_MINOR_VERSION >= 3
+ #include <opencv2/core/core_c.h>
+-#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 (file)
index 0000000..3ff5d6b
--- /dev/null
@@ -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 <pcl/search/kdtree.h>
+ #include <pcl/common/eigen.h>
+ #include <pcl/common/common.h>
++#include <pcl/common/point_tests.h>
+ #include <set>
+ #include <queue>
+ #include <fstream>
+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 <rtabmap/core/util3d.h>
+ #include <opencv2/highgui/highgui.hpp>
+ #include <opencv2/imgproc/imgproc.hpp>
++#include <pcl/common/point_tests.h>
+ 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 <rtabmap/core/EpipolarGeometry.h>
+ #include <opencv2/calib3d/calib3d.hpp>
+ #include <pcl/search/kdtree.h>
++#include <pcl/common/point_tests.h>
+ 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 <opencv2/video/tracking.hpp>
++#include <pcl/common/point_tests.h>
++
+ 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 (file)
index 0000000..4640d13
--- /dev/null
@@ -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"
+}