commit:     02cd747eb9c3ec0c8ce5f3969c3d19061fe1bc51
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 12:26:37 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 12:27:02 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02cd747e

sci-astronomy/casacore: Allow for compiling with GCC 6

Gentoo-bug: 594186

Patch taken from upstream master branch

Package-Manager: portage-2.3.0

 sci-astronomy/casacore/casacore-2.1.0.ebuild       |  5 ++-
 .../casacore/files/casacore-2.1.0-fix-c++14.patch  | 45 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/sci-astronomy/casacore/casacore-2.1.0.ebuild 
b/sci-astronomy/casacore/casacore-2.1.0.ebuild
index 6829883..cfdc619 100644
--- a/sci-astronomy/casacore/casacore-2.1.0.ebuild
+++ b/sci-astronomy/casacore/casacore-2.1.0.ebuild
@@ -34,7 +34,10 @@ DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )
        test? ( sci-astronomy/casa-data sci-astronomy/sofa_c )"
 
-PATCHES=( "${FILESDIR}/${PN}-disable-tpath-test.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-disable-tpath-test.patch"
+       "${FILESDIR}/${PN}-2.1.0-fix-c++14.patch"
+)
 
 pkg_pretend() {
        if [[ $(tc-getCC)$ == *gcc* ]] && [[ ${MERGE_TYPE} != binary ]]; then

diff --git a/sci-astronomy/casacore/files/casacore-2.1.0-fix-c++14.patch 
b/sci-astronomy/casacore/files/casacore-2.1.0-fix-c++14.patch
new file mode 100644
index 00000000..b14b703
--- /dev/null
+++ b/sci-astronomy/casacore/files/casacore-2.1.0-fix-c++14.patch
@@ -0,0 +1,45 @@
+From 3a45f84ccb6f08270fd6fd299eaf1b5401199d77 Mon Sep 17 00:00:00 2001
+From: Tammo Jan Dijkema <t.j.dijk...@gmail.com>
+Date: Fri, 18 Mar 2016 10:43:13 +0100
+Subject: [PATCH] Add std to isinf and isnan, fixes #337
+
+---
+ casa/BasicMath/Math.cc          | 4 ++--
+ casa/BasicMath/test/tMathNaN.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/casa/BasicMath/Math.cc b/casa/BasicMath/Math.cc
+index d1bd984..00659e3 100644
+--- a/casa/BasicMath/Math.cc
++++ b/casa/BasicMath/Math.cc
+@@ -178,7 +178,7 @@ Bool isInf(Float val) {
+   // infinite. I can only have access to Solaris, Linux and SGI machines to
+   // determine this.
+ #if defined(AIPS_LINUX)
+-  return (isinf(Double(val)));
++  return (std::isinf(Double(val)));
+ #elif defined(AIPS_DARWIN)
+   return (std::isinf(Double(val)));
+ #elif defined(AIPS_SOLARIS) || defined(AIPS_IRIX)
+@@ -212,7 +212,7 @@ Bool isInf(Double val) {
+   // infinite. I can only have access to Solaris, Linux and SGI machines to
+   // determine this.
+ #if defined(AIPS_LINUX)
+-  return (isinf(Double(val)));
++  return (std::isinf(Double(val)));
+ #elif defined(AIPS_DARWIN)
+   return (std::isinf(Double(val)));
+ #elif defined(AIPS_SOLARIS) || defined(AIPS_IRIX)
+diff --git a/casa/BasicMath/test/tMathNaN.cc b/casa/BasicMath/test/tMathNaN.cc
+index f1a73bc..0c330d1 100644
+--- a/casa/BasicMath/test/tMathNaN.cc
++++ b/casa/BasicMath/test/tMathNaN.cc
+@@ -43,7 +43,7 @@
+                           ((*(Int *)(x) & 0x007fffff) != 0x00000000))
+ 
+ inline Bool isNaN_isnan(Float val) {
+-  return (isnan(Double(val)));
++  return (std::isnan(Double(val)));
+ }
+ 
+ inline Bool isNaN_isnanf(const Float& val) {

Reply via email to