summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-04-03 21:36:28 +0200
committerLeo Famulari <leo@famulari.name>2016-04-11 19:45:58 -0400
commitdf887432be25e1534b9ecdccf39c98857b1d0786 (patch)
tree1bbf921380e89a0494ff4537b6f2e9bf4c89f9b2 /gnu/packages/linux.scm
parent916627b484053a0ed95c78e312c8f36a919a723d (diff)
downloadpatches-df887432be25e1534b9ecdccf39c98857b1d0786.tar
patches-df887432be25e1534b9ecdccf39c98857b1d0786.tar.gz
gnu: util-linux: Add "static" output.
* gnu/packages/linux.scm: (util-linux)[outputs]: New field. [arguments]: Remove "--disable-static" from #:configure-flags. Add 'move-static-libraries' phase. Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm18
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 02cde8eed2..6c669e3160 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -464,12 +464,11 @@ providing the system administrator with some help in common tasks.")
(("build_kill=yes") "build_kill=no"))
#t))))
(build-system gnu-build-system)
+ (outputs '("out"
+ "static")) ; >2 MiB of static .a libraries
(arguments
`(#:configure-flags (list "--disable-use-tty-group"
- ;; Do not build .a files to save 2 MiB.
- "--disable-static"
-
;; Install completions where our
;; bash-completion package expects them.
(string-append "--with-bashcompletiondir="
@@ -494,6 +493,19 @@ providing the system administrator with some help in common tasks.")
(substitute* "tests/ts/misc/mcookie"
(("/etc/services")
(string-append net "/etc/services")))
+ #t)))
+ (add-after
+ 'install 'move-static-libraries
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (with-directory-excursion out
+ (for-each (lambda (file)
+ (rename-file file
+ (string-append static "/"
+ file)))
+ (find-files "lib" "\\.a$")))
#t))))))
(inputs `(("zlib" ,zlib)
("ncurses" ,ncurses)))