summary refs log tree commit diff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-05-27 14:50:01 +0200
committerMarius Bakke <marius@gnu.org>2020-05-27 21:49:56 +0200
commitfadd962f4b7aa5a5a26a3efa705a359e29f60fc5 (patch)
tree04e6d051c4810d28e7edcc6086c11b2f9b45e126 /gnu/packages/maths.scm
parentdb38840198a62e84e0754975dfece75132fd6672 (diff)
downloadguix-fadd962f4b7aa5a5a26a3efa705a359e29f60fc5.tar.gz
gnu: hdf4: Provide an absolute reference to libjpeg.
* gnu/packages/maths.scm (hdf4)[arguments]: Add phase
'provide-absolute-libjpeg-reference'.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 76e9eacc1a..8e35188d80 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -920,7 +920,17 @@ computations.")
                (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
                 (string-append prefix (string-take hash 10) "...")))
              #t))
-         )))
+         (add-after 'install 'provide-absolute-libjpeg-reference
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (libjpeg (assoc-ref inputs "libjpeg")))
+               ;; libjpeg-turbo does not provide a .la file, so libtool is
+               ;; unable to add an absolute reference for -ljpeg in the .la
+               ;; files.  Fix it manually to avoid having to propagate it.
+               (substitute* (find-files (string-append out "/lib") "\\.la$")
+                 (("-ljpeg")
+                  (string-append "-L" libjpeg "/lib -ljpeg")))
+               #t))))))
     (home-page "https://www.hdfgroup.org/products/hdf4/")
     (synopsis
      "Library and multi-object file format for storing and managing data")