From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oF1RGva4kWP8QAEAbAwnHQ (envelope-from ) for ; Thu, 08 Dec 2022 11:14:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8HNZGva4kWPtUQAAauVa8A (envelope-from ) for ; Thu, 08 Dec 2022 11:14:14 +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 15CAB2E150 for ; Thu, 8 Dec 2022 11:14:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Duo-0004wO-6j; Thu, 08 Dec 2022 05:14:06 -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 1p3Dul-0004vS-Ub for guix-patches@gnu.org; Thu, 08 Dec 2022 05:14:04 -0500 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 1p3Dul-0000o6-Ax for guix-patches@gnu.org; Thu, 08 Dec 2022 05:14:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Dul-0008FY-6E for guix-patches@gnu.org; Thu, 08 Dec 2022 05:14:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59896] [PATCH 1/5] gnu: Add catch2-3.1. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Dec 2022 10:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59896 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59896@debbugs.gnu.org Received: via spool by 59896-submit@debbugs.gnu.org id=B59896.167049442231668 (code B ref 59896); Thu, 08 Dec 2022 10:14:03 +0000 Received: (at 59896) by debbugs.gnu.org; 8 Dec 2022 10:13:42 +0000 Received: from localhost ([127.0.0.1]:55803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3DuP-0008Ec-So for submit@debbugs.gnu.org; Thu, 08 Dec 2022 05:13:42 -0500 Received: from mail-ej1-f67.google.com ([209.85.218.67]:41857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3DuK-0008Dw-KU for 59896@debbugs.gnu.org; Thu, 08 Dec 2022 05:13:39 -0500 Received: by mail-ej1-f67.google.com with SMTP id vp12so2694497ejc.8 for <59896@debbugs.gnu.org>; Thu, 08 Dec 2022 02:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:content-transfer-encoding:to:subject:date :from:from:to:cc:subject:date:message-id:reply-to; bh=PTcaoQhcqWKEfr4d34Wo/Mb3WFy3jjUnSdKvmFlD6Xo=; b=oWB3LiYu1nqD1Euw8CHUOFqicJ2m72l/sN6dbFTxm8XK/EDFXQA4U9xjOKwzcl8W9+ jj7CNhcqkQZys0uxMDo+E2683ELHKW6KHYb69swi3ODI9Q9qNeu1FWc0dFIXWMCcHo23 tHdxIHfSNirINHppbirp2kMtkXWnzUww9dVs46lr8Q/WzNo6fgq4I0qN/rIqHeV4WTaL BqTSIgdQlFdDZtzhwfARBp9PZX00F+UByJ4NqvSYmsKilIy5e4ikFix22w4881pJic9E xRMuargYIIlx6fvHE+TBiCGZq6BT1ELpTfg3mljc+cJITfZ8TN5c+CQO+5r69huPeILy sXzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:content-transfer-encoding:to:subject:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PTcaoQhcqWKEfr4d34Wo/Mb3WFy3jjUnSdKvmFlD6Xo=; b=Fm0JQzhQRD4uyfzGU70wTHUDbmIlQW8HGVb7XCOiU9//NvsxYgUJXm/SXDRbub8qZi 0+DnB9lxFoyc2x/O1j58Qc5LYfrVz11/yyr2ejuXcdIGR35i0ACRhOlyRX517argSYJr KzBuRHQ2S3go/aZXbBIosRzSvY6c6m8kt40djuF7IAGfzG+YoCppA7TkqshMKqp7B0TD 28B6Cc2sNcICmZiq/Poy6QsyvnKa4q+vhLwwrtffrBeoubV0BnUEz66LhEH7TBvqc+Tr W0YiUPCT6ewpUHfGSHY5cO/WJ3YwepUQusYj/+a9h0zsR1tShlU8iq7Ng3mYX5HXgVag 2pFg== X-Gm-Message-State: ANoB5pn+a2wHdmdpAYzPbMIHAmFABaEctg0gGTk+WnnX9xTrjeAWj5fj 0LFAFPupcqP6sffW7AhalhKDNoBE9qM= X-Google-Smtp-Source: AA0mqf4bVjogDWxyJk9lnTDKsOQVeMtjgk5d5mSOJn7fKWoWaMOPWpNC9cqTUf/BPYf+hQHQzqeU6g== X-Received: by 2002:a17:906:d963:b0:7c1:98f:be57 with SMTP id rp3-20020a170906d96300b007c1098fbe57mr8557176ejb.97.1670494410708; Thu, 08 Dec 2022 02:13:30 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id q3-20020aa7da83000000b0046c91fa5a4asm3207309eds.70.2022.12.08.02.13.29 for <59896@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 02:13:30 -0800 (PST) From: Liliana Marie Prikler Date: Thu, 8 Dec 2022 09:31:42 +0100 Content-Transfer-Encoding: 7bit Message-ID: 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+larch=yhetil.org@gnu.org Sender: 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=1670494454; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=PTcaoQhcqWKEfr4d34Wo/Mb3WFy3jjUnSdKvmFlD6Xo=; b=gRLPpuiP/mFCwe35Bp+JQ0Ce8JTPNCLtzdjdocHHWKyztfgoU6g1z0vBsxK2yYENJNHI4Z 7df9UhzZGZUMnNTNh9I9X2yZ38nG7uByYunR42wPYEhjkC+fQok+/HEDZVpioNXQ2zsKUX 8mV8hZrYarGuo9f2GrkoaSUYTe0oWaToHMecnBlmoTXVOypCqhMkwC8qn2hT9gPEt+oP+W yyF0qqk9PrVAE6B6Dz/eft596dvd5dz9apq8PId0mWM7MIaN2hJCXbKyJJWZeaZkukR70B k7pl2FjyaNN4jBudrghKWEZAv9SYQpRa+G+AaR2uSRBmu0F5UbcnhSs5pdY+AQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670494454; a=rsa-sha256; cv=none; b=YT9Au3CdgOPUMhixJu60ufit1rauupvTkj1/ry+0/6xOrRm46hrAzMj7H/hCXRbGj/dYov e8Wajapk8A7PInsQlb7ttaUIVcp5UW0H5AMX+7Wog0SQdGf7ERS4/zkX8QRgljpf2bG483 JtKCFEMoBRT7e4pPCvwda1cEWbHNz5PkKap3IRENv9MaOi55ig47rUcZpidywiLdupD7xL mybii7NFwMfIrKDXC1uju3BkjWhk5/o7Ua0tV3pY1dS0OCdxThb25IdrUT0VKafga0AZMo wfQXWmQ11fBEjDfsWU+LPLlM9HKjUlRvhSe3RADp7vr04oe0ROTf3JXXyenYKg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oWB3LiYu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 5.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oWB3LiYu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 15CAB2E150 X-Spam-Score: 5.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: bDNNpv6EuU8F * gnu/packages/check.scm (catch2-3.1): New variable. --- gnu/packages/check.scm | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index c900a055d5..af48ae91be 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -580,6 +580,85 @@ (define-public cbehave pattern.") (license license:apsl2)))) +(define-public catch2-3.1 + (package + (name "catch2") + (version "3.1.1") + (home-page "https://github.com/catchorg/Catch2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/catchorg/Catch2") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qnr5b3zq8brh43f924rgnw5gmmjf9ax7kbq2crz1mlwgmdymxlp")))) + (outputs (list "out" "static")) + (build-system meson-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-meson + (lambda _ + (substitute* "src/catch2/meson.build" + (("static_library") "both_libraries")))) + (add-after 'install 'install-cmake-config + (lambda* (#:key outputs #:allow-other-keys) + (define prefix (string-append (assoc-ref outputs "out") + "/lib/cmake/Catch2/")) + (mkdir-p prefix) + (call-with-output-file (string-append + prefix + "catch2-config-version.cmake") + (lambda (port) + (format + port + "set(PACKAGE_VERSION ~s)~@ + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)~@ + set(PACKAGE_VERSION_EXACT TRUE)~@ + set(PACKAGE_VERSION_COMPATIBLE TRUE)~@ + elseif(PACKAGE_FIND_VERSION VERSION_LESS_EQUAL ~ + PACKAGE_VERSION)~@ + set(PACKAGE_VERSION_COMPATIBLE TRUE)~@ + else()~@ + set(PACKAGE_VERSION_COMPATIBLE FALSE)~@ + endif()" + #$version))) + (call-with-output-file (string-append prefix + "catch2-config.cmake") + (lambda (port) + (format + port + "include(FindPkgConfig)~@ + pkg_check_modules(CATCH2 IMPORTED_TARGET GLOBAL catch2)~@ + pkg_check_modules(CATCH2MAIN ~ + IMPORTED_TARGET GLOBAL ~ + catch2 catch2-with-main)~@ + if(CATCH2_FOUND)~@ + add_library(Catch2::Catch2 ALIAS PkgConfig::CATCH2)~@ + endif()~@ + if(CATCH2MAIN_FOUND)~@ + add_library(Catch2::Catch2WithMain ~ + ALIAS PkgConfig::CATCH2MAIN)~@ + endif()"))))) + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (for-each + (lambda (file) + (install-file file (string-append static "/lib")) + (delete-file file)) + (find-files (string-append out "/lib") + "\\.a$")))))))) + (inputs (list python-wrapper)) + (synopsis "Automated test framework for C++ and Objective-C") + (description "Catch2 stands for C++ Automated Test Cases in Headers and is +a multi-paradigm automated test framework for C++ and Objective-C.") + (license license:boost1.0))) + (define-public cmdtest (package (name "cmdtest") -- 2.38.1