From b6e4bcd6bc48fc990a529464d8b338bc398abcf0 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 11 Sep 2025 21:36:32 +0800 Subject: [PATCH] gnu: Move dictd and libmaa to (gnu packages dictionaries). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dictd.scm (libmaa, dictd): Move from here ... * gnu/packages/dictionaries.scm: ... to here. * gnu/local.mk (GNU_SYSTEM_MODULES): Remove entry of %D%/packages/dictd.scm. Closes: #2628 Change-Id: I991d6c5e3ad07b0fa2b0da27e30da552b95abce9 Signed-off-by: 宋文武 --- gnu/local.mk | 1 - gnu/packages/dictd.scm | 108 ---------------------------------- gnu/packages/dictionaries.scm | 83 +++++++++++++++++++++++++- 3 files changed, 81 insertions(+), 111 deletions(-) delete mode 100644 gnu/packages/dictd.scm diff --git a/gnu/local.mk b/gnu/local.mk index c89c7ff16423ddd974d5084e7b6b59a2536c8f82..13aaa806ce5371d2155c6659974ad2b8af57c429 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -239,7 +239,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/dezyne.scm \ %D%/packages/decker.scm \ %D%/packages/dhall.scm \ - %D%/packages/dictd.scm \ %D%/packages/dotnet.scm \ %D%/packages/dictionaries.scm \ %D%/packages/diffoscope.scm \ diff --git a/gnu/packages/dictd.scm b/gnu/packages/dictd.scm deleted file mode 100644 index 408d5fc4efa7b4c12cbf45019847148886f24daf..0000000000000000000000000000000000000000 --- a/gnu/packages/dictd.scm +++ /dev/null @@ -1,108 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2024 Runciter -;;; -;;; 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 . - -(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) - #:use-module (gnu packages bison) - #:use-module (gnu packages flex) - #:use-module (gnu packages compression)) - -(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+))) - -(define-public dictd - (package - (name "dictd") - (version "1.13.3") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/dict/dictd/" - "dictd-" - version - "/dictd-" - version - ".tar.gz")) - (sha256 - (base32 "0w8i7w3xs53kj5v72xf1zq24kz4qa6fcg1lmibs279wgnggjj88r")))) - (inputs (list libmaa zlib)) - (native-inputs (list libtool bison flex)) - (arguments - (list - #:test-target "test" - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-configure - (lambda _ - ;; workaround for missing yylex in yywrap lex check - (substitute* "configure" - (("yywrap [(]void[)];") - "yywrap (void); int yylex () { return 0; }"))))))) - (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 Dico.") - (home-page "https://sourceforge.net/projects/dict/") - (license gpl2+))) diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index 5e53675ea70943dca27b700a28c89789e0b15605..6735a58ffd5a36558183e777b464b4026c15af74 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2020 Lu hux ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2022 ROCKTAKEY -;;; Copyright © 2022 Runciter +;;; Copyright © 2022, 2024 Runciter ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2025 Artyom V. Poptsov ;;; Copyright © 2025 Zhu Zihao @@ -45,11 +45,11 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) - #:use-module (gnu packages dictd) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages fribidi) @@ -127,6 +127,85 @@ written in C, Guile or Python. Dico also includes a command-line client, which may be used to query remote dictionary databases.") (license license:gpl3+))) +(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 license:gpl2+))) + +(define-public dictd + (package + (name "dictd") + (version "1.13.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/dict/dictd/" + "dictd-" + version + "/dictd-" + version + ".tar.gz")) + (sha256 + (base32 "0w8i7w3xs53kj5v72xf1zq24kz4qa6fcg1lmibs279wgnggjj88r")))) + (inputs (list libmaa zlib)) + (native-inputs (list libtool bison flex)) + (arguments + (list + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-configure + (lambda _ + ;; workaround for missing yylex in yywrap lex check + (substitute* "configure" + (("yywrap [(]void[)];") + "yywrap (void); int yylex () { return 0; }"))))))) + (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 Dico.") + (home-page "https://sourceforge.net/projects/dict/") + (license license:gpl2+))) + (define-public vera (package (name "vera")