1 |
commit: 63f54474d7dc8f905ad738bc7886eb4dab505a8e |
2 |
Author: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 18 16:36:22 2017 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 18 16:36:22 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63f54474 |
7 |
|
8 |
sci-visualization/spyview: Fix some more missing std::, bug 615966 |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
.../files/spyview-20150124-gcc6cxx14-2.patch | 113 +++++++++++++++++++++ |
13 |
.../spyview/spyview-20150124-r1.ebuild | 1 + |
14 |
2 files changed, 114 insertions(+) |
15 |
|
16 |
diff --git a/sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch b/sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..f23838ced7d |
19 |
--- /dev/null |
20 |
+++ b/sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch |
21 |
@@ -0,0 +1,113 @@ |
22 |
+diff --git a/spyview/ImageData.C b/spyview/ImageData.C |
23 |
+index a9b2c17..29decea 100644 |
24 |
+--- a/spyview/ImageData.C |
25 |
++++ b/spyview/ImageData.C |
26 |
+@@ -180,12 +180,12 @@ void ImageData::load_int(int *data, |
27 |
+ double y1, double y2, |
28 |
+ double z1, double z2) |
29 |
+ { |
30 |
+- xmin = isnan(x1) ? x1 : 0; |
31 |
+- xmax = isnan(x2) ? x2 : width-1; |
32 |
+- ymin = isnan(y1) ? y1 : 0; |
33 |
+- ymax = isnan(y2) ? y2 : height-1; |
34 |
+- qmin = isnan(z1) ? z1 : 0; |
35 |
+- qmax = isnan(z2) ? z2 : QUANT_MAX; |
36 |
++ xmin = std::isnan(x1) ? x1 : 0; |
37 |
++ xmax = std::isnan(x2) ? x2 : width-1; |
38 |
++ ymin = std::isnan(y1) ? y1 : 0; |
39 |
++ ymax = std::isnan(y2) ? y2 : height-1; |
40 |
++ qmin = std::isnan(z1) ? z1 : 0; |
41 |
++ qmax = std::isnan(z2) ? z2 : QUANT_MAX; |
42 |
+ width = w; |
43 |
+ height = h; |
44 |
+ |
45 |
+@@ -214,10 +214,10 @@ void ImageData::load_raw(double *data, |
46 |
+ double x1, double x2, |
47 |
+ double y1, double y2) |
48 |
+ { |
49 |
+- xmin = isnan(x1) ? x1 : 0; |
50 |
+- xmax = isnan(x2) ? x2 : width-1; |
51 |
+- ymin = isnan(y1) ? y1 : 0; |
52 |
+- ymax = isnan(y2) ? y2 : height-1; |
53 |
++ xmin = std::isnan(x1) ? x1 : 0; |
54 |
++ xmax = std::isnan(x2) ? x2 : width-1; |
55 |
++ ymin = std::isnan(y1) ? y1 : 0; |
56 |
++ ymax = std::isnan(y2) ? y2 : height-1; |
57 |
+ width = w; |
58 |
+ height = h; |
59 |
+ |
60 |
+@@ -762,7 +762,7 @@ int ImageData::load_Delft(const char *name) |
61 |
+ |
62 |
+ //if (sscanf(linebuffer, "%*f\t%lf\t%lf", &last_sweep, &last_data) != 2) |
63 |
+ last_data = parse_reading(linebuffer, gp_column); |
64 |
+- if (isnan(last_data)) |
65 |
++ if (std::isnan(last_data)) |
66 |
+ { |
67 |
+ //info("line\n%s\ncgp_column %d\nval %e\n", linebuffer, gp_column, last_data); |
68 |
+ badfilec("invalid data in delft file at line %d\nline: %s\n", nread, linebuffer); |
69 |
+@@ -1116,7 +1116,7 @@ void ImageData::gamma(double gamma, double epsilon) |
70 |
+ v2 = pow(v1, gamma); |
71 |
+ //if (!isfinite(v2)) |
72 |
+ //info("v1 %e v2 %e eps %e\n", v1, v2, epsilon); |
73 |
+- if (isnan(v2)) |
74 |
++ if (std::isnan(v2)) |
75 |
+ raw_data[i] = 0; |
76 |
+ else |
77 |
+ raw_data[i] = v2; |
78 |
+@@ -2385,7 +2385,7 @@ int MTX_Data::load_file(const char *name) |
79 |
+ float tmp; |
80 |
+ if (fread(&tmp, bytes, 1, fp) != 1) |
81 |
+ badfilec( "Short read on mtx file: %s", filename.c_str()); |
82 |
+- if (isnan(tmp)) warn( "nan at %d %d %d", i, j, k); |
83 |
++ if (std::isnan(tmp)) warn( "nan at %d %d %d", i, j, k); |
84 |
+ getData(i,j,k) = tmp; |
85 |
+ } |
86 |
+ else if (bytes == 8) |
87 |
+@@ -3419,7 +3419,7 @@ int MTX_Data::load_dat_meta(const char *name, int col) |
88 |
+ else // otherwise try to get new data |
89 |
+ { |
90 |
+ val = nextreading(fp, col, lnum); |
91 |
+- if (isnan(val)) // failed to read a point |
92 |
++ if (std::isnan(val)) // failed to read a point |
93 |
+ { |
94 |
+ if (npoints == 0) |
95 |
+ { |
96 |
+diff --git a/spyview/ImageWindow.C b/spyview/ImageWindow.C |
97 |
+index 134b198..e1a8ecb 100644 |
98 |
+--- a/spyview/ImageWindow.C |
99 |
++++ b/spyview/ImageWindow.C |
100 |
+@@ -696,7 +696,7 @@ int ImageWindow::handle(int event) |
101 |
+ */ |
102 |
+ |
103 |
+ case FL_PUSH: |
104 |
+- if(isnan(lastFocus) && stupid_windows_focus) |
105 |
++ if(std::isnan(lastFocus) && stupid_windows_focus) |
106 |
+ { |
107 |
+ fprintf(stderr,"Ate unfocused click. This apparently never happens.\n"); |
108 |
+ hungryFocus = true; |
109 |
+diff --git a/spyview/bisector.H b/spyview/bisector.H |
110 |
+index 039c5ff..4326da7 100644 |
111 |
+--- a/spyview/bisector.H |
112 |
++++ b/spyview/bisector.H |
113 |
+@@ -105,18 +105,18 @@ public: |
114 |
+ } |
115 |
+ else |
116 |
+ { |
117 |
+- if(fxp < 0 && (isnan(x1) || (fxp > fx1))) |
118 |
++ if(fxp < 0 && (std::isnan(x1) || (fxp > fx1))) |
119 |
+ { |
120 |
+ x1 = xp; |
121 |
+ fx1 = fxp; |
122 |
+ } |
123 |
+- else if(fxp > 0 && (isnan(x2) || (fxp < fx2))) |
124 |
++ else if(fxp > 0 && (std::isnan(x2) || (fxp < fx2))) |
125 |
+ { |
126 |
+ x2 = xp; |
127 |
+ fx2 = fxp; |
128 |
+ } |
129 |
+ } |
130 |
+- bisection = !(isnan(x1) || isnan(x2)); |
131 |
++ bisection = !(std::isnan(x1) || std::isnan(x2)); |
132 |
+ if(bisection) |
133 |
+ { |
134 |
+ // printf("Bisection step: [%g,%g] {%g,%g}\n", x1,x2,fx1,fx2); |
135 |
|
136 |
diff --git a/sci-visualization/spyview/spyview-20150124-r1.ebuild b/sci-visualization/spyview/spyview-20150124-r1.ebuild |
137 |
index 918ef565f6c..1454c18c924 100644 |
138 |
--- a/sci-visualization/spyview/spyview-20150124-r1.ebuild |
139 |
+++ b/sci-visualization/spyview/spyview-20150124-r1.ebuild |
140 |
@@ -31,6 +31,7 @@ RDEPEND="${COMMON_DEPEND} |
141 |
PATCHES=( |
142 |
"${FILESDIR}/${P}"-gnuplot_interface_fix.patch |
143 |
"${FILESDIR}/${P}"-gcc6cxx14.patch |
144 |
+ "${FILESDIR}/${P}"-gcc6cxx14-2.patch |
145 |
) |
146 |
|
147 |
src_unpack() { |