FreeBSD Bugzilla – Attachment 260525 Details for
Bug 286917
biology/lamarc: unbreak on FreeBSD 14+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Git patch to unbreak biology/lamarc on FreeBSD 14+
0001-biology-lamarc-unbreak-on-FreeBSD-14.patch (text/plain), 6.95 KB, created by
Hayzam Sherif
on 2025-05-19 00:22:06 UTC
(
hide
)
Description:
Git patch to unbreak biology/lamarc on FreeBSD 14+
Filename:
MIME Type:
Creator:
Hayzam Sherif
Created:
2025-05-19 00:22:06 UTC
Size:
6.95 KB
patch
obsolete
>From 524c7a8cf9f8802e8b81a65d728827d8de158966 Mon Sep 17 00:00:00 2001 >From: hayzamjs <hayzam@alchemilla.io> >Date: Mon, 19 May 2025 04:17:48 +0400 >Subject: [PATCH] biology/lamarc: unbreak on FreeBSD 14+ > >Fix build with Clang 16+ by removing explicit template arguments from >std::make_pair used with lvalues, which caused build errors. > >While here: >- Regenerated patch-src_tools_stringx.h with consistent offsets >--- > biology/lamarc/Makefile | 2 -- > .../files/patch-src_control_chainmanager.cpp | 11 +++++++++++ > biology/lamarc/files/patch-src_tools_mathx.cpp | 11 +++++++++++ > biology/lamarc/files/patch-src_tools_stringx.h | 10 +++++----- > .../lamarc/files/patch-src_tree_arrangervec.cpp | 11 +++++++++++ > .../lamarc/files/patch-src_tree_collector.cpp | 11 +++++++++++ > biology/lamarc/files/patch-src_tree_prior.cpp | 17 +++++++++++++++++ > 7 files changed, 66 insertions(+), 7 deletions(-) > create mode 100644 biology/lamarc/files/patch-src_control_chainmanager.cpp > create mode 100644 biology/lamarc/files/patch-src_tools_mathx.cpp > create mode 100644 biology/lamarc/files/patch-src_tree_arrangervec.cpp > create mode 100644 biology/lamarc/files/patch-src_tree_collector.cpp > create mode 100644 biology/lamarc/files/patch-src_tree_prior.cpp > >diff --git a/biology/lamarc/Makefile b/biology/lamarc/Makefile >index 46f4e10263..33ecc2c9c6 100644 >--- a/biology/lamarc/Makefile >+++ b/biology/lamarc/Makefile >@@ -12,8 +12,6 @@ WWW= https://evolution.genetics.washington.edu/lamarc/ > > LICENSE= APACHE20 > >-BROKEN_FreeBSD_14= fails to compile: no matching function for call to 'make_pair' >- > USE_CXXSTD= c++98 > > GNU_CONFIGURE= yes >diff --git a/biology/lamarc/files/patch-src_control_chainmanager.cpp b/biology/lamarc/files/patch-src_control_chainmanager.cpp >new file mode 100644 >index 0000000000..bf21359154 >--- /dev/null >+++ b/biology/lamarc/files/patch-src_control_chainmanager.cpp >@@ -0,0 +1,11 @@ >+--- src/control/chainmanager.cpp.orig 2025-05-18 23:57:13 UTC >++++ src/control/chainmanager.cpp >+@@ -1631,7 +1631,7 @@ vector<pair<double, long int> > ChainManager::SortChai >+ unsigned long int i; >+ for (i = 0; i < temps.size(); ++i) >+ { >+- orderedtemps.push_back(make_pair<double, long int>(temps[i].GetTemperature(), i)); >++ orderedtemps.push_back(make_pair(temps[i].GetTemperature(), i)); >+ } >+ std::sort(orderedtemps.begin(), orderedtemps.end()); >+ return orderedtemps; >diff --git a/biology/lamarc/files/patch-src_tools_mathx.cpp b/biology/lamarc/files/patch-src_tools_mathx.cpp >new file mode 100644 >index 0000000000..527dfe4af3 >--- /dev/null >+++ b/biology/lamarc/files/patch-src_tools_mathx.cpp >@@ -0,0 +1,11 @@ >+--- src/tools/mathx.cpp.orig 2025-05-19 00:00:29 UTC >++++ src/tools/mathx.cpp >+@@ -778,7 +778,7 @@ std::pair<DoubleVec1d, DoubleVec2d> EigenCalculator::E >+ { >+ eigvals[i] = a[i][i]; >+ } >+- return std::make_pair<DoubleVec1d, DoubleVec2d>(eigvals, eigvecs); >++ return std::make_pair(eigvals, eigvecs); >+ } // Eigen >+ >+ //------------------------------------------------------------------------------------ >diff --git a/biology/lamarc/files/patch-src_tools_stringx.h b/biology/lamarc/files/patch-src_tools_stringx.h >index d1ded1a7d8..04019393fb 100644 >--- a/biology/lamarc/files/patch-src_tools_stringx.h >+++ b/biology/lamarc/files/patch-src_tools_stringx.h >@@ -1,6 +1,6 @@ > --- src/tools/stringx.h.orig 2011-04-23 02:02:49 UTC > +++ src/tools/stringx.h >-@@ -107,6 +107,26 @@ struct CIStringCompare : public std::bin >+@@ -107,6 +107,26 @@ bool ciStringEqual(const std::string& s1, const std::s > > bool ciStringEqual(const std::string& s1, const std::string& s2); > >@@ -27,10 +27,11 @@ > //------------------------------------------------------------------------------------ > > template <class T> >-@@ -188,26 +208,6 @@ bool FromString(const std::string & in, >+@@ -187,26 +207,6 @@ DoubleVec1d StringToDoubleVecOrBarf(const std::string& >+ bool FromString(const std::string & in, method_type& out); > > DoubleVec1d StringToDoubleVecOrBarf(const std::string& in); >- >+- > -// functions for making xmltags and lines of xml > -std::string MakeTag(const std::string& str); > -std::string MakeCloseTag(const std::string& str); >@@ -50,7 +51,6 @@ > -std::string Pretty(long number, int width=DEFWIDTH); > -std::string Pretty(unsigned long number, int width=DEFWIDTH); > -std::string Pretty(std::string str, int width=DEFWIDTH); >-- >+ > bool StringCompare(const std::string&, const char*, long, long); > bool StringCompare(const std::string&, const std::string&, long, long); >- >diff --git a/biology/lamarc/files/patch-src_tree_arrangervec.cpp b/biology/lamarc/files/patch-src_tree_arrangervec.cpp >new file mode 100644 >index 0000000000..ff3636f3a5 >--- /dev/null >+++ b/biology/lamarc/files/patch-src_tree_arrangervec.cpp >@@ -0,0 +1,11 @@ >+--- src/tree/arrangervec.cpp.orig 2025-05-18 23:55:20 UTC >++++ src/tree/arrangervec.cpp >+@@ -116,7 +116,7 @@ void ArrangerVec::CopyAllMembers(const ArrangerVec & c >+ 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)); >+ } >+ } >+ } >diff --git a/biology/lamarc/files/patch-src_tree_collector.cpp b/biology/lamarc/files/patch-src_tree_collector.cpp >new file mode 100644 >index 0000000000..bff56a70b2 >--- /dev/null >+++ b/biology/lamarc/files/patch-src_tree_collector.cpp >@@ -0,0 +1,11 @@ >+--- src/tree/collector.cpp.orig 2025-05-18 23:58:39 UTC >++++ src/tree/collector.cpp >+@@ -204,7 +204,7 @@ void ParamCollector::AddParamSummary(ForceParameters f >+ >+ void ParamCollector::AddParamSummary(ForceParameters fp, long ncopy) >+ { >+- m_paramsum.push_back(make_pair<ForceParameters, long>(fp, ncopy)); >++ m_paramsum.push_back(std::make_pair(fp, ncopy)); >+ } >+ >+ //------------------------------------------------------------------------------------ >diff --git a/biology/lamarc/files/patch-src_tree_prior.cpp b/biology/lamarc/files/patch-src_tree_prior.cpp >new file mode 100644 >index 0000000000..a8dbf7ab04 >--- /dev/null >+++ b/biology/lamarc/files/patch-src_tree_prior.cpp >@@ -0,0 +1,17 @@ >+--- src/tree/prior.cpp.orig 2025-05-18 23:58:05 UTC >++++ src/tree/prior.cpp >+@@ -85,12 +85,12 @@ std::pair<double, double> Prior::RandomDraw() const >+ 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) + >-- >2.48.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 286917
: 260525