summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-07-30 17:09:07 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-07-30 17:09:07 +0200
commitb90289dadc8ee15848ce911a2bdcd3ae8302d58c (patch)
treeb1c72a2cf76ef26e3467151aea2be73dcbf9b2c1 /gnu
parent7b844100464633db5455a3931858bb57c9e529e6 (diff)
gnu: zlib: Move static library to separate output.
* gnu/packages/compression.scm (zlib)[outputs]: New field. [arguments]: Add phase 'move-static-library'.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/compression.scm11
1 files changed, 10 insertions, 1 deletions
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