summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-02 00:26:26 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-02 00:32:12 +0100
commitcd40978a4b38de4ac46b316588ed922deda826d1 (patch)
treeafd642ca108a8758f36adad573f2f2592d79819c /gnu
parent205a65839a7dffcf86f5a1ee99bed8801bdabb5c (diff)
gnu: randomjungle: Fix compatibility errors.
* gnu/packages/machine-learning.scm (randomjungle)[arguments]: Add build phase 'fix-compatibility-errors to patch type errors.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm15
1 files 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)