From patchwork Fri Oct 7 15:21:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43202 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 4627427BBEA; Fri, 7 Oct 2022 17:36:38 +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 E498427BBE9 for ; Fri, 7 Oct 2022 17:36:37 +0100 (BST) Received: from localhost ([::1]:54102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogqKy-0001fJ-Ts for patchwork@mira.cbaines.net; Fri, 07 Oct 2022 12:36:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpBm-0002Pw-Eo for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpBm-0005pI-4p for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogpBm-0005ns-0W for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v2 01/13] gnu: Add fast-float. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 15:23:01 +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.166515612822099 (code B ref 58261); Fri, 07 Oct 2022 15:23:01 +0000 Received: (at 58261) by debbugs.gnu.org; 7 Oct 2022 15:22:08 +0000 Received: from localhost ([127.0.0.1]:37153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpAt-0005kH-EE for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:08 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpAp-0005j1-AT for 58261@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C12BA240104 for <58261@debbugs.gnu.org>; Fri, 7 Oct 2022 17:21:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156117; bh=1M7M0xQUFQToKJlxyyH48OGhvjG9GqpCTD3qYoiJaEU=; h=From:To:Cc:Subject:Date:From; b=KAfSRoa3vTGOycsZ1Wg/faLz+vlpAISBmjLQcrmSD3JGAOsRcIDn2vg7X+LxwU0Jb TzxNQAXU31fvjnQegH/XbTDMTw+HT6yRy90HVwYLpj6cvvetgy/33ubGkiOA7LwvX+ JOTk3xGvwjAnNFySvnKsG77QTkZUejlbWkV+P3ZuZqeBRdCPORGuQa5TkK8oWKBlsG ylLxo0McdLGNkrEPwVNQEDZOEuQMwUu5P2koN6d+6djAOtVerqV3wgqGgdoG80XrDs oM+JlATVUlwtjdIegflOei7xP8WSwHxVD/2sXiA065wGalNoWWWI4UBBCjRzJaT5Fu BPxVZakYiEZ3A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkX912Xv8z6tnN; Fri, 7 Oct 2022 17:21:57 +0200 (CEST) From: David Elsing Date: Fri, 7 Oct 2022 15:21:38 +0000 Message-Id: <20221007152148.32591-2-david.elsing@posteo.net> In-Reply-To: References: 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/cpp.scm (fast-float): New variable. --- gnu/packages/cpp.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index d03e0bc7e1..a7404df563 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2022 muradm ;;; Copyright © 2022 Attila Lendvai ;;; Copyright © 2022 Arun Isaac +;;; Copyright © 2022 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -1907,3 +1908,56 @@ (define-public cpp-mustache templated string type for compatibility with any STL-like string (std::string, std::wstring, etc).") (license license:boost1.0))) + +(define-public fast-float + (package + (name "fast-float") + (version "3.5.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastfloat/fast_float") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list + "-DFASTFLOAT_TEST=ON" + "-DSYSTEM_DOCTEST=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cmake-tests + (lambda _ + (substitute* "tests/CMakeLists.txt" + (("FetchContent_GetProperties\\(supplemental_test_files.*") + "") + (("if\\(NOT supplemental_test_files_POPULATED.*") + (string-append + "set(supplemental_test_files_BINARY_DIR " + #$(this-package-native-input "test-data") "/data" + ")\nif(0)\n")))))))) + (native-inputs + `(("test-data" + ,(let ((commit "97a0b2e638feb479387554cf253e346500541e7e")) + (origin + (method git-fetch) + (uri (git-reference + (url + "https://github.com/fastfloat/supplemental_test_files.git") + (commit commit))) + (file-name (git-file-name "fast_float_test-data" commit)) + (sha256 + (base32 + "0dxbiyzyh7i847i89ablfzypfc3ckhm7f74w98jsh73v1mppmxlf"))))) + ("doctest" ,doctest))) + (home-page "https://github.com/fastfloat/fast_float") + (synopsis "Floating point number parser for C++") + (description "@code{fast_float} is a header-only C++ library for parsing +floating point numbers from strings. It implements the C++ from_chars +functions for the float and double types.") + (license (list license:asl2.0 license:expat)))) ; dual licensed