summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/compression.scm17
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"))