[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: randomjungle: Fix compatibility errors.
From: |
guix-commits |
Subject: |
01/02: gnu: randomjungle: Fix compatibility errors. |
Date: |
Wed, 1 Dec 2021 18:34:55 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit cd40978a4b38de4ac46b316588ed922deda826d1
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Dec 2 00:26:26 2021 +0100
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 701a121..3185c15 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)