gnu: randomjungle: Fix compatibility errors.

* gnu/packages/machine-learning.scm (randomjungle)[arguments]: Add build phase
'fix-compatibility-errors to patch type errors.
This commit is contained in:
Ricardo Wurmus 2021-12-02 00:26:26 +01:00
parent 205a65839a
commit cd40978a4b
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -391,11 +391,16 @@ (define-public randomjungle
(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)