From patchwork Tue Feb 13 15:49:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 60277 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 8D93327BBE2; Tue, 13 Feb 2024 15:50:16 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 5F3D027BBE9 for ; Tue, 13 Feb 2024 15:50:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZv2Y-0001Yq-PY; Tue, 13 Feb 2024 10:49:46 -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 1rZv2W-0001YZ-SW for guix-patches@gnu.org; Tue, 13 Feb 2024 10:49:44 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZv2W-00056n-KZ for guix-patches@gnu.org; Tue, 13 Feb 2024 10:49:44 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZv2o-0002l8-0I for guix-patches@gnu.org; Tue, 13 Feb 2024 10:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69103] [PATCH] gnu: Add stringzilla. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 15:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69103 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69103@debbugs.gnu.org Cc: "Paul A. Patience" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170783939910591 (code B ref -1); Tue, 13 Feb 2024 15:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 15:49:59 +0000 Received: from localhost ([127.0.0.1]:45775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZv2k-0002kk-G0 for submit@debbugs.gnu.org; Tue, 13 Feb 2024 10:49:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:51306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZv2h-0002kU-6p for submit@debbugs.gnu.org; Tue, 13 Feb 2024 10:49:57 -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 1rZv2P-0001RH-DL for guix-patches@gnu.org; Tue, 13 Feb 2024 10:49:37 -0500 Received: from mail-40136.proton.ch ([185.70.40.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZv2L-00053q-Pz for guix-patches@gnu.org; Tue, 13 Feb 2024 10:49:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1707839368; x=1708098568; bh=h1AmAVg6c2WC5mTIPSEegid+qcAlrYOEThZRCw2FHrU=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=dhcPoZ7OFNley5eEN8NmujCIYq2Ogvclslsc+48lyRY5lT1rA5UIpJ2R+WaeaOSpF aJAob3thRFBY81nsHnJEXZHqnqeu387nLfwOfjXnrTfwWgNCzzKDQ9ARcyeR4pLNHC DbI18S1OzjEpOIes+8oXfyNRMD54xwjXW+NrakM/ovlVHQs2VcFTtryNZ6i/8U1xP2 atuiYiYe/gXpDF/cUTuPFZTawBkmrybvnEDzw//Dr29dD8KzmR/iDgmw9Z6TIA5Fgd +ae6HPJ/nlhXNaJtLsjBP7yJ9CdDaOTSE0cjv967vVIarNUT5j9Rs7NZXYxbEyNKsu eY+je1SoH2wHw== Date: Tue, 13 Feb 2024 15:49:23 +0000 From: "Paul A. Patience" Message-ID: <1d1a44107760fab61928be251e22d16e958c64b0.1707839329.git.paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.136; envelope-from=paul@apatience.com; helo=mail-40136.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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/c.scm (stringzilla): New variable. Change-Id: Ie84b126f8245f6ba8f1cc9ee56cc025b5181c3af --- gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) base-commit: 570ef13a87bb54d3410c431700ba78316a2641e2 diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1346605c71..742fe0a40a 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2023 zamfofex ;;; Copyright © 2023 Foundation Devices, Inc. ;;; Copyright © 2023 David Elsing +;;; Copyright © 2024 Paul A. Patience ;;; ;;; This file is part of GNU Guix. ;;; @@ -1462,6 +1463,44 @@ (define-public utf8-h string.h, but with a utf8* prefix instead of the str* prefix.") (license license:unlicense)))) +(define-public stringzilla + (package + (name "stringzilla") + (version "3.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ashvardanian/StringZilla") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15gvbhya3q1bjidnjgbd59jgf8pj3mykp5l1d46p5k3lwr67m1iw")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags + #~(list "-DSTRINGZILLA_INSTALL=ON" + (string-append "-DSTRINGZILLA_INCLUDE_INSTALL_DIR=" + #$output "/include") + ;; One fails, another takes very long. + "-DSTRINGZILLA_BUILD_BENCHMARK=OFF" + ;; Header-only; the shared library is not installed. + "-DSTRINGZILLA_BUILD_SHARED=OFF") + #:phases + #~(modify-phases %standard-phases + ;; AVX512 support can be disabled by defining SZ_USE_X86_AVX512 + ;; to 0 before including the header. + (add-after 'unpack 'skip-failing-test + (lambda _ + (substitute* "CMakeLists.txt" + (("^ *define_launcher\\(.*_avx512 .*") ""))))))) + (home-page "https://github.com/ashvardanian/StringZilla") + (synopsis "C/C++ header-only string library using SIMD and SWAR") + (description "StringZilla is a C/C++ header-only string library which +relies on SIMD and SWAR. It implements string search, edit distances, +sorting, lazy ranges, hashes and fingerprints.") + (license (list license:asl2.0 license:bsd-3)))) ; readme says dual-licensed + (define-public utest-h ;; The latest commit is used as there is no release. (let ((commit "54458e248f875f1a51f0af8bec8ca6ae7761b9d1")