Subject: [bug#65280] [PATCH 10/26] gnu: Add qtimageformats.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 14 Aug 2023 00:29:20 -0400

* gnu/packages/qt.scm (qtimageformats): New variable.
---

 gnu/packages/qt.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index e1869802ea..d9ca408721 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1122,6 +1122,40 @@ (define-public qtimageformats-5
     (description "The QtImageFormats module contains plugins for adding
 support for MNG, TGA, TIFF and WBMP image formats.")))
 
+(define-public qtimageformats
+  (package
+    (name "qtimageformats")
+    (version "6.5.2")
+    (source (origin
+              (inherit (package-source qtimageformats-5))
+              (method url-fetch)
+              (uri (qt-url name version))
+              (sha256
+               (base32
+                "0hv7mkn72126rkhy5gmjmbvzy7v17mkk3q2pkmzy99f64j4w1q5a"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'set-display
+            (lambda _
+              ;; Make Qt render "offscreen", required for tests.
+              (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (inputs
+     (list jasper
+           libmng
+           libtiff
+           libwebp
+           mesa
+           qtbase
+           zlib))
+    (synopsis "Additional Image Format plugins for Qt")
+    (description "The QtImageFormats module contains plugins for adding
+support for MNG, TGA, TIFF and WBMP image formats.")
+    (home-page (package-home-page qtbase))
+    (license (package-license qtbase))))
+
 (define-public qtx11extras
   (package (inherit qtsvg-5)
     (name "qtx11extras")
-- 
2.41.0