unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: David Thompson <dthompson2@worcester.edu>
Cc: 37027@debbugs.gnu.org
Subject: [bug#37027] [PATCH] gnu: zlib: Add support for MinGW targets.
Date: Wed, 28 Aug 2019 00:06:26 +0200	[thread overview]
Message-ID: <87a7bumffh.fsf@gnu.org> (raw)
In-Reply-To: <20190814125853.18488-1-dthompson2@worcester.edu> (David Thompson's message of "Wed, 14 Aug 2019 08:58:53 -0400")

Hi David,

David Thompson <dthompson2@worcester.edu> skribis:

> ---
>  gnu/packages/compression.scm | 55 +++++++++++++++++++++++-------------
>  1 file changed, 36 insertions(+), 19 deletions(-)

Please add a commit log.  :-)

> +               `((delete 'configure)
> +                 (add-before 'install 'set-install-paths
> +                             (lambda* (#:key outputs #:allow-other-keys)
> +                               (let ((out (assoc-ref outputs "out")))
> +                                 (setenv "INCLUDE_PATH" (string-append out "/include"))
> +                                 (setenv "LIBRARY_PATH" (string-append out "/lib"))
> +                                 (setenv "BINARY_PATH" (string-append out "/bin"))
> +                                 #t))))
> +               `((replace 'configure
> +                          (lambda* (#:key outputs #:allow-other-keys)

Minor issue: could you adjust indentation to look like:

  (add-before 'x 'y
    (lambda* …

?  guix.el should take care of that.

> -               (with-directory-excursion (string-append out "/lib")
> -                 (install-file "libz.a" (string-append static "/lib"))
> -                 (delete-file "libz.a")
> -                 #t)))))))
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out"))
> +                            (static (assoc-ref outputs "static")))
> +                        (with-directory-excursion (string-append out "/lib")
> +                                                  (install-file "libz.a" (string-append static "/lib"))

The ‘with-directory-excursion’ indentation went off here.

> +       ,@(if (target-mingw?)
> +             `(#:make-flags
> +               '("-fwin32/Makefile.gcc"
> +                 "SHARED_MODE=1"
> +                 ,(string-append "CC=" (%current-target-system) "-gcc")
> +                 ,(string-append "RC=" (%current-target-system) "-windres")
> +                 ,(string-append "AR=" (%current-target-system) "-ar")))
> +             '())))

I wonder if we could have a single ‘if’:

  (arguments
    (if (target-mingw?)
        …
        ))

?  Thoughts?

Otherwise LGTM, thanks!

Ludo’.

  reply	other threads:[~2019-08-27 22:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 12:58 [bug#37027] [PATCH] gnu: zlib: Add support for MinGW targets David Thompson
2019-08-27 22:06 ` Ludovic Courtès [this message]
2019-08-28 13:05   ` [bug#37208] " David Thompson
     [not found]     ` <handler.37208.B.15669975368130.ack@debbugs.gnu.org>
2019-08-28 13:07       ` bug#37208: Acknowledgement ([PATCH] gnu: zlib: Add support for MinGW targets.) Thompson, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7bumffh.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=37027@debbugs.gnu.org \
    --cc=dthompson2@worcester.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).