From patchwork Wed Jul 21 01:00:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31535 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EBEE727BC82; Wed, 21 Jul 2021 02:02:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4EB5327BC6B for ; Wed, 21 Jul 2021 02:02:12 +0100 (BST) Received: from localhost ([::1]:38626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cl-0007QW-4f for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cc-0007Pw-PN for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cc-0007h4-HF for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cc-00008w-9q for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 1/9] gnu: Fix check of =?utf-8?b?4oCYJWN1cnJl?= =?utf-8?b?bnQtc3lzdGVt4oCZ?= and =?utf-8?b?4oCYJWN1cnJlbnQtdGFyZ2V0LXN5c3Rl?= =?utf-8?b?beKAmQ==?= References: <20210721004615.631777-1-bauermann@kolabnow.com> In-Reply-To: <20210721004615.631777-1-bauermann@kolabnow.com> Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829286406 (code B ref 49672); Wed, 21 Jul 2021 01:02:02 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:26 +0000 Received: from localhost ([127.0.0.1]:35745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c1-00006N-GY for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:26 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:49194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60bz-000067-1g for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:24 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 8D3A4AF6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1626829275; x=1628643676; bh=HGmAUd3j4pQ5uuAEtM2fr+XRrUB4L71iWQgWk7qUi2Q=; b=Yhba2MpXWMDc 8AIBVWUmf5vtO2vHvv2xykyXhnB1Gss+3kLq6tRr0EaHwxb3s0+cFYX1D1Ec0/i8 RXet6o/+h9dNMvyfq9I1ce1LXCtsPbFGqtgmXcRJsXxssTVEeAy1oaW0pBCU0qvx XQvKnDhDahDO2TV7Ogc+luhk4yqYhZIgBjquUx9XZZfPf0xhAgrTP8x46O1PVssy TKkJnvz+wDQUnlukXzl65HjUZ8j5U6THEYd07bZxki7uvHfVKzJIvbowWRIuGjym rfa56zLaAVjXb/2eHNeSiF30VYY/RNLBFmCDJXte0H3VisK2xpd2eE1yYGDMWIBH oCct1nAkekp15rBbjNY+HWf0PpWXJ4Ux3sPulIth6Xmwwj+4IZrlsDgHretmHsDH /cCN8sb17Lk9jL7EUEPV02JbIf8d1c05AmrYCsBEYbroVHq+5qs6VT2m1aEsVK9U l4AtZVOlVRZjW4RAQbo/cWlK6odNGZ+7cXSCW2tGZZoOlVMO6rhFLpKZ9Tvgsta6 UsT7a1isDb1Jxeov3T8uqOnR1NmbfkHEYTXhC1PHhTSGXuzc5ufh9+mg1TLPFVWQ eDUA6TUkYJEtFgaUFvgDQ4NfcCRrBPgkWfiicxbOxDi7aR+hBlrdhaRCSC7uTH8P pf3THZX25Is8wOynbAlCJKcM6HBVH3E= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u09TimJDBscP for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:15 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 23F75AB6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:13 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id DA9AB4337; Wed, 21 Jul 2021 03:01:12 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:35 -0300 Message-Id: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches The order of the check is important because ‘%current-system’ is always defined, while ‘%current-target-system’ is only defined when cross-building. Therefore, it’s important to check ‘%current-target-system’ first, otherwise the cross-build target is never considered. * gnu/packages/bdw-gc.scm (libgc)[arguments]<#:configure-flags>: Check ‘%current-target-system’ first. * gnu/packages/crypto.scm (libb2)[arguments]<#:configure-flags>: Likewise. * gnu/packages/golang.scm (go-1.4)[arguments]<#:system>: Likewise. (go-1.14)[arguments]<#:system>: Likewise. * gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Likewise. [native-inputs]: Likewise. (ant-bootstrap)[arguments]<#:phases>: Likewise. (classpath-jamvm-wrappers)[arguments]<#:builder>: Likewise. * gnu/packages/lisp.scm (clisp)[arguments]<#:configure-flags>: Likewise. * gnu/packages/photo.scm (lensfun)[arguments]<#:configure-flags>: Likewise. * gnu/packages/php.scm (php)[arguments]<#:phases>: Likewise. * gnu/packages/sdl.scm (sdl-gfx)[arguments]<#:configure-flags>: Likewise. * gnu/packages/telephony.scm (pjproject)[arguments]<#:configure-flags>: Likewise. --- gnu/packages/bdw-gc.scm | 4 ++-- gnu/packages/crypto.scm | 4 ++-- gnu/packages/golang.scm | 8 ++++---- gnu/packages/java.scm | 16 ++++++++-------- gnu/packages/lisp.scm | 4 ++-- gnu/packages/photo.scm | 4 ++-- gnu/packages/php.scm | 4 ++-- gnu/packages/sdl.scm | 4 ++-- gnu/packages/telephony.scm | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index ecac5b93687e..cd834ff11031 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -52,8 +52,8 @@ ;; to configure script. See bug report and discussion: ;; ;; - ,@(if (hurd-triplet? (or (%current-system) - (%current-target-system))) + ,@(if (hurd-triplet? (or (%current-target-system) + (%current-system))) '("--disable-gcj-support") '())))) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index fe2cec045d6c..dff9584e07b3 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -867,8 +867,8 @@ data on your platform, so the seed itself will be as random as possible. (arguments `(#:configure-flags (list - ,@(if (any (cute string-prefix? <> (or (%current-system) - (%current-target-system))) + ,@(if (any (cute string-prefix? <> (or (%current-target-system) + (%current-system))) '("x86_64" "i686")) ;; fat only checks for Intel optimisations '("--enable-fat") diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index a830afa022a6..58688687bba3 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -1046,8 +1046,8 @@ your Go binary to be later served from an http.FileSystem.") (guix build utils) (srfi srfi-1)) #:tests? #f ; Tests are run by the all.bash script. - ,@(if (string-prefix? "aarch64-linux" (or (%current-system) - (%current-target-system))) + ,@(if (string-prefix? "aarch64-linux" (or (%current-target-system) + (%current-system))) '(#:system "armhf-linux") '()) #:phases @@ -1199,8 +1199,8 @@ in the style of communicating sequential processes (@dfn{CSP}).") (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:system system) - (if (string-prefix? "aarch64-linux" (or (%current-system) - (%current-target-system))) + (if (string-prefix? "aarch64-linux" (or (%current-target-system) + (%current-system))) "aarch64-linux" system)) ((#:phases phases) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 64df5a2e24a2..e69d62be0802 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -315,8 +315,8 @@ language.") "--enable-runtime-reloc-checks" "--enable-ffi") #:phases - ,(if (string-prefix? "aarch64" (or (%current-system) - (%current-target-system))) + ,(if (string-prefix? "aarch64" (or (%current-target-system) + (%current-system))) ;; Makefiles and the configure script need to be regenerated to ;; incorporate support for AArch64. '(modify-phases %standard-phases @@ -330,8 +330,8 @@ language.") ("zip" ,zip) ("zlib" ,zlib))) (native-inputs - (if (string-prefix? "aarch64" (or (%current-system) - (%current-target-system))) + (if (string-prefix? "aarch64" (or (%current-target-system) + (%current-system))) ;; Additional packages needed for autoreconf. `(("autoconf" ,autoconf) ("automake" ,automake) @@ -401,8 +401,8 @@ JNI.") ;; Without these JamVM options the build may freeze. (substitute* "bootstrap.sh" (("^\"\\$\\{JAVACMD\\}\" " m) - ,@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) + ,@(if (string-prefix? "armhf" (or (%current-target-system) + (%current-system))) `((string-append m "-Xnocompact ")) `((string-append m "-Xnocompact -Xnoinlining "))))) @@ -674,8 +674,8 @@ the standard javac executable."))) (for-each (lambda (tool) (with-output-to-file (string-append bin tool) (lambda _ - ,@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) + ,@(if (string-prefix? "armhf" (or (%current-target-system) + (%current-system))) `((format #t "#!~a/bin/sh ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ gnu.classpath.tools.~a.~a $@" diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index d8d7a7394c44..ee43226ff091 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -347,8 +347,8 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") ("libsigsegv" ,libsigsegv))) (arguments `(#:configure-flags '(,@(if (string-prefix? "armhf-linux" - (or (%current-system) - (%current-target-system))) + (or (%current-target-system) + (%current-system))) '("CFLAGS=-falign-functions=4") '()) "--with-dynamic-ffi" diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 673989e06b09..1b646497c91e 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -440,8 +440,8 @@ scene to produce an image that looks much like a tone-mapped image.") "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf")))) (build-system cmake-build-system) (arguments - `(,@(if (any (cute string-prefix? <> (or (%current-system) - (%current-target-system))) + `(,@(if (any (cute string-prefix? <> (or (%current-target-system) + (%current-system))) '("x86_64" "i686")) ;; SSE and SSE2 are supported only on Intel processors. '() diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index 4edff2cfd886..597494e8a94f 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -177,8 +177,8 @@ (substitute* "ext/standard/tests/streams/bug60602.phpt" (("'ls'") (string-append "'" (which "ls") "'"))) - ,@(if (string-prefix? "arm" (or (%current-system) - (%current-target-system))) + ,@(if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) ;; Drop tests known to fail on armhf. '((for-each delete-file (list diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 128bd95af881..bddc0bdbe990 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -200,8 +200,8 @@ system, such as sound redirection over the network.") (build-system gnu-build-system) (outputs '("out" "debug")) (arguments - `(,@(if (any (cute string-prefix? <> (or (%current-system) - (%current-target-system))) + `(,@(if (any (cute string-prefix? <> (or (%current-target-system) + (%current-system))) '("x86_64" "i686")) ;; mmx is supported only on Intel processors. '() diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index f75a168948bb..4957ecca13a0 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -755,8 +755,8 @@ your calls and messages.") "--with-external-srtp" "--with-external-pa" ;; The following flag is Linux specific. - ,@(if (string-contains (or (%current-system) - (%current-target-system)) "linux") + ,@(if (string-contains (or (%current-target-system) + (%current-system)) "linux") '("--enable-epoll") '()) "--with-gnutls" ;disable OpenSSL checks From patchwork Wed Jul 21 01:00:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31536 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 58B5227BC6B; Wed, 21 Jul 2021 02:02:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DC7E227BC78 for ; Wed, 21 Jul 2021 02:02:12 +0100 (BST) Received: from localhost ([::1]:38644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cl-0007Ri-Vz for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007Q0-0E for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cc-0007hg-OO for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cc-000093-Mo for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 2/9] utils: Add =?utf-8?q?=E2=80=98current-targe?= =?utf-8?q?t-nix-system=E2=80=99?= helper Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829289424 (code B ref 49672); Wed, 21 Jul 2021 01:02:02 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:29 +0000 Received: from localhost ([127.0.0.1]:35751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c5-00006l-DX for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:29 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:59496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c1-00006B-B4 for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:25 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id A2FD0405B8 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829279; x=1628643680; bh=GFRSO9hwK9Ix1U2vSpPPEERhAc0ECXwS5jo cGimT+Cw=; b=ohrHIfcTTh8PR6D4QkR/uSL0vv1SHBXl0DM0uWrQlirdSS5oqNr 4Jp2ACvLqfujSuifP5mOrH7k/02T4UcxRRPF/7gfyBv+lAxAk2WsJPNd0VkeenEY eN4OhkbTocXFhjNZ+Hg2pzQzHjAQCBEPttrF6h56kMGAEtP+D6IOMyXEcaSq9ihf wSienpbBxnUQpXJjYmAg0AwkqlCm1I3pEUgpa7g5AjVdCuKCA2/0cMDBaE6BOtEG HIpdbd0Yamx4zROa+W/Y5SIEqq2aCdiQ+IhNnVxeBgdfSOs9hb1Y3VBxyqdPJ3PO mMQVedduyGWb1g6P4+hDMuASWyDPST2SAf6gVRhCEukpUGhSYcNW5nrJn4J7OsOP p1hFV6LamlQv7PzVc8OziATGcIEhIPXYOvdBa+yiD4aiTS8EDBMT3UO+jzDSYxaX GGKpZjA1dIsMhfoALFn3/08jY0vrtmvuFskcckgHe9VkjRYEpVXdtvYcEyQq4Uke YqWN1+PWHIRHf1WXfsLF6BQJAeAO9BhiKuLKandnHK27rvVfLV+R35a68O+vilVp uxhHOKujOC6Aci8yivDQS2U+gDqaqSfhlWpgRQLYIXlKtlDGtGpkfcVwmqFGxPB0 ifEcSNIZa0r+VN8cXqmxKoDyV+aowxnlS9gserZb6uow5Ny+6ig8+95w= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id st6Qh1x9Aou1 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:19 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 06063403CB for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:17 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 12B0F323; Wed, 21 Jul 2021 03:01:16 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:36 -0300 Message-Id: <20210721010043.632012-2-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches Many places check a Nix system identifier string against ‘%current-target-system’ and ‘%current-target’. This is problematic because these parameters hold different kinds of identifiers. The former holds a GNU triplet (or #f if not cross-compiling), while the latter holds a Nix system identifier. As a first step to solve the confusion, introduce the ‘current-target-nix-system’ procedure which looks at both parameters and always returns a Nix system identifier. The code is factored out from ‘glibc-dynamic-linker’ and ‘system->llvm-target’. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Use result of ‘current-target-nix-system’ as default value for ‘system’ argument. * gnu/packages/llvm.scm (system->llvm-target): Likewise. * guix/utils.scm (current-target-nix-system): Define new procedure. --- gnu/packages/bootstrap.scm | 6 ++---- gnu/packages/llvm.scm | 4 +--- guix/utils.scm | 7 +++++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index c598cedc0ae2..b7134653cfc4 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -35,7 +35,7 @@ #:select (run-with-store add-to-store add-text-to-store)) #:use-module ((guix derivations) #:select (derivation derivation-input derivation->output-path)) - #:use-module ((guix utils) #:select (gnu-triplet->nix-system)) + #:use-module (guix utils) #:use-module ((guix gexp) #:select (lower-object)) #:use-module (guix memoization) #:use-module (guix i18n) @@ -286,9 +286,7 @@ or false to signal an error." package-with-bootstrap-guile))))) (define* (glibc-dynamic-linker - #:optional (system (or (and=> (%current-target-system) - gnu-triplet->nix-system) - (%current-system)))) + #:optional (system (current-target-nix-system))) "Return the name of Glibc's dynamic linker for SYSTEM." ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc. (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2") diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 575c63c713e9..3c4e5930d044 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -66,9 +66,7 @@ #:export (system->llvm-target)) (define* (system->llvm-target #:optional - (system (or (and=> (%current-target-system) - gnu-triplet->nix-system) - (%current-system)))) + (system (current-target-nix-system))) "Return the LLVM target name that corresponds to SYSTEM, a system type such as \"x86_64-linux\"." ;; See the 'lib/Target' directory of LLVM for a list of supported targets. diff --git a/guix/utils.scm b/guix/utils.scm index 2c56c8b2e08b..4072dea89051 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -77,6 +77,7 @@ gnu-triplet->nix-system %current-system %current-target-system + current-target-nix-system package-name->name+version target-mingw? target-arm32? @@ -520,6 +521,12 @@ returned by `config.guess'." ;; cross-building to. (make-parameter #f)) +(define (current-target-nix-system) + "Return the Nix system identifier for the current target, whether we are +cross-building or not." + (or (and=> (%current-target-system) gnu-triplet->nix-system) + (%current-system))) + (define* (package-name->name+version spec #:optional (delimiter #\@)) "Given SPEC, a package name like \"foo@0.9.1b\", return two values: \"foo\" From patchwork Wed Jul 21 01:00:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31539 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1911727BC78; Wed, 21 Jul 2021 02:02:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 88AD027BC82 for ; Wed, 21 Jul 2021 02:02:21 +0100 (BST) Received: from localhost ([::1]:39284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cu-0007sk-JV for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007QC-CW for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007hp-58 for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cd-00009B-3s for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 3/9] gnu: Query membership in =?utf-8?b?4oCYc3Vw?= =?utf-8?b?cG9ydGVkLXN5c3RlbXPigJk=?= list with Nix identifier Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829292434 (code B ref 49672); Wed, 21 Jul 2021 01:02:03 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:32 +0000 Received: from localhost ([127.0.0.1]:35753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c7-00006v-PA for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:31 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:46640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c4-00006F-JZ for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:29 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id C565B998 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829282; x=1628643683; bh=SAJtHvbCdwm8Ckgjtm0X+08E70CEVR79+6Q /3J1R6Pc=; b=MfnJNYk0Fy1pn6POnnE1wZ5stnWhEvZ2qtp13VTQ2h9eV5kZN0z EyIMks/sH5ME20pi6cB5Qw8iG21LpaqTKUAkMJQd7La3OZpk4pMksl+/QYcCmq3h 3O7DNXuLxqmFI/1q3vLkFdOxsU8/UdRQqlKMFwUsTP4untkr2XaiYysFqGC92Ud5 KNZxH1jH7bSyFTGatiMXosI9qNR+d5OrMysFltBwlZuBfj/uxEbf/PzggYi8dCRg VhCAxrNyf4PRuDofn+das2S4u77NryQyOR/dl4RVstOnWzz7DrWdkDUDUOSARCn4 XwegdQLgvgQOL98scdGDAJ+iUvUVh+sYV7SJNWF0Idyls5KZlrsk+4Ysxef6FCsJ dnVKhY0QVOsGzu3sLuMiS8FacaTJVdhc1D2YNLncy/xG/xJz3AuXwg/U5WdWhOsx p+HaAydgc/TZQr7YKD9WayaAdeqartwI1cKq5ONyx2QJFgOiFhvVYStbrp1uJZpv 1CwUuNmtTbV0hXFwCGQag8e2BQbM5HoP08WqT1H8a+zd+QG4bW4pbMCBFXgbr3ir BgitvTGrVhqa67jOyCnq0kUnONJbDJubvRcZk0d7pe0YuDvbNsTS4D3Bzsi3Nxw6 znrLPr22Zg4RAd/gIoGfIfC97TnjpN/Oet05AzlfTlwhvXZKRHFLncNc= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id chUqjvn8JpyW for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:22 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 35BD5D3 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:20 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 5E3CD323; Wed, 21 Jul 2021 03:01:20 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:37 -0300 Message-Id: <20210721010043.632012-3-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches Packages’ ‘supported-systems’ list contains Nix system identifiers, while ‘%current-target-system’ contains a GNU triplet. We need to use ‘current-target-nix-system’ to query the list, which always returns a Nix system identifier. * gnu/packages/bootloaders.scm (grub)[inputs]: Use ‘current-target-nix-system’ to query membership in (package-supported-systems). * gnu/packages/pciutils.scm (pciutils): Likewise. --- gnu/packages/bootloaders.scm | 9 +++------ gnu/packages/pciutils.scm | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 742992a119b2..be51fb0c3de4 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -182,16 +182,14 @@ ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and ;; 'grub-install' to recognize mapped devices (LUKS, etc.) - ,@(if (member (or (%current-target-system) - (%current-system)) + ,@(if (member (current-target-nix-system) (package-supported-systems lvm2)) `(("lvm2" ,lvm2)) '()) ;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install' ;; to determine whether the root file system is RAID. - ,@(if (member (or (%current-target-system) - (%current-system)) + ,@(if (member (current-target-nix-system) (package-supported-systems mdadm)) `(("mdadm" ,mdadm)) '()) @@ -202,8 +200,7 @@ ;; Needed for ‘grub-mount’, the only reliable way to tell whether a given ;; file system will be readable by GRUB without rebooting. - ,@(if (member (or (%current-target-system) - (%current-system)) + ,@(if (member (current-target-nix-system) (package-supported-systems fuse)) `(("fuse" ,fuse)) '()) diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index d7d224b292f2..f2196c4e53ae 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -112,8 +112,7 @@ `(("which" ,which) ("pkg-config" ,pkg-config))) (inputs - `(,@(if (member (or (%current-target-system) - (%current-system)) + `(,@(if (member (current-target-nix-system) (package-supported-systems kmod)) `(("kmod" ,kmod)) '()) From patchwork Wed Jul 21 01:00:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31537 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2978F27BC78; Wed, 21 Jul 2021 02:02:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8CDE827BC6B for ; Wed, 21 Jul 2021 02:02:14 +0100 (BST) Received: from localhost ([::1]:38702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cn-0007UB-JH for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007QL-PS for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007iC-Hg for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cd-00009I-Gv for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 4/9] gnu: Use =?utf-8?q?=E2=80=98current-target-?= =?utf-8?q?nix-system=E2=80=99?= in pattern matches Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829295450 (code B ref 49672); Wed, 21 Jul 2021 01:02:03 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:35 +0000 Received: from localhost ([127.0.0.1]:35757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cB-00007B-1Q for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:35 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:49208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60c8-00006d-TO for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:33 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 6F504AF6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829286; x=1628643687; bh=bChMfSZ/8qlUGDxjrBTrzsOYKIbhmuWq/Sd hd47sUI4=; b=T7BjvtctpOZEJi/PP9GxzD8VqAwPmXCTOqKeonIuhnhsqsbtX1m 1NlqVrMYOsY1Pfw4CICu2stLwn2+CASZLkCXbUUNFndAFZnDuCxpAKBHPSPNDEqo vGhguXJ4TggOJtAeF3Bw6SUQOQjZu6zpAEFpvFgFUwLpwxmb0h4o8u0HcbtCGX3A X7k6wYcYTe5a9QQtUcmxAOp82N1s0h82jeNKex9DtYiX08rVFm+0XX5iwK+bCDEe oloiNR5xHlWPijidyRarEigkaELxgmr4d3jwA3PSiJxe/OgsiLCNgaBQ228HRC/K zW0YpfgoVabdRKkAMD3nbzt1KeoV4tMBX8bcBip83n9Cp21w8MJxbSQWV2fcKKYH 2KZcuENdMCBCpNlc/rtADj1FOtSPq1x6GtEqpRgHr/G7N+SCkt5/UHC4kUMdYwHQ hDTLjF0fqz1mUJI203wfZ/TkHL1RHRViujFFIP4Jt+sHC5JQQlyVOLwgH3Z9s4LO F7i5Dqyz0EVvamNtARXU2XQQ4IFxtAT6TyeWaHjFj0jWlTTeGsFvRSH2phE9JOzA CTYC4gNjDhvbcxzd/h8EjFs0nnWfzV+cuS3yzuwHsLhVv/1KOWsC0iGpDgZIilcI c4t61Y8QRz8zSS81PNeoNK3XhOKnxwdABs9/wM+Qx9zy8cjLuuZKlIRk= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kP5IwSDsQ-d3 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:26 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 862D9AB6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:25 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 65AEA4337; Wed, 21 Jul 2021 03:01:24 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:38 -0300 Message-Id: <20210721010043.632012-4-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches Parts of the code try to match a Nix system identifier to either ‘%current-target-system’ or ‘%current-system’, but this won’t work for cross-compiling because the former parameter contains a GNU triplet identifier. Fix the problem by matching against ‘current-target-nix-system’, which always returns a Nix system identifier. * gnu/packages/astronomy.scm (libpasastro)[arguments]<#:make-flags>: Use ‘current-target-nix-system’. * gnu/packages/compression.scm (zpaq)[arguments]<#:make-flags>: Likewise. * gnu/packages/digest.scm (xxhash)[arguments]<#:make-flags>: Likewise. * gnu/packages/java.scm (java-swt)[source]: Likewise. * gnu/packages/julia.scm (julia)[arguments]<#:make-flags>: Likewise. * gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[inputs]: Likewise. * gnu/packages/pascal.scm (fpc)[native-inputs]: Likewise. [arguments]<#:phases>: Likewise. * gnu/packages/video.scm (mplayer)[arguments]<#:phases>: Likewise. * gnu/packages/web.scm (nginx)[arguments]<#:phases>: Likewise. (nginx-accept-language-module)[arguments]<#:phases>: Likewise. --- gnu/packages/astronomy.scm | 4 ++-- gnu/packages/compression.scm | 6 ++---- gnu/packages/digest.scm | 3 +-- gnu/packages/java.scm | 2 +- gnu/packages/julia.scm | 3 +-- gnu/packages/make-bootstrap.scm | 2 +- gnu/packages/pascal.scm | 6 ++---- gnu/packages/video.scm | 3 +-- gnu/packages/web.scm | 6 ++---- 9 files changed, 13 insertions(+), 22 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index a3f7d5cbf456..8c4a759718e7 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -645,11 +645,11 @@ low quality ones") `(#:tests? #f #:make-flags (list - ,(match (or (%current-target-system) (%current-system)) + ,(match (current-target-nix-system) ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux") "OS_TARGET=linux") (_ #f)) - ,(match (or (%current-target-system) (%current-system)) + ,(match (current-target-nix-system) ("i686-linux" "CPU_TARGET=i386") ("x86_64-linux" "CPU_TARGET=x86_64") ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l") diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index cf4ec4e644a3..ac217e663f4c 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1434,16 +1434,14 @@ functionality in a C++ iostream.") #:make-flags (list (string-append "CPPFLAGS=-Dunix" - ,(match (or (%current-target-system) - (%current-system)) + ,(match (current-target-nix-system) ("x86_64-linux" "") ("i686-linux" "") (_ " -DNOJIT"))) ;; These should be safe, lowest-common-denominator instruction sets, ;; allowing for some optimisation while remaining reproducible. (string-append "CXXFLAGS=-O3 -DNDEBUG" - ,(match (or (%current-target-system) - (%current-system)) + ,(match (current-target-nix-system) ("x86_64-linux" " -march=nocona -mtune=generic") ("i686-linux" " -march=i686 -mtune=generic") ("armhf-linux" " -mtune=generic-armv7-a") diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm index 986e33586133..b1954221f261 100644 --- a/gnu/packages/digest.scm +++ b/gnu/packages/digest.scm @@ -77,8 +77,7 @@ Zig, V, and Nim programming language standard libraries.") (arguments `(#:make-flags (list ,(string-append "CC=" (cc-for-target)) - ,(match (or (%current-target-system) - (%current-system)) + ,(match (current-target-nix-system) ;; Detect vector instruction set at run time. ((or "i686-linux" "x86_64-linux") "DISPATCH=1") (_ "DISPATCH=0")) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e69d62be0802..1c62f5d358e2 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3715,7 +3715,7 @@ specification.") (file32 "x86") (file64 "x86_64")) (let-values (((hash file) - (match (or (%current-target-system) (%current-system)) + (match (current-target-nix-system) ("x86_64-linux" (values hash64 file64)) (_ (values hash32 file32))))) (origin diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index abefc388bc6e..b5e29c394532 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -373,8 +373,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.") ;; Passing the MARCH flag is necessary to build binary substitutes for ;; the supported architectures. - ,(match (or (%current-target-system) - (%current-system)) + ,(match (current-target-nix-system) ("x86_64-linux" "MARCH=x86-64") ("i686-linux" "MARCH=pentium4") ("armhf-linux" "JULIA_CPU_TARGET=armv7-a,neon") diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index cdcb1dcaa295..fd656f9b8bfd 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -902,7 +902,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." %build-inputs) #t))) (inputs `(("guile-tarball" ,%guile-bootstrap-tarball) - ,@(match (or (%current-target-system) (%current-system)) + ,@(match (current-target-nix-system) ((or "i686-linux" "x86_64-linux") `(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball) ("bootstrap-mes" ,%mes-bootstrap-tarball) diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm index 0fdbecf05c20..9169584558b0 100644 --- a/gnu/packages/pascal.scm +++ b/gnu/packages/pascal.scm @@ -89,8 +89,7 @@ (native-inputs ;; FPC is built with FPC, so we need bootstrap binaries. `(("fpc-binary" - ,(match (or (%current-target-system) - (%current-system)) + ,(match (current-target-nix-system) ("i686-linux" fpc-bootstrap-i386-3.0.4) ;("powerpc64le-linux" fpc-bootstrap-ppc64le-3.0.4) ;("powerpc-linux" fpc-bootstrap-ppc-3.0.4) @@ -101,8 +100,7 @@ #:phases (let ((fpc-bootstrap-path (string-append (getcwd) "/" ,name "-" ,version "/fpc-bin")) - (arch ,(match (or (%current-target-system) - (%current-system)) + (arch ,(match (current-target-nix-system) ("i686-linux" "i386") ("x86_64-linux" "x86_64") (_ "unknown")))) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 399327741f6b..6cf8b90ffa95 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2021,8 +2021,7 @@ streaming protocols.") (string-append "--prefix=" out) ;; Enable runtime cpu detection where supported, ;; and choose a suitable target. - ,@(match (or (%current-target-system) - (%current-system)) + ,@(match (current-target-nix-system) ("x86_64-linux" '("--enable-runtime-cpudetection" "--target=x86_64-linux")) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 2cc8619b19d9..b00c9aa3db5b 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -413,8 +413,7 @@ the same, being completely separated from the Internet.") ,(let ((system "Linux") ; uname -s (release "3.2.0") ; uname -r ;; uname -m - (machine (match (or (%current-target-system) - (%current-system)) + (machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i686") ("mips64el-linux" "mips64") @@ -605,8 +604,7 @@ ngx_http_accept_language_module~%") ,(let ((system "Linux") ; uname -s (release "3.2.0") ; uname -r ;; uname -m - (machine (match (or (%current-target-system) - (%current-system)) + (machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i686") ("mips64el-linux" "mips64") From patchwork Wed Jul 21 01:00:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31540 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6608627BC78; Wed, 21 Jul 2021 02:02:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DB55427BC6B for ; Wed, 21 Jul 2021 02:02:22 +0100 (BST) Received: from localhost ([::1]:39406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cv-0007xb-V2 for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60ce-0007QT-5j for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007iZ-Um for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cd-00009P-Tr for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 5/9] gnu: Use =?utf-8?q?=E2=80=98current-target-?= =?utf-8?q?nix-system=E2=80=99?= in prefix checks Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829299467 (code B ref 49672); Wed, 21 Jul 2021 01:02:03 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:39 +0000 Received: from localhost ([127.0.0.1]:35761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cE-00007S-Hl for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:38 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:59510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cC-00006u-L5 for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:37 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 361E6405B8 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829290; x=1628643691; bh=XrmxZqmNUpnGukASMWNqBWXJRs3Lk9u47HL FL29WnwU=; b=hT6zPLN54WuOr4Y+6aex+8tNwEJVjgO4j/2E+ayoweNZEklZSTw fcb+5UU2hCsX9RksU9R9m9RitSA87ZTnArK+UvMO/61JsLvvvYmPdLxGzLxP93Ku 1G2XujmTvroGLSW5Ime8EFrePuzjXo4NNimJBwpCdbsVfqUt8FaxRE+qjDdzKUI3 ZzI0I5kyityWciY/r26fG7kOWXHWpbP2BzTnJItoMLUgwaJiw6kdRbVYKahAwdaZ 7d5JLgu6mGIFfWKHonWFvKsnaxa/HKbbZMa83i0jtp82797KHCZ7+B8u6GowZljy vS4wolPvnfr8SPVWZZgwtcOtM190NT2j+E1LKezUyLjVbIId8YYGkZpYykrWNyzr xbA8TIlILDgZYOZIH1RTDrPD/4cLg6r0DiKsNnI2FSk0skDNMdkKX1Nh5zZBQDkc 7+v/pNzMfsFOBgHuBebd4yCP+OfQbeo49Zk8MQBIzMdLP4ShsTpzoAWj6fMPzzV6 4RWp0Q+e2hYZEIZKk3Dd74sbmzJS53tr9YCZNWZhf8FYl7k6tOwdq61PtYxsap06 at+MtBys+bsyp5f7/hjIY8oNYULYPe6mhaZWmRd6jRPZPQGkHjPNfreWOO+o1r27 J3YKxyBJw0uCh7AaMl6hfk28H2t4zu487kYdGmoQkmUWkZD4Z13sv+48= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id heebkTqB4AT1 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:30 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 52C6F403CB for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:29 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 3EDA9323; Wed, 21 Jul 2021 03:01:27 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:39 -0300 Message-Id: <20210721010043.632012-5-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches Some places check whether the system identifier starts with “-linux”, which is a Nix system identifier. The GNU triplet identifier stored in ‘%current-target-system’ may not match the pattern if it includes a vendor field. Fix the problem by checking against ‘current-target-nix-system’, which always returns a Nix system identifier. * gnu/packages/bootloaders.scm (u-boot-tools)[arguments]<#:phases>: Use ‘current-target-nix-system’. * gnu/packages/c.scm (tcc)[arguments]<#:configure-flags>: Likewise. * gnu/packages/databases.scm (rocksdb)[arguments]<#:tests>: Likewise. * gnu/packages/debug.scm (american-fuzzy-lop): Likewise. (qemu-for-american-fuzzy-lop): Likewise. * gnu/packages/golang.scm (go-1.4)[arguments]<#:system>: Likewise. (go-1.14)[arguments]<#:system>: Likewise. * gnu/packages/lisp.scm (clisp)[arguments]<#:configure-flags>: Likewise. * gnu/packages/mes.scm (mes-0.19)[native-inputs]: Likewise. --- gnu/packages/bootloaders.scm | 4 +--- gnu/packages/c.scm | 3 +-- gnu/packages/databases.scm | 3 +-- gnu/packages/debug.scm | 6 ++---- gnu/packages/golang.scm | 6 ++---- gnu/packages/lisp.scm | 3 +-- gnu/packages/mes.scm | 3 +-- 7 files changed, 9 insertions(+), 19 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index be51fb0c3de4..669574468bd2 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -622,9 +622,7 @@ def test_ctrl_c")) (invoke "test/image/test-imagetools.sh"))) ;; Only run full test suite on x86_64 systems, as many tests ;; assume x86_64. - ,@(if (string-match "^x86_64-linux" - (or (%current-target-system) - (%current-system))) + ,@(if (string-match "^x86_64-linux" (current-target-nix-system)) '((add-after 'check 'check-x86 (lambda* (#:key make-flags test-target #:allow-other-keys) (apply invoke "make" "mrproper" make-flags) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1b9003ce09dd..f85bc2f4b6c9 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -88,8 +88,7 @@ (assoc-ref %build-inputs "libc") "/lib") ,@(if (string-prefix? "armhf-linux" - (or (%current-target-system) - (%current-system))) + (current-target-nix-system)) `("--triplet=arm-linux-gnueabihf") '())) #:test-target "test")) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 7de85d10c148..14367bde82b5 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1379,8 +1379,7 @@ including field and record folding."))) #:test-target "check_some" ;; Many tests fail on 32-bit platforms. There are multiple reports about ;; this upstream, but it's not going to be supported any time soon. - #:tests? (let ((system ,(or (%current-target-system) - (%current-system)))) + #:tests? (let ((system ,(current-target-nix-system))) (or (string-prefix? "x86_64-linux" system) (string-prefix? "aarch64-linux" system))) #:phases diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 3a29886b0e40..c5fad64692ae 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -172,8 +172,7 @@ tools that process C/C++ code.") (license license:ncsa))) (define-public american-fuzzy-lop - (let ((machine (match (or (%current-target-system) - (%current-system)) + (let ((machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i386") ("aarch64-linux" "aarch64") @@ -248,8 +247,7 @@ down the road.") (define-public qemu-for-american-fuzzy-lop ;; afl only supports using a single afl-qemu-trace executable, so ;; we only build qemu for the native target. - (let ((machine (match (or (%current-target-system) - (%current-system)) + (let ((machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i386") ("aarch64-linux" "aarch64") diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 58688687bba3..939dbc83ce71 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -1046,8 +1046,7 @@ your Go binary to be later served from an http.FileSystem.") (guix build utils) (srfi srfi-1)) #:tests? #f ; Tests are run by the all.bash script. - ,@(if (string-prefix? "aarch64-linux" (or (%current-target-system) - (%current-system))) + ,@(if (string-prefix? "aarch64-linux" (current-target-nix-system)) '(#:system "armhf-linux") '()) #:phases @@ -1199,8 +1198,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:system system) - (if (string-prefix? "aarch64-linux" (or (%current-target-system) - (%current-system))) + (if (string-prefix? "aarch64-linux" (current-target-nix-system)) "aarch64-linux" system)) ((#:phases phases) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index ee43226ff091..6fd1cd55e009 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -347,8 +347,7 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") ("libsigsegv" ,libsigsegv))) (arguments `(#:configure-flags '(,@(if (string-prefix? "armhf-linux" - (or (%current-target-system) - (%current-system))) + (current-target-nix-system)) '("CFLAGS=-falign-functions=4") '()) "--with-dynamic-ffi" diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index c66751bc7c74..d4a8278697ca 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -174,8 +174,7 @@ parsers to allow execution with Guile as extension languages."))) ("nyacc" ,nyacc-0.86))) (native-inputs `(("guile" ,guile-2.2) - ,@(let ((target-system (or (%current-target-system) - (%current-system)))) + ,@(let ((target-system (current-target-nix-system))) (cond ((string-prefix? "x86_64-linux" target-system) ;; Use cross-compiler rather than #:system "i686-linux" to get From patchwork Wed Jul 21 01:00:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31538 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DFB1127BC85; Wed, 21 Jul 2021 02:02:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7E03D27BC78 for ; Wed, 21 Jul 2021 02:02:21 +0100 (BST) Received: from localhost ([::1]:39260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60cu-0007rx-H5 for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60ce-0007Qv-Ju for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60ce-0007ii-CW for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60ce-00009X-BQ for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829301483 (code B ref 49672); Wed, 21 Jul 2021 01:02:04 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:41 +0000 Received: from localhost ([127.0.0.1]:35765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cH-00007j-00 for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:41 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:46654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cF-00007A-Qs for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:40 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 489B8998 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829293; x=1628643694; bh=Eon/idi5y3gj5ZKZmx/KKYPfEF2gcOTgCg+ 5H0aBNQA=; b=0K7QI+CeNCULGsv7cn86mdH0T7Jj9GKr6Yc2hmZ0GdPTjtt7StV aCPw/EFui6cKcSvbygFVBeQNwHDlWgniodw2osbPnc4kG9pB3rrC6cTP1qRsh2TX XQtvj1kyXshmV4nSzF/VtbmV44T5w0lFA4RBEdXv1MZFCWIaE1kyPrRlwy0tFt9K ZVaLlIPQuD7OTxvMimhUQQFkw+D5mcY466HWvuW0ZaOxF9N9DLNW2rHcB0GMksgp ONw26J/iq9SsbRCuiF7GmppcbTjHBjryPjZdXRXahQHJSStBr+4oxxAPnf6RMVSa g/1LD+ze14coDgiL40G9vn+2LyBFD7L00XXzQ/Q3FdSFban+OFrTOIbdb7slLAMk F6AnuWCeIQ3pmc7CsCPA8OPRg0+TXKOiBrL+isjx3D/6/QDha98gDcdtz9lF8i0H k00GVH3BZMnWKzu7RIsdfNbxDMoT8REs1oZRXL5qaDbEvJjChIygUxfsA2ujyaJm a92m8+OTlFlC5ceiQuvFbEt6pem9v7qLak9S7oSwh0XIU+uolN5G4Xa5Nl89WIB6 rh/ZCmc7W+hgrLa/xTh6dx7OBtYY/bTbO0QCareChCS7FDKeRA38vDCXD6xUaEIs 14dKAunZZhpAZIJEGi4Ub3NsbMyxZpZ1f3mqRfEUPjBRArNHz1qxF+C4= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RzWlPdRIhTAS for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:33 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id A657FD3 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:33 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id BB40E4337; Wed, 21 Jul 2021 03:01:32 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:40 -0300 Message-Id: <20210721010043.632012-6-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches 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 From patchwork Wed Jul 21 01:00:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31542 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8C07427BC78; Wed, 21 Jul 2021 02:02:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1160827BC6B for ; Wed, 21 Jul 2021 02:02:29 +0100 (BST) Received: from localhost ([::1]:39936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60d2-0008Jm-4Q for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cf-0007Rp-24 for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60ce-0007j8-Qm for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60ce-00009e-Pk for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 7/9] bootloader: grub: Fix mix of GNU triplet and Nix system identifier Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829307503 (code B ref 49672); Wed, 21 Jul 2021 01:02:04 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:47 +0000 Received: from localhost ([127.0.0.1]:35769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cN-000082-9r for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:47 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:49216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cL-00007g-Nf for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:46 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 46518AF6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829297; x=1628643698; bh=Vlj4F3reKETdde84MigstZ0dzVqKIDtClIB xGUO8mv8=; b=entsooVP29i7zsnDU6yfk7hn53mzt7D9tqMOH6I14y1F3+Ohh0Q c6HvqcZQO2/xAq2ZFYRzULewaLBcFcJNdliEf1kIPtd3eJV2a1ndEfj3w6miBRG8 jcVwGG7uG2J4t029AdwL5UkWH23TdN5jTZMY/6v/zUV06CJiIYhCOxOIot5m8WOo xqEOxdmEt/2SSY6aDGxDHFyfs7BZVKu8DImiznBkA5vIzWrQpea8Zu+l/vDGl7XX ygj7bzdE53B2bZd6VGe/CETMv92pIi+8aPxo4uenQlDqZhPoQb78u18ffSYTQkKc 9+4KCiJgVjEqe8hk+9Qhe3qB//TN80sk2JQfGSgeQIJFpO+2l3KZEGDlt7M8T2NM tBjrnDpyobpCDrxVbU9VhlTsk/bJ+pCk14yfSuHHQCNzxDya6M1vwfSKiSUed+CO k5SehsrvXP8N/vv1dQb/bgL3a2D77tGCvtJQ9zdST3hM6Pn1z0ZtbJ71MkGeQ/Wb 4DrpJSG6m6ShFtsw0E6kv26TsuwanMh42ZTTd6nQswnds/p2yHor4pZzNGaCJNeI WgTW25w1u6VBsipvRRtybCUBRAH0FkupO4zHfQIP/BU20Z5Zpc72XaDofsrzgIXr kCwJzVD4JiI78KCuZz17wDBzIfSmV5NOZQNNisguvRgYnXe4S+Rsn/Hw= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P0Zg-1L48HuQ for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:37 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 6D0EDAB6 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:37 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 95AE7323; Wed, 21 Jul 2021 03:01:36 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:41 -0300 Message-Id: <20210721010043.632012-7-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches ‘install-grub-efi-netboot’ calls ‘nix-system->gnu-triplet’ on ‘%current-target-system’, but that parameter already contains a GNU triplet identifier. There’s no bug in practice because ‘install-grub-efi-netboot’ only uses the arch part of the identifier, which is the same for both. Nevertheless, it’s best to fix the confusion. Therefore, define a ‘current-target-gnu-triplet’ procedure which returns the GNU triplet identifier for the current target – whether we are cross-building or not – and use it in ‘install-grub-efi-netboot’. Also take the opportunity to use the new procedure in packages ‘gcc-4.7’, ‘rust-1.19’ and ‘mplayer’, which have the same logic as the new procedure. * gnu/bootloader/grub.scm (install-grub-efi-netboot): Use ‘current-target-gnu-triplet’. * gnu/packages/gcc.scm (gcc-4.7)[configure-flags]: Likewise. * gnu/packages/rust.scm (rust-1.19)[arguments]<#:phases>: Likewise. * gnu/packages/video.scm (mplayer)[arguments]<#:phases>: Likewise. * guix/utils.scm (current-target-gnu-triplet): Define new procedure. --- gnu/bootloader/grub.scm | 5 +---- gnu/packages/gcc.scm | 5 +---- gnu/packages/rust.scm | 4 +--- gnu/packages/video.scm | 4 +--- guix/utils.scm | 7 +++++++ 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index ce146aba3c60..fe82a3c1e9ed 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -610,10 +610,7 @@ fi~%")))) (define (install-grub-efi-netboot subdir) "Define a grub-efi-netboot bootloader installer for installation in SUBDIR, which is usually efi/Guix or efi/boot." - (let* ((system (string-split (nix-system->gnu-triplet - (or (%current-target-system) - (%current-system))) - #\-)) + (let* ((system (string-split (current-target-gnu-triplet) #\-)) (arch (first system)) (boot-efi-link (match system ;; These are the supportend systems and the names diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 2fe30b13210e..4adcb5fc0d69 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -138,10 +138,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC "--without-headers"))) ;; Pass the right options for the target triplet. - (let ((triplet - (or (%current-target-system) - (nix-system->gnu-triplet (%current-system))))) - (gcc-configure-flags-for-triplet triplet)) + (gcc-configure-flags-for-triplet (current-target-gnu-triplet)) (maybe-target-tools)))))) (hidden-package diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 73f94a3929bd..c8bb4d158711 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -402,9 +402,7 @@ test = { path = \"../libtest\" } (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (target-system ,(or (%current-target-system) - (nix-system->gnu-triplet - (%current-system)))) + (target-system ,(current-target-gnu-triplet)) (out-libs (string-append out "/lib/rustlib/" target-system "/lib"))) ;(setenv "CFG_PREFIX" out) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 6cf8b90ffa95..375e2297b889 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2032,9 +2032,7 @@ streaming protocols.") '("--target=mips3-linux")) (_ (list (string-append "--target=" - (or (%current-target-system) - (nix-system->gnu-triplet - (%current-system))))))) + (current-target-gnu-triplet))))) "--disable-iwmmxt"))))))) (home-page "https://www.mplayerhq.hu") (synopsis "Audio and video player") diff --git a/guix/utils.scm b/guix/utils.scm index 4072dea89051..61da05137186 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -78,6 +78,7 @@ %current-system %current-target-system current-target-nix-system + current-target-gnu-triplet package-name->name+version target-mingw? target-arm32? @@ -527,6 +528,12 @@ cross-building or not." (or (and=> (%current-target-system) gnu-triplet->nix-system) (%current-system))) +(define (current-target-gnu-triplet) + "Return the GNU triplet identifier for the current target, whether we are +cross-building or not." + (or (%current-target-system) + (nix-system->gnu-triplet (%current-system)))) + (define* (package-name->name+version spec #:optional (delimiter #\@)) "Given SPEC, a package name like \"foo@0.9.1b\", return two values: \"foo\" From patchwork Wed Jul 21 01:00:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31541 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B860327BC78; Wed, 21 Jul 2021 02:02:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8D78827BC6B for ; Wed, 21 Jul 2021 02:02:28 +0100 (BST) Received: from localhost ([::1]:39918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60d1-0008JD-LT for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cf-0007St-Ek for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cf-0007jY-6u for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cf-00009l-5Q for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 8/9] gnu: ustr: =?utf-8?b?RG9u4oCZdA==?= pass default argument Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829311519 (code B ref 49672); Wed, 21 Jul 2021 01:02:05 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:51 +0000 Received: from localhost ([127.0.0.1]:35773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cQ-00008I-PJ for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:50 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:59520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cP-00007s-2f for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:49 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id A0B6B405B8 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829303; x=1628643704; bh=GOWuafueRWJ+4OPeoy+XimnxjOQxgX0NkcD Zw2am1Qk=; b=yG2GYdIrB4YWPfAbg/cYM2rO/LVTqaBnVMdcC3c2pVEf2JXr8Ae c5yPZsM7lMSJ4L4WlOz5yqB5HFpzcCNhQUWTypn78zt4r5ljiQFJC9bzRRMX/8CY R7u9Vey/wGZZxJkWooEaAhbeOqB7yWD8HFizMyP+39t2ggY8lkcOKV7g4TnPL/vo U/HCZ1gbGJ29ph5j6YvAG9JJ6hq7H2NSfDcvGdhUifC/orVKU4iswm8vVKuurNbS N6pvGNeMclejAwyNbDmDYlrmu9rw7WDLkNnhNUzp1j0Xs9DMIPnEbQSCDpeTxBVs y2W8630FbYmMw61GjoEtWmxnqXiI4yy5BKWJgOBjtefWNxSkSw1aNJrP0XRV/QRj 9zRtnZt7NUK9ZrmyTXrLNVWG2EY/iL9vRUXEy0pH4csgwSlsALSyBwdocXrbQw/l xHXUpEyCnYzA/QeV4JHKaGH+ya+Syf+WGSITh21u3pqPiL1TTpCa5lh4/RXfDFQT w2ViCAbdC62vOFnsX+dqPZ2HCylCWcZ43Ysj5AAyHuFzpuGE0p9oDxlh3fGh22K1 KMDNB7rUQo5XcwUMWnzuAnOI1iMZnK/Pn9WlawxrChDGq814xCd1Xz0eESsbCMrX cOm8Tud6PFJPWYgNGyaoWOg0Vu6zSla2+C9Fb8/nDP1kUcR4PFvI7BQE= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0jiIPOQbnFjs for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:43 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 1B5C6403CB for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:41 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id E76B532BA; Wed, 21 Jul 2021 03:01:40 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:42 -0300 Message-Id: <20210721010043.632012-8-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches The default argument to ‘target-64bit?’ already is `(or (%current-target-system) (%current-system))`, so there’s no need to duplicate code. * gnu/packages/textutils.scm (ustr)[arguments]<#:phases>: Don’t pass default argument to ‘target-64bit?’. --- gnu/packages/textutils.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index c3f4580a47c7..0f23a166e7c0 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -331,8 +331,7 @@ input bits thoroughly but are not suitable for cryptography.") (lambda _ (substitute* "Makefile" (("\\./autoconf_64b") - ,(if (target-64bit? (or (%current-target-system) - (%current-system))) + ,(if (target-64bit?) "echo 1" "echo 0")) (("\\./autoconf_vsnprintf") "echo 0")))) From patchwork Wed Jul 21 01:00:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31543 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3017227BC78; Wed, 21 Jul 2021 02:02:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4622227BC6B for ; Wed, 21 Jul 2021 02:02:35 +0100 (BST) Received: from localhost ([::1]:40404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60d8-0000C4-BV for patchwork@mira.cbaines.net; Tue, 20 Jul 2021 21:02:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60cf-0007Tu-Rd for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cf-0007k0-JD for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cf-00009u-I1 for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 9/9] gnu: Use existing target helpers from =?utf-8?b?4oCY?=(guix utils)=?utf-8?b?4oCZ?= Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829315536 (code B ref 49672); Wed, 21 Jul 2021 01:02:05 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:55 +0000 Received: from localhost ([127.0.0.1]:35777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cU-00008Z-Vm for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:55 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:46664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cR-00007x-QO for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:52 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 5C7BC998 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829305; x=1628643706; bh=eC5eZl9IdkPU1qDnGNrLPqkeO2Alpq8gTMk bdFlmIAw=; b=M8sbISj+gyoSYzMoIaDLPzTEy1DkV5r7sM5rIaCGlcRyi3cOA5q gZHAEGGfZo5KAlmfUYO9i61C21uNoVJq7OFEiLrXUNWSA4r2GJi+PiM7Y2I020BJ ooN30iXWkSOIfXofqm1hs2HLvj+1EL2/NDR+XcZX1NcoQFxBftwsKIe52qDgqbw3 tpL3BFg0I36oPBWQwISr7J5L55uJkla0NzOtiKhJIKkbYhqb3mnMi3kFRZOycptU oh6p69soBzDchaxSchltBc/tzkpz4JcvuQS5dHZl/6iG8R2EDgNHPQKZtUCSnZlO Far25KIepalej2snsehUofzLNaEYDAxVnthCgeNwTsIkJXMVyLrv0Duwfnt+lzKW KrkAfAHjQTbktbDfnI7zOIl1Y+OUuUrI6qBbKdssr2nnStbho9RDNjUhcgjgEmpa JrDuvR2/dNFgRoayF4ZjeR2K7oxPRFWXOsvbAh+MhbNp/UcPU4YNXwddkJ2wSs/2 OxnMf5sp/ZcTrcLyRDJpTw1YUFYiiWN4OYP4nnJCQTD1HExvSbjqcJqs2wSUIjWU Mu657CeNq6ql81gOVB3pj1k42yo12lt1Hyo2YUyukwdkJkVke1AGeBlct0QGW9KF frX5GjNYbK5z+8BOabST8N4m+QMtJsUFeRb6owc9qZkN7X+XEvJdlxHc= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DiDFKFs0uybc for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:45 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 1C9D5D3 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:44 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 973D3323; Wed, 21 Jul 2021 03:01:44 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:43 -0300 Message-Id: <20210721010043.632012-9-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches These are equivalent to existing code and shouldn't lead to any behaviour change. The objective of the change is to make the code easier to read. * gnu/packages/algebra.scm (fftwf)[arguments]<#:configure-flags>: Use ‘target-arm32?’. * gnu/packages/boost.scm (boost)[arguments]<#:make-flags>: Use ‘target-arm32?’ and ‘target-aarch64?’. * gnu/packages/bootloaders.scm (grub)[arguments]<#:tests>: Use ‘target-arm?’. (vboot-utils)[arguments]<#:make-flags>: Use ‘target-arm32?’. * gnu/packages/ci.scm (cuirass)[arguments]<#:tests>: Use ‘target-aarch64?’. * gnu/packages/firmware.scm (ovmf-aarch64)[native-inputs]: Use ‘target-aarch64?’. [arguments]<#:phases>: Likewise. * gnu/packages/gstreamer.scm (gst-plugins-base)[propagated-inputs]: Use ‘target-arm32?’. (gst-plugins-bad)[arguments]<#:phases>: Likewise. * gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Use ‘target-aarch64?’. [native-inputs]: Likewise. * gnu/packages/linux.scm (proot)[arguments]<#:tests>: Use ‘target-arm?’. * gnu/packages/multiprecision.scm (qd)[arguments]<#:configure-flags>: Use ‘target-aarch64?’. * gnu/packages/php.scm (php)[arguments]<#:phases>: Use ‘target-arm32?’. * gnu/packages/python.scm (python-3.8)[arguments]<#:phases>: Use ‘target-arm?’. [native-inputs]: Likewise. * gnu/packages/syncthing.scm (go-github-com-rcrowley-go-metrics)[arguments] <#:tests>: Use ‘target-aarch64?’. * gnu/packages/valgrind.scm (valgrind)[arguments]<#:make-flags>: Use ‘target-powerpc?’. * gnu/packages/web.scm (rapidjson)[arguments]<#:phases>: Use ‘target-aarch64?’. --- gnu/packages/algebra.scm | 3 +-- gnu/packages/boost.scm | 4 ++-- gnu/packages/bootloaders.scm | 9 ++------- gnu/packages/ci.scm | 6 ++---- gnu/packages/firmware.scm | 4 ++-- gnu/packages/gstreamer.scm | 6 ++---- gnu/packages/java.scm | 6 ++---- gnu/packages/linux.scm | 4 +--- gnu/packages/multiprecision.scm | 4 +--- gnu/packages/php.scm | 3 +-- gnu/packages/python.scm | 26 ++++++++++---------------- gnu/packages/syncthing.scm | 4 ++-- gnu/packages/valgrind.scm | 4 ++-- gnu/packages/web.scm | 3 +-- 14 files changed, 31 insertions(+), 55 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 533b1f09e023..f51bd69a4230 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -802,8 +802,7 @@ cosine/ sine transforms or DCT/DST).") (substitute-keyword-arguments (package-arguments fftw) ((#:configure-flags fftw-configure-flags) `(cons* "--enable-single" - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) + ,@(if (target-arm32?) ;; fftw supports NEON on 32-bit ARM only when compiled ;; for single-precision, so add it here. '("--enable-neon") diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index e05a3c32fe11..67d452e925e1 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -108,11 +108,11 @@ "binary-format=elf" "target-os=linux" ,@(cond - ((string-prefix? "arm" (%current-target-system)) + ((target-arm32?) '("abi=aapcs" "address-model=32" "architecture=arm")) - ((string-prefix? "aarch64" (%current-target-system)) + ((target-aarch64?) '("abi=aapcs" "address-model=64" "architecture=arm")) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 669574468bd2..6912cffa38be 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -173,10 +173,7 @@ "test_unset")) #t))) ;; Disable tests on ARM and AARCH64 platforms or when cross-compiling. - #:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system) - (%current-system))) - '("arm" "aarch64")) - (%current-target-system))))) + #:tests? ,(not (or (target-arm?) (%current-target-system))))) (inputs `(("gettext" ,gettext-minimal) @@ -988,9 +985,7 @@ to Novena upstream, does not load u-boot.img from the first partition.") ;; "armv7l", the value of `uname -m`, and will not ;; match ${ARCH}, which will make the tests require ;; QEMU for testing. - ,@(if (string-prefix? "arm" - (or (%current-target-system) - (%current-system))) + ,@(if (target-arm32?) '("HOST_ARCH=arm") '()) (string-append "DESTDIR=" (assoc-ref %outputs "out"))) diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm index 0bcde0fad515..bddc1e8386c2 100644 --- a/gnu/packages/ci.scm +++ b/gnu/packages/ci.scm @@ -27,7 +27,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix download) + #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages boost) @@ -97,9 +97,7 @@ #:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass ;; XXX: HTTP tests fail on aarch64 due to Fibers errors, disable them ;; on that architecture for now. - #:tests? ,(let ((s (or (%current-target-system) - (%current-system)))) - (not (string-prefix? "aarch64" s))) + #:tests? ,(not (target-aarch64?)) #:parallel-tests? #f #:phases (modify-phases %standard-phases diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ebcb89923cee..b569bc288949 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -398,7 +398,7 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") (name "ovmf-aarch64") (native-inputs `(,@(package-native-inputs ovmf) - ,@(if (not (string-prefix? "aarch64" (%current-system))) + ,@(if (not (target-aarch64? (%current-system))) `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu")) ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu"))) '()))) @@ -408,7 +408,7 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") `(modify-phases ,phases (add-before 'configure 'set-env (lambda _ - ,@(if (not (string-prefix? "aarch64" (%current-system))) + ,@(if (not (target-aarch64? (%current-system))) `((setenv "GCC49_AARCH64_PREFIX" "aarch64-linux-gnu-")) '()) #t)) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 3047773e0f07..488417c39773 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -539,8 +539,7 @@ This package provides the core library and elements.") ;; XXX: Do not enable Orc optimizations on ARM systems because ;; it leads to two test failures. ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683 - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) + ,@(if (target-arm32?) '() `(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc (inputs @@ -691,8 +690,7 @@ model to base your own plug-in on, here it is.") `(#:phases (modify-phases %standard-phases ,@%common-gstreamer-phases - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) + ,@(if (target-arm32?) ;; Disable test that fails on ARMv7. ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188 `((add-after 'unpack 'disable-asfmux-test diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 1c62f5d358e2..5b5d5afed945 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -315,8 +315,7 @@ language.") "--enable-runtime-reloc-checks" "--enable-ffi") #:phases - ,(if (string-prefix? "aarch64" (or (%current-target-system) - (%current-system))) + ,(if (target-aarch64?) ;; Makefiles and the configure script need to be regenerated to ;; incorporate support for AArch64. '(modify-phases %standard-phases @@ -330,8 +329,7 @@ language.") ("zip" ,zip) ("zlib" ,zlib))) (native-inputs - (if (string-prefix? "aarch64" (or (%current-target-system) - (%current-system))) + (if (target-aarch64?) ;; Additional packages needed for autoreconf. `(("autoconf" ,autoconf) ("automake" ,automake) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0d695950d101..c6b7c0a403ef 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -6890,9 +6890,7 @@ userspace queueing component and the logging subsystem.") ;; Disable the test suite on ARM platforms, as there are too many ;; failures to keep track of (see for example: ;; https://github.com/proot-me/proot/issues/263). - `(#:tests? ,(not (string-match "^(arm|aarch64)" - (or (%current-target-system) - (%current-system)))) + `(#:tests? ,(not (target-arm?)) #:make-flags '("-C" "src") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-sources diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 733e6548b992..53b1e3c55ca7 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -235,9 +235,7 @@ error. Additionally, iRRAM uses the concept of multi-valued functions.") (arguments `(#:configure-flags `("--disable-enable_fma" ;weird :/ "--enable-shared" - ,,@(if (string-prefix? "aarch64" - (or (%current-target-system) - (%current-system))) + ,,@(if (target-aarch64?) ;; XXX: The qd_test test fails numerical ;; accuracy checks for 'dd_real::exp()' on ;; aarch64 with GCC 5.4 at -O2. Disabling diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index 597494e8a94f..36a4527aad67 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -177,8 +177,7 @@ (substitute* "ext/standard/tests/streams/bug60602.phpt" (("'ls'") (string-append "'" (which "ls") "'"))) - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) + ,@(if (target-arm32?) ;; Drop tests known to fail on armhf. '((for-each delete-file (list diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e694321e173e..c1a486b9f21f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -488,16 +488,13 @@ data types.") #t))) ;; XXX: Apply patch on ARM platforms only to avoid a full rebuild. ;; Remove this phase in the next rebuild cycle. - ,@(let ((system (or (%current-target-system) - (%current-system)))) - (if (any (cute string-prefix? <> system) - '("arm" "aarch64")) - '((add-after 'unpack 'apply-alignment-patch - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke "patch" "-p1" "--force" "--input" - (assoc-ref (or native-inputs inputs) - "arm-alignment.patch"))))) - '())))))) + ,@(if (target-arm?) + '((add-after 'unpack 'apply-alignment-patch + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke "patch" "-p1" "--force" "--input" + (assoc-ref (or native-inputs inputs) + "arm-alignment.patch"))))) + '()))))) (native-inputs `(("tzdata" ,tzdata-for-tests) @@ -505,12 +502,9 @@ data types.") ;; it causes a test failure when building 32-bit Python on a ;; 64-bit kernel. See . ;; TODO: make this a regular patch in the next rebuild cycle. - ,@(let ((system (or (%current-target-system) - (%current-system)))) - (if (any (cute string-prefix? <> system) - '("arm" "aarch64")) - `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch"))) - '())) + ,@(if (target-arm?) + `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch"))) + '()) ,@(if (%current-target-system) `(("python3" ,this-package)) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index 5cb8449e448e..b23fcea24096 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -30,6 +30,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) + #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) @@ -568,8 +569,7 @@ higher-level API for doing so.") (arguments ;; Arbitrary precision tests are known to be broken on aarch64, ppc64le ;; and s390x. See: https://github.com/rcrowley/go-metrics/issues/249 - `(#:tests? ,(not (string-prefix? "aarch64" (or (%current-target-system) - (%current-system)))) + `(#:tests? ,(not (target-aarch64?)) #:import-path "github.com/rcrowley/go-metrics")) (propagated-inputs `(("go-github-com-stathat-go" ,go-github-com-stathat-go))) diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm index 4036bd461bc5..24b422c2c52c 100644 --- a/gnu/packages/valgrind.scm +++ b/gnu/packages/valgrind.scm @@ -26,6 +26,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix licenses) + #:use-module (guix utils) #:use-module (gnu packages gdb) #:use-module (gnu packages perl) #:use-module (gnu packages)) @@ -50,8 +51,7 @@ (outputs '("doc" ;16 MB "out")) (arguments - `(,@(if (string-prefix? "powerpc" (or (%current-target-system) - (%current-system))) + `(,@(if (target-powerpc?) `(#:make-flags '("CFLAGS+=-maltivec")) '()) #:phases diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index b00c9aa3db5b..a6812699d77b 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1322,8 +1322,7 @@ current version of any major web browser.") #t)))) (build-system cmake-build-system) (arguments - (if (string-prefix? "aarch64" (or (%current-target-system) - (%current-system))) + (if (target-aarch64?) '(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-aarch-march-detection