guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection


From: Thiago Jung Bauermann
Subject: [bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection
Date: Tue, 20 Jul 2021 22:00:40 -0300

The current code isn’t strictly correct because the GNU triplet in
‘%current-target-system’ could end in “linux-gnu”. Instead, check whether
either of the system identifiers contain the string “-linux”.

* gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘string-contains’.
[arguments]<#:configure-flags>: Likewise.
* gnu/packages/ntp.scm (ntp)[inputs]: Likewise
---
 gnu/packages/messaging.scm | 12 ++++++------
 gnu/packages/ntp.scm       |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index e5ecdb889441..f18de2a1295d 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -781,17 +781,17 @@ dictionaries.  HexChat can be extended with multiple 
addons.")
     (inputs `(("zlib" ,zlib)
               ("libwrap" ,tcp-wrappers)
               ("gnutls" ,gnutls)
-              ,@(if (string-suffix? "-linux"
-                                    (or (%current-target-system)
-                                        (%current-system)))
+              ,@(if (string-contains (or (%current-target-system)
+                                         (%current-system))
+                                     "-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 (string-contains (or (%current-target-system)
+                                    (%current-system))
+                                "-linux")
                '("--with-pam")
                '()))
        #:phases
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 191eedd15875..de501199596c 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -154,8 +154,8 @@ time-stamping or reference clock, sub-microsecond accuracy 
is possible.")
       ("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 (string-contains (or (%current-target-system) (%current-system))
+                             "-linux")
             `(("libcap" ,libcap))
             '())))
    (arguments





reply via email to

[Prev in Thread] Current Thread [Next in Thread]