commit: c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu May 5 19:06:06 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu May 5 19:06:06 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c7b1fd
sci-libs/pastix: Add cast to double for C99 isnan macro
Gentoo-Bug: 580422
* Move patches into PATCHES bash array
Package-Manager: portage-2.2.28
...pastix-5.2.2.22-isnan-floating-point-cast.patch | 47 ++++++++++++++++++++++
sci-libs/pastix/pastix-5.2.2.22-r1.ebuild | 5 ++-
2 files changed, 51 insertions(+), 1 deletion(-)
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
new file mode 100644
index 0000000..8aa7c06
--- /dev/null
+++ b/sci-libs/pastix/files/pastix-5.2.2.22-isnan-floating-point-cast.patch
@@ -0,0 +1,47 @@
+Add missing cast to floating-point type:
+* sopalin/src/variable_csc.c: In function ‘vcsc_add_node’:
+* sopalin/src/variable_csc.c:138:13: error: non-floating-point argument in
call to function ‘__builtin_isnan’
+* if (isnan(vcsc->values[COL-1][i*dof2 + ii])) {
+See also:
+https://bugs.gentoo.org/show_bug.cgi?id=580422
+
+--- src/common/src/errors.h
++++ src/common/src/errors.h
+@@ -140,7 +140,7 @@
+ * expr - The value to check.
+ */
+ #define CHECK_NAN(expr) { \
+- ASSERT_DEBUG(!isnan(expr), DBG_SOPALIN_NAN); \
++ ASSERT_DEBUG(!isnan(((double) expr)), DBG_SOPALIN_NAN); \
+ ASSERT_DEBUG(!isinf(expr), DBG_SOPALIN_INF); \
+ }
+ #else
+--- src/sopalin/src/variable_csc.c
++++ src/sopalin/src/variable_csc.c
+@@ -135,7 +135,7 @@
+ #endif
+
+ for (ii = 0; ii < dof2; ii++) {
+- if (isnan(vcsc->values[COL-1][i*dof2 + ii])) {
++ if (isnan(((double) vcsc->values[COL-1][i*dof2 + ii]))) {
+ vcsc->values[COL-1][i*dof2 + ii] = VALUE[ii];
+ } else {
+ vcsc->values[COL-1][i*dof2 + ii] =
op(vcsc->values[COL-1][i*dof2 + ii],
+@@ -252,7 +252,7 @@
+ vcsc->rows[COL_NODE][i]);
+ }
+ #endif
+- if (isnan(vcsc->values[COL_NODE][idx])) {
++ if (isnan(((double) vcsc->values[COL_NODE][idx]))) {
+ vcsc->values[COL_NODE][idx] = VALUE;
+ } else {
+ vcsc->values[COL_NODE][idx] = op(vcsc->values[COL_NODE][idx],
+@@ -660,7 +660,7 @@
+ } else {
+ INTS iterdof;
+ for (iterdof = 0; iterdof < dof2; iterdof++) {
+- if (!isnan(vcsc->values[MYCOL-1][dof2*iter2+iterdof])) {
++ if (!isnan(((double)
vcsc->values[MYCOL-1][dof2*iter2+iterdof]))) {
+ /* ignore NaN values from VCSC */
+ (*values_o)[dof2*iter3+iterdof] = op(
+ (*values_o)[dof2*iter3+iterdof],
diff --git a/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild
b/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild
index de59c9a..0fff267 100644
--- a/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild
+++ b/sci-libs/pastix/pastix-5.2.2.22-r1.ebuild
@@ -41,11 +41,14 @@ RDEPEND="
DEPEND="${RDEPEND}
virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${P}-nosmp-undefined-variable.patch"
+ "${FILESDIR}/${P}-isnan-floating-point-cast.patch"
+)
S="${WORKDIR}/${PN}_${PV}/src"
src_prepare() {
default
- epatch "${FILESDIR}"/${P}-nosmp-undefined-variable.patch
sed -e 's/^\(HOSTARCH\s*=\).*/\1 ${HOST}/' \
-e "s:^\(CCPROG\s*=\).*:\1 $(tc-getCC):" \
-e "s:^\(CFPROG\s*=\).*:\1 $(tc-getFC):" \