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