summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-01-28 15:12:41 +0100
committerAlexis Ballier <aballier@gentoo.org>2017-01-28 16:26:54 +0100
commit5969dcecd161e565567dc224f0c514af99ea446b (patch)
tree74fb93f2cc556d42ae4c57690d676c5da1a14959
parentdev-ros/collada_parser: Fix build in C++11 mode. (diff)
downloadgentoo-5969dcecd161e565567dc224f0c514af99ea446b.tar.gz
gentoo-5969dcecd161e565567dc224f0c514af99ea446b.tar.bz2
gentoo-5969dcecd161e565567dc224f0c514af99ea446b.zip
dev-ros/laser_filters: Backport upstream patch to fix build in C++11 mode.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--dev-ros/laser_filters/files/c11.patch36
-rw-r--r--dev-ros/laser_filters/laser_filters-1.8.3.ebuild3
2 files changed, 38 insertions, 1 deletions
diff --git a/dev-ros/laser_filters/files/c11.patch b/dev-ros/laser_filters/files/c11.patch
new file mode 100644
index 00000000000..11850d48db9
--- /dev/null
+++ b/dev-ros/laser_filters/files/c11.patch
@@ -0,0 +1,36 @@
+commit a185bb6d0b61cbf8283467770e646241f7cac03e
+Author: Mike Purvis <mpurvis@clearpathrobotics.com>
+Date: Fri Jul 15 23:47:45 2016 -0400
+
+ Use std:: namespace for c++11 compat.
+
+diff --git a/include/laser_filters/intensity_filter.h b/include/laser_filters/intensity_filter.h
+index 3f175a0..4c9cfbc 100644
+--- a/include/laser_filters/intensity_filter.h
++++ b/include/laser_filters/intensity_filter.h
+@@ -99,8 +99,8 @@ public:
+ // Calculate histogram
+ if (disp_hist_enabled_){
+ // If intensity value is inf or NaN, skip voting histogram
+- if( isinf((double)filtered_scan.intensities[i]) ||
+- isnan((double)filtered_scan.intensities[i]) )
++ if( std::isinf((double)filtered_scan.intensities[i]) ||
++ std::isnan((double)filtered_scan.intensities[i]) )
+ continue;
+
+ // Choose bucket to vote on histogram,
+diff --git a/test/test_scan_filter_chain.cpp b/test/test_scan_filter_chain.cpp
+index b661f5f..139da60 100644
+--- a/test/test_scan_filter_chain.cpp
++++ b/test/test_scan_filter_chain.cpp
+@@ -60,8 +60,8 @@ sensor_msgs::LaserScan gen_msg(){
+ */
+ void expect_ranges_eq(const std::vector<float> &a, const std::vector<float> &b) {
+ for( int i=0; i<10; i++) {
+- if(isnan(a[i])) {
+- EXPECT_TRUE(isnan(a[i]));
++ if(std::isnan(a[i])) {
++ EXPECT_TRUE(std::isnan(a[i]));
+ }
+ else {
+ EXPECT_NEAR(a[i], b[i], 1e-6);
diff --git a/dev-ros/laser_filters/laser_filters-1.8.3.ebuild b/dev-ros/laser_filters/laser_filters-1.8.3.ebuild
index 4ad356137f5..9d8b33142d1 100644
--- a/dev-ros/laser_filters/laser_filters-1.8.3.ebuild
+++ b/dev-ros/laser_filters/laser_filters-1.8.3.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="
"
DEPEND="${RDEPEND}
test? ( dev-ros/rostest[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}/c11.patch" )