gnu: julia: Use modify-phases syntax and add return values.
* gnu/packages/julia.scm (julia)[arguments]: Use modify-phases syntax for build phases and add missing return values.
This commit is contained in:
parent
83a0db178f
commit
6d149ec349
@ -63,52 +63,56 @@
|
|||||||
#:validate-runpath? #f
|
#:validate-runpath? #f
|
||||||
|
|
||||||
#:phases
|
#:phases
|
||||||
(alist-cons-after
|
(modify-phases %standard-phases
|
||||||
'unpack 'hardcode-soname-map
|
(delete 'configure)
|
||||||
;; ./src/ccall.cpp creates a map from library names to paths using the
|
(add-after
|
||||||
;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix,
|
'unpack 'hardcode-soname-map
|
||||||
;; we patch ccall.cpp to contain a static map.
|
;; ./src/ccall.cpp creates a map from library names to paths using the
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix,
|
||||||
(use-modules (ice-9 match))
|
;; we patch ccall.cpp to contain a static map.
|
||||||
(substitute* "src/ccall.cpp"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(("jl_read_sonames.*;")
|
(use-modules (ice-9 match))
|
||||||
(string-join
|
(substitute* "src/ccall.cpp"
|
||||||
(map (match-lambda
|
(("jl_read_sonames.*;")
|
||||||
((input libname soname)
|
(string-join
|
||||||
(string-append
|
(map (match-lambda
|
||||||
"sonameMap[\"" libname "\"] = "
|
((input libname soname)
|
||||||
"\"" (assoc-ref inputs input) "/lib/" soname "\";")))
|
(string-append
|
||||||
'(("libc" "libc" "libc.so.6")
|
"sonameMap[\"" libname "\"] = "
|
||||||
("pcre" "libpcre" "libpcre.so")
|
"\"" (assoc-ref inputs input) "/lib/" soname "\";")))
|
||||||
("mpfr" "libmpfr" "libmpfr.so")
|
'(("libc" "libc" "libc.so.6")
|
||||||
("openblas" "libblas" "libopenblas.so")
|
("pcre" "libpcre" "libpcre.so")
|
||||||
("arpack-ng" "libarpack" "libarpack.so")
|
("mpfr" "libmpfr" "libmpfr.so")
|
||||||
("lapack" "liblapack" "liblapack.so")
|
("openblas" "libblas" "libopenblas.so")
|
||||||
("gmp" "libgmp" "libgmp.so")
|
("arpack-ng" "libarpack" "libarpack.so")
|
||||||
("openlibm" "libopenlibm" "libopenlibm.so")
|
("lapack" "liblapack" "liblapack.so")
|
||||||
("openspecfun" "libopenspecfun" "libopenspecfun.so")
|
("gmp" "libgmp" "libgmp.so")
|
||||||
("fftw" "libfftw3" "libfftw3.so")
|
("openlibm" "libopenlibm" "libopenlibm.so")
|
||||||
("fftwf" "libfftw3f" "libfftw3f.so")))))))
|
("openspecfun" "libopenspecfun" "libopenspecfun.so")
|
||||||
(alist-cons-before
|
("fftw" "libfftw3" "libfftw3.so")
|
||||||
'build 'replace-default-shell
|
("fftwf" "libfftw3f" "libfftw3f.so"))))))
|
||||||
(lambda _
|
#t))
|
||||||
(substitute* "base/client.jl"
|
(add-before
|
||||||
(("/bin/sh") (which "sh"))))
|
|
||||||
(alist-cons-before
|
|
||||||
'build 'patch-include-path
|
'build 'patch-include-path
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "deps/Makefile"
|
(substitute* "deps/Makefile"
|
||||||
(("/usr/include/double-conversion")
|
(("/usr/include/double-conversion")
|
||||||
(string-append (assoc-ref %build-inputs "double-conversion")
|
(string-append (assoc-ref %build-inputs "double-conversion")
|
||||||
"/include/double-conversion"))))
|
"/include/double-conversion")))
|
||||||
(alist-cons-before
|
#t))
|
||||||
'check 'disable-broken-test
|
(add-before
|
||||||
;; One test fails because it produces slightly different output.
|
'build 'replace-default-shell
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "test/repl.jl"
|
(substitute* "base/client.jl"
|
||||||
(("@test output") "# @test output")))
|
(("/bin/sh") (which "sh")))
|
||||||
;; no configure script
|
#t))
|
||||||
(alist-delete 'configure %standard-phases)))))
|
(add-before
|
||||||
|
'check 'disable-broken-test
|
||||||
|
;; One test fails because it produces slightly different output.
|
||||||
|
(lambda _
|
||||||
|
(substitute* "test/repl.jl"
|
||||||
|
(("@test output") "# @test output"))
|
||||||
|
#t)))
|
||||||
#:make-flags
|
#:make-flags
|
||||||
(list
|
(list
|
||||||
(string-append "prefix=" (assoc-ref %outputs "out"))
|
(string-append "prefix=" (assoc-ref %outputs "out"))
|
||||||
|
Loading…
Reference in New Issue
Block a user