From patchwork Wed Mar 30 09:23:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 38218 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 DA85327BBEB; Wed, 30 Mar 2022 10:34:47 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3A55B27BBEA for ; Wed, 30 Mar 2022 10:34:47 +0100 (BST) Received: from localhost ([::1]:36812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZUj0-0005GZ-5t for patchwork@mira.cbaines.net; Wed, 30 Mar 2022 05:34:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZUYc-0007qD-Q8 for guix-patches@gnu.org; Wed, 30 Mar 2022 05:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZUYc-0000Sz-HF for guix-patches@gnu.org; Wed, 30 Mar 2022 05:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZUYc-00013u-DW for guix-patches@gnu.org; Wed, 30 Mar 2022 05:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54635] [PATCH 4/5] gnu: atomic-queue: Do not depend on boost when cross-compiling. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Mar 2022 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54635 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54635@debbugs.gnu.org Cc: Arun Isaac , Efraim Flashner Received: via spool by 54635-submit@debbugs.gnu.org id=B54635.16486322074005 (code B ref 54635); Wed, 30 Mar 2022 09:24:02 +0000 Received: (at 54635) by debbugs.gnu.org; 30 Mar 2022 09:23:27 +0000 Received: from localhost ([127.0.0.1]:34501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZUY2-00012W-JZ for submit@debbugs.gnu.org; Wed, 30 Mar 2022 05:23:26 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:51804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZUXy-000120-4d for 54635@debbugs.gnu.org; Wed, 30 Mar 2022 05:23:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QAb4L9OYpYrSl1DkACShXuhE+fa1vIvTrjUidSNk7go=; b=VmIVvCNbQrAE1NyuMvf2/DogE3 TQELBt/MKnOva4m+0o/hlYsU2d/cUF/W66a8W3O9VSWqiPitfDYe/o1bSP3dIxloH7T8s9Mnde/lK 64OCKkacDNkqIVmjb3zQOwU+7HuDUFBCNPf3/sVh0sByn2A3CBentPSNcuEx688B1ByJoVvj43fjC zkqBiUUzVsyaQ0rtIs9nMyrZO9oNMjnnYKHzWt0Wj8BWSQ1bRsQmZsAzVhPeIpR1LWbu6fKIYhGa0 DSoubdIaQ+e6/k/6TZRr81xUpFcffyL/+pJpdGAFPOGTh/DvgjraOLddbHCBb9nVWhGB7qHBbUDm+ bpYSRZGQ==; Received: from [192.168.2.1] (port=6582 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nZUXr-000T5d-4h; Wed, 30 Mar 2022 14:53:15 +0530 From: Arun Isaac Date: Wed, 30 Mar 2022 14:53:12 +0530 Message-Id: <20220330092313.23584-4-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220330092313.23584-1-arunisaac@systemreboot.net> References: <20220330092313.23584-1-arunisaac@systemreboot.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (atomic-queue)[arguments]: When cross-compiling, add do-not-check-for-boost phase and delete the build phase. [native-inputs]: Do not include boost when cross-compiling. --- gnu/packages/cpp.scm | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index eb48902034..649a57b0d5 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1294,6 +1294,21 @@ (define-public atomic-queue `(#:configure-flags '("-Dbenchmarks=false") #:phases (modify-phases %standard-phases + ,@(if (%current-target-system) + `(;; boost is a test dependency. We don't run tests when + ;; cross-compiling. So, do not check for it. + (add-after 'unpack 'do-not-check-for-boost + (lambda _ + (substitute* "meson.build" + (("unit_test_framework =" all) + (string-append "# " all)) + ((", unit_test_framework") "")))) + ;; atomic-queue is a header-only library. Excepting the + ;; tests, no building is required. And since we don't run + ;; tests when cross-compiling, delete the build phase + ;; entirely. + (delete 'build)) + '()) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -1303,9 +1318,11 @@ (define-public atomic-queue (copy-recursively "../source/include/atomic_queue" (string-append (assoc-ref outputs "out") "/include/atomic_queue"))))))) - (native-inputs - (list boost - pkg-config)) + (native-inputs + (cons pkg-config + (if (%current-target-system) + '() + (list boost)))) (home-page "https://github.com/max0x7ba/atomic_queue") (synopsis "C++ lockless queue") (description