Package: guix-patches;
Reported by: Runciter <runciter <at> whispers-vpn.org>
Date: Mon, 18 Nov 2024 05:05:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74411 in the body.
You can then email your comments to 74411 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 05:05:02 GMT) Full text and rfc822 format available.Runciter <runciter <at> whispers-vpn.org>
:guix-patches <at> gnu.org
.
(Mon, 18 Nov 2024 05:05:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: guix-patches <at> gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH 0/4] Add DICT and FreeDict projects packages Date: Sun, 17 Nov 2024 18:06:50 +0000
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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 05:57:02 GMT) Full text and rfc822 format available.Message #8 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH 1/4] gnu: Add (gnu packages dictd). Date: Mon, 18 Nov 2024 05:55:49 +0000
* gnu/packages/dictd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Runciter <runciter <at> 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 <at> posteo.net> # Copyright © 2024 Ashish SHUKLA <ashish.is <at> lostca.se> # Copyright © 2024 Fabio Natali <me <at> fabionatali.com> +# Copyright © 2024 Runciter <runciter <at> 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 <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 05:57:03 GMT) Full text and rfc822 format available.Message #11 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH 2/4] gnu: Add dictd-1.13.1. Date: Mon, 18 Nov 2024 05:56:18 +0000
* gnu/packages/dictd.scm (dictd-1.13.1): New variable. Signed-off-by: Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 05:57:03 GMT) Full text and rfc822 format available.Message #14 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH 3/4] gnu: Add freedict-tools-0.6.0. Date: Mon, 18 Nov 2024 05:56:31 +0000
* gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable. Signed-off-by: Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 05:57:04 GMT) Full text and rfc822 format available.Message #17 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH 4/4] gnu: Add freedict-dictionaries. Date: Mon, 18 Nov 2024 05:56:41 +0000
* gnu/packages/dictionaries (freedict-dictionaries): New variable. Signed-off-by: Runciter <runciter <at> 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 <at> gmx.com> ;;; Copyright © 2020 Lu hux <luhux <at> outlook.com> ;;; Copyright © 2022 ROCKTAKEY <rocktakey <at> gmail.com> +;;; Copyright © 2022 Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Mon, 18 Nov 2024 06:38:01 GMT) Full text and rfc822 format available.Message #20 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Subject: freedict-dictionaries build non-deterministic Date: Mon, 18 Nov 2024 06:37:39 +0000
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.
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Tue, 19 Nov 2024 08:44:01 GMT) Full text and rfc822 format available.Message #23 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Nicolas Graves <ngraves <at> ngraves.fr> To: Runciter <runciter <at> whispers-vpn.org>, 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] freedict-dictionaries build non-deterministic Date: Tue, 19 Nov 2024 09:43:26 +0100
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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Tue, 19 Nov 2024 15:14:02 GMT) Full text and rfc822 format available.Message #26 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: Nicolas Graves <ngraves <at> ngraves.fr> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] freedict-dictionaries build non-deterministic Date: Tue, 19 Nov 2024 15:13:06 +0000
"Nicolas Graves" <ngraves <at> 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,
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 00:51:02 GMT) Full text and rfc822 format available.Message #29 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v2 1/5] gnu: Add (gnu packages dictd). Date: Thu, 21 Nov 2024 00:49:51 +0000
* gnu/packages/dictd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Runciter <runciter <at> 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 <at> posteo.net> # Copyright © 2024 Ashish SHUKLA <ashish.is <at> lostca.se> # Copyright © 2024 Fabio Natali <me <at> fabionatali.com> +# Copyright © 2024 Runciter <runciter <at> 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 <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 00:51:02 GMT) Full text and rfc822 format available.Message #32 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v2 2/5] gnu: Add dictd-1.13.1. Date: Thu, 21 Nov 2024 00:49:59 +0000
* gnu/packages/dictd.scm (dictd-1.13.1): New variable. Signed-off-by: Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 00:51:03 GMT) Full text and rfc822 format available.Message #35 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0. Date: Thu, 21 Nov 2024 00:50:05 +0000
* gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable. Signed-off-by: Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 00:51:03 GMT) Full text and rfc822 format available.Message #38 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v2 4/5] gnu: Add freedict-dictionaries. Date: Thu, 21 Nov 2024 00:50:10 +0000
* gnu/packages/dictionaries (freedict-dictionaries): New variable. Signed-off-by: Runciter <runciter <at> 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 <at> gmx.com> ;;; Copyright © 2020 Lu hux <luhux <at> outlook.com> ;;; Copyright © 2022 ROCKTAKEY <rocktakey <at> gmail.com> +;;; Copyright © 2022 Runciter <runciter <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 00:51:04 GMT) Full text and rfc822 format available.Message #41 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers. Date: Thu, 21 Nov 2024 00:50:17 +0000
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 <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Thu, 21 Nov 2024 01:16:01 GMT) Full text and rfc822 format available.Message #44 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Subject: patch v2 non-determinism fix Date: Thu, 21 Nov 2024 01:15:47 +0000
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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Fri, 29 Nov 2024 13:12:01 GMT) Full text and rfc822 format available.Message #47 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd). Date: Fri, 29 Nov 2024 14:10:52 +0100
Hi, Thanks for these patches! Overall it LGTM, I only have minor comments and suggestions: Runciter <runciter <at> whispers-vpn.org> skribis: > * gnu/packages/dictd.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > > Signed-off-by: Runciter <runciter <at> 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. :-)
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Fri, 29 Nov 2024 13:13:02 GMT) Full text and rfc822 format available.Message #50 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 2/5] gnu: Add dictd-1.13.1. Date: Fri, 29 Nov 2024 14:11:23 +0100
Runciter <runciter <at> whispers-vpn.org> skribis: > * gnu/packages/dictd.scm (dictd-1.13.1): New variable. > > Signed-off-by: Runciter <runciter <at> whispers-vpn.org> [...] > +(define-public dictd-1.13.1 Likewise, just ‘dictd’.
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Fri, 29 Nov 2024 13:15:02 GMT) Full text and rfc822 format available.Message #53 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 3/5] gnu: Add freedict-tools-0.6.0. Date: Fri, 29 Nov 2024 14:14:16 +0100
Runciter <runciter <at> whispers-vpn.org> skribis: > * gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable. > > Signed-off-by: Runciter <runciter <at> 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. :-)
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Fri, 29 Nov 2024 13:29:01 GMT) Full text and rfc822 format available.Message #56 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries. Date: Fri, 29 Nov 2024 14:28:08 +0100
Runciter <runciter <at> whispers-vpn.org> skribis: > * gnu/packages/dictionaries (freedict-dictionaries): New variable. > > Signed-off-by: Runciter <runciter <at> 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?).
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Fri, 29 Nov 2024 13:35:02 GMT) Full text and rfc822 format available.Message #59 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers. Date: Fri, 29 Nov 2024 14:34:41 +0100
Runciter <runciter <at> 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 <at> whispers-vpn.org> Nice, LGTM!
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 20:42:01 GMT) Full text and rfc822 format available.Message #62 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 1/5] gnu: Add (gnu packages dictd). Date: Sun, 01 Dec 2024 20:41:41 +0000
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 <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 20:54:02 GMT) Full text and rfc822 format available.Message #65 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 74411 <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v2 4/5] gnu: Add freedict-dictionaries. Date: Sun, 01 Dec 2024 20:53:15 +0000
Ludovic Courtès <ludo <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 21:00:03 GMT) Full text and rfc822 format available.Message #68 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v3 1/5] gnu: Add (gnu packages dictd). Date: Sun, 01 Dec 2024 20:59:35 +0000
* gnu/packages/dictd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Runciter <runciter <at> 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 <at> posteo.net> # Copyright © 2024 Ashish SHUKLA <ashish.is <at> lostca.se> # Copyright © 2024 Fabio Natali <me <at> fabionatali.com> +# Copyright © 2024 Runciter <runciter <at> 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 <at> 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 21:01:01 GMT) Full text and rfc822 format available.Message #71 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v3 2/5] gnu: Add dictd. Date: Sun, 01 Dec 2024 20:59:53 +0000
* gnu/packages/dictd.scm (dictd-1.13.1): New variable. Signed-off-by: Runciter <runciter <at> 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 8e025a2f04..5456b39d9b 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 (package @@ -61,3 +64,37 @@ (define-public libmaa performance of memory-intensive applications.") (home-page "https://sourceforge.net/projects/dict/") (license gpl2+))) + +(define-public dictd + (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 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 21:01:02 GMT) Full text and rfc822 format available.Message #74 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v3 3/5] gnu: Add freedict-tools. Date: Sun, 01 Dec 2024 21:00:05 +0000
* gnu/packages/dictionaries.scm (freedict-tools-0.6.0): New variable. Signed-off-by: Runciter <runciter <at> whispers-vpn.org> --- gnu/packages/dictionaries.scm | 54 ++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index 3f9b59c960..3141d6d46d 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,51 @@ (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 + (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 + 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 "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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 21:01:02 GMT) Full text and rfc822 format available.Message #77 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v3 4/5] gnu: Add freedict-dictionaries. Date: Sun, 01 Dec 2024 21:00:16 +0000
* gnu/packages/dictionaries (freedict-dictionaries): New variable. Signed-off-by: Runciter <runciter <at> whispers-vpn.org> --- gnu/packages/dictionaries.scm | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index 3141d6d46d..e6f9f7f5a8 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com> ;;; Copyright © 2020 Lu hux <luhux <at> outlook.com> ;;; Copyright © 2022 ROCKTAKEY <rocktakey <at> gmail.com> +;;; Copyright © 2022 Runciter <runciter <at> whispers-vpn.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -518,3 +519,44 @@ (define-public freedict-tools 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 libxslt dictd perl-libxml freedict-tools)) + (native-inputs (list python perl)) + (arguments + (list + ;; "validation" target fails because of hardcoded + ;; path /usr/bin/xmllint in freedict-tools + #: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 + "/share/freedict"))))))))) + (build-system gnu-build-system) + (synopsis "Multilingual dictionaries compiled to the DICT 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
guix-patches <at> gnu.org
:bug#74411
; Package guix-patches
.
(Sun, 01 Dec 2024 21:01:03 GMT) Full text and rfc822 format available.Message #80 received at 74411 <at> debbugs.gnu.org (full text, mbox):
From: Runciter <runciter <at> whispers-vpn.org> To: 74411 <at> debbugs.gnu.org Cc: Runciter <runciter <at> whispers-vpn.org> Subject: [PATCH v3 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers. Date: Sun, 01 Dec 2024 21:00:29 +0000
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 <at> 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 e6f9f7f5a8..da86b4f797 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -483,7 +483,8 @@ (define-public freedict-tools (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
Ludovic Courtès <ludo <at> gnu.org>
:Runciter <runciter <at> whispers-vpn.org>
:Message #85 received at 74411-done <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Runciter <runciter <at> whispers-vpn.org> Cc: 74411-done <at> debbugs.gnu.org Subject: Re: [bug#74411] [PATCH v3 1/5] gnu: Add (gnu packages dictd). Date: Mon, 02 Dec 2024 22:04:07 +0100
Hi, Applied with minor changes: the ‘freedict-dictionaries’ version string and adding ‘file-name’ fields to ‘git-fetch’ origins as reported by ‘guix lint’. Thanks! Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Tue, 31 Dec 2024 12:24:06 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.