From patchwork Sat Feb 11 16:50:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 46859 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 3A60216613; Sat, 11 Feb 2023 16:51:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 87D1D165FC for ; Sat, 11 Feb 2023 16:51:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQt5d-0002jB-4p; Sat, 11 Feb 2023 11:51:05 -0500 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 1pQt5a-0002iK-Sy for guix-patches@gnu.org; Sat, 11 Feb 2023 11:51:02 -0500 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 1pQt5a-0007Cx-J7 for guix-patches@gnu.org; Sat, 11 Feb 2023 11:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQt5a-0004Nx-GC for guix-patches@gnu.org; Sat, 11 Feb 2023 11:51:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61435] [PATCH 1/2] gnu: Add coucal. References: <20230211164821.2070553-1-mail@nicolasgoaziou.fr> In-Reply-To: <20230211164821.2070553-1-mail@nicolasgoaziou.fr> Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Feb 2023 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61435 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61435@debbugs.gnu.org Received: via spool by 61435-submit@debbugs.gnu.org id=B61435.167613423416804 (code B ref 61435); Sat, 11 Feb 2023 16:51:02 +0000 Received: (at 61435) by debbugs.gnu.org; 11 Feb 2023 16:50:34 +0000 Received: from localhost ([127.0.0.1]:42993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQt58-0004Mx-GC for submit@debbugs.gnu.org; Sat, 11 Feb 2023 11:50:34 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQt54-0004MS-2a for 61435@debbugs.gnu.org; Sat, 11 Feb 2023 11:50:31 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 35DD4E0005 for <61435@debbugs.gnu.org>; Sat, 11 Feb 2023 16:50:22 +0000 (UTC) From: Nicolas Goaziou Date: Sat, 11 Feb 2023 17:50:09 +0100 Message-Id: <20230211165010.2070585-1-mail@nicolasgoaziou.fr> X-Mailer: git-send-email 2.39.1 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/datastructures.scm (coucal): New variable. --- gnu/packages/datastructures.scm | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm index d40051506f..481109dea0 100644 --- a/gnu/packages/datastructures.scm +++ b/gnu/packages/datastructures.scm @@ -35,6 +35,56 @@ (define-module (gnu packages datastructures) #:use-module (guix build-system gnu) #:use-module (guix build-system meson)) +(define-public coucal + (let ((commit "73ada075553b7607d083037a87cb9c73b3683bfc") + (revision "1")) + (package + (name "coucal") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xroche/coucal") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01996vda3wj5ywpwg9yhysaq6cyi44xnkyhihbwwi43hrj1ic2vm")))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'do-not-run-tests-early + (lambda _ + (substitute* "Makefile" + (("(all: ).*" _ lead) (string-append lead "gcc"))))) + (add-after 'unpack 'remove-Werror + ;; Prevent "this statement may fall through + ;; [-Wimplicit-fallthrough=]" errors from "murmurhash3.h" file. + (lambda _ + (substitute* "Makefile" + (("-Werror ") "")))) + (delete 'configure) ;no configure script + (replace 'install ;no install target + (lambda _ + (let ((doc (string-append #$output + "/share/doc/" #$name "-" #$version))) + (install-file "README.md" doc)) + (for-each (lambda (f) (install-file f #$output)) + (find-files "." "(coucal|murmurhash)")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "tests" "runtests"))))))) + (home-page "https://github.com/xroche/coucal") + (synopsis "Cuckoo-hashing-based hashtable with stash area C library") + (description "Coucal is an implementation of the Cuckoo hashing +algorithm with a stash area using by default the MurmurHash hash function.") + ;; Library is released under Expat terms, but the source includes + ;; "murmurhash3.h", which is placed in the public domain. + (license (list license:expat license:public-domain))))) + (define-public gdsl (package (name "gdsl")