diff mbox

[01/14] gnu: Add qtsvg.

Message ID 20160610121025.6632-2-efraim@flashner.co.il
State New
Headers show

Commit Message

Efraim Flashner June 10, 2016, 12:10 p.m. UTC
* gnu/packages/qt.scm (qtsvg): New variable.
---
 gnu/packages/qt.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c79160f..9f0a0bb 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -431,6 +431,39 @@  developers using C++ or QML, a CSS & JavaScript like language.")
 developers using C++ or QML, a CSS & JavaScript like language.")
     (license (list lgpl2.1 lgpl3))))
 
+(define-public qtsvg
+  (package (inherit qtbase)
+    (name "qtsvg")
+    (version "5.6.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "08ca5g46g75acy27jfnvnalmcias5hxmjp7491v3y4k9y7a4ybpi"))))
+    (propagated-inputs `())
+    (inputs
+     `(("qtbase" ,qtbase)
+       ,@(package-inputs qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (zero? (system* "qmake"
+                             (string-append "PREFIX="
+                                            (assoc-ref %outputs "out"))))))
+         (add-before 'install 'fix-Makefiles
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out    (assoc-ref outputs "out"))
+                   (qtbase (assoc-ref inputs "qtbase")))
+               (substitute* (find-files "." "Makefile")
+                            (((string-append "INSTALL_ROOT)" qtbase))
+                             (string-append "INSTALL_ROOT)" out)))))))))))
+
 (define-public qjson
   (package
     (name "qjson")