diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-12-17 17:14:37 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-12-17 17:15:42 +0200 |
commit | 4276c595606d8bb2b24de8d91dd465dd1da131a5 (patch) | |
tree | f218aed9403e7853e81aa8d0be6bec947f9c85f7 | |
parent | 55dedd4d69d6abc6cb3d8dabf3a0e6357d67944b (diff) |
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
-rw-r--r-- | gnu/packages/maths.scm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2dd8f187c9..ad514a4641 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -685,10 +685,11 @@ precision floating point numbers.") (sha256 (base32 "0jxkxrnpys2j3rh8bzx0bmnh4w6xm28jd57rgxsjp0s863agpc6w")))) + (outputs '("out" "static")) (build-system gnu-build-system) (arguments (let ((system (%current-system))) - `(#:configure-flags (list "--disable-static") ;halves package size + `(#:make-flags (list "CFLAGS=-fPIC") #:phases (modify-phases %standard-phases ,@(cond @@ -734,7 +735,16 @@ precision floating point numbers.") (("gsl_ieee_env_setup.*" 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 (if (and (target-riscv64?) (%current-target-system)) |