From patchwork Mon Oct 3 00:19:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 6188 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 42D9B27BBF0; Mon, 3 Oct 2022 01:51:09 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 0D33C27BBEB for ; Mon, 3 Oct 2022 01:51:08 +0100 (BST) Received: from localhost ([::1]:54424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fn-0001EI-6J for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0007sE-0D for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0001xw-Ma for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ch-00074E-Hl for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 04/11] gnu: Add tinydir. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:03 +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.166475641626999 (code B ref 58261); Mon, 03 Oct 2022 00:21:03 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:16 +0000 Received: from localhost ([127.0.0.1]:48367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bv-00071C-Hi for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Br-000702-H3 for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0C42424010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756406; bh=Q86jFcqeapRFBzeXFYH5IPYv7vqb5jUT9TolKpIlIJE=; h=From:To:Cc:Subject:Date:From; b=GNgzix1OcgiQ9Gmrip0iKo34kd/rSTomayinQkB1L/Eh5oVrIYiQejBI3roLtv3PY TRV9L9YTR9Ck445X19lS44F6lm6We6QWUe9xWuOiImeY0HK/7OAf05ArSkiLEgdHN2 SCV0v04Ii2sVLwWyeshAU1pNhChxaRtd2BK7Pdn4S350kdmWXJuGZZNzIptC2yIWr+ X+DjFrtwshxCQCCKP9VRfIZ274eP0hZ7Dka18O5o1ik+/f88CPZG1mFm9+DdmP1u9Y PWv/l6CitkeXJ6GFNE4FXMg0l+/5DDaJZIj6N7qjOQRTHD33kZb7NsoJ4jWglLZ28P AHGc38wr9KM0A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLF4l1Mz9rxD; Mon, 3 Oct 2022 02:20:05 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:49 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (tinydir): New variable. --- gnu/packages/cpp.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 7bfa3d6cdf..4819f36052 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2020,3 +2020,41 @@ (define-public sajson (description "sajson is a high-performance, in-place JSON parser header-only library.") (license license:expat)))) + +(define-public tinydir + (package + (name "tinydir") + (version "1.2.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cxong/tinydir") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1nprgdfx4i8wzc1idw6chan4fjfa75b5ll8kghdc0q2278pny259")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "tests/cbehave")))) + (build-system cmake-build-system) + (arguments + (list + ;; Tests require cbehave and rlutil + #:tests? #f + #:phases + ;; Build samples instead of tests + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "samples") #t)) + (add-after 'build 'chdir-back + (lambda _ (chdir "..") #t)) + (replace 'install + (lambda _ + (install-file "tinydir.h" (string-append #$output "/include")) + #t))))) + (home-page "https://github.com/cxong/tinydir") + (synopsis "Lightweight, portable and easy to integrate C directory and +file reader") + (description "tinydir is a header-only C library to portably read files +and directories.") + (license license:bsd-2)))