[packages/mpqc] - fix sprintf abuse - fix c++11 compile error - rel 6

baggins baggins at pld-linux.org
Thu May 25 23:43:52 CEST 2017


commit 6e370dc7e90d11e132ae24057b99323f53cf6f95
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu May 25 23:43:20 2017 +0200

    - fix sprintf abuse
    - fix c++11 compile error
    - rel 6

 cxx11.patch           | 11 +++++++++++
 format-security.patch | 11 +++++++++++
 mpqc.spec             |  8 +++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/mpqc.spec b/mpqc.spec
index c9e9e45..0d1a043 100644
--- a/mpqc.spec
+++ b/mpqc.spec
@@ -5,13 +5,15 @@ Summary:	The Massively Parallel Quantum Chemistry Program
 Summary(pl.UTF-8):	Program do równoległych obliczeń z zakresu chemii kwantowej
 Name:		mpqc
 Version:	2.3.1
-Release:	5
+Release:	6
 License:	LGPL/GPL (see LICENSE)
 Group:		Libraries
 Source0:	http://dl.sourceforge.net/mpqc/%{name}-%{version}.tar.bz2
 # Source0-md5:	2f9b4f7487387730d78066a53764f848
 Patch0:		%{name}-paths.patch
 Patch1:		%{name}-libfl.patch
+Patch2:		format-security.patch
+Patch3:		cxx11.patch
 URL:		http://www.mpqc.org/
 # -lsB_BLAS ?
 # cca-chem-config (http://www.cca-forum.org/~cca-chem/)
@@ -26,6 +28,8 @@ BuildRequires:	libstdc++-devel
 BuildRequires:	perl-base
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		no_install_post_check_so	1
+
 %description
 MPQC is the Massively Parallel Quantum Chemistry Program. It computes
 properties of atoms and molecules from first principles using the time
@@ -85,6 +89,8 @@ Statyczna biblioteka MPQC.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %{__autoconf}
diff --git a/cxx11.patch b/cxx11.patch
new file mode 100644
index 0000000..d8a914c
--- /dev/null
+++ b/cxx11.patch
@@ -0,0 +1,11 @@
+--- mpqc-2.3.1/src/lib/chemistry/qc/mbptr12/transform_tbint.h~	2005-07-12 00:52:34.000000000 +0200
++++ mpqc-2.3.1/src/lib/chemistry/qc/mbptr12/transform_tbint.h	2017-05-25 23:38:32.061627039 +0200
+@@ -61,7 +61,7 @@
+ protected:
+   /** By default, integrals smaller than zero_integral are considered zero.
+       This constant is only used in checking integrals, not computing them. */
+-  static const double zero_integral = 1.0e-12;
++  static constexpr const double zero_integral = 1.0e-12;
+   /// Predefined enumerated type for the MO spaces
+   typedef struct {
+     enum {Space1, Space2, Space3, Space4};
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..72366a4
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,11 @@
+--- mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.cc~	2005-02-04 01:51:31.000000000 +0100
++++ mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.cc	2017-05-25 23:30:03.745595718 +0200
+@@ -493,7 +493,7 @@
+   if (iname != symbol_to_Z_.end()) return iname->second;
+ 
+   if (allow_exceptions) {
+-      ExEnv::err0() << sprintf("AtomInfo: invalid name: %s\n",name.c_str());
++      ExEnv::err0() << "AtomInfo: invalid name: " << name << std::endl;
+       throw std::runtime_error("invalid atom name");
+     }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mpqc.git/commitdiff/6e370dc7e90d11e132ae24057b99323f53cf6f95



More information about the pld-cvs-commit mailing list