aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-12-17 17:14:37 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:48 +0200
commit53bec65c51c3f2b7e318db4dc7a5c3a09ad00214 (patch)
treeea4a762b8b333d4ac471690b3aea25ff70ed70fe
parent09d62629a91b7623ed9c86f4d52db32682ec88a0 (diff)
downloadguix-53bec65c51c3f2b7e318db4dc7a5c3a09ad00214.tar.gz
guix-53bec65c51c3f2b7e318db4dc7a5c3a09ad00214.zip
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.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d7ce839a68..99692fd2b7 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -725,10 +725,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
@@ -774,7 +775,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))