summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-17 00:45:22 +0300
committerThanos Apollo <[email protected]>2024-08-17 00:45:22 +0300
commitb36108fe0e0880e4aac641901e5e37b0ce99c430 (patch)
treecd2337bc3e47d48fb81d178ea0fc73423de39782
parent19b830f591e1eb2856b3b285ba7933c8aa9490c5 (diff)
packages: Rewrite hunspell module.
* Add greek hunspell dict
-rw-r--r--hecate/packages/hunspell.scm118
1 files changed, 99 insertions, 19 deletions
diff --git a/hecate/packages/hunspell.scm b/hecate/packages/hunspell.scm
index 4b8e0db..65527c3 100644
--- a/hecate/packages/hunspell.scm
+++ b/hecate/packages/hunspell.scm
@@ -15,22 +15,102 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages textutils))
-;; (define-public hunspell-dict-el
-;; (let ((commit "cd62887723f7adcac4c952cf6d4894f1873082b5"))
-;; (package
-;; (name "hunspell-dict-el")
-;; (version "20170630")
-;; (source
-;; (origin
-;; (method git-fetch)
-;; (uri (git-reference
-;; (url "https://github.com/stevestavropoulos/elspell")
-;; (commit commit)))
-;; (filename (git-file-name name version))
-;; (sha256
-;; (base32
-;; "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
-;; (build-system gnu-build-system)
-;; (native-inputs
-;; (list libiconv))
-;; (native-search))))
+(define-public hunspell
+ (package
+ (name "hunspell")
+ (version "1.7.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hunspell/hunspell")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list autoconf automake libtool))
+ (inputs
+ (list perl))
+ (native-search-paths (list (search-path-specification
+ (variable "DICPATH")
+ (files '("share/hunspell")))))
+ (home-page "https://hunspell.github.io/")
+ (synopsis "Spell checker")
+ (description "Hunspell is a spell checker and morphological analyzer
+library and program designed for languages with rich morphology and complex
+word compounding or character encoding.")
+ ;; Triple license, including "mpl1.1 or later".
+ (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
+
+(define-public hunspell-dict-med
+ (package
+ (name "hunspell-dict-med")
+ (version "01")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.thanosapollo.org/hunspell-en-med-full/")
+ (commit "589979639abb78aecc37a3f8e3872ff6ad3f47ad")))
+ (sha256
+ (base32 "1pl5kbf3cnxfrpijf83pmv23yzk2ggy7dllqk7rayfbq75117608"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install ;no install target
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/hunspell/")))
+ (install-file "en_med_full.aff" share)
+ (install-file "en_med_full.dic" share)
+ #t))))
+ #:tests? #f)) ; no tests
+ (native-inputs
+ (list hunspell ispell perl))
+ (synopsis "Hunspell dictionary medical")
+ (description "This package provides a dictionary for the Hunspell
+spell-checking library.")
+ (home-page "https://www.j3e.de/ispell/igerman98/")
+ (license (list license:gpl2 license:gpl3))))
+
+(define-public hunspell-dict-el
+ (let ((commit "8e799911aede4e2c340d1b5a67a07f8e22ab9c8e"))
+ (package
+ (name "hunspell-dict-el")
+ (version "0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.thanosapollo.org/hunspell-dict-el")
+ (commit commit)))
+ (sha256
+ (base32 "0z9nyfy50c0bjvvm42xwd3npjpp07a9slm3gfgvxanyqm7djrmb1"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/hunspell/")))
+ (install-file "el_GR.aff" share)
+ (install-file "el_GR.dic" share)
+ #t))))
+ #:tests? #f)) ; no tests
+ (native-inputs
+ (list hunspell ispell perl))
+ (synopsis "Hunspell Greek/Hellenic dictionary")
+ (description "This package provides a dictionary for the Hunspell
+spell-checking library.")
+ (home-page "https://www.j3e.de/ispell/igerman98/")
+ (license (list license:gpl2 license:gpl3)))))
+