[HepMC/el5: 5/5] Do not trigger hexfloat output with gcc 5

Mattias Ellert ellert at fedoraproject.org
Fri Mar 6 16:54:51 UTC 2015


commit e212ffc3871e19ec96805009e0eb7e0bef513a28
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Fri Mar 6 17:54:16 2015 +0100

    Do not trigger hexfloat output with gcc 5

 HepMC-no-hexfloat.patch | 20 ++++++++++++++++++++
 HepMC.spec              |  7 ++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/HepMC-no-hexfloat.patch b/HepMC-no-hexfloat.patch
new file mode 100644
index 0000000..3d09418
--- /dev/null
+++ b/HepMC-no-hexfloat.patch
@@ -0,0 +1,20 @@
+diff -ur HepMC-2.06.09.orig/src/IO_AsciiParticles.cc HepMC-2.06.09/src/IO_AsciiParticles.cc
+--- HepMC-2.06.09.orig/src/IO_AsciiParticles.cc	2010-05-17 17:23:44.000000000 +0200
++++ HepMC-2.06.09/src/IO_AsciiParticles.cc	2015-03-06 17:38:41.860507302 +0100
+@@ -156,14 +156,14 @@
+ 
+       xmassi = (*part)->generatedMass();
+       if(fabs(xmassi) < 0.0001) xmassi =0.;
+-      m_outstream->setf(std::ios::fixed);
++      m_outstream->unsetf(std::ios::floatfield);
+       m_outstream->precision(3);
+       m_outstream->width(8);
+       *m_outstream << xmassi << " ";
+       m_outstream->setf(std::ios::scientific,std::ios::floatfield);
+       m_outstream->precision(m_precision);
+ 
+-      m_outstream->setf(std::ios::fixed);
++      m_outstream->unsetf(std::ios::floatfield);
+       m_outstream->precision(3);
+       m_outstream->width(6);
+       etai = (*part)->momentum().eta();
diff --git a/HepMC.spec b/HepMC.spec
index e0aeb8d..484c154 100644
--- a/HepMC.spec
+++ b/HepMC.spec
@@ -2,7 +2,7 @@
 
 Name:		HepMC
 Version:	2.06.09
-Release:	7%{?dist}
+Release:	8%{?dist}
 Summary:	C++ Event Record for Monte Carlo Generators
 Group:		System Environment/Libraries
 
@@ -13,6 +13,7 @@ Patch0:		%{name}-fix-typo-hierachy-hierarchy.patch
 Patch1:		%{name}-examples-makefile.patch
 Patch2:		%{name}-examples-hwaend.patch
 Patch3:		%{name}-linking.patch
+Patch4:		%{name}-no-hexfloat.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -54,6 +55,7 @@ This package provides HepMC manuals and examples.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %configure --with-momentum=GEV --with-length=MM --disable-static
@@ -111,6 +113,9 @@ rm -rf %{buildroot}
 %doc %{_pkgdocdir}/COPYING
 
 %changelog
+* Fri Mar 06 2015 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.06.09-8
+- Do not trigger hexfloat output with gcc 5
+
 * Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.06.09-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list