[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/11: gnu: make-mingw-w64: Use G-Expressions.
From: |
guix-commits |
Subject: |
08/11: gnu: make-mingw-w64: Use G-Expressions. |
Date: |
Mon, 15 Jul 2024 17:35:36 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit ce578830e6798e65f21ba713d3c1193895999286
Author: Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>
AuthorDate: Tue Jun 18 13:26:14 2024 +0200
gnu: make-mingw-w64: Use G-Expressions.
* gnu/packages/mingw.scm (make-mingw-w64): Use G-Expressions and
move some arguments above phases.
Change-Id: Ie095dceac635f19f146895c8e3f36d9889108a9a
Signed-off-by: Christopher Baines <mail@cbaines.net>
---
gnu/packages/mingw.scm | 67 +++++++++++++++++++++++++++-----------------------
1 file changed, 36 insertions(+), 31 deletions(-)
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
index 1ef2c5e1cf..bae1561546 100644
--- a/gnu/packages/mingw.scm
+++ b/gnu/packages/mingw.scm
@@ -25,6 +25,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages cross-base)
#:use-module (guix build-system gnu)
+ #:use-module (guix gexp)
#:use-module (guix memoization)
#:use-module (guix packages)
#:use-module (guix download)
@@ -76,37 +77,41 @@ specified, recurse and return a mingw-w64 with support for
winpthreads."
,(string-append triplet "/lib")
,(string-append triplet "/lib64"))))))
(arguments
- `(#:configure-flags '(,(string-append "--host=" triplet)
- ,@(if with-winpthreads?
- '("--with-libraries=winpthreads")
- '()))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xgcc-core (assoc-ref inputs "xgcc-core"))
- (mingw-headers (string-append
- (getcwd) "/mingw-w64-headers")))
- (setenv "CPP"
- (string-append
- xgcc-core ,(string-append "/bin/" triplet "-cpp")))
- (setenv "CROSS_C_INCLUDE_PATH"
- (string-append
- mingw-headers
- ":" mingw-headers "/include"
- ":" mingw-headers "/crt"
- ":" mingw-headers "/defaults/include"
- ":" mingw-headers "/direct-x/include"))
- (when ,with-winpthreads?
- (let ((xlibc (assoc-ref inputs "xlibc")))
- (setenv "CROSS_LIBRARY_PATH"
- (string-append
- xlibc "/lib" ":"
- xlibc "/" ,triplet "/lib"))))))))
- #:make-flags (list "DEFS=-DHAVE_CONFIG_H -D__MINGW_HAS_DXSDK=1")
- #:parallel-build? #f ; parallel builds often fail with empty .a files
- #:tests? #f ; compiles and includes glibc headers
- #:strip-binaries? #f))
+ (list #:parallel-build? #f ; parallel builds often fail with empty .a
files
+ #:tests? #f ; compiles and includes glibc headers
+ #:strip-binaries? #f
+ #:configure-flags
+ #~(list #$(string-append "--host=" triplet)
+ #$@(if with-winpthreads?
+ #~("--with-libraries=winpthreads")
+ #~()))
+ #:make-flags #~'("DEFS=-DHAVE_CONFIG_H -D__MINGW_HAS_DXSDK=1")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (let ((xgcc-core #+(this-package-native-input
+ "xgcc-core"))
+ (mingw-headers (string-append
+ (getcwd) "/mingw-w64-headers")))
+ (setenv "CPP"
+ (string-append
+ xgcc-core "/bin/" #$triplet "-cpp"))
+ (setenv "CROSS_C_INCLUDE_PATH"
+ (string-append
+ mingw-headers
+ ":" mingw-headers "/include"
+ ":" mingw-headers "/crt"
+ ":" mingw-headers "/defaults/include"
+ ":" mingw-headers "/direct-x/include"))
+ #$@(if with-winpthreads?
+ #~((let ((xlibc #+(this-package-native-input
+ "xlibc")))
+ (setenv "CROSS_LIBRARY_PATH"
+ (string-append
+ xlibc "/lib" ":"
+ xlibc "/" #$triplet "/lib"))))
+ #~())))))))
(home-page "https://mingw-w64.org")
(synopsis "Minimalist GNU for Windows")
(description
- branch master updated (0e5e3edec5 -> bf6ab0e0f5), guix-commits, 2024/07/15
- 01/11: guix: packages: Add new &package-unsupported-target-error., guix-commits, 2024/07/15
- 09/11: gnu: make-mingw-w64: Update to 12.0.0., guix-commits, 2024/07/15
- 11/11: gnu: mingw-w64-tools: Update to 12.0.0., guix-commits, 2024/07/15
- 03/11: guix: packages: Add &unsupported-cross-compilation-target-error., guix-commits, 2024/07/15
- 02/11: gnu: tls: Raise conditions from target->openssl-target., guix-commits, 2024/07/15
- 04/11: build-system: meson: Use a more specific exception., guix-commits, 2024/07/15
- 05/11: gnu: rust: Guard against unsupported rust targets., guix-commits, 2024/07/15
- 08/11: gnu: make-mingw-w64: Use G-Expressions.,
guix-commits <=
- 06/11: build-system: go: Properly handle when a target is unsupported., guix-commits, 2024/07/15
- 10/11: gnu: mingw-w64-tools: Use G-Expressions., guix-commits, 2024/07/15
- 07/11: gnu: make-mingw-w64: Memoize., guix-commits, 2024/07/15