From b90289dadc8ee15848ce911a2bdcd3ae8302d58c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 30 Jul 2018 17:09:07 +0200 Subject: gnu: zlib: Move static library to separate output. * gnu/packages/compression.scm (zlib)[outputs]: New field. [arguments]: Add phase 'move-static-library'. --- gnu/packages/compression.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index fdfa5ce39b..c206fd8664 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -85,6 +85,7 @@ (base32 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3")))) (build-system gnu-build-system) + (outputs '("out" "static")) (arguments `(#:phases (modify-phases %standard-phases @@ -99,7 +100,15 @@ `((setenv "CHOST" ,(%current-target-system))) '()) (invoke "./configure" - (string-append "--prefix=" out)))))))) + (string-append "--prefix=" out))))) + (add-after 'install 'move-static-library + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (with-directory-excursion (string-append out "/lib") + (install-file "libz.a" (string-append static "/lib")) + (delete-file "libz.a") + #t))))))) (home-page "https://zlib.net/") (synopsis "Compression library") (description -- cgit 1.4.1