summary refs log tree commit diff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 96e207e940..c6fc26f9b8 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -603,10 +603,8 @@ collection of tools for doing simple manipulations of TIFF images.")
        ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libtiff" ,libtiff)
-       ("libwebp" ,libwebp)))
-    (propagated-inputs
-     ;; Linking a program with leptonica also requires these.
-     `(("openjpeg" ,openjpeg)
+       ("libwebp" ,libwebp)
+       ("openjpeg" ,openjpeg)
        ("zlib" ,zlib)))
     (arguments
      '(#:phases
@@ -618,7 +616,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