Subject: Add qolibri with its dependency
From: Nicolò Balzarotti <[email-masked]>
To: [email-masked]
Date: Sat, 04 Sep 2021 14:50:47 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi guix!

Those two patches add qolibri, a dictionary viewver for the EPWING
format (used by Japanese dictionaries) and libeb, a library used by
qolibri to read those dictionaries.

I could not find an homepage for libeb: AUR and NixOS do not have a
working one (404 and missing), so I added the website where the file can
be downloaded (but the website is in Japanese, if the libeb page was
just moved I could not find it).

Both packages build and guix lint does not complain.

I was not sure about the best place for libeb (maybe it fits better
under cdrom.scm)

Thanks!
Nicolò

From 0474a605bb952443b94ea1bdd3a681c7d1daf367 Mon Sep 17 00:00:00 2001
From: nixo <[email-masked]>
Date: Sat, 4 Sep 2021 14:15:27 +0200
Subject: [PATCH 1/2] gnu: Add libeb.

* gnu/packages/education.scm (libeb): New variable.
---
 gnu/packages/education.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index f0120c8af2..897dd37088 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -1019,6 +1019,32 @@ factoring numbers and simplifying fractions, as well as zapping rocks
 floating through space.")
     (license license:gpl3+)))
 
+(define-public libeb
+  (package
+    (name "libeb")
+    (version "4.4.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "ftp://ftp.sra.co.jp/pub/misc/eb/eb-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb"))))
+    (build-system gnu-build-system)
+    (native-inputs ; Required for building docs
+     `(("perl" ,perl)))
+    (inputs
+     `(("zlib" ,zlib)))
+    (synopsis "C library for accessing Japanese CD-ROM books")
+    (description "The EB library is a library for accessing CD-ROM
+books, which are a common way to distribute electronic dictionaries in
+Japan.  It supports the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING
+formats.")
+    ;; FIXME: I cannot find a real home page
+    (home-page "https://sra.co.jp/")
+    (license license:bsd-3)))
+
 (define-public mdk
   (package
     (name "mdk")
-- 
2.33.0

From 6d8228deb30b4aedfaadf6cda76bbe346a184baa Mon Sep 17 00:00:00 2001
From: nixo <[email-masked]>
Date: Sat, 4 Sep 2021 14:26:17 +0200
Subject: [PATCH 2/2] gnu: Add qolibri.

* gnu/packages/education.scm (qolibri): New variable.
---
 gnu/packages/education.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index 897dd37088..2039347ddc 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -1045,6 +1045,40 @@ formats.")
     (home-page "https://sra.co.jp/")
     (license license:bsd-3)))
 
+(define-public qolibri
+  (package
+    (name "qolibri")
+    (version "2.1.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url"https://github.com/ludios/qolibri")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "066y7jcq9vg6hnvn7qxckzhd1qkgfzpzhw69nw5psm43qbaca8lg"))))
+    (build-system qt-build-system)
+    (arguments
+     '(#:tests? #f)) ; no test target
+    (native-inputs
+     `(("qttools", qttools)))
+    (inputs
+     `(("libeb" ,libeb)
+       ("qtbase" ,qtbase-5)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebengine" ,qtwebengine)
+       ("zlib" ,zlib)))
+    (synopsis "EPWING dictionary reader")
+    (description "qolibri is a dictionary viewer for the EPWING dictionary
+format.  Most monolingual Japanese dictionaries can only be found in the
+EPWING format.")
+    (home-page "https://github.com/ludios/qolibri")
+    (license license:gpl2)))
+
 (define-public mdk
   (package
     (name "mdk")
-- 
2.33.0