[PATCH] gnu: Add stringzilla.

  • Open
  • quality assurance status badge
Details
One participant
  • Paul A. Patience
Owner
unassigned
Submitted by
Paul A. Patience
Severity
normal
P
P
Paul A. Patience wrote on 13 Feb 16:49 +0100
(address . guix-patches@gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
1d1a44107760fab61928be251e22d16e958c64b0.1707839329.git.paul@apatience.com
* gnu/packages/c.scm (stringzilla): New variable.

Change-Id: Ie84b126f8245f6ba8f1cc9ee56cc025b5181c3af
---
gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (61 lines)
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 <zamfofex@twdb.moe>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024 Paul A. Patience <paul@apatience.com>
;;;
;;; 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")

base-commit: 570ef13a87bb54d3410c431700ba78316a2641e2
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69103@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69103
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch