unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#59024] [PATCH] gnu: Add safeint.
@ 2022-11-04 20:25 Antero Mejr via Guix-patches via
  2022-11-15 10:50 ` bug#59024: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Antero Mejr via Guix-patches via @ 2022-11-04 20:25 UTC (permalink / raw)
  To: 59024; +Cc: Antero Mejr

* gnu/packages/cpp.scm (safeint): New variable.
---
 gnu/packages/cpp.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 470f404066..4d58e01fa8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2166,3 +2166,42 @@ (define-public optionparser
 command line options.  It supports the short and long option formats of
 getopt(), getopt_long() and getopt_long_only().")
     (license license:expat)))
+
+(define-public safeint
+  (package
+    (name "safeint")
+    (version "3.0.27")
+    (home-page "https://github.com/dcleblanc/SafeInt")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01d2dpdhyw3lghmamknb6g39w2gg0sv53pgxlrs2la8h694z6x7s"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (replace 'install
+                          (lambda _
+                            (let ((include-dir (string-append #$output
+                                                              "/include")))
+                              (with-directory-excursion "../source"
+                                (install-file "SafeInt.hpp" include-dir)
+                                (install-file "safe_math.h" include-dir)
+                                (install-file "safe_math_impl.h" include-dir)))))
+                        (add-after 'install 'install-doc
+                          (lambda _
+                            (let ((doc-dir (string-append #$output
+                                                          "/share/doc/safeint")))
+                              (with-directory-excursion "../source"
+                                (install-file "helpfile.md" doc-dir))))))))
+    (synopsis "C and C++ library for managing integer overflows")
+    (description
+     "SafeInt is a class library for C++ that manages integer overflows.  It
+also includes a C library that checks casting, multiplication, division,
+addition and subtraction for all combinations of signed and unsigned 32-bit and
+64-bit integers.")
+    (license license:expat)))
-- 
2.38.0





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

* bug#59024: [PATCH] gnu: Add safeint.
  2022-11-04 20:25 [bug#59024] [PATCH] gnu: Add safeint Antero Mejr via Guix-patches via
@ 2022-11-15 10:50 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2022-11-15 10:50 UTC (permalink / raw)
  To: Antero Mejr; +Cc: 59024-done

Hi,

Antero Mejr <antero@mailbox.org> skribis:

> * gnu/packages/cpp.scm (safeint): New variable.

Applied, thanks!

Ludo’.




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

end of thread, other threads:[~2022-11-15 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 20:25 [bug#59024] [PATCH] gnu: Add safeint Antero Mejr via Guix-patches via
2022-11-15 10:50 ` bug#59024: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).