From cd40978a4b38de4ac46b316588ed922deda826d1 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 2 Dec 2021 00:26:26 +0100 Subject: gnu: randomjungle: Fix compatibility errors. * gnu/packages/machine-learning.scm (randomjungle)[arguments]: Add build phase 'fix-compatibility-errors to patch type errors. --- gnu/packages/machine-learning.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 701a121627..3185c15aea 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -391,11 +391,16 @@ algorithm.") (assoc-ref %build-inputs "boost"))) #:phases (modify-phases %standard-phases - (add-before - 'configure 'set-CXXFLAGS - (lambda _ - (setenv "CXXFLAGS" "-fpermissive ") - #t))))) + (add-after 'unpack 'fix-compatibility-errors + (lambda _ + (substitute* "src/library/IAM2WayImportance.h" + (("= std::make_pair.*") + "= std::minmax(varID1, varID2);")) + (substitute* "src/library/DataFrame.h" + (("isFirst\\?.*") + "if (isFirst) { isFirst = false; } else { os << par.delimiter; }\n")))) + (add-before 'configure 'set-CXXFLAGS + (lambda _ (setenv "CXXFLAGS" "-fpermissive ")))))) (inputs `(("boost" ,boost) ("gsl" ,gsl) -- cgit v1.2.3