me
/
guix
Archived
1
0
Fork 0

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>
master
Tobias Geerinckx-Rice 2016-04-03 21:36:28 +02:00 committed by Leo Famulari
parent 28181faf45
commit dd581e9ab3
1 changed files with 15 additions and 3 deletions

View File

@ -464,12 +464,11 @@ providing the system administrator with some help in common tasks.")
(("build_kill=yes") "build_kill=no")) (("build_kill=yes") "build_kill=no"))
#t)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out"
"static")) ; >2 MiB of static .a libraries
(arguments (arguments
`(#:configure-flags (list "--disable-use-tty-group" `(#:configure-flags (list "--disable-use-tty-group"
;; Do not build .a files to save 2 MiB.
"--disable-static"
;; Install completions where our ;; Install completions where our
;; bash-completion package expects them. ;; bash-completion package expects them.
(string-append "--with-bashcompletiondir=" (string-append "--with-bashcompletiondir="
@ -494,6 +493,19 @@ providing the system administrator with some help in common tasks.")
(substitute* "tests/ts/misc/mcookie" (substitute* "tests/ts/misc/mcookie"
(("/etc/services") (("/etc/services")
(string-append net "/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)))))) #t))))))
(inputs `(("zlib" ,zlib) (inputs `(("zlib" ,zlib)
("ncurses" ,ncurses))) ("ncurses" ,ncurses)))