summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-04-05 00:44:45 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-05 00:53:03 +0200
commit01fe019166fe8a925b3bf3b489792b52b1b6ca7a (patch)
tree9a6983f117cf8f6779a937e61f0603e945c3f227 /gnu
parentf84011d04a159d0a4acc8af0c0bf673ba09407c9 (diff)
downloadguix-01fe019166fe8a925b3bf3b489792b52b1b6ca7a.tar.gz
gnu: openexr: Add IlmBase include sub-directory to 'OpenEXR.pc'.
* gnu/packages/graphics.scm (openexr)[arguments]: Add
'set-ilmbase-directory-in-pc-file' phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/graphics.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index a502f246ff..79c7772af9 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
@@ -256,6 +256,20 @@ exception-handling library.")
     (arguments
      '(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'set-ilmbase-directory-in-pc-file
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Add '-I ILMBASE/include/OpenEXR' to 'OpenEXR.pc' since some of
+             ;; the headers of OpenEXR expect IlmBase headers to live in the
+             ;; same directory.  Unfortunately this doesn't help much because
+             ;; 'FindOpenEXR.cmake' doesn't read 'OpenEXR.pc'...
+             (let ((ilmbase (assoc-ref inputs "ilmbase")))
+               (substitute* "OpenEXR.pc.in"
+                 (("^Cflags: (.*)$" _ cflags)
+                  (string-append "Cflags: "
+                                 " -I" ilmbase "/include"
+                                 " -I" ilmbase "/include/OpenEXR "
+                                 cflags "\n")))
+               #t)))
          (add-after 'unpack 'disable-broken-test
            ;; This test fails on i686. Upstream developers suggest that
            ;; this test is broken on i686 and can be safely disabled: