mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gsl: Provide static library in separate output.
* gnu/packages/maths.scm (gsl)[outputs]: New field. [arguments]: Remove configure-flag disabling static library. Add make-flag to produce PIC output. Add a phase to move the static libraries into the static output. Change-Id: I4c5dddb8d384f4e2f82122b239da44350bacf57a
This commit is contained in:
parent
09d62629a9
commit
53bec65c51
1 changed files with 12 additions and 2 deletions
|
@ -725,10 +725,11 @@ precision floating point numbers.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0jxkxrnpys2j3rh8bzx0bmnh4w6xm28jd57rgxsjp0s863agpc6w"))))
|
"0jxkxrnpys2j3rh8bzx0bmnh4w6xm28jd57rgxsjp0s863agpc6w"))))
|
||||||
|
(outputs '("out" "static"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(let ((system (%current-system)))
|
(let ((system (%current-system)))
|
||||||
`(#:configure-flags (list "--disable-static") ;halves package size
|
`(#:make-flags (list "CFLAGS=-fPIC")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
,@(cond
|
,@(cond
|
||||||
|
@ -774,7 +775,16 @@ precision floating point numbers.")
|
||||||
(("gsl_ieee_env_setup.*" all)
|
(("gsl_ieee_env_setup.*" all)
|
||||||
(string-append "exit (77);\n" all)))))))
|
(string-append "exit (77);\n" all)))))))
|
||||||
|
|
||||||
(else '()))))))
|
(else '()))
|
||||||
|
(add-after 'install 'move-static-library
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let ((static (string-append (assoc-ref outputs "static") "/lib/"))
|
||||||
|
(out (string-append (assoc-ref outputs "out") "/lib/")))
|
||||||
|
(mkdir-p static)
|
||||||
|
(rename-file (string-append out "libgsl.a")
|
||||||
|
(string-append static "libgsl.a"))
|
||||||
|
(rename-file (string-append out "libgslcblas.a")
|
||||||
|
(string-append static "libgslcblas.a")))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(if (and (target-riscv64?)
|
(if (and (target-riscv64?)
|
||||||
(%current-target-system))
|
(%current-target-system))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue