From patchwork Thu Oct 13 21:04:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43391 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 A6E1C27BBEA; Thu, 13 Oct 2022 22:08:21 +0100 (BST) 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_INVALID, DKIM_SIGNED,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 8BEC127BBE9 for ; Thu, 13 Oct 2022 22:08:20 +0100 (BST) Received: from localhost ([::1]:48380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj5RD-0005xg-C1 for patchwork@mira.cbaines.net; Thu, 13 Oct 2022 17:08:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oj5P3-00032P-Dj for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oj5P2-0007Ug-MA for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oj5P2-0005n5-FU for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v3 04/15] gnu: Add cbehave. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 21:06:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166569511822105 (code B ref 58261); Thu, 13 Oct 2022 21:06:04 +0000 Received: (at 58261) by debbugs.gnu.org; 13 Oct 2022 21:05:18 +0000 Received: from localhost ([127.0.0.1]:35149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5OG-0005kJ-4Q for submit@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5Nu-0005hA-Bk for 58261@debbugs.gnu.org; Thu, 13 Oct 2022 17:04:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D6135240027 for <58261@debbugs.gnu.org>; Thu, 13 Oct 2022 23:04:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665695088; bh=/v+U3h5ILVWz56VBDwUv8OGMC9qq3QZiF67+ghyqIdc=; h=From:To:Cc:Subject:Date:From; b=j71PqMPE509BYf/fFdSZ+5fQuxrWySQIEoYKYUs9sPSlRKf2rbxFezk3GlWJfn7Fi jrc4GWo3BuLD4N4h1ukAUBHe/pcvys/Vyd7kPEZTyNGstnCk0ot94qRXKDXqEF+cYR X0i1IMFl9o6Wx+EdyRZ3gukZnGISMGsGfigoCaH0m0DlMgfwlAEIO4WI4UT6mM2ldT lPGOXdDvS+uY/0XPScepNVtZCJOOysjvEtJCdp6zWK/8Ws+kwO/83L5XGaxi/TgxFf rnrGrTPOv+oil8LNi64zKw3T/VDF6brlEJmMz3QDa36pES+j14VJdWWEttNWvyy3lV S1uLrT2gI0sHw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpMTr3DXlz6trC; Thu, 13 Oct 2022 23:04:48 +0200 (CEST) From: David Elsing Date: Thu, 13 Oct 2022 21:04:13 +0000 Message-Id: <20221013210424.993-5-david.elsing@posteo.net> In-Reply-To: <20221007152148.32591-1-david.elsing@posteo.net> References: <20221007152148.32591-1-david.elsing@posteo.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/check.scm (cbehave): New variable. --- gnu/packages/check.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 797fe71277..70dfbbac27 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -38,6 +38,7 @@ ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2021 Hugo Lecomte ;;; Copyright © 2022 Maxime Devos +;;; Copyright © 2022 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -3190,3 +3191,58 @@ (define-public python-pytest-regressions tables by saving expected data in a data directory (courtesy of pytest-datadir) that can be used to verify that future runs produce the same data.") (license license:expat))) + +(define-public cbehave + (let ((commit "5deaea0eaaf52f1c5ccdac0c68c003988f348fb4") + (revision "1")) + (package + (name "cbehave") + (version (git-version "0.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bigwhite/cbehave") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kicawxmxn059n3rmfc7r2q5wfjrqbr6lm8dmsi86ba76ak0f9gi")) + (snippet + #~(begin + (for-each + (lambda (file) + (delete-file file)) + '("Makefile.in" "aclocal.m4" "config.guess" "config.sub" + "configure" "depcomp" "install-sh" "libtool" + "ltmain.sh" "missing" "src/Makefile.in" + "src/example/Makefile.in")))))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags #~(list "--enable-shared" "--disable-static") + #:phases + #~(modify-phases %standard-phases + (add-before 'bootstrap 'rename-configure.in + (lambda _ + (rename-file "configure.in" "configure.ac"))) + (add-after 'rename-configure.in 'set-AM_PROG_AR + (lambda _ + (substitute* "configure.ac" + (("^AC_PROG_LIBTOOL.*" orig) + (string-append "AM_PROG_AR\n" orig))))) + (add-after 'set-AM_PROG_AR 'enable-tests + (lambda _ + (let ((port (open-file "src/example/Makefile.am" "a"))) + (display (string-append "\nTESTS = calculator_test" + " text_editor_test string_test" + " product_database_test mock_test\n") + port) + (close-port port)))) + (add-before 'check 'create-dummy-file + (lambda _ + (invoke "touch" "src/example/foo.txt")))))) + (native-inputs (list autoconf automake libtool)) + (home-page "https://github.com/bigwhite/cbehave") + (synopsis "Behavior-driven development framework for C") + (description "CBehave is a C framework for behavior-driven development.") + (license license:apsl2))))