dev-ros/hector_pose_estimation_core: fix build with gcc6, bug #598114
authorAlexis Ballier <aballier@gentoo.org>
Wed, 2 Nov 2016 10:19:06 +0000 (11:19 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Wed, 2 Nov 2016 10:19:14 +0000 (11:19 +0100)
Package-Manager: portage-2.3.2

dev-ros/hector_pose_estimation_core/files/gcc6.patch [new file with mode: 0644]
dev-ros/hector_pose_estimation_core/hector_pose_estimation_core-0.3.0-r1.ebuild

diff --git a/dev-ros/hector_pose_estimation_core/files/gcc6.patch b/dev-ros/hector_pose_estimation_core/files/gcc6.patch
new file mode 100644 (file)
index 0000000..4286291
--- /dev/null
@@ -0,0 +1,35 @@
+Index: hector_pose_estimation_core/include/hector_pose_estimation/input.h
+===================================================================
+--- hector_pose_estimation_core.orig/include/hector_pose_estimation/input.h
++++ hector_pose_estimation_core/include/hector_pose_estimation/input.h
+@@ -79,7 +79,7 @@ public:
+     return *variance_;
+   }
+ 
+-  virtual bool hasVariance() const { return variance_; }
++  virtual bool hasVariance() const { return variance_ != NULL; }
+   virtual Variance const &getVariance() { if (!variance_) variance_.reset(new Variance); return *variance_; }
+   virtual Variance const &getVariance() const { return *variance_; }
+   virtual Variance& variance() { if (!variance_) variance_.reset(new Variance); return *variance_; }
+Index: hector_pose_estimation_core/src/system/imu_model.cpp
+===================================================================
+--- hector_pose_estimation_core.orig/src/system/imu_model.cpp
++++ hector_pose_estimation_core/src/system/imu_model.cpp
+@@ -51,7 +51,7 @@ GyroModel::~GyroModel()
+ bool GyroModel::init(PoseEstimation& estimator, System &system, State& state)
+ {
+   bias_ = state.addSubState<3,3>(this, system.getName() + "_bias");
+-  return bias_;
++  return bias_ != NULL;
+ }
+ 
+ void GyroModel::getPrior(State &state)
+@@ -113,7 +113,7 @@ AccelerometerModel::~AccelerometerModel(
+ bool AccelerometerModel::init(PoseEstimation& estimator, System &system, State& state)
+ {
+   bias_ = state.addSubState<3,3>(this, system.getName() + "_bias");
+-  return bias_;
++  return bias_ != NULL;
+ }
+ 
+ void AccelerometerModel::getPrior(State &state)
index 3fce19f64606ce92489eb7bddf80d1a888b141c5..63064ba7710b27263b4407ca56f4f732d364404e 100644 (file)
@@ -27,4 +27,4 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}
        dev-cpp/eigen:3"
-PATCHES=( "${FILESDIR}/includes.patch" )
+PATCHES=( "${FILESDIR}/includes.patch" "${FILESDIR}/gcc6.patch" )