From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EL96HxfezGWFNQAAqHPOHw:P1 (envelope-from ) for ; Wed, 14 Feb 2024 16:36:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EL96HxfezGWFNQAAqHPOHw (envelope-from ) for ; Wed, 14 Feb 2024 16:36:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b="H+/JwC+y"; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707925015; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NJPHwNPMh3Y5lzBkhQmBk/NC8RtQvcO/EHqsq1Zn+I8=; b=Qed4MbLw7LRj3WOfBeXsqJ3x/4iZVNMoEq0/wnID/bInygNl5mOBO0PZa9YggqcyZz3mck P3DlTUHQqPVHg9BqpUMS/Ml7vkz3SH5bzGgnDhJpAjsCuqtykfyfrpoHGIFkGnO8ne9238 7aIguX1w3NsG9pdQXFJz8fjE8cMz+Ci5OxP0Bf6gyVEjhD0wTnr9nzXOF/597TYE6vO1YQ 5XL8swbra2n6KKiXS0RJcr8VKVT2jV1Yule8HS6HV4kto4hmR4qSK1jBO+wGfDoMkzBTBY 2djWq6uc/Rmj6QtY4FWyciuzWiseJb+1ZN+6ylXdMulBF1GU5+j7I8PxGNoxCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b="H+/JwC+y"; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707925015; a=rsa-sha256; cv=none; b=c9cpV+1b0anNwP6W2DkphcnVYEMDUHtYarWyJKF5hpF9YP/jAMBqe7NLbRAbvBIWxTi0xj Y11xsAoi4/myixgW3RWtj37WbwuECn3RrQOAoJeuuEXfW/ooxP9/9ZTxUti5xQORmez4bq Z2c5b5r9QW0bE4XdNj/47URQ7x4Z4j8xV1/hLm8Bsurfpd3zcf2gBCzbc0T3bP42hc8hS9 nNneAexur2KIm8dD3bU963cqoYFX0GuOyAFW3SQQnybw98hLQSsgIKSd0le/5rGKAVstGq Qq/TZx+Ga+Kos+mIZNuz3aK3ylaLJ7Pkqk0mZCGFwfeCviTR8ulbeTYIyKsaaQ== 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 5F6FB3B440 for ; Wed, 14 Feb 2024 16:36:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raHJY-0006lb-5C; Wed, 14 Feb 2024 10:36:48 -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 1raHJU-0006jX-Lb for guix-patches@gnu.org; Wed, 14 Feb 2024 10:36:45 -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 1raHJU-00057t-Dc for guix-patches@gnu.org; Wed, 14 Feb 2024 10:36:44 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raHJm-0003Mu-GD for guix-patches@gnu.org; Wed, 14 Feb 2024 10:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69126] [PATCH 2/2] gnu: Add type-safe. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Feb 2024 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69126 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69126@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 69126-submit@debbugs.gnu.org id=B69126.170792502112940 (code B ref 69126); Wed, 14 Feb 2024 15:37:02 +0000 Received: (at 69126) by debbugs.gnu.org; 14 Feb 2024 15:37:01 +0000 Received: from localhost ([127.0.0.1]:52822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raHJl-0003MY-68 for submit@debbugs.gnu.org; Wed, 14 Feb 2024 10:37:01 -0500 Received: from mail-4022.proton.ch ([185.70.40.22]:33573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raHJj-0003MK-ME for 69126@debbugs.gnu.org; Wed, 14 Feb 2024 10:37:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1707924995; x=1708184195; bh=NJPHwNPMh3Y5lzBkhQmBk/NC8RtQvcO/EHqsq1Zn+I8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=H+/JwC+yzYmcg32PvFqytnRyzhJW6dR5pop7QxTcJUROx4M81aWGXfTnyOC5mCBl5 Ta14zpldRQ9bPAYU5VPxi8E+VmsawSS/uAw8zUhe21Cvgj6IAI4/JcmwE3kshaVXzN bFQU+r32jDBWbZaVI4DLJ7R6fSU7fWd5q7WvOyMTiGF8E9kVGeq23UNOOIa2yugLUS eZcomW07MliSC4lxLbpNuh/JVTKSXLhjGxO+oVSkrWc5fdtMA2ubaZkgZq3jgxYbJC Mza9pT3uKEBLd40I030snfd+KhWIy/rSxIS9sYjgfhSQA27SQFX0GU0Ysuli3Ur/5A 6sxmN6T9j4KaA== Date: Wed, 14 Feb 2024 15:36:20 +0000 From: "Paul A. Patience" Message-ID: In-Reply-To: References: Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.03 X-Spam-Score: 0.03 X-Migadu-Queue-Id: 5F6FB3B440 X-Migadu-Scanner: mx13.migadu.com X-TUID: hCBkhJiYSHIY * gnu/packages/cpp.scm (type-safe): New variable. Change-Id: I96a690b41af78e331744daacba1cf5ee77f8257a --- gnu/packages/cpp.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 2456de5002..cf0771e470 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -3074,3 +3074,56 @@ (define-public debug-assert @code{DEBUG_ASSERT()} macro, which among other features can be selectively enabled in different parts of your code.") (license license:zlib)))) + +(define-public type-safe + (package + (name "type-safe") + (version "0.2.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/foonathan/type_safe") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ijd5grkbzfcmkqydka5ncl7ab4rc3307qr0ywwgzqsifr3ks0fd")) + (modules '((guix build utils))) + ;; Remove bundled debug_assert. + ;; Keep external/external.cmake because it enables + ;; TYPE_SAFE_HAS_IMPORTED_TARGETS, required for installing the CMak= e + ;; config files. + (snippet #~(delete-file-recursively "external/debug_assert")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags + #~(list "-DTYPE_SAFE_BUILD_TEST_EXAMPLE=3DON" + "-DTYPE_SAFE_BUILD_DOC=3DOFF") ; needs standardese + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-dependencies + (lambda _ + (substitute* "test/CMakeLists.txt" + (("^if\\(NOT EXISTS .*/catch\\.hpp\\)") "if(FALSE)") + (("^(target_include_directories\\(type_safe_test) .*" + all prefix) + (string-append all prefix " PRIVATE \"" + #$(this-package-native-input "catch2"= ) + "/include/catch2\")\n"))))) + (add-after 'install 'fix-cmake-config + (lambda _ + (substitute* (string-append + #$output + "/lib/cmake/type_safe/type_safe-config.cm= ake") + (("^(find_dependency\\(debug_assert)\\)" _ prefix) + (string-append prefix " PATHS \"" + #$(this-package-input "debug-assert") + "/lib/cmake/debug_assert\")")))))))) + (native-inputs (list catch2)) + (inputs (list debug-assert)) + (home-page "https://github.com/foonathan/type_safe") + (synopsis "C++ abstractions for preventing bugs via the type system") + (description "type_safe is a C++ header-only library which provides +abstractions for defining more appropriate types, thus allowing C++'s type +system to prevent more bugs.") + (license license:expat))) --=20 2.41.0