gnu: links: Update to 2.18.
[jackhill/guix/guix.git] / gnu / packages / ocr.scm
CommitLineData
f99f6fd6
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
427dda54 3;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
f99f6fd6
LC
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
9e617a54 20(define-module (gnu packages ocr)
d814be32 21 #:use-module ((guix licenses) #:prefix license:)
f99f6fd6
LC
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
d814be32 25 #:use-module (gnu packages compression)
427dda54 26 #:use-module (gnu packages image))
f99f6fd6
LC
27
28(define-public ocrad
29 (package
30 (name "ocrad")
915d7792 31 (version "0.26")
f99f6fd6
LC
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "mirror://gnu/ocrad/ocrad-"
35 version ".tar.lz"))
36 (sha256
37 (base32
915d7792 38 "0g4fq7maybdnd1471kd05a3f5sb7spa3d26k706rk85sd5wd70y3"))))
f99f6fd6
LC
39 (build-system gnu-build-system)
40 (native-inputs `(("lzip" ,lzip)))
6fd52309 41 (home-page "https://www.gnu.org/software/ocrad/")
f99f6fd6
LC
42 (synopsis "Optical character recognition based on feature extraction")
43 (description
79c311b8
LC
44 "GNU Ocrad is an optical character recognition program based on a
45feature extraction method. It can read images in PBM, PGM or PPM formats and
46it produces text in 8-bit or UTF-8 formats.")
d814be32
TUBK
47 (license license:gpl3+)))
48
49(define-public tesseract-ocr
50 (package
51 (name "tesseract-ocr")
427dda54 52 (version "3.04.01")
d814be32
TUBK
53 (source
54 (origin
55 (method url-fetch)
56 (uri (string-append
427dda54 57 "https://github.com/tesseract-ocr/tesseract/archive/"
d814be32 58 version ".tar.gz"))
427dda54 59 (file-name (string-append name "-" version ".tar.gz"))
d814be32 60 (sha256
427dda54 61 (base32 "0snwd8as5i8vx7zkimpd2yg898jl96zf90r65a9w615f2hdkxxjp"))))
d814be32 62 (build-system gnu-build-system)
427dda54 63 (inputs
d814be32
TUBK
64 `(("leptonica" ,leptonica)))
65 (arguments
427dda54 66 '(#:configure-flags
d814be32
TUBK
67 (let ((leptonica (assoc-ref %build-inputs "leptonica")))
68 (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include")))))
427dda54 69 (home-page "https://github.com/tesseract-ocr")
d814be32
TUBK
70 (synopsis "Optical character recognition engine")
71 (description
72 "Tesseract is an optical character recognition (OCR) engine with very
73high accuracy. It supports many languages, output text formatting, hOCR
74positional information and page layout analysis. Several image formats are
75supported through the Leptonica library. It can also detect whether text is
76monospaced or proportional.")
77 (license license:asl2.0)))