[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] gnu: util-linux: Add "static" output.
From: |
Leo Famulari |
Subject: |
Re: [PATCH 2/3] gnu: util-linux: Add "static" output. |
Date: |
Sat, 2 Apr 2016 20:47:00 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sat, Apr 02, 2016 at 03:29:33PM +0200, Tobias Geerinckx-Rice wrote:
> * gnu/packages/linux.scm: (util-linux)[outputs]: New field.
> [arguments]: Remove "--disable-static" configure flag.
> Add 'move-static-libraries phase.
Cool, it's always interesting to see how someone else implements the
same change as you :)
> ---
> gnu/packages/linux.scm | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 917a4d2..0260b0e 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" ; everything
"out" is not everything, since it doesn't include the static libraries.
How about just leaving "out" unlabeled? Or putting it 2nd in the list,
and labelling it "everything else"?
> + "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,17 @@ 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 (f)
> + (rename-file f (string-append static
> "/" f)))
> + (find-files "lib" "\\.a$")))
How about using something like "file" instead of "f", just to help the
Scheme neophytes get their bearings while reading the code? ;)
> #t))))))
> (inputs `(("zlib" ,zlib)
> ("ncurses" ,ncurses)))
> --
> 2.7.0
>
>
Re: Update btrfs-progs once again and add static output, Leo Famulari, 2016/04/02
Re: Update btrfs-progs once again and add static output, Leo Famulari, 2016/04/11