summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-09-18 14:26:37 +0200
committerDavid Seifert <soap@gentoo.org>2016-09-18 14:27:02 +0200
commit02cd747eb9c3ec0c8ce5f3969c3d19061fe1bc51 (patch)
tree1e29a6810c48aa31b92a2810a0b16464d7d3bb5e /sci-astronomy/casacore
parentnet-firewall/pglinux: Drop old (diff)
downloadgentoo-02cd747eb9c3ec0c8ce5f3969c3d19061fe1bc51.tar.gz
gentoo-02cd747eb9c3ec0c8ce5f3969c3d19061fe1bc51.tar.bz2
gentoo-02cd747eb9c3ec0c8ce5f3969c3d19061fe1bc51.zip
sci-astronomy/casacore: Allow for compiling with GCC 6
Gentoo-bug: 594186 Patch taken from upstream master branch Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-astronomy/casacore')
-rw-r--r--sci-astronomy/casacore/casacore-2.1.0.ebuild5
-rw-r--r--sci-astronomy/casacore/files/casacore-2.1.0-fix-c++14.patch45
2 files changed, 49 insertions, 1 deletions
diff --git a/sci-astronomy/casacore/casacore-2.1.0.ebuild b/sci-astronomy/casacore/casacore-2.1.0.ebuild
index 68298834ebff..cfdc619ae681 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 000000000000..b14b7035c60c
--- /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.Dijkema@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) {