From 8f685df247ad859fefaeeef14332b2c455ffc5b2 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 23 Aug 2019 22:33:31 +0200 Subject: gnu: Add jbigkit. * gnu/packages/image.scm (jbigkit): New public variable. --- gnu/packages/image.scm | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'gnu/packages/image.scm') diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 5f3cf0ac2c..670aeff85a 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -643,6 +643,81 @@ work.") (home-page "https://jbig2dec.com") (license license:gpl2+))) +(define-public jbigkit + (package + (name "jbigkit") + (version "2.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/" + "download/jbigkit-" version ".tar.gz")) + (sha256 + (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove files without clear licence information. + (for-each delete-file-recursively + (list "contrib" "examples")) + #t)))) + (build-system gnu-build-system) + (outputs (list "out" "pbmtools")) + (arguments + `(#:modules ((srfi srfi-26) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install ; no ‘make install’ target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (include (string-append out "/include"))) + (with-directory-excursion "libjbig" + (for-each (cut install-file <> include) + (find-files "." "\\.h$")) + (for-each (cut install-file <> lib) + (find-files "." "\\.a$"))) + #t))) + (add-after 'install 'install-pbmtools + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "pbmtools")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (man5 (string-append out "/share/man/man5"))) + (with-directory-excursion "pbmtools" + (for-each (cut install-file <> bin) + (list "jbgtopbm" "jbgtopbm85" + "pbmtojbg" "pbmtojbg85")) + + (for-each (cut install-file <> man1) + (find-files "." "\\.1$")) + (for-each (cut install-file <> man5) + (find-files "." "\\.5$")) + #t))))) + #:test-target "test" + #:tests? #f)) ; tests depend on examples/ + (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/") + (synopsis "Lossless compression for bi-level high-resolution images") + (description + "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and +ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as +black-and-white scanned documents. It is widely used in fax products, printer +firmware and drivers, document management systems, and imaging software. + +This package provides a static C library of (de)compression functions and some +simple command-line converters similar to those provided by netpbm. + +Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all +options of the standard but has to keep the full uncompressed image in memory. +The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with +memory management optimized for embedded and fax applications. It buffers +only a few lines of the uncompressed image in memory and is able to stream +images of initially unknown height.") + (license (list license:isc ; pbmtools/p?m.5 + license:gpl2+)))) ; the rest + (define-public openjpeg (package (name "openjpeg") -- cgit v1.2.3 From 4526bd07f72d6687fe53c7e9692d7618242d9337 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 5 Sep 2019 21:12:40 +0200 Subject: gnu: vigra-c: Update to 0.0.0-1.66ff4fa. * gnu/packages/image.scm (vigra-c): Update to 0.0.0-1.66ff4fa. [inputs]: Add hdf5. --- gnu/packages/image.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/image.scm') diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 670aeff85a..4e3fee53e2 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1075,12 +1075,11 @@ multi-dimensional image processing.") (home-page "https://ukoethe.github.io/vigra/"))) (define-public vigra-c - (let* ((commit "a2ff675f42079e2623318d8ff8b4288dbe7a7f06") - (revision "0") - (version (git-version "0.0.0" revision commit))) + (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7") + (revision "1")) (package (name "vigra-c") - (version version) + (version (git-version "0.0.0" revision commit)) (home-page "https://github.com/BSeppke/vigra_c") (source (origin (method git-fetch) @@ -1089,7 +1088,7 @@ multi-dimensional image processing.") (commit commit))) (sha256 (base32 - "1f1phmfbbz3dsq9330rd6bjmdg29hxskxi9l17cyx1f4mdqpgdgl")) + "1pnd92s284dvsg8zp6md7p8ck55bmcsryz58gzic7jh6m72hg689")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments @@ -1099,6 +1098,7 @@ multi-dimensional image processing.") (inputs `(("fftw" ,fftw) ("fftwf" ,fftwf) + ("hdf5" ,hdf5) ("vigra" ,vigra))) (synopsis "C interface to the VIGRA computer vision library") (description -- cgit v1.2.3