gnu: leptonica: Update to 1.74.0.

* gnu/packages/image.scm (leptonica): Update to 1.74.0.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
This commit is contained in:
Taylan Ulrich Bayırlı/Kammer 2016-12-15 09:39:30 +01:00 committed by Marius Bakke
parent c88bee0ace
commit d02fb7cec6
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 23 additions and 37 deletions

View File

@ -329,28 +329,23 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
(define-public leptonica (define-public leptonica
(package (package
(name "leptonica") (name "leptonica")
(version "1.72") (version "1.74.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://www.leptonica.com/source/leptonica-" (uri (string-append
version ".tar.gz")) "https://github.com/DanBloomberg/leptonica/archive/" version
".tar.gz"))
(file-name (string-append "leptonica-" version ".tar.gz"))
(sha256 (sha256
(base32 "0mhzvqs0im04y1cpcc1yma70hgdac1frf33h73m9z3356bfymmbr")) (base32 "0i2a4vx9gizki0wgmv03xjz8j9d8agkvbag1a8m4kcw4asd4p87g"))))
(modules '((guix build utils)))
;; zlib and openjpg should be under Libs, not Libs.private. See:
;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
(snippet
'(substitute* "lept.pc.in"
(("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
(string-append pre post))
(("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
(string-append pre post))
(("^Libs: .*" all)
(string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("gnuplot" ,gnuplot))) ;needed for test suite `(("gnuplot" ,gnuplot) ;needed for test suite
("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(inputs (inputs
`(("giflib" ,giflib) `(("giflib" ,giflib)
("libjpeg" ,libjpeg) ("libjpeg" ,libjpeg)
@ -358,31 +353,22 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
("libtiff" ,libtiff) ("libtiff" ,libtiff)
("libwebp" ,libwebp))) ("libwebp" ,libwebp)))
(propagated-inputs (propagated-inputs
;; Linking a program with leptonica also requires these.
`(("openjpeg" ,openjpeg) `(("openjpeg" ,openjpeg)
("zlib" ,zlib))) ("zlib" ,zlib)))
(arguments (arguments
'(#:parallel-tests? #f ; XXX: cause fpix1_reg to fail '(#:phases
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
;; Prevent make from trying to regenerate config.h.in. (add-after 'unpack 'autogen
(add-after (lambda _
'unpack 'set-config-h-in-file-time (zero? (system* "sh" "autobuild"))))
(lambda _ (add-after 'unpack 'patch-reg-wrapper
(set-file-time "config/config.h.in" (stat "configure")))) (lambda _
(add-after (substitute* "prog/reg_wrapper.sh"
'unpack 'patch-reg-wrapper ((" /bin/sh ")
(lambda _ (string-append " " (which "sh") " "))
(substitute* "prog/reg_wrapper.sh" (("which gnuplot")
((" /bin/sh ") "true")))))))
(string-append " " (which "sh") " "))
(("which gnuplot") (which "gnuplot")))))
(add-before
'check 'disable-failing-tests
;; XXX: 2 of 9 tests from webpio_reg fails.
(lambda _
(substitute* "prog/webpio_reg.c"
((".*DoWebpTest2.* 90.*") "")
((".*DoWebpTest2.* 100.*") "")))))))
(home-page "http://www.leptonica.com/") (home-page "http://www.leptonica.com/")
(synopsis "Library and tools for image processing and analysis") (synopsis "Library and tools for image processing and analysis")
(description (description