aboutsummaryrefslogtreecommitdiff
path: root/whispers/packages/dict.scm
blob: f80f912a88c24483625019fb0c5cb9bacb490789 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
;;; Whispers --- Stealth VPN and ssh tunneler
;;; Copyright © 2024 Runciter <runciter@whispers-vpn.org>
;;;
;;; This file is part of Whispers.
;;;
;;; Whispers is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; Whispers is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Whispers.  If not, see <http://www.gnu.org/licenses/>.

(define-module (whispers packages dict)
  #:use-module (guix)
  #:use-module (guix build-system gnu)
  #:use-module ((guix licenses) #:select (gpl2+
                                          gpl3+
                                          cc-by-sa3.0))
  #:use-module (guix git-download)
  #:use-module (guix git)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages gawk)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages speech)
  #:use-module (gnu packages python)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages xml)
  #:export ())

(define-public libmaa-1.3.2
  (package
   (name "libmaa")
   (version "1.3.2")
   (source (origin
            (method url-fetch)
            (uri (string-append "mirror://sourceforge/dict/libmaa/"
                                "libmaa-"
                                version
                                "/libmaa-"
                                version
                                ".tar.gz"))
            (sha256
             (base32
              "1idi4c30pi79g5qfl7rr9s17krbjbg93bi8f2qrbsdlh78ga19ar"))))
   (inputs (list libtool))
   (arguments
    (list #:make-flags
          #~'("CFLAGS=-DHAVE_CONFIG_H  -Wall -Wno-error -g -O2 $(VERCFLAGS) -I. -I${srcdir}")
          #:test-target "test"))
   (build-system gnu-build-system)
   (synopsis "When Khepera rose up out of the watery abyss of Nu, he
 created Maa as a foundation upon which to create everything else")
   (description "The libmaa library provides many low-level
data structures which are helpful for writing compilers, including hash
tables, sets, lists, debugging support, and memory management.  Although
libmaa was designed and implemented as a foundation for the Khepara
transformation system, the data structures are generally applicable to a
wide range of programming problems.

  The memory management routines are especially helpful for improving
the performance of memory-intensive applications.")
   (home-page "https://sourceforge.net/projects/dict/")
   (license gpl2+)))

(define-public dictd-1.13.1
  (package
   (name "dictd")
   (version "1.13.1")
   (source (origin
            (method url-fetch)
            (uri (string-append "mirror://sourceforge/dict/dictd/"
                                "dictd-"
                                version
                                "/dictd-"
                                version
                                ".tar.gz"))
            (sha256
             (base32
              "06racmv25ihwgwf67fgj2703ik0m5i2cjzcxasa88kc92rysdwg4"))))
   (inputs (list libmaa-1.3.2 zlib libtool bison flex))
   (arguments
    (list #:test-target "test"))
   (build-system gnu-build-system)
   (synopsis "@command{dict}, @command{dictd} and @command{dictfmt} programs")
   (description "The DICT Interchange Format (DICF) is a human-readable
 format for the interchange of dictionary databases for the use with
DICT protocol client/server software.

This package provides a client @command{dict} and a server program
@command{dictd} for the DICT protocol, as well as a utility
@command{dictfmt} to convert various dictionary formats into
dictionaries that can be served by @command{dictd} or @command{dicos}")
   (home-page "https://sourceforge.net/projects/dict/")
   (license gpl2+)))

(define-public freedict-tools-0.6.0
  (package
   (name "freedict-tools")
   (version "0.6.0")
   (source
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/freedict/tools")
            (commit "3596640e6e0582cc5fb76a342e5d8e7413aa4b34")))
      (sha256
       (base32 "1raayynvn1j8x0ck8pnbbljl6zxnsyzzil7y54xz03dpj7k9w7mk"))))
   (inputs (list espeak-ng
                 python perl
                 gzip
                 tar
                 libxslt
                 dictd-1.13.1
                 perl-libxml))
   (arguments
    (list #:tests? #f
          #:phases
          #~(modify-phases
             %standard-phases
             (delete 'configure)
             (add-before 'build 'set-prefix-in-makefile
                         (lambda* (#:key inputs #:allow-other-keys)
                           (substitute*
                            "Makefile"
                            (("PREFIX \\?=.*")
                             (string-append "PREFIX = "
                                            #$output
                                            "\n")))
                           (substitute*
                            "mk/dicts.mk"
                            (("available_platforms := src dictd slob")
                             "available_platforms := dictd")))))))
   (build-system gnu-build-system)
   (synopsis "The FreeDict tools are used to import, export (build) and
 manage FreeDict dictionaries")
   (description "FreeDict is a project that offers over 140 free
 dictionaries in about 45 languages, with the right to study, change and
 modify them. You can use them offline on your computer or mobile phone
 and export them to any format and application.

In order to limit store size and build complexity, only the build
targets that build dictionaries in dictd format are retained when this
Guix package is installed.")
   (home-page "https://freedict.org")
   (license gpl2+)))

(define-public freedict-dictionaries
  (package
   (name "freedict-dictionaries")
   (version "914b5f7")
   (source
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/freedict/fd-dictionaries")
            (commit "914b5f754b695e9422bf951837b0682a077e244e")))
      (sha256
       (base32 "0a8k5rq94rl1nmz0354sx2gmyqica0yjavirh5v5wdybkfq8nv83"))))
   (inputs (list espeak-ng
                 python perl
                 gzip
                 tar
                 libxslt
                 dictd-1.13.1
                 perl-libxml
                 freedict-tools-0.6.0))
   (arguments
    (list #:tests? #f
          #:make-flags
          #~(list (string-append "PREFIX="
                                 #$output))
          #:phases
          #~(modify-phases
             %standard-phases
             (delete 'configure)
             (add-before 'build 'set-tools-prefix-in-makefile
                         (lambda* (#:key inputs #:allow-other-keys)
                           (substitute*
                            "Makefile"
                            (("FREEDICT_TOOLS \\?= ../tools")
                             (string-append "export FREEDICT_TOOLS = "
                                            #$(file-append
                                               freedict-tools-0.6.0
                                               "/share/freedict")))))))))
   (build-system gnu-build-system)
   (synopsis "Multilingual dictionaries of the Freedict project,
 compiled to the dictd format.")
   (description "FreeDict is a project that offers over 140 free
 dictionaries in about 45 languages, with the right to study, change and
 modify them. You can use them offline on your computer or mobile phone
 and export them to any format and application.

This Guix package only installs the output dictionnaires in dictd
format.")
   (home-page "https://freedict.org")
   (license gpl2+)))

(define-public cc-cedict
  (package
   (name "cc-cedict")
   (version "0.1")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://git.whispers-vpn.org/cc-cedict.git")
           (commit "1bb276d2340eff428ff397dbd493646d880388c4")))
     (sha256
      (base32 "1d0l6g83n964af81bl96c9hbd6gacbq9a68n5d9wgifihl33z4q7"))))
   (inputs (list sed
                 gawk
                 gzip
                 dictd-1.13.1))
   (arguments (list #:tests? #f))
   (build-system gnu-build-system)
   (synopsis "CC-CEDICT is a community-maintained free Chinese-English
 dictionary.")
   (description "CC-CEDICT is a community-maintained free
 Chinese-English dictionary. It is a continuation of the CEDICT project
started by Paul Denisowski in 1997 with the aim to provide a complete
downloadable Chinese to English dictionary with pronunciation in pinyin
for the Chinese characters.

CC-CEDICT is licensed under a Creative Commons license CC-BY-SA.

Published by MDBG

License: Creative Commons Attribution-Share Alike 3.0

Referenced works: CEDICT - Copyright © 1997, 1998 Paul Andrew Denisowski

CC-CEDICT can be downloaded from:
http://www.mdbg.net/chindict/chindict.php?page=cc-cedict

Additions and corrections to the CC-CEDICT source can be sent through:
http://cc-cedict.org/editor/editor.php

For more information about CC-CEDICT see:
http://cc-cedict.org/wiki/

This package converts the community maintained text file containing the
CC-CEDICT dictionary into 5 dictionaries in the DICT Interchange format,
which can be served to client programs such as 'dico' and 'dicod' by
servers implementing the DICT protocol (RFC 2229), such as 'dictd' or
'dicod'.

While the exporter script that this package uses to create the
dictionaries is licensed under the GPL, the output dictionaries are
licensed under CC-BY-SA version 3.0.")
   (home-page "http://cc-cedict.org/")
   (license (list cc-by-sa3.0 gpl3+))))