* [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages
@ 2024-11-17 18:06 Runciter via Guix-patches via
2024-11-18 5:55 ` [bug#74411] [PATCH 1/4] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
` (10 more replies)
0 siblings, 11 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-17 18:06 UTC (permalink / raw)
To: 74411; +Cc: Runciter
Add the dictd package from the DICT project along with its library dependency
libmaa.
Add the human-written bilingual dictionaries from the FreeDict projects
freedict-dictionaries, with its toolchain dependency freedict-tools.
Runciter (4):
gnu: Add (gnu packages dictd).
gnu: Add dictd-1.13.1.
gnu: Add freedict-tools-0.6.0.
gnu: Add freedict-dictionaries.
gnu/local.mk | 2 +
gnu/packages/dictd.scm | 98 ++++++++++++++++++++++++++++++++
gnu/packages/dictionaries.scm | 103 +++++++++++++++++++++++++++++++++-
3 files changed, 202 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/dictd.scm
base-commit: b790db7589858fc77989b4d1f369c52bca6d6e7c
--
2.46.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH 1/4] gnu: Add (gnu packages dictd).
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
@ 2024-11-18 5:55 ` Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 2/4] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
` (9 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-18 5:55 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/local.mk | 2 ++
gnu/packages/dictd.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 gnu/packages/dictd.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index a97e988add..7004d02547 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -67,6 +67,7 @@
# Copyright © 2024 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
# Copyright © 2024 Fabio Natali <me@fabionatali.com>
+# Copyright © 2024 Runciter <runciter@whispers-vpn.org>
#
# This file is part of GNU Guix.
#
@@ -239,6 +240,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/decker.scm \
%D%/packages/dhall.scm \
%D%/packages/dico.scm \
+ %D%/packages/dictd.scm \
%D%/packages/dictionaries.scm \
%D%/packages/diffoscope.scm \
%D%/packages/digest.scm \
diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm
new file mode 100644
index 0000000000..fed41def64
--- /dev/null
+++ b/gnu/packages/dictd.scm
@@ -0,0 +1,61 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Runciter <runciter@whispers-vpn.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix 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.
+;;;
+;;; GNU Guix 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 GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dictd)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module ((guix licenses) #:select (gpl2+))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages autotools))
+
+(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"))))
+ (native-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 "Low-level data structures used by the dictd program")
+ (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+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH 2/4] gnu: Add dictd-1.13.1.
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
2024-11-18 5:55 ` [bug#74411] [PATCH 1/4] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
@ 2024-11-18 5:56 ` Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 3/4] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
` (8 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-18 5:56 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictd.scm (dictd-1.13.1): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictd.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm
index fed41def64..732f2bb6cc 100644
--- a/gnu/packages/dictd.scm
+++ b/gnu/packages/dictd.scm
@@ -23,7 +23,10 @@ (define-module (gnu packages dictd)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
- #:use-module (gnu packages autotools))
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages compression))
(define-public libmaa-1.3.2
(package
@@ -59,3 +62,37 @@ (define-public libmaa-1.3.2
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))
+ (native-inputs (list 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+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH 3/4] gnu: Add freedict-tools-0.6.0.
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
2024-11-18 5:55 ` [bug#74411] [PATCH 1/4] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 2/4] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
@ 2024-11-18 5:56 ` Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 4/4] gnu: Add freedict-dictionaries Runciter via Guix-patches via
` (7 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-18 5:56 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictionaries.scm | 55 ++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3f9b59c960..3470d8d945 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -28,6 +28,7 @@
(define-module (gnu packages dictionaries)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -55,7 +56,10 @@ (define-module (gnu packages dictionaries)
#:use-module (gnu packages compression)
#:use-module (gnu packages tcl)
#:use-module (gnu packages web)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages dictd)
+ #:use-module (gnu packages speech)
+ #:use-module (gnu packages perl))
(define-public vera
@@ -466,3 +470,52 @@ (define-public skk-jisyo
for SKK Japanese input systems, and various dictionary files.
@file{SKK-JISYO.L} can be used with @code{emacs-ddskk} or @code{uim} package.")
(license 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 "FreeDict tools 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 license:gpl2+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH 4/4] gnu: Add freedict-dictionaries.
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (2 preceding siblings ...)
2024-11-18 5:56 ` [bug#74411] [PATCH 3/4] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
@ 2024-11-18 5:56 ` Runciter via Guix-patches via
2024-11-18 6:37 ` [bug#74411] freedict-dictionaries build non-deterministic Runciter via Guix-patches via
` (6 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-18 5:56 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictionaries (freedict-dictionaries): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictionaries.scm | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3470d8d945..3e5d991890 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
;;; Copyright © 2022 ROCKTAKEY <rocktakey@gmail.com>
+;;; Copyright © 2022 Runciter <runciter@whispers-vpn.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -519,3 +520,50 @@ (define-public freedict-tools-0.6.0
Guix package is installed.")
(home-page "https://freedict.org")
(license 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 "Freedict multilingual dictionaries 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.")
+ (home-page "https://freedict.org")
+ (license license:gpl2+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] freedict-dictionaries build non-deterministic
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (3 preceding siblings ...)
2024-11-18 5:56 ` [bug#74411] [PATCH 4/4] gnu: Add freedict-dictionaries Runciter via Guix-patches via
@ 2024-11-18 6:37 ` Runciter via Guix-patches via
2024-11-19 8:43 ` Nicolas Graves via Guix-patches via
2024-11-19 15:13 ` Runciter via Guix-patches via
` (5 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-18 6:37 UTC (permalink / raw)
To: 74411
The build of the package freedict-dictionaries is non-deterministic, at
least because the output dictionaries are compressed by the utility
dictzip, which includes a timestamp in the compressed file headers.
I have not confirmed it yet but I think I could fix it: it would involve
a patch to the freedict-tools package, and then output dictionaries of
freedict-dictionaries would not be compressed.
The maintainers should just tell me if it's worth it to fix
non-determinism in this way: we have to carry forward a patch (unless a
better idea comes up), and we lose the benefit of compressing the outputs.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] freedict-dictionaries build non-deterministic
2024-11-18 6:37 ` [bug#74411] freedict-dictionaries build non-deterministic Runciter via Guix-patches via
@ 2024-11-19 8:43 ` Nicolas Graves via Guix-patches via
0 siblings, 0 replies; 22+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-11-19 8:43 UTC (permalink / raw)
To: Runciter, 74411
On 2024-11-18 06:37, Runciter via Guix-patches via wrote:
> The build of the package freedict-dictionaries is non-deterministic, at
> least because the output dictionaries are compressed by the utility
> dictzip, which includes a timestamp in the compressed file headers.
Are you sure there are no options at compression time to force
determinism on the archive?
Usually, there are some, see tar invocations for instance:
(invoke "tar" "cvfa" (string-append this-file ".tar")
"--mtime=1" "--owner=root:0" "--group=root:0" ; determinism
"--sort=name" ".")
The sort is here for determinism too.
>
> I have not confirmed it yet but I think I could fix it: it would involve
> a patch to the freedict-tools package, and then output dictionaries of
> freedict-dictionaries would not be compressed.
>
> The maintainers should just tell me if it's worth it to fix
> non-determinism in this way: we have to carry forward a patch (unless a
> better idea comes up), and we lose the benefit of compressing the outputs.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] freedict-dictionaries build non-deterministic
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (4 preceding siblings ...)
2024-11-18 6:37 ` [bug#74411] freedict-dictionaries build non-deterministic Runciter via Guix-patches via
@ 2024-11-19 15:13 ` Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
` (4 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-19 15:13 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 74411
"Nicolas Graves" <ngraves@ngraves.fr> writes:
> On 2024-11-18 06:37, Runciter via Guix-patches via wrote:
>
>> The build of the package freedict-dictionaries is non-deterministic, at
>> least because the output dictionaries are compressed by the utility
>> dictzip, which includes a timestamp in the compressed file headers.
>
> Are you sure there are no options at compression time to force
> determinism on the archive?
>
I'm as sure as one can be when one has read the man page of
dictzip. That is to say, not sure about undocumented features.
Independently of dictzip capabilities, one problem actually is having to
patch the freedict-tools package if one wants to change anything to the
output compression of freedict-dictionaries. From what I found online,
FreeDict does not document how to fine-tune or disable dictzip
compression within its build system. In the place where it's done at
compile-time, I don't see any handles I could use; you can look if you
want, it's in the source of the freedict-tools package, the
'install-base' target found in the file mk/dicts.mk.
Now that I think about it I figure, IF a patch has to be done, then
surely anyway some command-line hack could be inserted into the target
from the patch that would make up for the lack of a usable command-line
switch in dictzip... It's lame to have to create, setup and maintain a
patch, but if it has to be done we might as well enjoy the flexibility.
Incidentally, gzip as a subsitute for dictzip is documented to work in
dictd, some dictd optimizations would be lost though, I guess gzipped
dictionaries may also work in dicod and I also guess, dicod probably
does not bother to make detailed optimizations tailored to the dictzip
format specifics. This and other considerations makes it potentially
worthwhile to experiment a little by creating a dictd service in my
system, if that is practical, as well as playing around with the
relevant dicod handler.
Let me study in those directions until the end of the week and get back
to you.
Regards,
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd).
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (5 preceding siblings ...)
2024-11-19 15:13 ` Runciter via Guix-patches via
@ 2024-11-21 0:49 ` Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
` (4 more replies)
2024-11-21 1:15 ` [bug#74411] patch v2 non-determinism fix Runciter via Guix-patches via
` (3 subsequent siblings)
10 siblings, 5 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 0:49 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/local.mk | 2 ++
gnu/packages/dictd.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 gnu/packages/dictd.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index a97e988add..7004d02547 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -67,6 +67,7 @@
# Copyright © 2024 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
# Copyright © 2024 Fabio Natali <me@fabionatali.com>
+# Copyright © 2024 Runciter <runciter@whispers-vpn.org>
#
# This file is part of GNU Guix.
#
@@ -239,6 +240,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/decker.scm \
%D%/packages/dhall.scm \
%D%/packages/dico.scm \
+ %D%/packages/dictd.scm \
%D%/packages/dictionaries.scm \
%D%/packages/diffoscope.scm \
%D%/packages/digest.scm \
diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm
new file mode 100644
index 0000000000..fed41def64
--- /dev/null
+++ b/gnu/packages/dictd.scm
@@ -0,0 +1,61 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Runciter <runciter@whispers-vpn.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix 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.
+;;;
+;;; GNU Guix 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 GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dictd)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module ((guix licenses) #:select (gpl2+))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages autotools))
+
+(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"))))
+ (native-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 "Low-level data structures used by the dictd program")
+ (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+)))
base-commit: b790db7589858fc77989b4d1f369c52bca6d6e7c
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1.
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
@ 2024-11-21 0:49 ` Runciter via Guix-patches via
2024-11-29 13:11 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
` (3 subsequent siblings)
4 siblings, 1 reply; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 0:49 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictd.scm (dictd-1.13.1): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictd.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm
index fed41def64..732f2bb6cc 100644
--- a/gnu/packages/dictd.scm
+++ b/gnu/packages/dictd.scm
@@ -23,7 +23,10 @@ (define-module (gnu packages dictd)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
- #:use-module (gnu packages autotools))
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages compression))
(define-public libmaa-1.3.2
(package
@@ -59,3 +62,37 @@ (define-public libmaa-1.3.2
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))
+ (native-inputs (list 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+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0.
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
@ 2024-11-21 0:50 ` Runciter via Guix-patches via
2024-11-29 13:14 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
` (2 subsequent siblings)
4 siblings, 1 reply; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 0:50 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictionaries.scm | 55 ++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3f9b59c960..3470d8d945 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -28,6 +28,7 @@
(define-module (gnu packages dictionaries)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -55,7 +56,10 @@ (define-module (gnu packages dictionaries)
#:use-module (gnu packages compression)
#:use-module (gnu packages tcl)
#:use-module (gnu packages web)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages dictd)
+ #:use-module (gnu packages speech)
+ #:use-module (gnu packages perl))
(define-public vera
@@ -466,3 +470,52 @@ (define-public skk-jisyo
for SKK Japanese input systems, and various dictionary files.
@file{SKK-JISYO.L} can be used with @code{emacs-ddskk} or @code{uim} package.")
(license 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 "FreeDict tools 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 license:gpl2+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries.
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
2024-11-21 0:50 ` [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
@ 2024-11-21 0:50 ` Runciter via Guix-patches via
2024-11-29 13:28 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers Runciter via Guix-patches via
2024-11-29 13:10 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Ludovic Courtès
4 siblings, 1 reply; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 0:50 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictionaries (freedict-dictionaries): New variable.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/dictionaries.scm | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3470d8d945..3e5d991890 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
;;; Copyright © 2022 ROCKTAKEY <rocktakey@gmail.com>
+;;; Copyright © 2022 Runciter <runciter@whispers-vpn.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -519,3 +520,50 @@ (define-public freedict-tools-0.6.0
Guix package is installed.")
(home-page "https://freedict.org")
(license 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 "Freedict multilingual dictionaries 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.")
+ (home-page "https://freedict.org")
+ (license license:gpl2+)))
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers.
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
` (2 preceding siblings ...)
2024-11-21 0:50 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
@ 2024-11-21 0:50 ` Runciter via Guix-patches via
2024-11-29 13:34 ` Ludovic Courtès
2024-11-29 13:10 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Ludovic Courtès
4 siblings, 1 reply; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 0:50 UTC (permalink / raw)
To: 74411; +Cc: Runciter
Reset .dict file mtime to start of the epoch before compressing with dictzip.
* gnu/packages/patches/freedict-tools-fix-determinism.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/dictionaries.scm (freedict-tools): Use it.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/local.mk | 1 +
gnu/packages/dictionaries.scm | 3 ++-
.../freedict-tools-fix-determinism.patch | 22 +++++++++++++++++++
3 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/freedict-tools-fix-determinism.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 7004d02547..f6b465441a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1291,6 +1291,7 @@ dist_patch_DATA = \
%D%/packages/patches/fpc-glibc-2.34-compat.patch \
%D%/packages/patches/fpm-newer-clamp-fix.patch \
%D%/packages/patches/freecad-vtk-9.3.patch \
+ %D%/packages/patches/freedict-tools-fix-determinism.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
%D%/packages/patches/freeimage-libtiff-compat.patch \
%D%/packages/patches/freeimage-libraw-0.21-compat.patch \
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3e5d991890..a6daf209e3 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -483,7 +483,8 @@ (define-public freedict-tools-0.6.0
(url "https://github.com/freedict/tools")
(commit "3596640e6e0582cc5fb76a342e5d8e7413aa4b34")))
(sha256
- (base32 "1raayynvn1j8x0ck8pnbbljl6zxnsyzzil7y54xz03dpj7k9w7mk"))))
+ (base32 "1raayynvn1j8x0ck8pnbbljl6zxnsyzzil7y54xz03dpj7k9w7mk"))
+ (patches (search-patches "freedict-tools-fix-determinism.patch"))))
(inputs (list espeak-ng
python
perl
diff --git a/gnu/packages/patches/freedict-tools-fix-determinism.patch b/gnu/packages/patches/freedict-tools-fix-determinism.patch
new file mode 100644
index 0000000000..ad100bbba9
--- /dev/null
+++ b/gnu/packages/patches/freedict-tools-fix-determinism.patch
@@ -0,0 +1,22 @@
+The compression utility dictzip writes the compressed file's mtime in a header
+of the compressed file. No command-line switch is documented to control or
+suppress this behavior. This makes the build of packages relying on
+freedict-tools such as freedict-dictionaries non-deterministic.
+
+This patch sets the mtime of the .dict file to be compressed by dictzip to the
+start of the epoch on the Greenwich meridian, restoring build determinism.
+
+diff --git a/mk/dicts.mk b/mk/dicts.mk
+index 08e8923..e671cf3 100644
+--- a/mk/dicts.mk
++++ b/mk/dicts.mk
+@@ -265,7 +265,8 @@ $(BUILD_DICTD)/%.dict $(BUILD_DICTD)/%.index: $(BUILD_DICTD)/%.c5 query-dictd
+ dictfmt --without-time -t --headword-separator %%% $(DICTFMTFLAGS) $* < $(notdir $<)
+
+ $(BUILD_DICTD)/%.dict.dz: $(BUILD_DICTD)/%.dict
+- dictzip -k $<
++ touch -m -d "$$(date -u -R -d @0)" $< && \
++ dictzip -k $<
+
+ # prevent make from removing our precious file
+ .PRECIOUS: $(BUILD_DICTD)/$(dictname).dict
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#74411] patch v2 non-determinism fix
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (6 preceding siblings ...)
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
@ 2024-11-21 1:15 ` Runciter via Guix-patches via
2024-12-01 20:41 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
` (2 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-11-21 1:15 UTC (permalink / raw)
To: 74411
Version 2 of the patch is a change to the freedict-tools package which
is a fix for the non-determinism of dictzip headers.
Before compressing .dict files, a shell command involving touch and date
sets the file's mtime to the start of the epoch taken on the Greenwich
meridian.
The build is now repeatable on my machine, and probably on any single
machine. As for reproducibility across machines, well, good chance it'll
be reproducible: the design intent is that the compressed file headers
should be insensitive to the system's configured time zone. This will
need to be assured by challenging a substitutes build from a computer
which is configured on a timezone different from its substitute server.
Runciter
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd).
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
` (3 preceding siblings ...)
2024-11-21 0:50 ` [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers Runciter via Guix-patches via
@ 2024-11-29 13:10 ` Ludovic Courtès
4 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2024-11-29 13:10 UTC (permalink / raw)
To: Runciter; +Cc: 74411
Hi,
Thanks for these patches!
Overall it LGTM, I only have minor comments and suggestions:
Runciter <runciter@whispers-vpn.org> skribis:
> * gnu/packages/dictd.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>
[...]
> +(define-public libmaa-1.3.2
Unless there’s a good reason (such as future patches adding specific
versions), I’d call it ‘libmaa’.
> + (native-inputs (list libtool))
I suspect you don’t need Libtool here (it would be needed if you were
building from a checkout instead of from a tarball).
> + (arguments
> + (list
> + #:make-flags #~'("CFLAGS=-DHAVE_CONFIG_H -Wall -Wno-error -g -O2 $(VERCFLAGS) -I. -I${srcdir}")
Could you add a comment (one or two lines) explaining why these flags
are needed?
> + The memory management routines are especially helpful for improving
^
Extra space. :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1.
2024-11-21 0:49 ` [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
@ 2024-11-29 13:11 ` Ludovic Courtès
0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2024-11-29 13:11 UTC (permalink / raw)
To: Runciter; +Cc: 74411
Runciter <runciter@whispers-vpn.org> skribis:
> * gnu/packages/dictd.scm (dictd-1.13.1): New variable.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>
[...]
> +(define-public dictd-1.13.1
Likewise, just ‘dictd’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0.
2024-11-21 0:50 ` [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
@ 2024-11-29 13:14 ` Ludovic Courtès
0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2024-11-29 13:14 UTC (permalink / raw)
To: Runciter; +Cc: 74411
Runciter <runciter@whispers-vpn.org> skribis:
> * gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>
[...]
> +(define-public freedict-tools-0.6.0
‘freedict-tools’
> + (synopsis "FreeDict tools to import, export (build) and manage FreeDict
> +dictionaries")
Or just “Build and manage FreeDict dictionaries”.
> + "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.
^
Extra space. :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries.
2024-11-21 0:50 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
@ 2024-11-29 13:28 ` Ludovic Courtès
0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2024-11-29 13:28 UTC (permalink / raw)
To: Runciter; +Cc: 74411
Runciter <runciter@whispers-vpn.org> skribis:
> * gnu/packages/dictionaries (freedict-dictionaries): New variable.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>
[...]
> +(define-public freedict-dictionaries
> + (package
> + (name "freedict-dictionaries")
> + (version "914b5f7")
Regarding the version number of Git snapshots, see
<https://guix.gnu.org/manual/devel/en/html_node/Version-Numbers.html>.
> + (inputs (list espeak-ng
> + python
> + perl
> + gzip
> + tar
> + libxslt
> + dictd-1.13.1
> + perl-libxml
> + freedict-tools-0.6.0))
You can remove ‘tar’ and ‘gzip’, they’re provided by ‘gnu-build-system’.
‘python’ and ‘perl’ should probably be in ‘native-inputs’, assuming
they’re used at build-time.
> + (arguments
> + (list
> + #:tests? #f
Please add a short comment explaining why the test suite is skipped
(such as “no tests”).
> + (synopsis "Freedict multilingual dictionaries compiled to the dictd
> +format")
Maybe: “Multilingual dictionaries compiled to the DICT format” (the
format is “DICT”, right?).
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers.
2024-11-21 0:50 ` [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers Runciter via Guix-patches via
@ 2024-11-29 13:34 ` Ludovic Courtès
0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2024-11-29 13:34 UTC (permalink / raw)
To: Runciter; +Cc: 74411
Runciter <runciter@whispers-vpn.org> skribis:
> Reset .dict file mtime to start of the epoch before compressing with dictzip.
>
> * gnu/packages/patches/freedict-tools-fix-determinism.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/dictionaries.scm (freedict-tools): Use it.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>
Nice, LGTM!
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd).
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (7 preceding siblings ...)
2024-11-21 1:15 ` [bug#74411] patch v2 non-determinism fix Runciter via Guix-patches via
@ 2024-12-01 20:41 ` Runciter via Guix-patches via
2024-12-01 20:53 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
2024-12-01 20:59 ` [bug#74411] [PATCH v3 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-12-01 20:41 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 74411
Hi,
I'll send a revised patch series in a few minutes.
Thanks for review and feedback, I tried to follow all the advice and may
have succeeded except for 3 items for which the packages pose specific
difficulties.
Ludovic Courtès <ludo@gnu.org> writes:
>> + (native-inputs (list libtool))
>
> I suspect you don’t need Libtool here (it would be needed if you were
> building from a checkout instead of from a tarball).
I tried to remove the libtool native input but the test phase failed.
Regards,
Runciter
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries.
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (8 preceding siblings ...)
2024-12-01 20:41 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
@ 2024-12-01 20:53 ` Runciter via Guix-patches via
2024-12-01 20:59 ` [bug#74411] [PATCH v3 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-12-01 20:53 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 74411
Ludovic Courtès <ludo@gnu.org> writes:
>> +(define-public freedict-dictionaries
>> + (package
>> + (name "freedict-dictionaries")
>> + (version "914b5f7")
>
> Regarding the version number of Git snapshots, see
> <https://guix.gnu.org/manual/devel/en/html_node/Version-Numbers.html>.
I don't find anything that looks like an overall upstream version for
the whole freedict-dictionaries package. It seems only individual
dictionaries are (partially?) versioned.
Therefore at this time I don't have a unique and correct argument I
could feed to git-version.
>> + (arguments
>> + (list
>> + #:tests? #f
>
> Please add a short comment explaining why the test suite is skipped
> (such as “no tests”).
Actually There is a "validation" target that could be considered for the
test phase. It lints a xml source file for each dictionary. However it
fails because of a hard-coded "/usr/bin/xmllint" path in
freedict-tools. I added a comment to mention this issue.
This might be fixable; I'll try if requested by a maintainer. I have not
tried yet because it would probably require an extra special measure,
in the form of either a patch or regexp substitution.
Regards,
Runciter
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#74411] [PATCH v3 1/5] gnu: Add (gnu packages dictd).
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
` (9 preceding siblings ...)
2024-12-01 20:53 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
@ 2024-12-01 20:59 ` Runciter via Guix-patches via
10 siblings, 0 replies; 22+ messages in thread
From: Runciter via Guix-patches via @ 2024-12-01 20:59 UTC (permalink / raw)
To: 74411; +Cc: Runciter
* gnu/packages/dictd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/local.mk | 2 ++
gnu/packages/dictd.scm | 63 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
create mode 100644 gnu/packages/dictd.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index a97e988add..7004d02547 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -67,6 +67,7 @@
# Copyright © 2024 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
# Copyright © 2024 Fabio Natali <me@fabionatali.com>
+# Copyright © 2024 Runciter <runciter@whispers-vpn.org>
#
# This file is part of GNU Guix.
#
@@ -239,6 +240,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/decker.scm \
%D%/packages/dhall.scm \
%D%/packages/dico.scm \
+ %D%/packages/dictd.scm \
%D%/packages/dictionaries.scm \
%D%/packages/diffoscope.scm \
%D%/packages/digest.scm \
diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm
new file mode 100644
index 0000000000..8e025a2f04
--- /dev/null
+++ b/gnu/packages/dictd.scm
@@ -0,0 +1,63 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Runciter <runciter@whispers-vpn.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix 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.
+;;;
+;;; GNU Guix 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 GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dictd)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module ((guix licenses) #:select (gpl2+))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages autotools))
+
+(define-public libmaa
+ (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"))))
+ (native-inputs (list libtool))
+ (arguments
+ (list
+ ;; Change -Werror to -Wno-error, reproduce other default flags
+ ;; Do not error out on warnings related to snprintf function
+ #:make-flags #~'("CFLAGS=-DHAVE_CONFIG_H -Wall -Wno-error -g -O2 $(VERCFLAGS) -I. -I${srcdir}")
+ #:test-target "test"))
+ (build-system gnu-build-system)
+ (synopsis "Low-level data structures used by the dictd program")
+ (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+)))
base-commit: b790db7589858fc77989b4d1f369c52bca6d6e7c
--
2.46.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-12-01 21:00 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17 18:06 [bug#74411] [PATCH 0/4] Add DICT and FreeDict projects packages Runciter via Guix-patches via
2024-11-18 5:55 ` [bug#74411] [PATCH 1/4] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 2/4] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 3/4] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
2024-11-18 5:56 ` [bug#74411] [PATCH 4/4] gnu: Add freedict-dictionaries Runciter via Guix-patches via
2024-11-18 6:37 ` [bug#74411] freedict-dictionaries build non-deterministic Runciter via Guix-patches via
2024-11-19 8:43 ` Nicolas Graves via Guix-patches via
2024-11-19 15:13 ` Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-11-21 0:49 ` [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1 Runciter via Guix-patches via
2024-11-29 13:11 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0 Runciter via Guix-patches via
2024-11-29 13:14 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
2024-11-29 13:28 ` Ludovic Courtès
2024-11-21 0:50 ` [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers Runciter via Guix-patches via
2024-11-29 13:34 ` Ludovic Courtès
2024-11-29 13:10 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Ludovic Courtès
2024-11-21 1:15 ` [bug#74411] patch v2 non-determinism fix Runciter via Guix-patches via
2024-12-01 20:41 ` [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
2024-12-01 20:53 ` [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries Runciter via Guix-patches via
2024-12-01 20:59 ` [bug#74411] [PATCH v3 1/5] gnu: Add (gnu packages dictd) Runciter via Guix-patches via
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.