diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2022-06-25 16:33:44 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-07-31 12:23:41 +0200 |
commit | 0565cde6892c4fcc503a86227e366d3500040076 (patch) | |
tree | 6db81ba7e1cfecfa063e866e272d758467d2781d /gnu/packages/compression.scm | |
parent | d1c6b8db5a30f9e428d018156dadb12927c485f8 (diff) | |
download | guix-0565cde6892c4fcc503a86227e366d3500040076.tar.gz |
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>
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 17 |
1 files 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")) |