guix-patches
[Top][All Lists]
Advanced

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

[bug#56504] [PATCH] Mingw support for zlib


From: Vivien Kraus
Subject: [bug#56504] [PATCH] Mingw support for zlib
Date: Wed, 13 Jul 2022 17:19:36 +0200
User-agent: Evolution 3.42.1

Le mercredi 13 juillet 2022 à 07:49 +0200, Liliana Marie Prikler a
écrit :
> Am Dienstag, dem 12.07.2022 um 18:45 +0200 schrieb Vivien Kraus:
> > Le mardi 12 juillet 2022 à 08:07 +0200, Liliana Marie Prikler a
> > écrit :
> > > Am Dienstag, dem 12.07.2022 um 01:53 +0200 schrieb Vivien Kraus:
> > > > +                     `((substitute* "win32/Makefile.gcc"
> > > > +                         (("PREFIX =")
> > > > +                          (string-append "PREFIX = "
> > > > ,(%current-
> > > > target-system) "-"))
> > > > +                         (("prefix \\?= /usr/local")
> > > > +                          (string-append "prefix ?= " out))
> > > > +                         (("# BINARY_PATH, INCLUDE_PATH and
> > > > LIBRARY_PATH must be set.")
> > > > +                          "\
> > > > +BINARY_PATH = $(prefix)/bin
> > > > +INCLUDE_PATH = $(prefix)/include
> > > > +LIBRARY_PATH = $(prefix)/lib"))
> > > > +                       (rename-file "win32/Makefile.gcc"
> > > > "Makefile"))
> > > I think these can be conditionally added to #:make-flags
> > I did it for all but prefix, because I have to have the output
> > path.
> > Is there a way to get it from within the make-flags?
> With the gexp-style you'd write #$output, otherwise ,(assoc-ref
> %build-
> outputs "out").
Looking at the "-builder" scheme file that is generated for the
derivation, it looks like what I want is simply %outputs, not %build-
outputs.

> 
> > > > +                     `((invoke "./configure"
> > > > +                               (string-append "--prefix="
> > > > out)))))))
> > > 
> > > > +         ,@(if (and (%current-target-system)
> > > > +                    (string-suffix? "-mingw32" (%current-
> > > > target-
> > > > system)))
> > > > +               `(add-after 'install 'install-mingw-shared
> > > > +                  (lambda* (#:key make-flags #:allow-other-
> > > > keys)
> > > > +                    (apply invoke "make"
> > > > +                           (append make-flags
> > > > +                                   '("install"
> > > > "SHARED_MODE=1")))))
> > > SHARED_MODE might likewise be conditionally added to #:make-
> > > flags.
> > I get both the DLL loader and the DLL in the default output, and
> > the
> > static lib in the static output, so it works.
> Oh, so you mean the static output should be built without
> SHARED_MODE?
No, SHARED_MODE=1 means "please also install the DLL" and SHARED_MODE=0
means "please do not install the DLL". Reading the win32/Makefile.gcc,
nothing special is done if SHARED_MODE=0. It is only used in the
install and uninstall targets. I don’t really understand why you would
want to set SHARED_MODE=0 (even weirder to set it as a default) but I
guess it happens.

Attachment: v3-0001-gnu-zlib-Support-mingw-cross-compilation.patch
Description: Text Data


reply via email to

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