summary refs log tree commit diff
path: root/gnu/packages/djvu.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-11-22 14:10:19 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-11-22 14:28:45 +0100
commitb7c392a697992e3c420e1eee4e222736618ce601 (patch)
tree7f23bd20c817563f6a4331b283415cbe368e9eb5 /gnu/packages/djvu.scm
parente75d121ca47701869c776b86765486690a28b1e2 (diff)
downloadguix-b7c392a697992e3c420e1eee4e222736618ce601.tar.gz
gnu: Add minidjvu.
* gnu/packages/djvu.scm (minidjvu): New variable.
Diffstat (limited to 'gnu/packages/djvu.scm')
-rw-r--r--gnu/packages/djvu.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index db84df0269..90db1a2d42 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -229,3 +230,45 @@ It is able to extract:
     (description "This is a small tool to convert DjVu files to PDF files.")
     (home-page "https://0x2a.at/site/projects/djvu2pdf/")
     (license license:gpl2+)))
+
+(define-public minidjvu
+  (package
+    (name "minidjvu")
+    (version "0.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/minidjvu/minidjvu/"
+                           version "/minidjvu-" version ".tar.gz"))
+       (sha256
+        (base32 "0jmpvy4g68k6xgplj9zsl6brg6vi81mx3nx2x9hfbr1f4zh95j79"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("gettext" ,gettext-minimal)))
+    (inputs
+     `(("libjpeg-turbo" ,libjpeg-turbo)
+       ("libtiff" ,libtiff)
+       ("zlib" ,zlib)))
+    (arguments
+     '(#:configure-flags '("--disable-static")
+       #:parallel-build? #f
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-paths
+           (lambda _
+             (substitute* "Makefile.in"
+               (("/usr/bin/gzip")
+                "gzip"))
+             #t))
+         (add-before 'install 'make-lib-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
+             #t)))))
+    (synopsis "Black and white DjVu encoder")
+    (description
+     "@code{minidjvu} is a multipage DjVu encoder and single page
+encoder/decoder.  It doesn't support colors or grayscales, just black
+and white.")
+    (home-page "https://sourceforge.net/projects/minidjvu/")
+    (license license:gpl2)))