all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#69001] [PATCH] gnu: Add dbg-macro.
@ 2024-02-09 15:52 Paul A. Patience
  2024-02-09 16:30 ` [bug#69001] [PATCH v2] " Paul A. Patience
  0 siblings, 1 reply; 2+ messages in thread
From: Paul A. Patience @ 2024-02-09 15:52 UTC (permalink / raw)
  To: 69001; +Cc: Paul A. Patience

* gnu/packages/cpp.scm (dbg-macro): New variable.

Change-Id: If6c6cc5d3a309ee2f8987a1a3903069e29b6fdb0
---
 gnu/packages/cpp.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 62a1923571..575bef895e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -3048,3 +3048,37 @@ (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}-style debugging in C++")
+    (description "@code{dbg(…)} is a header-only implementation of a same-named
+macro which facilitates @code{printf}-style debugging in C++.")
+    (license license:expat)))

base-commit: 570ef13a87bb54d3410c431700ba78316a2641e2
-- 
2.41.0






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#69001] [PATCH v2] gnu: Add dbg-macro.
  2024-02-09 15:52 [bug#69001] [PATCH] gnu: Add dbg-macro Paul A. Patience
@ 2024-02-09 16:30 ` Paul A. Patience
  0 siblings, 0 replies; 2+ messages in thread
From: Paul A. Patience @ 2024-02-09 16:30 UTC (permalink / raw)
  To: 69001; +Cc: Paul A. Patience

* gnu/packages/cpp.scm (dbg-macro): New variable.

Change-Id: If6c6cc5d3a309ee2f8987a1a3903069e29b6fdb0
---
 gnu/packages/cpp.scm | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

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 <liliana.prikler@gmail.com>
 ;;; Copyright © 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
-;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2023-2024 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; 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)))

base-commit: 570ef13a87bb54d3410c431700ba78316a2641e2
-- 
2.41.0






^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-09 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 15:52 [bug#69001] [PATCH] gnu: Add dbg-macro Paul A. Patience
2024-02-09 16:30 ` [bug#69001] [PATCH v2] " Paul A. Patience

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.