Subject: [PATCH v2 1/4] gnu: Add hfst-ospell.

From: Jussi Timperi <[email-masked]>
Date: Tue, 26 Sep 2023 15:09:52 +0300

* gnu/packages/language.scm (hfst-ospell): New variable.
---
 gnu/packages/language.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index faf3114b84..241b145440 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2022 Milran <[email-masked]>
 ;;; Copyright © 2023 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2023 gemmaro <[email-masked]>
+;;; Copyright © 2023 Jussi Timperi <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@ (define-module (gnu packages language)
   #:use-module (gnu packages anthy)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dbm)
@@ -40,6 +42,7 @@ (define-module (gnu packages language)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages ibus)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -1179,3 +1182,33 @@ (define-public mecab-unidic
 from the database are used as entries (heading terms).")
     ;; triple-licensed (at the user’s choice)
     (license (list license:gpl2+ license:lgpl2.1 license:bsd-3))))
+
+(define-public hfst-ospell
+  (package
+    (name "hfst-ospell")
+    (version "0.5.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/hfst/hfst-ospell")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0n8zds3s3gj3fws6ghjr9cpgswasnjqr9rz4syxy2yq8n2fzb8fp"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      ;; Don't use obsolete XML libraries.
+      ;; see: https://github.com/hfst/hfst-ospell/issues/48
+      #:configure-flags #~'("--without-libxmlpp" "--without-tinyxml2"
+                            "--enable-zhfst")))
+    (inputs (list icu4c libarchive))
+    (native-inputs (list autoconf automake libtool pkg-config))
+    (home-page "https://github.com/hfst/hfst-ospell")
+    (synopsis "HFST spell checker library and command line tool")
+    (description
+     "Minimal @acronym{HFST, Helsinki Finite-State Technology}
+optimized-lookup format based spell checker library and a demonstrational
+implementation of command line based spell checker.")
+    (license license:asl2.0)))

base-commit: fafd3caef0d51811a5da81d6061789e2908b0dac
-- 
2.41.0