From 13539334ec08a24b52f85c68d0ec6ced59d8c4ac Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 17 Mar 2023 10:05:41 -0400 Subject: gnu: Add leptonica-1.80. * gnu/packages/image.scm (leptonica-1.80): New variable. --- gnu/packages/image.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'gnu/packages/image.scm') diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 228a31c7d0..0709c793b1 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -25,7 +25,7 @@ ;;; Copyright © 2018 Rutger Helling ;;; Copyright © 2020 Giacomo Leidi ;;; Copyright © 2020 R Veera Kumar -;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020, 2023 Maxim Cournoyer ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Zhu Zihao ;;; Copyright © 2020, 2021, 2022 Vinicius Monego @@ -655,6 +655,39 @@ scale and pixel depth, and pixelwise masking, blending, enhancement, and arithmetic ops.") (license license:bsd-2))) +(define-public leptonica-1.80 + (package + (inherit leptonica) + (name "leptonica") + (version "1.80.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/DanBloomberg/leptonica") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12ddln72z5l3icz0i9rpsfkg5xik8fcwcn8lb0cp3jigjxi8gvkg")))) + (arguments + (substitute-keyword-arguments (package-arguments leptonica) + ((#:tests? _ #t) + ;; The pngio_reg test fails, probably because the libpng used is + ;; newer. + #f) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (replace 'provide-absolute-giflib-reference + (lambda _ + (let ((giflib #$(this-package-input "giflib"))) + ;; Add an absolute reference to giflib to avoid propagation. + ;; This is the same as for the parent package, but at that + ;; time the file name was 'liblept.la, not libleptonica.la. + (with-directory-excursion (string-append #$output "/lib") + (substitute* '("liblept.la" "pkgconfig/lept.pc") + (("-lgif") + (string-append "-L" giflib "/lib -lgif"))))))))))))) + (define-public jbig2dec (package (name "jbig2dec") -- cgit v1.2.3