From patchwork Thu Oct 13 21:04:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43393 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 3426A27BBEA; Thu, 13 Oct 2022 22:09:04 +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 B167727BBE9 for ; Thu, 13 Oct 2022 22:09:03 +0100 (BST) Received: from localhost ([::1]:37458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj5Ru-0006nR-UL for patchwork@mira.cbaines.net; Thu, 13 Oct 2022 17:09:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oj5P1-0002zw-D7 for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oj5P0-0007UJ-IL for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oj5P0-0005mT-6v for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v3 01/15] gnu: Add fast-float. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 21:06:02 +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.166569510622052 (code B ref 58261); Thu, 13 Oct 2022 21:06:02 +0000 Received: (at 58261) by debbugs.gnu.org; 13 Oct 2022 21:05:06 +0000 Received: from localhost ([127.0.0.1]:35128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5Nw-0005hp-5b for submit@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:05 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5Nt-0005h0-J1 for 58261@debbugs.gnu.org; Thu, 13 Oct 2022 17:04:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C42F0240028 for <58261@debbugs.gnu.org>; Thu, 13 Oct 2022 23:04:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665695087; bh=B+pRMSyt2aDgmtRbUQDp6Zx/3Eu6eQq13c2eV88zmzY=; h=From:To:Cc:Subject:Date:From; b=Bi2ot5HW3Mclf8fBo1a+mEfdibbibQnJExSL2VpFqMmKsFkDOeKwRArZB1RkApqwy xbIGsS/CQkWPj5PhG8J8FxLnLImsmpbR0uuIG+AAUBk4yTQlGJ69dHHaRxcIpt/Rk0 0JV7Xe9TE0pBVSiI/CBs+bhA+M7vNpeTSZr42bSkobsXj3ufxjThE2OKGto5D3jSIz wlzS78veReMjvBRUsSLVvhhoywbHOqWiqVx0XSinfJtEGdALzc4aOUU1wHZxL0RzSp Ucp2CCvmpqTA6MB5BCRuS/C7agvaELVa/vlM3Y5zKQF20GZcC4zzlGV77xpFbYipfm 0mTKAH4/1Hi/w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpMTp2jqmz6tpd; Thu, 13 Oct 2022 23:04:46 +0200 (CEST) From: David Elsing Date: Thu, 13 Oct 2022 21:04:10 +0000 Message-Id: <20221013210424.993-2-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/cpp.scm (fast-float): New variable. --- gnu/packages/cpp.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 805413cc61..eba39ed660 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. ;;; @@ -1954,3 +1955,52 @@ (define-public crc32c "This package provides architecture-specific implementations of the CRC32C algorithm, which is specified in RFC 3720, section 12.1.") (license license:bsd-3))) + +(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 " + #$(origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/fastfloat" + "/supplemental_test_files.git")) + (commit "97a0b2e638feb479387554cf253e346500541e7e"))) + (file-name (git-file-name "fast_float_test-data" version)) + (sha256 + (base32 + "0dxbiyzyh7i847i89ablfzypfc3ckhm7f74w98jsh73v1mppmxlf"))) + "/data)\nif(0)\n")))))))) + (native-inputs (list 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