mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +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 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(outputs '("out" "static"))
|
(outputs '("out" "static"))
|
||||||
(arguments
|
(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
|
(modify-phases %standard-phases
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
@ -125,8 +134,10 @@
|
||||||
,@(if (%current-target-system)
|
,@(if (%current-target-system)
|
||||||
`((setenv "CHOST" ,(%current-target-system)))
|
`((setenv "CHOST" ,(%current-target-system)))
|
||||||
'())
|
'())
|
||||||
(invoke "./configure"
|
,@(if (target-mingw?)
|
||||||
(string-append "--prefix=" out)))))
|
`((rename-file "win32/Makefile.gcc" "Makefile"))
|
||||||
|
`((invoke "./configure"
|
||||||
|
(string-append "--prefix=" out)))))))
|
||||||
(add-after 'install 'move-static-library
|
(add-after 'install 'move-static-library
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
|
Loading…
Reference in a new issue