1 |
commit: c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 5 19:06:06 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 5 19:06:06 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c7b1fd |
7 |
|
8 |
sci-libs/pastix: Add cast to double for C99 isnan macro |
9 |
|
10 |
Gentoo-Bug: 580422 |
11 |
* Move patches into PATCHES bash array |
12 |
|
13 |
Package-Manager: portage-2.2.28 |
14 |
|
15 |
...pastix-5.2.2.22-isnan-floating-point-cast.patch | 47 ++++++++++++++++++++++ |
16 |
sci-libs/pastix/pastix-5.2.2.22-r1.ebuild | 5 ++- |
17 |
2 files changed, 51 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/sci-libs/pastix/files/pastix-5.2.2.22-isnan-floating-point-cast.patch b/sci-libs/pastix/files/pastix-5.2.2.22-isnan-floating-point-cast.patch |
20 |
new file mode 100644 |
21 |
index 0000000..8aa7c06 |
22 |
--- /dev/null |
23 |
+++ b/sci-libs/pastix/files/pastix-5.2.2.22-isnan-floating-point-cast.patch |
24 |
@@ -0,0 +1,47 @@ |
25 |
+Add missing cast to floating-point type: |
26 |
+* sopalin/src/variable_csc.c: In function ‘vcsc_add_node’: |
27 |
+* sopalin/src/variable_csc.c:138:13: error: non-floating-point argument in call to function ‘__builtin_isnan’ |
28 |
+* if (isnan(vcsc->values[COL-1][i*dof2 + ii])) { |
29 |
+See also: |
30 |
+https://bugs.gentoo.org/show_bug.cgi?id=580422 |
31 |
+ |
32 |
+--- src/common/src/errors.h |
33 |
++++ src/common/src/errors.h |
34 |
+@@ -140,7 +140,7 @@ |
35 |
+ * expr - The value to check. |
36 |
+ */ |
37 |
+ #define CHECK_NAN(expr) { \ |
38 |
+- ASSERT_DEBUG(!isnan(expr), DBG_SOPALIN_NAN); \ |
39 |
++ ASSERT_DEBUG(!isnan(((double) expr)), DBG_SOPALIN_NAN); \ |
40 |
+ ASSERT_DEBUG(!isinf(expr), DBG_SOPALIN_INF); \ |
41 |
+ } |
42 |
+ #else |
43 |
+--- src/sopalin/src/variable_csc.c |
44 |
++++ src/sopalin/src/variable_csc.c |
45 |
+@@ -135,7 +135,7 @@ |
46 |
+ #endif |
47 |
+ |
48 |
+ for (ii = 0; ii < dof2; ii++) { |
49 |
+- if (isnan(vcsc->values[COL-1][i*dof2 + ii])) { |
50 |
++ if (isnan(((double) vcsc->values[COL-1][i*dof2 + ii]))) { |
51 |
+ vcsc->values[COL-1][i*dof2 + ii] = VALUE[ii]; |
52 |
+ } else { |
53 |
+ vcsc->values[COL-1][i*dof2 + ii] = op(vcsc->values[COL-1][i*dof2 + ii], |
54 |
+@@ -252,7 +252,7 @@ |
55 |
+ vcsc->rows[COL_NODE][i]); |
56 |
+ } |
57 |
+ #endif |
58 |
+- if (isnan(vcsc->values[COL_NODE][idx])) { |
59 |
++ if (isnan(((double) vcsc->values[COL_NODE][idx]))) { |
60 |
+ vcsc->values[COL_NODE][idx] = VALUE; |
61 |
+ } else { |
62 |
+ vcsc->values[COL_NODE][idx] = op(vcsc->values[COL_NODE][idx], |
63 |
+@@ -660,7 +660,7 @@ |
64 |
+ } else { |
65 |
+ INTS iterdof; |
66 |
+ for (iterdof = 0; iterdof < dof2; iterdof++) { |
67 |
+- if (!isnan(vcsc->values[MYCOL-1][dof2*iter2+iterdof])) { |
68 |
++ if (!isnan(((double) vcsc->values[MYCOL-1][dof2*iter2+iterdof]))) { |
69 |
+ /* ignore NaN values from VCSC */ |
70 |
+ (*values_o)[dof2*iter3+iterdof] = op( |
71 |
+ (*values_o)[dof2*iter3+iterdof], |
72 |
|
73 |
diff --git a/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild b/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild |
74 |
index de59c9a..0fff267 100644 |
75 |
--- a/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild |
76 |
+++ b/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild |
77 |
@@ -41,11 +41,14 @@ RDEPEND=" |
78 |
DEPEND="${RDEPEND} |
79 |
virtual/pkgconfig" |
80 |
|
81 |
+PATCHES=( |
82 |
+ "${FILESDIR}/${P}-nosmp-undefined-variable.patch" |
83 |
+ "${FILESDIR}/${P}-isnan-floating-point-cast.patch" |
84 |
+) |
85 |
S="${WORKDIR}/${PN}_${PV}/src" |
86 |
|
87 |
src_prepare() { |
88 |
default |
89 |
- epatch "${FILESDIR}"/${P}-nosmp-undefined-variable.patch |
90 |
sed -e 's/^\(HOSTARCH\s*=\).*/\1 ${HOST}/' \ |
91 |
-e "s:^\(CCPROG\s*=\).*:\1 $(tc-getCC):" \ |
92 |
-e "s:^\(CFPROG\s*=\).*:\1 $(tc-getFC):" \ |