From patchwork Sun Jun 18 20:53:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 51066 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 EF70127BBEC; Sun, 18 Jun 2023 21:54:49 +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=ham 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 645D427BBEA for ; Sun, 18 Jun 2023 21:54:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAzPR-0006dQ-Tw; Sun, 18 Jun 2023 16:54:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAzPO-0006bH-Qd for guix-patches@gnu.org; Sun, 18 Jun 2023 16:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAzPO-0002EF-G6 for guix-patches@gnu.org; Sun, 18 Jun 2023 16:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAzPO-0007Sg-CM for guix-patches@gnu.org; Sun, 18 Jun 2023 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64137] [PATCH v2 3/8] gnu: Add tsl-sparse-map. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jun 2023 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64137 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64137@debbugs.gnu.org Cc: David Elsing Received: via spool by 64137-submit@debbugs.gnu.org id=B64137.168712162128586 (code B ref 64137); Sun, 18 Jun 2023 20:54:02 +0000 Received: (at 64137) by debbugs.gnu.org; 18 Jun 2023 20:53:41 +0000 Received: from localhost ([127.0.0.1]:55039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAzP2-0007Qy-O8 for submit@debbugs.gnu.org; Sun, 18 Jun 2023 16:53:41 -0400 Received: from mout01.posteo.de ([185.67.36.65]:51209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAzOx-0007Q6-Bg for 64137@debbugs.gnu.org; Sun, 18 Jun 2023 16:53:35 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CF3AD240029 for <64137@debbugs.gnu.org>; Sun, 18 Jun 2023 22:53:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1687121609; bh=ZuHw/i8UpteXEk1LnBvXW4U4c4tlaoys02QtHSfiJbg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=XKkhkC5O3ZHK9UwEa2B35ii7cDiiAcuF5aDpGhiSXmVVBONF/tyMscZh4AEhf/HM9 evLaboR78GUfq3fD6GpFzifztlpJ+xfTUpUjd+y8oAhtC8dCnTeWusWzSU5nPZPDoZ 5jLHBxgDl9S/rMFdGRCMG7FNWtyz0M903gFQkVmbt+0GVIRlF6EipX3YTsX55Td+1R /NlRWM6JZoYasZa0LKMI2vr4hMdzmD5ZlfPSJ/QawOt9mxqeHrwp/6TUhWVMrzAZ48 tQlF6fjrFQp/lV/ZRaEfoaoeULne5CjpEhGXWDqIigkAplm+oCkjGHaVrYBojP+Uzt yY/I8nLVznAhQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QklVK3PHpz6tvJ; Sun, 18 Jun 2023 22:53:29 +0200 (CEST) From: David Elsing Date: Sun, 18 Jun 2023 20:53:02 +0000 Message-Id: <56a3a24a9156aac5918076616220ee2cd3228cc2.1687121561.git.david.elsing@posteo.net> In-Reply-To: <7yh6r4ebw2.fsf@posteo.net> References: <7yh6r4ebw2.fsf@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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (tsl-sparse-map): New variable. --- gnu/packages/cpp.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 7878aa2a6d..6f558d1f5b 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2623,3 +2623,37 @@ (define-public tsl-hopscotch-map a hash set using open-addressing and hopscotch hashing to resolve collisions.") (license license:expat))) + +(define-public tsl-sparse-map + (package + (name "tsl-sparse-map") + (version "0.6.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Tessil/sparse-map") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0rb7w0hzsj4qbm0dff1niaf75aag9lj0xqhgb3vg5h9hfic62ic2")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cmake-test + (lambda _ + (let ((file (open-file "CMakeLists.txt" "a"))) + (display "\nenable_testing()\nadd_subdirectory(tests)" file) + (close-port file)) + (substitute* "tests/CMakeLists.txt" + (("set\\(Boost_USE_STATIC_LIBS.*") "") + (("add_subdirectory\\(\\.\\..*") + "add_test(tsl_sparse_map_tests tsl_sparse_map_tests)\n"))))))) + (native-inputs (list boost)) + (home-page "https://github.com/Tessil/sparse-map") + (synopsis "C++ implementation of a memory efficient hash map and hash set") + (description "This package provides a C++ implementation of a hash map and +a hash set with focus on memory efficiency.") + (license license:expat)))