sci-physics/geant: Add std:: qualifier to isnan for C++11
authorDavid Seifert <soap@gentoo.org>
Thu, 5 May 2016 20:38:39 +0000 (22:38 +0200)
committerDavid Seifert <soap@gentoo.org>
Thu, 5 May 2016 21:11:03 +0000 (23:11 +0200)
Gentoo-Bug: 581322

Package-Manager: portage-2.2.28

sci-physics/geant/files/geant-4.10.02-std-isnan.patch [new file with mode: 0644]
sci-physics/geant/geant-4.10.02.ebuild

diff --git a/sci-physics/geant/files/geant-4.10.02-std-isnan.patch b/sci-physics/geant/files/geant-4.10.02-std-isnan.patch
new file mode 100644 (file)
index 0000000..6d26a6c
--- /dev/null
@@ -0,0 +1,17 @@
+Fully qualify isnan:
+* /var/tmp/portage/sci-physics/geant-4.10.02/work/geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc:61:22: error: ‘isnan’ was not declared in this scope
+*      return( isnan( d ) );
+See also:
+https://bugs.gentoo.org/show_bug.cgi?id=581322
+
+--- geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc
++++ geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc
+@@ -58,7 +58,7 @@
+ */
+ int nfu_isNAN( double d ) {
+-    return( isnan( d ) );
++    return( std::isnan( d ) );
+ }
+ /*
+ ************************************************************
index 5dd41eeef36ae6d7c4ddc8310f84fcac1edfde9b..89b1e1220a30046a325485bc5677f93ede568729 100644 (file)
@@ -41,6 +41,7 @@ PDEPEND="
 S="${WORKDIR}/${MYP}"
 
 src_prepare() {
+       epatch -p1 "${FILESDIR}/${P}-std-isnan.patch"
        use examples || epatch "${FILESDIR}"/${PN}-${PV1}.${PV2}.${SPV3}-no-examples.patch
 }