From 469c7605b457385e730a8d429b85f05c6e4d32d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 21 Mar 2015 19:41:54 +0100 Subject: [PATCH 4/8] gnu: Add leptonica. * gnu/packages/image.scm (leptonica): New variable. --- gnu/packages/image.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 9c7e504..537cd57 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -24,6 +24,7 @@ (define-module (gnu packages image) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages doxygen) @@ -164,6 +165,54 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.") ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+. (license license:lgpl2.0+))) +(define-public leptonica + (package + (name "leptonica") + (version "1.71") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.leptonica.com/source/leptonica-" + version ".tar.gz")) + (sha256 + (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gnuplot" ,gnuplot) ;needed for test suite + ("libtool" ,libtool))) + (inputs + `(("giflib" ,giflib) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp) + ("openjpeg" ,openjpeg) + ("zlib" ,zlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + unpack autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vif")))) + (add-after + autoreconf patch-reg-wrapper + (lambda _ + (substitute* "prog/reg_wrapper.sh" + ((" /bin/sh ") + (string-append " " (which "sh") " ")))))))) + (home-page "http://www.leptonica.com/") + (synopsis "Image processing and image analysis operations") + (description + "Leptonica is a C library for efficient image processing and image +analysis operations. It supports rasterop, affine transformations, binary and +grayscale morphology, rank order, and convolution, seedfill and connected +components, image transformations combining changes in scale and pixel depth, +and pixelwise masking, blending, enhancement, arithmetic ops.") + (license license:bsd-2))) + (define-public jbig2dec (package (name "jbig2dec") -- 2.2.1