mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 23:06:59 +01:00
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>
This commit is contained in:
parent
d1c6b8db5a
commit
0565cde689
1 changed files with 14 additions and 3 deletions
|
@ -113,7 +113,16 @@ (define-public zlib
|
|||
(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 @@ (define-public zlib
|
|||
,@(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"))
|
||||
|
|
Loading…
Reference in a new issue