From patchwork Sun Jun 18 20:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 51065 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 E72CE27BBE2; Sun, 18 Jun 2023 21:54:47 +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 0D58B27BBEA for ; Sun, 18 Jun 2023 21:54:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAzPQ-0006cN-8S; Sun, 18 Jun 2023 16:54:04 -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-0006bG-Pp for guix-patches@gnu.org; Sun, 18 Jun 2023 16:54:03 -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-0002E7-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-0007SZ-15 for guix-patches@gnu.org; Sun, 18 Jun 2023 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64137] [PATCH v2 2/8] gnu: Add tsl-hopscotch-map. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jun 2023 20:54:01 +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.168712161728568 (code B ref 64137); Sun, 18 Jun 2023 20:54:01 +0000 Received: (at 64137) by debbugs.gnu.org; 18 Jun 2023 20:53:37 +0000 Received: from localhost ([127.0.0.1]:55035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAzOz-0007Qd-9R for submit@debbugs.gnu.org; Sun, 18 Jun 2023 16:53:37 -0400 Received: from mout01.posteo.de ([185.67.36.65]:54339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAzOx-0007Q4-2w 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 62B91240028 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=8eFSnAj+eq3M3K1R5oyXczEK1lfArpaMdhmfWnAd1JY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=V2vru+eFwmT6+bWrCIE3k5RTMe5t6XvFpWB0Tm8JFa0yZn/GeCb6KW0G2gAySg75R vxPpQ0WmSvRCVoPiaUHPe3hY1ITD+7YBCVVLj1Llk2o/FsaW94+df8qGQBorCmBNJ/ FeCWsC58Nt3z1Rul5CftPs6Ods4W3qAuNVapxNoM/g5QH5YGGVFKdIkHf0PrYEvzoU yfgdpdhigryrZagca6iJaktHoO4RfiJfVklH40c+bt1fFBHBV+EpT6/46a5DiYpW6f Kd3vUnnNPVRs/7ANAeKbvqlrPsQrfKoxbiYXEEZKkzT00VxgMOpZJXWsScYU+6+P7v KFuSCivpmsuuQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QklVH5z2dz9rxT; Sun, 18 Jun 2023 22:53:27 +0200 (CEST) From: David Elsing Date: Sun, 18 Jun 2023 20:53:01 +0000 Message-Id: <68b5dda8fc0b5d59188cda3cf33f0f1537c6efed.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-hopscotch-map): New variable. --- gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 5a6298fc4d..7878aa2a6d 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2588,3 +2588,38 @@ (define-public mpark-variant "MPark.Variant provides the C++17 std::variant for C++11/14/17. It is based on the implementation of std::variant in libc++.") (license license:boost1.0))) + +(define-public tsl-hopscotch-map + (package + (name "tsl-hopscotch-map") + (version "2.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Tessil/hopscotch-map") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "012pw37w000pdxdvps0wsqrw6597cm6i6kr5rpl303qmiwqicb2p")))) + (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_hopscotch_map_tests tsl_hopscotch_map_tests)\n"))))))) + (native-inputs (list boost)) + (home-page "https://github.com/Tessil/hopscotch-map") + (synopsis "C++ implementation of a hash map and hash set using hopscotch hashing") + (description "This package provides a C++ implementation of a hash map and +a hash set using open-addressing and hopscotch hashing to resolve +collisions.") + (license license:expat)))