gnu: opencv: Fix build with new version of jasper.
authorRaghav Gururajan <raghavgururajan@disroot.org>
Fri, 14 Aug 2020 14:08:17 +0000 (16:08 +0200)
committerDanny Milosavljevic <dannym@scratchpost.org>
Fri, 14 Aug 2020 14:08:17 +0000 (16:08 +0200)
* gnu/packages/image-processing.scm (opencv): Fix build failure.
[arguments]<#:phases>[fix-jasper]: New phase.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
gnu/packages/image-processing.scm

index 52e0311..b93ad16 100644 (file)
@@ -358,6 +358,14 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
                      "--strip-components=1"
                      "-C" "../opencv-contrib")))
 
+         (add-after 'unpack 'fix-jasper
+           (lambda _
+             ;; See <https://github.com/opencv/opencv/pull/17983>.
+             (substitute* "modules/imgcodecs/src/grfmt_jpeg2000.cpp"
+               (("&jas_matrix_get")
+                "jas_matrix_getref"))
+             #t))
+
          (add-after 'set-paths 'add-ilmbase-include-path
            (lambda* (#:key inputs #:allow-other-keys)
            ;; OpenEXR propagates ilmbase, but its include files do not appear