me
/
guix
Archived
1
0
Fork 0

gnu: leptonica: Use new package style.

* gnu/packages/image.scm (leptonica)[inputs]: Remove labels.
[arguments]<#:phases>: Use gexps; use "this-package-input" to locate package
input; do not explicitly return #t from phases.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Simon South 2023-02-15 11:44:10 -05:00 committed by Ludovic Courtès
parent 064d331068
commit fb9124cb04
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 24 additions and 26 deletions

View File

@ -619,33 +619,31 @@ collection of tools for doing simple manipulations of TIFF images.")
libtool
pkg-config))
(inputs
`(("giflib" ,giflib)
("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)
("libwebp" ,libwebp)
("openjpeg" ,openjpeg)
("zlib" ,zlib)))
(list giflib
libjpeg-turbo
libpng
libtiff
libwebp
openjpeg
zlib))
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-reg-wrapper
(lambda _
(substitute* "prog/reg_wrapper.sh"
((" /bin/sh ")
(string-append " " (which "sh") " "))
(("which gnuplot")
"true"))
#t))
(add-after 'install 'provide-absolute-giflib-reference
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(giflib (assoc-ref inputs "giflib")))
;; Add an absolute reference to giflib to avoid propagation.
(with-directory-excursion (string-append out "/lib")
(substitute* '("liblept.la" "pkgconfig/lept.pc")
(("-lgif") (string-append "-L" giflib "/lib -lgif"))))
#t))))))
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-reg-wrapper
(lambda _
(substitute* "prog/reg_wrapper.sh"
((" /bin/sh ")
(string-append " " (which "sh") " "))
(("which gnuplot")
"true"))))
(add-after 'install 'provide-absolute-giflib-reference
(lambda _
(let ((giflib #$(this-package-input "giflib")))
;; Add an absolute reference to giflib to avoid propagation.
(with-directory-excursion (string-append #$output "/lib")
(substitute* '("liblept.la" "pkgconfig/lept.pc")
(("-lgif") (string-append "-L" giflib "/lib -lgif"))))))))))
(home-page "http://www.leptonica.com/")
(synopsis "Library and tools for image processing and analysis")
(description