From patchwork Tue Jun 1 22:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 29789 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 3C97D27BC81; Tue, 1 Jun 2021 23:08:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B332F27BC78 for ; Tue, 1 Jun 2021 23:08:10 +0100 (BST) Received: from localhost ([::1]:37662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loCYT-00019M-T5 for patchwork@mira.cbaines.net; Tue, 01 Jun 2021 18:08:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loCYM-00018p-Iq for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loCYM-00010d-Bu for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1loCYM-0003R4-2G for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48785] [PATCH 1/3] gnu: Add fast-double-parser. References: <20210601220510.78230-1-monego@posteo.net> In-Reply-To: <20210601220510.78230-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Jun 2021 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48785 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48785@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48785-submit@debbugs.gnu.org id=B48785.162258523213122 (code B ref 48785); Tue, 01 Jun 2021 22:08:02 +0000 Received: (at 48785) by debbugs.gnu.org; 1 Jun 2021 22:07:12 +0000 Received: from localhost ([127.0.0.1]:38118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loCXT-0003PU-Nh for submit@debbugs.gnu.org; Tue, 01 Jun 2021 18:07:12 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loCXS-0003P4-OB for 48785@debbugs.gnu.org; Tue, 01 Jun 2021 18:07:07 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 1ECE92400E5 for <48785@debbugs.gnu.org>; Wed, 2 Jun 2021 00:07:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1622585221; bh=GZJoXYgWQzOR2ACo0yZFf6jCPmUGeUfa8wWcYLF3qn0=; h=From:To:Cc:Subject:Date:From; b=JFCSYawKAGWlJp0llZ5XBWUNzj0cMPzHepFKYx08/KWo+aVNF8AgfVM0AbzJG4/y9 Ue1SNQ6WWB0Wp2ExMMydou0Hlnr97fTony7RhgiphnSegctiHM8f+xmfSakpSlDyYS xLL6tU5myryJ6+pmUcY3WLz7kboGsofmG3skqQPvvTzPj09a3gd5Stu4W7S82g5wnS NEmh8RMepvXE0CkSmjxSQ9fxhMLiujqnOh0lo6nOPYZmhpIU/MdoUIs+2UCJZJpSJE HgAVNR1rKULZwCUXXptgAeel68PpgZHVVqZ/qPQudlpP4YbdMVvMuvN1wfeSuHeTq/ RDjAHgPyI3qoQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FvmTv4gtCz6tmT; Wed, 2 Jun 2021 00:06:59 +0200 (CEST) From: Vinicius Monego Date: Tue, 1 Jun 2021 22:06:41 +0000 Message-Id: <20210601220643.78439-1-monego@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-double-parser): New variable. --- gnu/packages/cpp.scm | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 3089094eb8..1cddf7209b 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2020 Roel Janssen ;;; Copyright © 2020 Ricardo Wurmus ;;; Copyright © 2020 Brice Waegeneire -;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Alexandros Theodotou @@ -330,6 +330,42 @@ functions, class methods, and stl containers. @end enumerate\n") (license license:bsd-3))) +(define-public fast-double-parser + (package + (name "fast-double-parser") + (version "0.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lemire/fast_double_parser") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "10mfpy4i7lpavghb15s4d0920nlwsac1ri2sxkcqbrj9iq94qj71")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'install ;no install target, have to do it manually + (lambda* (#:key outputs #:allow-other-keys) + (let ((out-include (string-append (assoc-ref outputs "out") + "/include"))) + (mkdir-p out-include) + (copy-file "../source/include/fast_double_parser.h" + (string-append out-include + "/fast_double_parser.h")))))))) + (home-page "https://github.com/lemire/fast_double_parser") + (synopsis "Parse strings into double (binary64) floating-point values") + (description "Fast function to parse strings containing decimal numbers +into double-precision (binary64) floating-point values. That is, given the +string \"1.0e10\", it should return a 64-bit floating-point value equal to +10000000000. The function will match exactly (down the smallest bit) the +result of a standard function like @code{strtod}.") + ;; Dual-licensed, either license applies. + (license (list license:asl2.0 + license:boost1.0)))) + (define-public fifo-map (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9") (revision "0")