[PATCH 0/3] WIP: Add hunspell-dict-de.

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Jonathan Brielmaier
  • Jakub K?dzio?ka
Owner
unassigned
Submitted by
Jonathan Brielmaier
Severity
normal
J
J
Jonathan Brielmaier wrote on 22 Jul 2020 14:26
(address . guix-patches@gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200722122649.6883-1-jonathan.brielmaier@web.de
Hi folks,

as I'm missing spell checker in Icecat and Libreoffice (Icedove let you install one), I tried to package
hunspell-dict-de.

It's more engaged then I thought before :P I added byacc as an yacc implementation required
by ispell. That part is working, so not WIP.

ispell
======
It's Makefiles are a bit ugly so you need to patch them somehow.
At the current state the binaries are looking at the wrong place for the "/lib/ispell/*.hash" files.
So I guess that is where
```
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure open-file: No such file or directory: "/gnu/store/smvi9sk3s3xvn0xx6az0hvzl6mhy7zyn-ispell-3.4.00/lib/ispell/english.hash"
```
comes from.
```
$ /gnu/store/smvi9sk3s3xvn0xx6az0hvzl6mhy7zyn-ispell-3.4.00/bin/ispell
Can't open /lib/ispell/english.hash
```
Do I need to wrap this somehow?

hunspell-dict-de
================
It's blocked by ispell. It only requires buildhash which seems to be working.

In general wouldn't it make sense to rename aspell.scm to spell.scm and move the hunspell* stuff from
libreoffice.scm there?

Jonathan Brielmaier (3):
gnu: Add byacc.
WIP: gnu: Add ispell.
WIP: gnu: Add hunspell-dict-de.

gnu/packages/aspell.scm | 45 ++++++++++++++++++++++++++++++++++++
gnu/packages/c.scm | 20 ++++++++++++++++
gnu/packages/libreoffice.scm | 28 +++++++++++++++++++++-
3 files changed, 92 insertions(+), 1 deletion(-)

--
2.27.0
J
J
Jonathan Brielmaier wrote on 22 Jul 2020 14:30
[PATCH 2/3] WIP: gnu: Add ispell.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200722123013.7060-2-jonathan.brielmaier@web.de
* gnu/packages/aspell.scm (ispell): New variable.
---
gnu/packages/aspell.scm | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (68 lines)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 22256f750b..023f6bc8c4 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,7 +34,9 @@
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (ice-9 match))

@@ -453,3 +456,45 @@ under permissive licensing terms. See the 'Copyright' file."))))
(define-word-list-dictionary hunspell-dict-en-us
"en_US"
(synopsis "Hunspell dictionary for United States English"))
+
+(define-public ispell
+ (package
+ (name "ispell")
+ (version "3.4.00")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.cs.hmc.edu/~geoff/tars/ispell-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1hmfnz55qzfpz7lz0r3m4kkv31smir92ks9s5l1iiwimhr2jxi2x"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
+ "local.h" "config.sh")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'correct-hardcoding
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("config.X"
+ "local.h.linux"
+ "local.h.generic")
+ ;; gcc-toolchain does not provide symlink cc -> gcc
+ (("\"cc\"") "\"gcc\"")
+ (("/bin/sh") (which "sh"))
+ (("/usr/local/bin") "/bin")
+ (("/usr/local/lib") "/lib/ispell")
+ (("/usr/local/man") "/share/man"))
+ #t)))
+ #:tests? #f)) ;no tests
+ (native-inputs
+ `(("byacc" ,byacc)
+ ("ncurses" ,ncurses)))
+ (synopsis "Interactive spell-checking tool for Unix")
+ (description "Ispell is an interactive spell-checking tool supporting many
+European languages.")
+ (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
+ (license bsd-3)))
--
2.27.0
J
J
Jonathan Brielmaier wrote on 22 Jul 2020 14:30
[PATCH 1/3] gnu: Add byacc.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200722123013.7060-1-jonathan.brielmaier@web.de
* gnu/packages/c.scm (byacc): New variable.
---
gnu/packages/c.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 25bc78e6bf..fde10f5a43 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright @ 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -473,3 +474,22 @@ avoiding distractions when studying code that uses @code{#ifdef} heavily for
portability.")
(license (list license:bsd-2 ;all files except...
license:bsd-3)))) ;...the unidef.1 manual page
+
+(define-public byacc
+ (package
+ (name "byacc")
+ (version "20200330")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://invisible-mirror.net/archives/byacc/"
+ "byacc-" version ".tgz"))
+ (sha256
+ (base32
+ "1c0zyn6v286i09jlc8gx6jyaa5438qyy985rqsd76kb8ibfy56g0"))))
+ (build-system gnu-build-system)
+ (synopsis "LARL(1) parser generator")
+ (description "Berkley yacc is a Look-Ahead LR (@dfn{LARL}) parser generator trying to be
+compatible with AT&T yacc as much as possible.")
+ (home-page "https://invisible-island.net/byacc/byacc.html")
+ (license license:public-domain)))
--
2.27.0
J
J
Jonathan Brielmaier wrote on 22 Jul 2020 14:30
[PATCH 3/3] WIP: gnu: Add hunspell-dict-de.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200722123013.7060-3-jonathan.brielmaier@web.de
* gnu/packages/libreoffice.scm (hunspell-dict-de): New variable.
---
gnu/packages/libreoffice.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index ebe4fd7246..9e964fb096 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -10,7 +10,7 @@
;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2018, 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
;;;
@@ -971,6 +971,32 @@ library.")
(license
(list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))

+(define-public hunspell-dict-de
+ (package
+ (name "hunspell-dict-de")
+ (version "20161207")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
+ "igerman98-" version ".tar.bz2"))
+ (sha256 (base32
+ "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("hunspell/de_DE.dic")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))
+ #:tests? #f)) ;no tests
+ (native-inputs
+ `(("perl" ,perl)))
+ (synopsis "Hunspell dictionary for German")
+ (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 hyphen
(package
(name "hyphen")
--
2.27.0
E
E
Efraim Flashner wrote on 23 Jul 2020 09:56
Re: [bug#42474] [PATCH 0/3] WIP: Add hunspell-dict-de.
(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)(address . 42474@debbugs.gnu.org)
20200723075637.GE3039@E5400
On Wed, Jul 22, 2020 at 02:26:49PM +0200, Jonathan Brielmaier wrote:
Toggle quote (13 lines)
> Hi folks,
>
> ```
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> In procedure open-file: No such file or directory: "/gnu/store/smvi9sk3s3xvn0xx6az0hvzl6mhy7zyn-ispell-3.4.00/lib/ispell/english.hash"
> ```
> comes from.
> ```
> $ /gnu/store/smvi9sk3s3xvn0xx6az0hvzl6mhy7zyn-ispell-3.4.00/bin/ispell
> Can't open /lib/ispell/english.hash
> ```
> Do I need to wrap this somehow?

Is this the type of thing where a search path would work?

Toggle quote (5 lines)
>
> In general wouldn't it make sense to rename aspell.scm to spell.scm and move the hunspell* stuff from
> libreoffice.scm there?
>

I'm very in favor of this. It's something I've thought about doing
before.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl8ZQrQACgkQQarn3Mo9
g1H7TRAAuP1KAKkgOQl4Z7nCbeb3yVgERUn0AlQgYl6Phgm3hWyYlg9hUKkW2iDV
uVJmOCKAIDJd3pdRt2sQBuBZMXRLEpTuivQoVNJeVp4emQhSgFCC56wdmc6mMZYU
3kUIZkpnhvD7JPCSj5VvegHsVGEhfoh7K6vtMc1OZriw6d+6F4Iq65N2vbtu5Zg1
igmw+zMu+lB4E5O46l7e0dlDw4CIuyRb/kigOrqhgnYW93pUQ7SE7S9igJtu273T
1QuQHhsb1CY6fS3XEuUIxlmCTSIMwDYj4aI7VZxXOXPOAgVhQwIflGUCN9EsVxbd
mJUAupJCoGisCsfUiIEmxzVWAMdCgu3DoPIQgWgnFCKQzqM+9HTq5h1lma2PVN6j
V/uv0Y1gYiGyNBk6qQH/dioQFAWKgtXXd+UFpNv/0/oVljAchxuka6356aGThNqy
liyMJ0Pzeper9t42e9eV4PlDv28aU6w344EcY5Mf7PgllpPp7HG491GzckNNe/jk
GjMBJMelFbhMobuL9Q7hJXUM3yUbbdTOBjICZvx9mYC63puiGJkUroaFRFg5169P
YfHomJkpfGfVYDMmohCKYagLjPZHnKVkvk4zqaF9i3M/pMBwK86N2OUHSptxJPza
TEvtbjmhrnhSyt8Pl8iHcEAw1J9+1CR09Ty7hGZz2MuWRaFFFhs=
=1Wob
-----END PGP SIGNATURE-----


J
J
Jonathan Brielmaier wrote on 25 Jul 2020 00:38
[PATCH v2 0/3] Add hunspell-dict-de.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200724223838.12444-1-jonathan.brielmaier@web.de
Changes compared to v1:
* ispell builds now. The ispell binary is still broken and needs some patch magic
or so.
* hunspell-dict-de builds now as well and ships the file we need. I installed it
and LibreOffice and Icecat have no German spell checking.
* Fixed identation with indent script.

It would be nice if we can add packages for de_AT and de_CH as well, but I don't
know what would be a proper approach: inherit + something...

Jonathan Brielmaier (3):
gnu: Add byacc.
WIP: gnu: Add ispell.
WIP: gnu: Add hunspell-dict-de.

gnu/packages/aspell.scm | 49 ++++++++++++++++++++++++++++++++++++
gnu/packages/c.scm | 20 +++++++++++++++
gnu/packages/libreoffice.scm | 38 +++++++++++++++++++++++++++-
3 files changed, 106 insertions(+), 1 deletion(-)

--
2.27.0
J
J
Jonathan Brielmaier wrote on 25 Jul 2020 00:38
[PATCH v2 1/3] gnu: Add byacc.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200724223838.12444-2-jonathan.brielmaier@web.de
* gnu/packages/c.scm (byacc): New variable.
---
gnu/packages/c.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 25bc78e6bf..fde10f5a43 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright @ 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -473,3 +474,22 @@ avoiding distractions when studying code that uses @code{#ifdef} heavily for
portability.")
(license (list license:bsd-2 ;all files except...
license:bsd-3)))) ;...the unidef.1 manual page
+
+(define-public byacc
+ (package
+ (name "byacc")
+ (version "20200330")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://invisible-mirror.net/archives/byacc/"
+ "byacc-" version ".tgz"))
+ (sha256
+ (base32
+ "1c0zyn6v286i09jlc8gx6jyaa5438qyy985rqsd76kb8ibfy56g0"))))
+ (build-system gnu-build-system)
+ (synopsis "LARL(1) parser generator")
+ (description "Berkley yacc is a Look-Ahead LR (@dfn{LARL}) parser generator trying to be
+compatible with AT&T yacc as much as possible.")
+ (home-page "https://invisible-island.net/byacc/byacc.html")
+ (license license:public-domain)))
--
2.27.0
J
J
Jonathan Brielmaier wrote on 25 Jul 2020 00:38
[PATCH v2 2/3] WIP: gnu: Add ispell.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200724223838.12444-3-jonathan.brielmaier@web.de
* gnu/packages/aspell.scm (ispell): New variable.
---
gnu/packages/aspell.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 22256f750b..31346d5ba7 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,7 +34,9 @@
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (ice-9 match))

@@ -453,3 +456,49 @@ under permissive licensing terms. See the 'Copyright' file."))))
(define-word-list-dictionary hunspell-dict-en-us
"en_US"
(synopsis "Hunspell dictionary for United States English"))
+
+; FIXME: ispell binary is not working, needs some path mangling
+(define-public ispell
+ (package
+ (name "ispell")
+ (version "3.4.00")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.cs.hmc.edu/~geoff/tars/ispell-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1hmfnz55qzfpz7lz0r3m4kkv31smir92ks9s5l1iiwimhr2jxi2x"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
+ "local.h" "config.sh")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'correct-hardcoding
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("config.X"
+ "local.h.linux"
+ "local.h.generic")
+ ;; gcc-toolchain does not provide symlink cc -> gcc
+ (("\"cc\"") "\"gcc\"")
+ (("/bin/sh") (which "sh"))
+ (("/usr/local/bin") "/bin")
+ (("/usr/local/lib") "/lib/ispell")
+ (("/usr/local/man") "/share/man"))
+ (substitute* '("Makefile")
+ (("\\$\\(DESTDIR\\)\\$\\$MASTERHASH")
+ "$(DESTDIR)/lib/ispell/$$MASTERHASH"))
+ #t)))
+ #:tests? #f)) ;no tests
+ (native-inputs
+ `(("byacc" ,byacc)
+ ("ncurses" ,ncurses)))
+ (synopsis "Interactive spell-checking tool for Unix")
+ (description "Ispell is an interactive spell-checking tool supporting many
+European languages.")
+ (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
+ (license bsd-3)))
--
2.27.0
J
J
Jonathan Brielmaier wrote on 25 Jul 2020 00:38
[PATCH v2 3/3] WIP: gnu: Add hunspell-dict-de.
(address . 42474@debbugs.gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200724223838.12444-4-jonathan.brielmaier@web.de
* gnu/packages/libreoffice.scm (hunspell-dict-de): New variable.
---
gnu/packages/libreoffice.scm | 38 +++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index ebe4fd7246..98d81587c5 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -10,7 +10,7 @@
;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2018, 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
;;;
@@ -42,6 +42,7 @@
#:use-module (ice-9 match)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
+ #:use-module (gnu packages aspell)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
@@ -971,6 +972,41 @@ library.")
(license
(list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))

+(define-public hunspell-dict-de
+ (package
+ (name "hunspell-dict-de")
+ (version "20161207")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
+ "igerman98-" version ".tar.bz2"))
+ (sha256 (base32
+ "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("hunspell/de_DE.dic")
+ #:phases
+ (modify-phases %standard-phases
+ (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/")))
+ (mkdir-p share)
+ (copy-file "hunspell/de_DE.aff" (string-append share "de_DE.aff"))
+ (copy-file "hunspell/de_DE.dic" (string-append share "de_DE.dic"))))))
+ #:tests? #f)) ;no tests
+ (native-inputs
+ `(("hunspell" ,hunspell)
+ ("ispell" ,ispell)
+ ("perl" ,perl)))
+ (synopsis "Hunspell dictionary for German (de_DE)")
+ (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 hyphen
(package
(name "hyphen")
--
2.27.0
J
J
Jakub K?dzio?ka wrote on 28 Jul 2020 13:36
[PATCH v3 1/2] gnu: Add ispell.
(address . 42474@debbugs.gnu.org)
20200728113609.28126-1-kuba@kadziolka.net
* gnu/packages/aspell.scm (ispell): New variable.

Co-authored-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
---

Hi,

DESTDIR is a variable that should always be / on Guix. Its meaning is
that the package should be installed to $DESTDIR/$prefix/bin/foo, but
will be ran at $prefix/bin/foo - useful when you're managing the
creation of a binary tarball manually, but useless and misleading for
Guix.

Also, we already have an implementation of Yacc - I've replaced the
input with Bison.

Moreover, instead of patching the defaults, a configuration file is now
created.

I haven't tried spellchecking anything with ispell or using the German
dictionary, but both packages now build.

Regards,
Jakub K?dzio?ka

gnu/packages/aspell.scm | 51 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 22256f750b..a9c7e0d615 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -9,6 +9,8 @@
;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,7 +35,9 @@
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (ice-9 match))
@@ -453,3 +457,50 @@ under permissive licensing terms. See the 'Copyright' file."))))
(define-word-list-dictionary hunspell-dict-en-us
"en_US"
(synopsis "Hunspell dictionary for United States English"))
+
+(define-public ispell
+ (package
+ (name "ispell")
+ (version "3.4.00")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.cs.hmc.edu/~geoff/tars/ispell-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1hmfnz55qzfpz7lz0r3m4kkv31smir92ks9s5l1iiwimhr2jxi2x"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:parallel-build? #f
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Based on local.h.linux
+ (let* ((grep (assoc-ref inputs "grep"))
+ (out (assoc-ref outputs "out")))
+ (call-with-output-file "local.h"
+ (lambda (port)
+ (format port "#define MINIMENU~%")
+ (format port "#define USG~%")
+ (format port "#define HAS_RENAME~%")
+ (format port "#define CC \"gcc\"~%")
+ (format port "#define POUNDBANG \"#!~a\"~%" (which "sh"))
+ (format port "#define EGREPCMD \"~a/bin/grep -Ei\"~%" grep)
+ (format port "#define BINDIR \"~a/bin\"~%" out)
+ (format port "#define LIBDIR \"~a/lib/ispell\"~%" out)
+ (format port "#define MAN1DIR \"~a/share/man/man1\"~%" out)
+ (format port "#define MAN45DIR \"~a/share/man/man5\"~%" out))))
+ #t)))))
+ (inputs
+ `(("grep" ,grep)
+ ("ncurses" ,ncurses)))
+ (native-inputs
+ `(("bison" ,bison)))
+ (synopsis "Interactive spell-checking tool for Unix")
+ (description "Ispell is an interactive spell-checking tool supporting many
+European languages.")
+ (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
+ (license bsd-3)))
--
2.27.0
J
J
Jakub K?dzio?ka wrote on 28 Jul 2020 13:36
[PATCH v3 2/2] gnu: Add hunspell-dict-de.
(address . 42474@debbugs.gnu.org)
20200728113644.28418-1-kuba@kadziolka.net
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>

* gnu/packages/libreoffice.scm (hunspell-dict-de): New variable.
---
gnu/packages/libreoffice.scm | 38 +++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index ebe4fd7246..98d81587c5 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -10,7 +10,7 @@
;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2018, 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
;;;
@@ -42,6 +42,7 @@
#:use-module (ice-9 match)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
+ #:use-module (gnu packages aspell)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
@@ -971,6 +972,41 @@ library.")
(license
(list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+(define-public hunspell-dict-de
+ (package
+ (name "hunspell-dict-de")
+ (version "20161207")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
+ "igerman98-" version ".tar.bz2"))
+ (sha256 (base32
+ "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("hunspell/de_DE.dic")
+ #:phases
+ (modify-phases %standard-phases
+ (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/")))
+ (mkdir-p share)
+ (copy-file "hunspell/de_DE.aff" (string-append share "de_DE.aff"))
+ (copy-file "hunspell/de_DE.dic" (string-append share "de_DE.dic"))))))
+ #:tests? #f)) ;no tests
+ (native-inputs
+ `(("hunspell" ,hunspell)
+ ("ispell" ,ispell)
+ ("perl" ,perl)))
+ (synopsis "Hunspell dictionary for German (de_DE)")
+ (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 hyphen
(package
(name "hyphen")
--
2.27.0
J
J
Jonathan Brielmaier wrote on 28 Jul 2020 14:51
Re: [PATCH v3 1/2] gnu: Add ispell.
(address . efraim@flashner.co.il)
7712f260-e389-919a-5085-a79af523e80f@web.de
On 28.07.20 13:36, Jakub K?dzio?ka wrote:
Toggle quote (13 lines)
> * gnu/packages/aspell.scm (ispell): New variable.
>
> Co-authored-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
> ---
>
> Hi,
>
> DESTDIR is a variable that should always be / on Guix. Its meaning is
> that the package should be installed to $DESTDIR/$prefix/bin/foo, but
> will be ran at $prefix/bin/foo - useful when you're managing the
> creation of a binary tarball manually, but useless and misleading for
> Guix.

Okay, thanks for that explanation :)

Toggle quote (3 lines)
> Also, we already have an implementation of Yacc - I've replaced the
> input with Bison.

I search for yacc in my /gnu/store but there was no build of Bison so I
couldn't find it. We(TM) need definitly a tool to search binaries in all
packages :)

Toggle quote (6 lines)
> Moreover, instead of patching the defaults, a configuration file is now
> created.
>
> I haven't tried spellchecking anything with ispell or using the German
> dictionary, but both packages now build.

I tested your version with LibreOffice and Icecat and it's still
working. So I'm fine with it for pushing. Thank for your review and
additional work!
J
J
Jonathan Brielmaier wrote on 27 Aug 2020 22:15
Re: [PATCH v3 2/2] gnu: Add hunspell-dict-de.
e8174171-bef8-34d6-587d-38bbfebfe749@web.de
Ping.
J
J
Jonathan Brielmaier wrote on 15 Oct 2020 22:07
(address . efraim@flashner.co.il)
61ba041a-5057-6550-447d-75b24e4606df@web.de
Another friendly ping. I'm using the patch for almost three months now
and other German users should also profit from our work :)
E
E
Efraim Flashner wrote on 18 Oct 2020 11:20
(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20201018092043.GC974@E5400
On Thu, Oct 15, 2020 at 10:07:30PM +0200, Jonathan Brielmaier wrote:
Toggle quote (3 lines)
> Another friendly ping. I'm using the patch for almost three months now
> and other German users should also profit from our work :)

Indeed. Patch pushed with minor tweaks.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+MCOoACgkQQarn3Mo9
g1GPSxAAjxzB7CjYr86t/WKGH+iUD21p5ZxaOAyw5Bqj6yIWDh3L9Id4f+5RsVqA
VXitSjUMqtarqlirXKEWqPz2R02Y8KfGecaG9J2cbGjdE1Itbb6dagDvmajOlX25
BeneGYO1x8tVnYE/a2Ne8dZ4JB1e6eY/jlV7C0XtJUNGDUdstjfbN1T0IkTpXINZ
tcDdlXWoAj7QZJHbezwFocPXyZRJ8qXzjDQJhMhCIkTQ2HebeGTUBXAsltv9ge8S
g0M4HG/2HnnWzf8BCIrpQkihOsU/BnlLE98gaJDyimhljqvwqE+xJIDF6GQ3uH7I
6qc8ldXhw8+PzHpQcF9CrDIlQLthg/JEDEosjz2A01ZHO7vjuzctZRmbj3wmy/vK
YIelkE79mPMh1Gllf5Swt0T7LL0iodh68Dr1GjnNhWu97S4oVyQE5jH1uxqT5/gi
mxb+x8zglBoqNJLzby5fZbZJfQKcB5WcCsEl6X/IAvjyM+VBX63wQ2bNbdLmWiLT
vP7bFmwghyrkebD754Ab3WdK0Wqa7Eo2xyXE3Aa9WSumLGnDt86pVRFPl4VbDZ6S
hdp609U5KlJP9hVcP7JHLfNdFhuP61kJCI8GYQX5ULRfbD6zpm1htMJR5ZmDN1XG
0AAir3rluC6TfqFdpp/0H5bySiCQ9pTMh4h8LGyrFgajyU7xmTk=
=Y/pP
-----END PGP SIGNATURE-----


Closed
?