[med-svn] [lamarc] 01/01: Update patched to make it compile with gcc-7

Gert Wollny gewo at moszumanska.debian.org
Tue Dec 5 08:05:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

gewo pushed a commit to branch master
in repository lamarc.

commit d266c46da17076f8dfbdd5bbf2ff27807e4f5649
Author: Gert Wollny <gewo at debian.org>
Date:   Tue Dec 5 09:05:10 2017 +0100

    Update patched to make it compile with gcc-7
---
 debian/patches/gcc-7.patch  | 114 +++++++++++++++++++++++++++++++++++++++++++-
 debian/patches/limits.patch |  11 +++++
 2 files changed, 124 insertions(+), 1 deletion(-)

diff --git a/debian/patches/gcc-7.patch b/debian/patches/gcc-7.patch
index 6623324..9ae6f91 100644
--- a/debian/patches/gcc-7.patch
+++ b/debian/patches/gcc-7.patch
@@ -4,7 +4,7 @@ Description: make_pair doesn't require the explicite type specification
 
 --- a/src/tools/mathx.cpp
 +++ b/src/tools/mathx.cpp
-@@ -778,7 +778,7 @@ pair<DoubleVec1d, DoubleVec2d> EigenCalc
+@@ -778,7 +778,7 @@
      {
          eigvals[i] = a[i][i];
      }
@@ -13,3 +13,115 @@ Description: make_pair doesn't require the explicite type specification
  } // Eigen
  
  //------------------------------------------------------------------------------------
+--- a/src/tree/argtree.cpp
++++ b/src/tree/argtree.cpp
+@@ -371,7 +371,7 @@
+         if (forcefound)
+         {
+             // add to target map array
+-            Branch_ptr nullptr;
++            Branch_ptr null_ptr;
+             if (recfound)
+             {
+                 // recombination case - returns a pair of branches
+@@ -388,7 +388,7 @@
+                 else
+                 {
+                     // everything else
+-                    targetpair p = make_pair(recbranches.first, nullptr);
++                    targetpair p = make_pair(recbranches.first, null_ptr);
+                     targetmap.insert(make_pair(argedges[edge].GetSource(), p));
+                 }
+ 
+@@ -404,7 +404,7 @@
+                 else
+                 {
+                     // everything else
+-                    targetpair q = make_pair(recbranches.second, nullptr);
++                    targetpair q = make_pair(recbranches.second, null_ptr);
+                     targetmap.insert(make_pair(argedges[edge+1].GetSource(), q));
+                 }
+             }
+@@ -421,7 +421,7 @@
+                 else
+                 {
+                     // everything else
+-                    targetpair p = make_pair(newbranch, nullptr);
++                    targetpair p = make_pair(newbranch, null_ptr);
+                     targetmap.insert(make_pair(argedges[edge].GetSource(), p));
+                 }
+             }
+--- a/src/tree/arrangervec.cpp
++++ b/src/tree/arrangervec.cpp
+@@ -122,7 +122,7 @@
+         for(it = cp.arrangers.begin(); it != cp.arrangers.end(); it++)
+         {
+             Arranger* arr = it->second->Clone();
+-            arrangers.insert(std::make_pair<string, Arranger*>(arr->GetName(), arr));
++            arrangers.insert(std::make_pair(arr->GetName(), arr));
+         }
+     }
+ }
+--- a/src/tree/collector.cpp
++++ b/src/tree/collector.cpp
+@@ -205,7 +205,7 @@
+ 
+ void ParamCollector::AddParamSummary(ForceParameters fp, long ncopy)
+ {
+-    m_paramsum.push_back(make_pair<ForceParameters, long>(fp, ncopy));
++    m_paramsum.push_back(make_pair(fp, ncopy));
+ }
+ 
+ //------------------------------------------------------------------------------------
+--- a/src/tree/prior.cpp
++++ b/src/tree/prior.cpp
+@@ -85,12 +85,12 @@
+         case LINEAR:
+             newparam = rnd.Float() * (m_upperbound - m_lowerbound) + m_lowerbound;
+             newlnparam = log(newparam);
+-            return std::make_pair<double, double>(newparam, newlnparam);
++            return std::make_pair(newparam, newlnparam);
+             break;
+         case LOGARITHMIC:
+             newlnparam = rnd.Float() * (m_lnupper - m_lnlower) + m_lnlower;
+             newparam = exp(newlnparam);
+-            return std::make_pair<double, double>(newparam, newlnparam);
++            return std::make_pair(newparam, newlnparam);
+             break;
+     }
+     string e = "Unknown prior type " + ToString(m_priortype) +
+@@ -117,7 +117,7 @@
+             {
+                 newparam = 2.0 * m_upperbound - newparam;
+             }
+-            return std::make_pair<double,double>(newparam, log(newparam));
++            return std::make_pair(newparam, log(newparam));
+             break;
+          case LOGARITHMIC:
+             string e = "Cannot use prior type " + ToString(m_priortype) +
+@@ -135,7 +135,7 @@
+ std::pair<double, double> Prior::RandomDrawWithinBounds(double lower, double upper) const
+ {
+   Random& rnd = registry.GetRandom();
+-  double newparam, newlnparam;
++  double newparam = 0, newlnparam = 0;
+   double lowbound = std::max(m_lowerbound, lower);
+   double upbound = std::min(m_upperbound, upper);
+   switch (m_priortype)
+@@ -143,15 +143,14 @@
+          case LINEAR:
+             newparam = rnd.Float() * (upbound - lowbound) + lowbound;
+             newlnparam = log(newparam);
+-            return std::make_pair<double, double>(newparam, newlnparam);
+             break;
+          case LOGARITHMIC:
+             lowbound = log(lowbound);
+             upbound = log(upbound);
+             newlnparam = rnd.Float() * (upbound - lowbound) + lowbound;
+             newparam = exp(newlnparam);
+-            return std::make_pair<double, double>(newparam, newlnparam);
+             break;
+   }
++  return std::make_pair(newparam, newlnparam);
+ 
+ } // RandomDrawWithinBounds
diff --git a/debian/patches/limits.patch b/debian/patches/limits.patch
index b79a557..ca9ae2a 100644
--- a/debian/patches/limits.patch
+++ b/debian/patches/limits.patch
@@ -12,3 +12,14 @@ Description: Add missing climits
  
  // NOTE: older versions required including <direct.h> here and
  // using _getcwd() below for MSWINDOWS compiles
+--- a/src/xml/tixml_base.cpp
++++ b/src/xml/tixml_base.cpp
+@@ -13,6 +13,8 @@
+ #include "tinyxml.h"
+ #include "tixml_base.h"
+ 
++#include <climits>
++
+ const std::string tibasestr::EXTRA_TAG_0     =   "incorrect xml: extra tag \"";
+ const std::string tibasestr::EXTRA_TAG_1     =   "\".";
+ const std::string tibasestr::MISSING_TAG_0   =   "incorrect xml: missing tag \"";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/lamarc.git



More information about the debian-med-commit mailing list