From dd581e9ab360a3fcb589d07780a299fc76aaadac Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 3 Apr 2016 21:36:28 +0200 Subject: 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 --- gnu/packages/linux.scm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0eb379eb77..30ab138a5e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -464,12 +464,11 @@ (define-public util-linux (("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 @@ (define-public util-linux (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))) -- cgit v1.2.3