Subject: [PATCH] gnu: qtimageformats: fix build.
From: Michael Rohleder <[email-masked]>
To: [email-masked]
Date: Fri, 31 Jul 2020 10:15:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

nefix reported on IRC that qtimageformats doesnt build.

From 3c74b590d6578bc5a6f9ac84cc8e0339ffee9175 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <[email-masked]>
Date: Fri, 31 Jul 2020 10:11:49 +0200
Subject: [PATCH] gnu: qtimageformats: fix build.

* gnu/packages/qt.scm (qtimageformats): fix build.
---
 gnu/packages/qt.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4b3af757f9..053f744037 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Kei Kebreau <[email-masked]>
 ;;; Copyright © 2020 TomZ <[email-masked]>
 ;;; Copyright © 2020 Jonathan Brielmaier <[email-masked]>
+;;; Copyright © 2020 Michael Rohleder <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -712,6 +713,15 @@ HostData=lib/qt5
               '(begin
                  (delete-file-recursively "src/3rdparty")
                  #t))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'fix-build
+             (lambda _ (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
+                         (("^#include <jasper/jasper.h>")
+                          "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
+               #t))))))
     (native-inputs `())
     (inputs
      `(("jasper" ,jasper)
-- 
2.28.0

-- 
some people are so poor that the only
thing they have is money.