guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: zlib: Support mingw cross-compilation.


From: guix-commits
Subject: branch master updated: gnu: zlib: Support mingw cross-compilation.
Date: Sun, 31 Jul 2022 07:19:13 -0400

This is an automated email from the git hooks/post-receive script.

lilyp pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 0565cde689 gnu: zlib: Support mingw cross-compilation.
0565cde689 is described below

commit 0565cde6892c4fcc503a86227e366d3500040076
Author: Vivien Kraus <vivien@planete-kraus.eu>
AuthorDate: Sat Jun 25 16:33:44 2022 +0200

    gnu: zlib: Support mingw cross-compilation.
    
    * gnu/packages/compression.scm (zlib): Only run configure if not mingw.
    
    Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/packages/compression.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 5b31b0ad52..df056dd65a 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -113,7 +113,16 @@
     (build-system gnu-build-system)
     (outputs '("out" "static"))
     (arguments
-     `(#:phases
+     `(#:make-flags
+       ,(if (target-mingw?)
+            `(list ,(string-append "PREFIX=" (%current-target-system) "-")
+                   "BINARY_PATH = $(prefix)/bin"
+                   "INCLUDE_PATH = $(prefix)/include"
+                   "LIBRARY_PATH = $(prefix)/lib"
+                   "SHARED_MODE = 1"
+                   (string-append "prefix = " (assoc-ref %outputs "out")))
+            ''())
+       #:phases
        (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
@@ -125,8 +134,10 @@
                ,@(if (%current-target-system)
                      `((setenv "CHOST" ,(%current-target-system)))
                      '())
-               (invoke "./configure"
-                       (string-append "--prefix=" out)))))
+               ,@(if (target-mingw?)
+                     `((rename-file "win32/Makefile.gcc" "Makefile"))
+                     `((invoke "./configure"
+                               (string-append "--prefix=" out)))))))
          (add-after 'install 'move-static-library
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))



reply via email to

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