From patchwork Fri Oct 7 15:21:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43203 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 5B58427BBEA; Fri, 7 Oct 2022 17:37:28 +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 0E2D427BBE9 for ; Fri, 7 Oct 2022 17:37:28 +0100 (BST) Received: from localhost ([::1]:46580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogqLn-0002IJ-5M for patchwork@mira.cbaines.net; Fri, 07 Oct 2022 12:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpBm-0002R7-Pr for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpBm-0005pN-GS 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-0005o0-Bs for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v2 02/13] gnu: Add pocketfft. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 15:23: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.166515612922110 (code B ref 58261); Fri, 07 Oct 2022 15:23:02 +0000 Received: (at 58261) by debbugs.gnu.org; 7 Oct 2022 15:22:09 +0000 Received: from localhost ([127.0.0.1]:37156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpAu-0005kM-3V for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:09 -0400 Received: from mout01.posteo.de ([185.67.36.65]:48777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpAq-0005j3-Ne for 58261@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:05 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9E2FC240027 for <58261@debbugs.gnu.org>; Fri, 7 Oct 2022 17:21:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156118; bh=FZvur5fTxCpkf2Q4cyc4gY/50D8SYXjcK3UpSQc8qHM=; h=From:To:Cc:Subject:Date:From; b=DOiwOSCSt8YjxVlONOFakUEdmGGF/EZYMvV0mvta81AugOMFvNebTjkF4/fP94y10 saXYjI056U0zD5r2+Qt1nPIPthV4V8WNyD3mES1qRif2t8H1UtDSVZaovIo/fktokW iMZpLlizzxz8hE1CvBgd6r8uSOybQe1nmgV/UJOvnqMzW+Nw1OoSkNBU33esbX7RM1 Or26TqrYbXvI4lI1JC9mf89aGflK/QU1SdJveVIKrfuywLNebXGiOt9XH/Cu5qQzw+ TpUMCAQbTkx4HkLHgj857f7KF4upbdI85GZx4Mx1yhO3Q6W5BrbUHkpKrSOKLCgK+3 jIDl/ax/Pz+4Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkX920Dddz6tr5; Fri, 7 Oct 2022 17:21:58 +0200 (CEST) From: David Elsing Date: Fri, 7 Oct 2022 15:21:39 +0000 Message-Id: <20221007152148.32591-3-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 (pocketfft): New variable. --- gnu/packages/cpp.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index a7404df563..38a2a9e829 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1961,3 +1961,47 @@ (define-public fast-float 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 + +(define-public pocketfft-cpp + (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3") + (revision "0")) + (package + (name "pocketfft-cpp") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mreineck/pocketfft") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan + #~'(("pocketfft_hdronly.h" "include/")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'patch-novectors + (lambda _ + (substitute* "pocketfft_hdronly.h" + (("#ifndef POCKETFFT_NO_VECTORS") + "#if !(POCKETFFT_NO_VECTORS)") + (("#if defined\\(POCKETFFT_NO_VECTORS\\)") + "#if POCKETFFT_NO_VECTORS") + (("#define POCKETFFT_NO_VECTORS") + "#define POCKETFFT_NO_VECTORS 1") + (("#\\s*undef POCKETFFT_NO_VECTORS") + "#define POCKETFFT_NO_VECTORS 0") + (("#define POCKETFFT_HDRONLY_H.*" orig) + (string-append + orig "\n#ifndef POCKETFFT_NO_VECTORS\n" + "#define POCKETFFT_NO_VECTORS 1\n" "#endif\n")))))))) + (home-page "https://github.com/mreineck/pocketfft") + (synopsis "C++11 header-only Fast Fourier Transform library") + (description "This package provides a single-header C++11 library for +computing Fast Fourier transformations. It supports multidimensional arrays, +different floating point sizes and complex transformations.") + (license license:bsd-3))))