[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49672] [PATCH v2 1/6] gnu: Fix GNU/Linux system detection
From: |
Thiago Jung Bauermann |
Subject: |
[bug#49672] [PATCH v2 1/6] gnu: Fix GNU/Linux system detection |
Date: |
Sun, 27 Mar 2022 18:40:21 -0300 |
The current code isn’t strictly correct because the GNU triplet in
‘%current-target-system’ could end in “linux-gnu”. The helper works in all
cases.
* gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘target-linux?’.
[arguments]<#:configure-flags>: Likewise.
* gnu/packages/ntp.scm (ntp)[inputs]: Likewise
---
gnu/packages/messaging.scm | 8 ++------
gnu/packages/ntp.scm | 3 +--
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f40c3a7e2ccb..44809754212a 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -899,17 +899,13 @@ (define-public ngircd
(inputs `(("zlib" ,zlib)
("libwrap" ,tcp-wrappers)
("gnutls" ,gnutls)
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system)
- (%current-system)))
+ ,@(if (target-linux?)
`(("linux-pam" ,linux-pam))
'())))
(arguments
`(#:configure-flags
'("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system)
- (%current-system)))
+ ,@(if (target-linux?)
'("--with-pam")
'()))
#:phases
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 7a3c033b2e12..d7f99c614ed8 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -148,8 +148,7 @@ (define-public ntp
("libevent" ,libevent)
;; Build with POSIX capabilities support on GNU/Linux. This allows
'ntpd'
;; to run as non-root (when invoked with '-u'.)
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system) (%current-system)))
+ ,@(if (target-linux?)
`(("libcap" ,libcap))
'())))
(arguments
- [bug#49672] [PATCH v2 0/6] Target check fixes for cross compilation, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 1/6] gnu: Fix GNU/Linux system detection,
Thiago Jung Bauermann <=
- [bug#49672] [PATCH v2 2/6] gnu: libgc: Use default argument in ‘target-hurd?’ call, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 6/6] gnu: Fix check of ‘%current-system’ and ‘%current-target-system’, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 4/6] gnu: Use ‘current-target-nix-system’ for matches, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 5/6] gnu: Query membership in ‘supported-systems’ list with Nix identifier, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 3/6] utils: Introduce the ‘current-target-nix-system’ procedure, Thiago Jung Bauermann, 2022/03/27
- [bug#49672] [PATCH v2 0/6] Target check fixes for cross compilation, Maxime Devos, 2022/03/28