gnu: ocaml-mcl: Build with latest OCaml.
* gnu/packages/machine-learning.scm (ocaml-mcl)[arguments]: Remove #:ocaml and #:findlib arguments; patch code in build phase. [native-inputs]: Add ocamlbuild.
This commit is contained in:
parent
ddb5dc08a7
commit
b24aaeec45
|
@ -315,18 +315,36 @@ networks) based on simulation of (stochastic) flow in graphs.")
|
||||||
"1l5jbhwjpsj38x8b9698hfpkv75h8hn3kj0gihjhn8ym2cwwv110"))))
|
"1l5jbhwjpsj38x8b9698hfpkv75h8hn3kj0gihjhn8ym2cwwv110"))))
|
||||||
(build-system ocaml-build-system)
|
(build-system ocaml-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:ocaml ,ocaml-4.02
|
`(#:phases
|
||||||
#:findlib ,ocaml4.02-findlib
|
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'patch-paths
|
(add-before 'configure 'patch-paths
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "configure"
|
(substitute* "configure"
|
||||||
(("SHELL = /bin/sh") (string-append "SHELL = "(which "sh"))))
|
(("/bin/sh") (which "sh")))
|
||||||
(substitute* "setup.ml"
|
(substitute* "setup.ml"
|
||||||
(("LDFLAGS=-fPIC")
|
(("LDFLAGS=-fPIC")
|
||||||
(string-append "LDFLAGS=-fPIC\"; \"SHELL=" (which "sh"))))
|
(string-append "LDFLAGS=-fPIC\"; \"SHELL=" (which "sh")))
|
||||||
|
(("-std=c89") "-std=gnu99")
|
||||||
|
|
||||||
|
;; This is a mutable string, which is no longer supported. Use
|
||||||
|
;; a byte buffer instead.
|
||||||
|
(("String.make \\(String.length s\\)")
|
||||||
|
"Bytes.make (String.length s)")
|
||||||
|
|
||||||
|
;; These two belong together.
|
||||||
|
(("OASISString.replace_chars")
|
||||||
|
"Bytes.to_string (OASISString.replace_chars")
|
||||||
|
((" s;")
|
||||||
|
" s);"))
|
||||||
|
(substitute* "myocamlbuild.ml"
|
||||||
|
(("std=c89") "std=gnu99"))
|
||||||
|
;; Since we build with a more recent OCaml, we have to use C99 or
|
||||||
|
;; later. This causes problems with the old C code.
|
||||||
|
(substitute* "src/impala/matrix.c"
|
||||||
|
(("restrict") "restrict_"))
|
||||||
#t)))))
|
#t)))))
|
||||||
|
(native-inputs
|
||||||
|
`(("ocamlbuild" ,ocamlbuild)))
|
||||||
(home-page "https://github.com/fhcrc/mcl")
|
(home-page "https://github.com/fhcrc/mcl")
|
||||||
(synopsis "OCaml wrappers around MCL")
|
(synopsis "OCaml wrappers around MCL")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in New Issue