Subject: [bug#71280] [PATCH 1/4] gnu: kimageformats: Build with current OpenEXR.

From: Vinicius Monego <[email-masked]>
Date: Thu, 30 May 2024 18:23:00 +0000

* gnu/packages/kde-frameworks.scm (kimageformats)[inputs]: Replace openexr-2
by openexr. Add imath, zlib.
[arguments]: Unset "-DCMAKE_CXX_FLAGS".

Change-Id: I49bb6f4e6c75a44dbb92752ad2f2fe600f2a6414
---
 gnu/packages/kde-frameworks.scm | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 08329820fa..e8f3b2f5f2 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Petr Hodina <[email-masked]>
 ;;; Copyright © 2023 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2024 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2024 Vinicius Monego <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1938,9 +1939,11 @@ (define-public kimageformats
     (native-inputs
      (list extra-cmake-modules pkg-config))
     (inputs
-     (list karchive ; for Krita and OpenRaster images
-           openexr-2 ; for OpenEXR high dynamic-range images
-           qtbase-5))
+     (list imath ; companion for OpenEXR
+           karchive ; for Krita and OpenRaster images
+           openexr ; for OpenEXR high dynamic-range images
+           qtbase-5
+           zlib))
     (arguments
      (list
       #:phases
@@ -1955,18 +1958,9 @@ (define-public kimageformats
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
-                (setenv "HOME"
-                        (getcwd))
-                ;; FIXME: I guess kde's qt no this fail.
-                ;; see https://invent.kde.org/frameworks/kimageformats/-/jobs/1046283
-                (invoke "ctest" "-E" "kimageformats-read-psd")))))
-      ;; FIXME: The header files of ilmbase (propagated by openexr) are not
-      ;; found when included by the header files of openexr, and an explicit
-      ;; flag needs to be set.
-      #:configure-flags #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
-                                               (assoc-ref %build-inputs
-                                                          "ilmbase")
-                                               "/include/OpenEXR"))))
+                (setenv "HOME" (getcwd))
+                ;; Test fails with unsupported image format 'birthday.tif'.
+                (invoke "ctest" "-E" "kimageformats-read-psd")))))))
     (home-page "https://community.kde.org/Frameworks")
     (synopsis "Plugins to allow QImage to support extra file formats")
     (description "This framework provides additional image format plugins for
-- 
2.39.2