diff options
author | David Seifert <soap@gentoo.org> | 2016-05-05 21:06:06 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-05-05 21:06:06 +0200 |
commit | c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956 (patch) | |
tree | 023bc7b06dfae8e165dd40a3708e7dd6924e9ad8 /sci-libs/pastix | |
parent | sci-mathematics/cgal: Move cmake files back to /usr/libdir (diff) | |
download | gentoo-c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956.tar.gz gentoo-c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956.tar.bz2 gentoo-c3c7b1fd5e5c3f2925ad71c73bd5ae12eb2e5956.zip |
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
Diffstat (limited to 'sci-libs/pastix')
-rw-r--r-- | sci-libs/pastix/files/pastix-5.2.2.22-isnan-floating-point-cast.patch | 47 | ||||
-rw-r--r-- | sci-libs/pastix/pastix-5.2.2.22-r1.ebuild | 5 |
2 files changed, 51 insertions, 1 deletions
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 000000000000..8aa7c06e5c93 --- /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 de59c9a71479..0fff267b93bf 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):" \ |