* [bug#69103] [PATCH] gnu: Add stringzilla.
@ 2024-02-13 15:49 Paul A. Patience
0 siblings, 0 replies; only message in thread
From: Paul A. Patience @ 2024-02-13 15:49 UTC (permalink / raw)
To: 69103; +Cc: Paul A. Patience
* gnu/packages/c.scm (stringzilla): New variable.
Change-Id: Ie84b126f8245f6ba8f1cc9ee56cc025b5181c3af
---
gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-13 15:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 15:49 [bug#69103] [PATCH] gnu: Add stringzilla Paul A. Patience
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.