diff mbox series

[bug#56771,06/33] gnu: Add qtsvg, version 6.3.1.

Message ID 20220725230803.10002-6-maxim.cournoyer@gmail.com
State Accepted
Headers show
Series None | expand

Commit Message

Maxim Cournoyer July 25, 2022, 11:07 p.m. UTC
* gnu/packages/qt.scm (qtsvg): New variable.
---
 gnu/packages/qt.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 40d3f8194b..a5296bd17a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -902,6 +902,37 @@  (define-public qtsvg-5
     (description "The QtSvg module provides classes for displaying the
  contents of SVG files.")))
 
+(define-public qtsvg
+  (package
+    (name "qtsvg")
+    (version "6.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (qt5-urls name version))
+              (sha256
+               (base32
+                "1xvxz2jfpr1al85rhwss7ji5vkxa812d0b888hry5f7pwqcg86bv"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'set-display
+            (lambda _
+              ;; Make Qt render "offscreen", required for tests.
+              (setenv "QT_QPA_PLATFORM" "offscreen")))
+          (add-after 'install 'delete-installed-tests
+            (lambda _
+              (delete-file-recursively (string-append #$output "/tests")))))))
+    (native-inputs (list perl))
+    (inputs (list libxkbcommon mesa qtbase zlib))
+    (synopsis "Qt module for displaying SVGs")
+    (description "The QtSvg module provides classes for displaying the
+ contents of SVG files.")
+    (home-page (package-home-page qtbase))
+    (license (package-license qtbase))))
+
 (define-public qtimageformats
   (package (inherit qtsvg-5)
     (name "qtimageformats")