summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-03-19 17:26:59 -0400
committerAndreas Sturmlechner <asturm@gentoo.org>2017-03-20 00:11:56 +0100
commit7e7ffe5d302c447dfbdf02bcce2dda8debbc4542 (patch)
treeebbd6317b5e3ce31b304d47cf37ce8132fe80a62 /kde-misc/kcollectd
parentapp-arch/file-roller: remove old (diff)
downloadgentoo-7e7ffe5d302c447dfbdf02bcce2dda8debbc4542.tar.gz
gentoo-7e7ffe5d302c447dfbdf02bcce2dda8debbc4542.tar.bz2
gentoo-7e7ffe5d302c447dfbdf02bcce2dda8debbc4542.zip
kde-misc/kcollectd: Fix building with gcc-6 (bug #613174)
Package-Manager: Portage-2.3.5, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/4247
Diffstat (limited to 'kde-misc/kcollectd')
-rw-r--r--kde-misc/kcollectd/files/kcollectd-0.9-gcc6.patch52
-rw-r--r--kde-misc/kcollectd/kcollectd-0.9-r1.ebuild3
2 files changed, 54 insertions, 1 deletions
diff --git a/kde-misc/kcollectd/files/kcollectd-0.9-gcc6.patch b/kde-misc/kcollectd/files/kcollectd-0.9-gcc6.patch
new file mode 100644
index 000000000000..bcf28d0a3182
--- /dev/null
+++ b/kde-misc/kcollectd/files/kcollectd-0.9-gcc6.patch
@@ -0,0 +1,52 @@
+Description: fix FTBFS with gcc-6
+Author: Logan Rosen <logan@ubuntu.com>
+Acked-By: Mattia Rizzolo <mattia@debian.org>
+Bug-Debian: https://bugs.debian.org/831129
+Last-Update: 2016-10-10
+
+--- a/kcollectd/graph.cc
++++ b/kcollectd/graph.cc
+@@ -564,9 +564,9 @@
+ paint.setPen(Qt::NoPen);
+ paint.setBrush(QBrush(color_minmax[color_nr++ % 8]));
+ for(int i=0; i<size; ++i) {
+- while (i<size && (isnan(min_data[i]) || isnan(max_data[i]))) ++i;
++ while (i<size && (std::isnan(min_data[i]) || std::isnan(max_data[i]))) ++i;
+ int l = i;
+- while (i<size && !isnan(min_data[i]) && !isnan(max_data[i])) ++i;
++ while (i<size && !std::isnan(min_data[i]) && !std::isnan(max_data[i])) ++i;
+ const int asize = i-l;
+ points.resize(asize*2);
+ int k;
+@@ -597,9 +597,9 @@
+ if (!avg_data.empty()) {
+ paint.setPen(color_line[color_nr++ % 8]);
+ for(int i=0; i<size; ++i) {
+- while (i<size && isnan(avg_data[i])) ++i;
++ while (i<size && std::isnan(avg_data[i])) ++i;
+ int l = i;
+- while (i<size && !isnan(avg_data[i])) ++i;
++ while (i<size && !std::isnan(avg_data[i])) ++i;
+ const int asize = i-l;
+ points.resize(asize);
+ for(int k=0; k<asize; ++k, ++l) {
+--- a/kcollectd/misc.cc
++++ b/kcollectd/misc.cc
+@@ -119,7 +119,7 @@
+ // process avg_data
+ if (!avg_data.empty()) {
+ for(std::size_t i=0; i<size; ++i) {
+- if (isnan(avg_data[i])) continue;
++ if (std::isnan(avg_data[i])) continue;
+ valid = true;
+ if (min > avg_data[i]) min = avg_data[i];
+ if (max < avg_data[i]) max = avg_data[i];
+@@ -129,7 +129,7 @@
+ // process min/max-data
+ if (!min_data.empty() && !max_data.empty()) {
+ for(std::size_t i=0; i<size; ++i) {
+- if (isnan(min_data[i]) || isnan(max_data[i])) continue;
++ if (std::isnan(min_data[i]) || std::isnan(max_data[i])) continue;
+ valid = true;
+ if (min > min_data[i]) min = min_data[i];
+ if (max < min_data[i]) max = min_data[i];
diff --git a/kde-misc/kcollectd/kcollectd-0.9-r1.ebuild b/kde-misc/kcollectd/kcollectd-0.9-r1.ebuild
index 5e6837e8a658..4e654e720a66 100644
--- a/kde-misc/kcollectd/kcollectd-0.9-r1.ebuild
+++ b/kde-misc/kcollectd/kcollectd-0.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -23,4 +23,5 @@ PATCHES=(
"${FILESDIR}/${P}-boost.patch"
"${FILESDIR}/${P}-cflags.patch"
"${FILESDIR}/${P}-desktop.patch"
+ "${FILESDIR}/${P}-gcc6.patch"
)