guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] gnu: libextractor: Move .a files to output "static".


From: Maxim Cournoyer
Subject: Re: [PATCH 5/5] gnu: libextractor: Move .a files to output "static".
Date: Thu, 02 Feb 2017 09:13:10 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi ng0,

address@hidden writes:

> From: ng0 <address@hidden>
>
> * gnu/packages/gnunet.scm (libextractor): Move .a files to "static" output.
> [arguments](phases): New phase for moving .a files to output "static".
> ---
>  gnu/packages/gnunet.scm | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
> index f7da12ad5..a4514a7f4 100644
> --- a/gnu/packages/gnunet.scm
> +++ b/gnu/packages/gnunet.scm
> @@ -115,13 +115,30 @@
>        ("zlib" ,zlib)))
>     (native-inputs
>      `(("pkg-config" ,pkg-config)))
> +   (outputs '("out"
> +              "static")) ; 396 KiB .a files
>     (arguments
>      `(#:configure-flags
>        (list (string-append "--with-ltdl="
>                             (assoc-ref %build-inputs "libltdl"))
>              (string-append "--with-tidy="
>                             (assoc-ref %build-inputs "tidy-html")))
> -      #:parallel-tests? #f))
> +      #:parallel-tests? #f
> +      #:phases
> +      (modify-phases %standard-phases
> +        (add-after 'install 'move-static-libraries
> +          (lambda* (#:key outputs #:allow-other-keys)
> +            ;; Move static libraries to the "static" output.
> +            (let* ((out    (assoc-ref outputs "out"))
> +                   (lib    (string-append out "/lib"))
> +                   (static (assoc-ref outputs "static"))
> +                   (slib   (string-append static "/lib")))
> +              (mkdir-p slib)
> +              (for-each (lambda (file)
> +                          (install-file file slib)
> +                          (delete-file file))
> +                        (find-files lib "\\.a$"))
> +              #t))))))
>     (synopsis "Library to extract meta-data from media files")
>     (description
>      "GNU libextractor is a library for extracting metadata from files.  It

I've reviewed this patch series and didn't see anything wrong. Looking
at how often you strip the ".a" static libraries into a separate output,
maybe it'd be worth the effort of adding an automatic way of doing so in
the gnu build system? I'm thinking it could work in a way similar to
adding debug symbols: simply add a "static" output and the rest is taken
care of automagically.

Thanks for all the packaging work!

Maxim

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]