From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SCyhMG91ZWNQPgEAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 21:26:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id osC0MG91ZWMbmgAA9RJhRA (envelope-from ) for ; Fri, 04 Nov 2022 21:26:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 57DC73F206 for ; Fri, 4 Nov 2022 21:26:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1or3GQ-0007Cl-2q; Fri, 04 Nov 2022 16:26:06 -0400 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 1or3GN-0007C8-5c for guix-patches@gnu.org; Fri, 04 Nov 2022 16:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1or3GM-0001Uf-Pe for guix-patches@gnu.org; Fri, 04 Nov 2022 16:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1or3GM-0003SK-Kr for guix-patches@gnu.org; Fri, 04 Nov 2022 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59024] [PATCH] gnu: Add safeint. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Nov 2022 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59024 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59024@debbugs.gnu.org Cc: Antero Mejr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166759353613250 (code B ref -1); Fri, 04 Nov 2022 20:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2022 20:25:36 +0000 Received: from localhost ([127.0.0.1]:54930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1or3Fv-0003Rd-Uv for submit@debbugs.gnu.org; Fri, 04 Nov 2022 16:25:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:39582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1or3Ft-0003RV-U6 for submit@debbugs.gnu.org; Fri, 04 Nov 2022 16:25:34 -0400 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 1or3Ft-0006zM-CE for guix-patches@gnu.org; Fri, 04 Nov 2022 16:25:33 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1or3Fp-0001Rf-4o for guix-patches@gnu.org; Fri, 04 Nov 2022 16:25:32 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4N3sZB6Zx0z9sWV for ; Fri, 4 Nov 2022 21:25:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1667593522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tAwWXwVjDhDtVygO5V7LwkiB0fwc+ro9wrWRosVGCAo=; b=JQLqRkEkKS6ksxCjTDl4YnZO7q3TZRXMTHnRh/8j4ThNtiwdGnmmPwcz5knLhegrNGV455 v3NhYahJJfOWgz9gm6G1hjngkR+ds3wwUk+DHv/SQu97sfYKvEGdTdsTR1seL0798Dmmc4 CU029KLsB9vrqiPksnWtW36FhUyp4uvVZAkfAWhTqPcrkHAvADzNZ8B8U/4c73ZACoFA+x oAYjVeDjS7vZobzkG0T5cWNkZ9XnDRLcWQH4VksosDDV/+Cf9MeiCA2F1MR7q0arLLedtv UYBIZvYG2zMI8ExE72XqP+SG2GVZq7ITzEMAu2Pa1pcg2HiP2m5b1mksOwgkXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1667593520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tAwWXwVjDhDtVygO5V7LwkiB0fwc+ro9wrWRosVGCAo=; b=e/DDdnmWx268qlwJ59BKlEiUOpAb8yrnWGEKGZ17ilIh+n4LXLDhr696yJHn7RJbBxferV GJr6PxCZrdwAr5yIQj8Gv2l3qtvgX7VrMroatPmpLn1fTab81su230tKke29cM4+2ap2JH DQhoHvIvomOLurSLxS26ptQt/gE5/HP7WhNmcWfaZtwivEMlQ+kYjQXDfC25hJdioHxGcO KHzT2UKz+3Kia06jYpvIbaFyig0s9Te+TDj6nHX9oi4t4R7uJVDwW5I8dNc32klszFMR+a zJx6NNz2rulvCKyyRPJ3APyR4yxshT6jUZ/fp4eOjImVtnk05iGJRDdUPYBZmA== Date: Fri, 4 Nov 2022 20:25:12 +0000 Message-Id: <20221104202512.6140-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 39dfabf1d5b7a569d43 X-MBO-RS-META: xigap1drjaua41iwyyjmd7zjyh7n9p6m X-Rspamd-Queue-Id: 4N3sZB6Zx0z9sWV Received-SPF: pass client-ip=80.241.56.171; envelope-from=antero@mailbox.org; helo=mout-p-201.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches From: Antero Mejr via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667593583; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tAwWXwVjDhDtVygO5V7LwkiB0fwc+ro9wrWRosVGCAo=; b=ObFzBlX0/x2NTlUpBfUFxd1TG+mSBwGJhvTyQiCAsHPQTHy/pXEWpnBT4TL7eBeu9GNW4g WZ0SSPP1fNRAemmC7FPVOqGi0hvnRp2MKKAc2lSs82ucfezefPdePMyXjXolUtX7YN7hsh O0pAGkBvd1Z470aQEhcYuGnd73MOdwWW2nCXOKVelm/HcuZpRx++UsrO8PAANw10mYzP+B 3f+EdddB5Kjvkk0bbxcLetTgM2P3PT/vmQPez1nyQXaO+cwuwbdxoQaiAZB/mLentMtQpX /C4nOWURamaLh392Nivot5qxh6Q9IxxsmwG7kmlqC3caSrKUrh8JZq3qhR+j4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667593583; a=rsa-sha256; cv=none; b=F30vDpUxI+5GRuy8hpWNFe59NzBvzOMS/zlC+AWfgj5EP2Fd3LSRuLi/9MIitetLhFYzWw FdGFmCM6BvyvZMU8GmjF/kjlESy/V9IrCq8sqKIE/sqAl90Su6197preC2COtT0LOupfdB CUYcJsA2wMSSZkT3doVVEpZKpdrTGPfx6+ngFBstzIpxpRxSk1IIu2qK5yR26q4pQDsWIz bdHWEBsIZ+WRaADs209zcc/EuwT20g4TvHLEa7i0snhXOHu3/YQ+jfmsJbyfoF2rPcUJZj 8UtVDZNJjn05xjFvwDKy3r80eGFsMtrykfCiOKlblu2LnwHJaa1ve77huTHbXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=JQLqRkEk; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="e/DDdnmW"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=JQLqRkEk; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="e/DDdnmW"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 57DC73F206 X-Spam-Score: -3.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: i6lnHV5LnEX/ * 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