From patchwork Thu Dec 8 08:31:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 8149 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A5C1A27BBEB; Thu, 8 Dec 2022 10:14:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E75F227BBE9 for ; Thu, 8 Dec 2022 10:14:13 +0000 (GMT) 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 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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")