[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: gnu: leptonica: Add giflib reference in Libtool- and pkg-config f
From: |
guix-commits |
Subject: |
03/04: gnu: leptonica: Add giflib reference in Libtool- and pkg-config files. |
Date: |
Mon, 4 May 2020 10:32:40 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 08dfff747b2f6e11ed9b12a6a09cfa0178ec8083
Author: Marius Bakke <address@hidden>
AuthorDate: Mon May 4 16:21:06 2020 +0200
gnu: leptonica: Add giflib reference in Libtool- and pkg-config files.
* gnu/packages/image.scm (leptonica)[arguments]: Add phase
"provide-absolute-giflib-reference".
---
gnu/packages/image.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 3f758b7..eef73d6 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -612,7 +612,16 @@ collection of tools for doing simple manipulations of TIFF
images.")
(string-append " " (which "sh") " "))
(("which gnuplot")
"true"))
- #t)))))
+ #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))))))
(home-page "http://www.leptonica.com/")
(synopsis "Library and tools for image processing and analysis")
(description