From patchwork Fri Feb 9 16:30:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 59962 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 4197527BBEA; Fri, 9 Feb 2024 16:41:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 121E927BBE2 for ; Fri, 9 Feb 2024 16:41:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYTvm-0002j9-DV; Fri, 09 Feb 2024 11:40:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYTvj-0002iO-Hu for guix-patches@gnu.org; Fri, 09 Feb 2024 11:40:48 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYTvj-0006ZA-9m for guix-patches@gnu.org; Fri, 09 Feb 2024 11:40:47 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYTvy-0002cq-64 for guix-patches@gnu.org; Fri, 09 Feb 2024 11:41:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69001] [PATCH v2] gnu: Add dbg-macro. References: <2df0e5cd9e2c955fadad22157d45dedfa88f719e.1707493900.git.paul@apatience.com> In-Reply-To: <2df0e5cd9e2c955fadad22157d45dedfa88f719e.1707493900.git.paul@apatience.com> Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Feb 2024 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69001@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 69001-submit@debbugs.gnu.org id=B69001.17074968149947 (code B ref 69001); Fri, 09 Feb 2024 16:41:02 +0000 Received: (at 69001) by debbugs.gnu.org; 9 Feb 2024 16:40:14 +0000 Received: from localhost ([127.0.0.1]:50076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYTvA-0002aG-Dn for submit@debbugs.gnu.org; Fri, 09 Feb 2024 11:40:14 -0500 Received: from mail-4018.proton.ch ([185.70.40.18]:54479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYTme-0002Av-8t for 69001@debbugs.gnu.org; Fri, 09 Feb 2024 11:31:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1707496262; x=1707755462; bh=c44o6Q/Cohe81+57bru6QHdf0H/mKvZlUOuw8dQITjc=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Vpy4xI+UP53CLZKhDj3OPA4vpLZF/UdQ/C9WQ78NFVWAxq3+VssGEO5o2zGNQzL5T 0wS233Jt6NIZSV4+1M6GiOolzRi3unntxHFq6NwP4ozUP5fo+m1RDLIHtahFgtHc7J Bm0MM5RyfXSzbUSBlQNBrRL2i4WG17p6Q17gw25JTLP+vnkFCH3SdjEpcYo1nqCBSQ KrkitbHhW37kgrr8Ity8t95id/LzNSnCFFoHZloBB1tqiVNaxe0/nvRLhmr3GKDvwQ eMRoE/5s05N8f6I8ZJPGAUeqDLxOo3dh0vIgW+fVgd63MkYv40vXFkQAQOn35uXW0q bk2zuftc1Wo7w== Date: Fri, 09 Feb 2024 16:30:48 +0000 From: "Paul A. Patience" Message-ID: <70fcc9ebebcce847dddda3d6bd8c7bc1e7b9c8c6.1707496199.git.paul@apatience.com> Feedback-ID: 19227857:user:proton 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (dbg-macro): New variable. Change-Id: If6c6cc5d3a309ee2f8987a1a3903069e29b6fdb0 --- gnu/packages/cpp.scm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) base-commit: 570ef13a87bb54d3410c431700ba78316a2641e2 diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 62a1923571..daefa753a9 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -38,7 +38,7 @@ ;;; Copyright © 2023 Liliana Marie Prikler ;;; Copyright © 2023 Denis 'GNUtoo' Carikli ;;; Copyright © 2023 Foundation Devices, Inc. -;;; Copyright © 2023 Paul A. Patience +;;; Copyright © 2023-2024 Paul A. Patience ;;; ;;; This file is part of GNU Guix. ;;; @@ -3048,3 +3048,38 @@ (define-public tl-optional the std::optional for C++11/14/17, with support for monadic operations added in C++23.") (license license:cc0))) + +(define-public dbg-macro + (package + (name "dbg-macro") + (version "0.5.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sharkdp/dbg-macro") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03nkvvy32rf00wwbx1hcv4k4kskvwp6sghqj4hdxr00wr7bgg4y2")) + (modules '((guix build utils))) + ;; Remove bundled Catch2. + (snippet #~(delete-file-recursively "tests/Catch2")))) + (build-system cmake-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cmake-test + (lambda _ + (substitute* "CMakeLists.txt" + (("add_subdirectory\\(tests/Catch2\\)") + "find_package(Catch2 REQUIRED)") + (("^ *list\\(APPEND CMAKE_MODULE_PATH .*\\btests/Catch2\\b.*") + ""))))))) + (native-inputs (list catch2)) + (home-page "https://github.com/sharkdp/dbg-macro") + (synopsis "@code{dbg(…)} macro for @code{printf} debugging in C++") + (description "@code{dbg(…)} is a header-only implementation of a same-named +macro which facilitates @code{printf} debugging in C++. It is inspired by +Rust's @code{dbg!(…)} macro.") + (license license:expat)))