gnu: All snippets report errors using exceptions, else return #t.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
index fb242a0..74a22ae 100644 (file)
@@ -2,9 +2,13 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
+;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +32,7 @@
   #:use-module (guix build utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages databases)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
@@ -74,6 +80,7 @@
         (sha256
          (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
     (native-inputs
+     ;; Optional: lcov and cccc, both are for code coverage
      `(("doxygen" ,doxygen)))
     (inputs
      `(("qtbase" ,qtbase)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'check
-                  (lambda _
-                    (zero? (system* "ctest" ;; exclude 2 tests which require a display
-                                    "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
+         (add-before 'check 'check-setup
+           (lambda _
+             ;; make Qt render "offscreen", required for tests
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
     (home-page "https://github.com/steveire/grantlee")
     (synopsis "Libraries for text templating with Qt")
     (description "Grantlee Templates can be used for theming and generation of
@@ -96,7 +104,8 @@ system, and the core design of Django is reused in Grantlee.")
 (define-public qt
   (package
     (name "qt")
-    (version "5.6.2")
+    (version "5.9.4")
+    (outputs '("out" "examples"))
     (source (origin
              (method url-fetch)
              (uri
@@ -107,8 +116,8 @@ system, and the core design of Django is reused in Grantlee.")
                  "/single/qt-everywhere-opensource-src-"
                  version ".tar.xz"))
              (sha256
-               (base32
-                 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
+              (base32
+               "1mblh8k04l13nk9fhhrr43h5bcph1gbz94j5y7csx8zvxb5xkb73"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -120,32 +129,53 @@ system, and the core design of Django is reused in Grantlee.")
                 ;; Alternatively, we could use the "-skip qtwebengine"
                 ;; configuration option.
                 (delete-file-recursively "qtwebengine")
-                ;; Remove one of the two bundled harfbuzz copies in addition
-                ;; to passing "-system-harfbuzz".
-                (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
-                ;; Remove the bundled sqlite copy in addition to
-                ;; passing "-system-sqlite".
-                (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
+                ;; The following snippets are copied from their mondular-qt counterparts.
+                (for-each
+                  (lambda (dir)
+                    (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
+                  (list "double-conversion" "freetype" "harfbuzz-ng"
+                        "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
+                        "xkbcommon" "zlib"))
+                (for-each
+                  (lambda (dir)
+                    (delete-file-recursively dir))
+                  (list "qtimageformats/src/3rdparty"
+                        "qtmultimedia/examples/multimedia/spectrum/3rdparty"
+                        "qtwayland/examples"
+                        "qtcanvas3d/examples/canvas3d/3rdparty"))
+                ;; Tests depend on this example, which depends on the 3rd party code.
+                (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
+                  (("spectrum") "#"))
+                #t))))
     (build-system gnu-build-system)
     (propagated-inputs
      `(("mesa" ,mesa)))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("dbus" ,dbus)
+       ("bluez" ,bluez)
        ("cups" ,cups)
+       ("dbus" ,dbus)
+       ("double-conversion" ,double-conversion)
        ("expat" ,expat)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glib" ,glib)
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)
        ("harfbuzz" ,harfbuzz)
        ("icu4c" ,icu4c)
+       ("jasper" ,jasper)
+       ("libinput" ,libinput-minimal)
        ("libjpeg" ,libjpeg)
        ("libmng" ,libmng)
        ("libpci" ,pciutils)
        ("libpng" ,libpng)
+       ("libtiff" ,libtiff)
+       ("libwebp" ,libwebp)
        ("libx11" ,libx11)
        ("libxcomposite" ,libxcomposite)
        ("libxcursor" ,libxcursor)
+       ("libxext" ,libxext)
        ("libxfixes" ,libxfixes)
        ("libxi" ,libxi)
        ("libxinerama" ,libxinerama)
@@ -161,10 +191,11 @@ system, and the core design of Django is reused in Grantlee.")
        ("openssl" ,openssl)
        ("postgresql" ,postgresql)
        ("pulseaudio" ,pulseaudio)
-       ("pcre" ,pcre)
+       ("pcre2" ,pcre2)
        ("sqlite" ,sqlite)
        ("udev" ,eudev)
        ("unixodbc" ,unixodbc)
+       ("wayland" ,wayland)
        ("xcb-util" ,xcb-util)
        ("xcb-util-image" ,xcb-util-image)
        ("xcb-util-keysyms" ,xcb-util-keysyms)
@@ -181,24 +212,19 @@ system, and the core design of Django is reused in Grantlee.")
        ("ruby" ,ruby)
        ("which" ,(@ (gnu packages base) which))))
     (arguments
-     `(;; FIXME: Disabling parallel building is a quick hack to avoid the
-       ;; failure described in
-       ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
-       ;; A more structural fix is needed.
-       #:parallel-build? #f
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'configure 'patch-bin-sh
            (lambda _
-             (substitute* '("qtbase/config.status"
-                            "qtbase/configure"
+             (substitute* '("qtbase/configure"
                             "qtbase/mkspecs/features/qt_functions.prf"
                             "qtbase/qmake/library/qmakebuiltins.cpp")
                           (("/bin/sh") (which "sh")))
              #t))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+             (let ((out      (assoc-ref outputs "out"))
+                   (examples (assoc-ref outputs "examples")))
                (substitute* '("configure" "qtbase/configure")
                  (("/bin/pwd") (which "pwd")))
                (substitute* "qtbase/src/corelib/global/global.pri"
@@ -209,12 +235,12 @@ system, and the core design of Django is reused in Grantlee.")
                        "./configure"
                        "-verbose"
                        "-prefix" out
+                       "-examplesdir" examples ; 89MiB
                        "-opensource"
                        "-confirm-license"
-                       ;; Do not build examples; if desired, these could go
-                       ;; into a separate output, but for the time being, we
+                       ;; Do not build examples; for the time being, we
                        ;; prefer to save the space and build time.
-                       "-nomake" "examples"
+                       "-no-compile-examples"
                        ;; Most "-system-..." are automatic, but some use
                        ;; the bundled copy by default.
                        "-system-sqlite"
@@ -223,6 +249,8 @@ system, and the core design of Django is reused in Grantlee.")
                        "-openssl-linked"
                        ;; explicitly link with dbus instead of dlopening it
                        "-dbus-linked"
+                       ;; don't use the precompiled headers
+                       "-no-pch"
                        ;; drop special machine instructions not supported
                        ;; on all instances of the target
                        ,@(if (string-prefix? "x86_64"
@@ -230,12 +258,6 @@ system, and the core design of Django is reused in Grantlee.")
                                                  (%current-system)))
                              '()
                              '("-no-sse2"))
-                       "-no-sse3"
-                       "-no-ssse3"
-                       "-no-sse4.1"
-                       "-no-sse4.2"
-                       "-no-avx"
-                       "-no-avx2"
                        "-no-mips_dsp"
                        "-no-mips_dspr2"))))))))
     (home-page "https://www.qt.io/")
@@ -266,7 +288,8 @@ developers using C++ or QML, a CSS & JavaScript like language.")
              (modules '((guix build utils)))
              (snippet
               ;; Remove webkit module, which is not built.
-              '(delete-file-recursively "src/3rdparty/webkit"))))
+              '(begin (delete-file-recursively "src/3rdparty/webkit")
+                      #t))))
     (inputs `(,@(alist-delete "harfbuzz"
                               (alist-delete "libjpeg" (package-inputs qt)))
               ("libjepg" ,libjpeg-8)
@@ -349,7 +372,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtbase
   (package
     (name "qtbase")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -358,23 +381,29 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd"))
+               "1kq422vb2zaic099pgzwk7c0qzgc3xap6qahw5vklrq0mgivvrk9"))
+             ;; Use TZDIR to avoid depending on package "tzdata".
+             (patches (search-patches "qtbase-use-TZDIR.patch"))
              (modules '((guix build utils)))
              (snippet
+               ;; corelib uses bundled harfbuzz, md4, md5, sha3
               '(begin
-                ;; Remove one of the two bundled harfbuzz copies in addition
-                ;; to passing "-system-harfbuzz".
-                (delete-file-recursively "src/3rdparty/harfbuzz-ng")
-                ;; Remove the bundled sqlite copy in addition to
-                ;; passing "-system-sqlite".
-                (delete-file-recursively "src/3rdparty/sqlite")))))
+                (for-each
+                  (lambda (dir)
+                    (delete-file-recursively (string-append "src/3rdparty/" dir)))
+                  (list "double-conversion" "freetype" "harfbuzz-ng"
+                        "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
+                        "xkbcommon" "zlib"))
+                #t))))
     (build-system gnu-build-system)
     (propagated-inputs
-     `(("mesa" ,mesa)))
+     `(("mesa" ,mesa)
+       ("which" ,(@ (gnu packages base) which))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("cups" ,cups)
        ("dbus" ,dbus)
+       ("double-conversion" ,double-conversion)
        ("eudev" ,eudev)
        ("expat" ,expat)
        ("fontconfig" ,fontconfig)
@@ -382,7 +411,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("glib" ,glib)
        ("harfbuzz" ,harfbuzz)
        ("icu4c" ,icu4c)
-       ("libinput" ,libinput)
+       ("libinput" ,libinput-minimal)
        ("libjpeg" ,libjpeg)
        ("libmng" ,libmng)
        ("libpng" ,libpng)
@@ -402,7 +431,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("mysql" ,mysql)
        ("nss" ,nss)
        ("openssl" ,openssl)
-       ("pcre" ,pcre)
+       ("pcre2" ,pcre2)
        ("postgresql" ,postgresql)
        ("pulseaudio" ,pulseaudio)
        ("sqlite" ,sqlite)
@@ -420,8 +449,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("python" ,python-2)
-       ("ruby" ,ruby)
-       ("which" ,(@ (gnu packages base) which))))
+       ("ruby" ,ruby)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -453,70 +481,112 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                        "./configure"
                        "-verbose"
                        "-prefix" out
+                       "-docdir" (string-append out "/share/doc/qt5")
+                       "-headerdir" (string-append out "/include/qt5")
+                       "-archdatadir" (string-append out "/lib/qt5")
+                       "-datadir" (string-append out "/share/qt5")
+                       "-examplesdir" (string-append
+                                       out "/share/doc/qt5/examples")
                        "-opensource"
                        "-confirm-license"
                        ;; Do not build examples; if desired, these could go
                        ;; into a separate output, but for the time being, we
                        ;; prefer to save the space and build time.
-                       "-nomake" "examples"
+                       "-no-compile-examples"
                        ;; Most "-system-..." are automatic, but some use
                        ;; the bundled copy by default.
                        "-system-sqlite"
                        "-system-harfbuzz"
+                       "-system-pcre"
                        ;; explicitly link with openssl instead of dlopening it
                        "-openssl-linked"
                        ;; explicitly link with dbus instead of dlopening it
                        "-dbus-linked"
-                       ;; drop special machine instructions not supported
-                       ;; on all instances of the target
+                       ;; don't use the precompiled headers
+                       "-no-pch"
+                       ;; drop special machine instructions that do not have
+                       ;; runtime detection
                        ,@(if (string-prefix? "x86_64"
                                              (or (%current-target-system)
                                                  (%current-system)))
                              '()
                              '("-no-sse2"))
-                       "-no-sse3"
-                       "-no-ssse3"
-                       "-no-sse4.1"
-                       "-no-sse4.2"
-                       "-no-avx"
-                       "-no-avx2"
                        "-no-mips_dsp"
                        "-no-mips_dspr2")))))
-         (add-after 'install 'patch-qt_config.prf
+         (add-after 'install 'patch-mkspecs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (archdata (string-append out "/lib/qt5"))
+                    (mkspecs (string-append archdata "/mkspecs"))
                     (qt_config.prf (string-append
-                                    out "/mkspecs/features/qt_config.prf")))
+                                    mkspecs "/features/qt_config.prf")))
                ;; For each Qt module, let `qmake' uses search paths in the
                ;; module directory instead of all in QT_INSTALL_PREFIX.
                (substitute* qt_config.prf
                  (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
-                  "$$replace(dir, mkspecs/modules, include)")
+                  "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
                  (("\\$\\$\\[QT_INSTALL_LIBS\\]")
-                  "$$replace(dir, mkspecs/modules, lib)")
+                  "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
                  (("\\$\\$\\[QT_HOST_LIBS\\]")
-                  "$$replace(dir, mkspecs/modules, lib)")
-                 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
-                  "$$replace(dir, mkspecs/modules, plugins)")
-                 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
-                  "$$replace(dir, mkspecs/modules, libexec)")
+                  "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
                  (("\\$\\$\\[QT_INSTALL_BINS\\]")
-                  "$$replace(dir, mkspecs/modules, bin)")
-                 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
-                  "$$replace(dir, mkspecs/modules, imports)")
-                 (("\\$\\$\\[QT_INSTALL_QML\\]")
-                  "$$replace(dir, mkspecs/modules, qml)"))
-               #t))))))
+                  "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
+
+               ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
+               (substitute* (string-append mkspecs "/features/qt_functions.prf")
+                 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
+                  "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
+
+               ;; Resolve qmake spec files within qtbase by absolute paths.
+               (substitute*
+                   (map (lambda (file)
+                          (string-append mkspecs "/features/" file))
+                        '("device_config.prf" "moc.prf" "qt_build_config.prf"
+                          "qt_config.prf" "winrt/package_manifest.prf"))
+                 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
+                 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
+               #t)))
+         (add-after 'unpack 'patch-paths
+           ;; Use the absolute paths for dynamically loaded libs, otherwise
+           ;; the lib will be searched in LD_LIBRARY_PATH which typically is
+           ;; not set in guix.
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; libresolve
+             (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
+                                                 "cross-libc" "libc"))))
+               (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
+                              "src/network/kernel/qhostinfo_unix.cpp")
+                 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
+                (string-append a glibc "/lib/lib" b))))
+             ;; X11/locale (compose path)
+             (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
+               ;; Don't search in /usr/…/X11/locale, …
+               (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
+                (string-append "// " line))
+               ;; … but use libx11's path
+               (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
+                (string-append a "\"" (assoc-ref inputs "libx11") b)))
+             ;; libGL
+             (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
+               (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
+                (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
+             ;; libXcursor
+             (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
+               (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
+                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
+               (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
+                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
+             #t)))))
     (native-search-paths
      (list (search-path-specification
             (variable "QMAKEPATH")
-            (files '("")))
+            (files '("lib/qt5")))
            (search-path-specification
             (variable "QML2_IMPORT_PATH")
-            (files '("qml")))
+            (files '("lib/qt5/qml")))
            (search-path-specification
             (variable "QT_PLUGIN_PATH")
-            (files '("plugins")))
+            (files '("lib/qt5/plugins")))
            (search-path-specification
             (variable "XDG_DATA_DIRS")
             (files '("share")))
@@ -532,7 +602,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtsvg
   (package (inherit qtbase)
     (name "qtsvg")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -541,7 +611,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h"))))
+               "0yh3an9rc7fh013cw3bm318ap6428icsmnj38hhg1w6lpwr2gwm2"))))
     (propagated-inputs `())
     (native-inputs `(("perl" ,perl)))
     (inputs
@@ -551,31 +621,63 @@ developers using C++ or QML, a CSS & JavaScript like language.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               ;; Valid QT_BUILD_PARTS variables are:
-               ;; libs tools tests examples demos docs translations
-               (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
-                               (string-append "PREFIX=" out))))))
-         (add-before 'install 'fix-Makefiles
+         (add-before 'configure 'configure-qmake
            (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)))
+             (let* ((out (assoc-ref outputs "out"))
+                    (qtbase (assoc-ref inputs "qtbase"))
+                    (tmpdir (string-append (getenv "TMPDIR")))
+                    (qmake (string-append tmpdir "/qmake"))
+                    (qt.conf (string-append tmpdir "/qt.conf")))
+               ;; Use qmake with a customized qt.conf to override install
+               ;; paths to $out.
+               (symlink (which "qmake") qmake)
+               (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
+               (with-output-to-file qt.conf
+                 (lambda ()
+                   (format #t "[Paths]
+Prefix=~a
+ArchData=lib/qt5
+Data=share/qt5
+Documentation=share/doc/qt5
+Headers=include/qt5
+Libraries=lib
+LibraryExecutables=lib/qt5/libexec
+Binaries=bin
+Tests=tests
+Plugins=lib/qt5/plugins
+Imports=lib/qt5/imports
+Qml2Imports=lib/qt5/qml
+Translations=share/qt5/translations
+Settings=etc/xdg
+Examples=share/doc/qt5/examples
+HostPrefix=~a
+HostData=lib/qt5
+HostBinaries=bin
+HostLibraries=lib
+
+[EffectiveSourcePaths]
+HostPrefix=~a
+HostData=lib/qt5
+" out out qtbase)))
                #t)))
-            (add-before 'check 'set-display
-              (lambda _
-                ;; make Qt render "offscreen", required for tests
-                (setenv "QT_QPA_PLATFORM" "offscreen")
-                #t)))))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Valid QT_BUILD_PARTS variables are:
+             ;; libs tools tests examples demos docs translations
+             (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"))))
+         (add-before 'check 'set-display
+           (lambda _
+             ;; make Qt render "offscreen", required for tests
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (synopsis "Qt module for displaying SVGs")
+    (description "The QtSvg module provides classes for displaying the
+ contents of SVG files.")))
 
 (define-public qtimageformats
   (package (inherit qtsvg)
     (name "qtimageformats")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -584,11 +686,10 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
+               "1nfxvf96wh1smdmcsk4m9f7zg69fgp844f8772qpv6v4m20p1qb9"))
              (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 (delete-file-recursively "src/3rdparty")))))
+             (snippet '(begin (delete-file-recursively "src/3rdparty")
+                              #t))))
     (native-inputs `())
     (inputs
      `(("jasper" ,jasper)
@@ -597,12 +698,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("libwebp" ,libwebp)
        ("mesa" ,mesa)
        ("qtbase" ,qtbase)
-       ("zlib" ,zlib)))))
+       ("zlib" ,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.")))
 
 (define-public qtx11extras
   (package (inherit qtsvg)
     (name "qtx11extras")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -611,19 +715,22 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
+               "1a125fi7lbxfps207i12jammm4cjbiawmp4sqa3bxqah8p21i6w7"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (native-inputs `(("perl" ,perl)))
     (inputs
      `(("mesa" ,mesa)
-       ("qtbase" ,qtbase)))))
+       ("qtbase" ,qtbase)))
+    (synopsis "Qt Extras for X11")
+    (description "The QtX11Extras module includes the library to access X11
+from within Qt 5.")))
 
 (define-public qtxmlpatterns
   (package (inherit qtsvg)
     (name "qtxmlpatterns")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -632,7 +739,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
+               "0ybz0i3wblvrm958s9ykp3a79bakjbb7k74q71mqaaswkv9imxgs"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:phases phases)
@@ -640,15 +747,19 @@ developers using C++ or QML, a CSS & JavaScript like language.")
            (add-after 'unpack 'disable-network-tests
              (lambda _ (substitute* "tests/auto/auto.pro"
                          (("qxmlquery") "# qxmlquery")
-                         (("xmlpatterns") "# xmlpatterns"))
+                         (("xmlpatterns ") "# xmlpatterns"))
                #t))))))
     (native-inputs `(("perl" ,perl)))
-    (inputs `(("qtbase" ,qtbase)))))
+    (inputs `(("qtbase" ,qtbase)))
+    (synopsis "Qt XML patterns module")
+    (description "The QtXmlPatterns module is a XQuery and XPath engine for
+XML and custom data models.  It contains programs such as xmlpatterns and
+xmlpatternsvalidator.")))
 
 (define-public qtdeclarative
   (package (inherit qtsvg)
     (name "qtdeclarative")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -657,7 +768,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
+               "0r9dhfc6qmxlzn2v9r6z6n2mcq6pv1nmyh91g9hcdlkx40xqlqyw"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -669,12 +780,18 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("qtxmlpatterns" ,qtxmlpatterns)))
     (inputs
      `(("mesa" ,mesa)
-       ("qtbase" ,qtbase)))))
+       ("qtbase" ,qtbase)))
+    (synopsis "Qt QML module (Quick 2)")
+    (description "The Qt QML module provides a framework for developing
+applications and libraries with the QML language.  It defines and implements the
+language and engine infrastructure, and provides an API to enable application
+developers to extend the QML language with custom types and integrate QML code
+with JavaScript and C++.")))
 
 (define-public qtconnectivity
   (package (inherit qtsvg)
     (name "qtconnectivity")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -683,19 +800,33 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
+               "12qckqz6ldvn1czkkigadmgl07yk4gs74hy4ifh4hmpm7cv519yv"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'disable-failing-tests
+             ;; this test fails on armhf and aarch64
+             (lambda _
+               (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
+                 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
+                 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
+               #t))))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("qtdeclarative" ,qtdeclarative)))
     (inputs
      `(("bluez" ,bluez)
-       ("qtbase" ,qtbase)))))
+       ("qtbase" ,qtbase)))
+    (synopsis "Qt Connectivity module")
+    (description "The Qt Connectivity modules provides modules for interacting
+with Bluetooth and NFC.")))
 
 (define-public qtwebsockets
   (package (inherit qtsvg)
     (name "qtwebsockets")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -704,19 +835,25 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
+               "00786d9m8skj68n5x9d8151zmmskx7ckhgcdd08hs9nly04h55vj"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
-    (inputs `(("qtbase" ,qtbase)))))
+    (inputs `(("qtbase" ,qtbase)))
+    (synopsis "Qt Web Sockets module")
+    (description "WebSocket is a web-based protocol designed to enable two-way
+communication between a client application and a remote host.  The Qt
+WebSockets module provides C++ and QML interfaces that enable Qt applications
+to act as a server that can process WebSocket requests, or a client that can
+consume data received from the server, or both.")))
 
 (define-public qtsensors
   (package (inherit qtsvg)
     (name "qtsensors")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -725,16 +862,31 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
+               "0n6lkkn7c9x8vcplmfvkx7jq6najh2mrwnfb3blrmkmpash3lgvr"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:parallel-tests? _ #f) #f) ; can lead to race condition
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'fix-tests
+             (lambda _
+               (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
+                 (("2000") "5000")      ;lengthen test timeout
+                 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
+               #t))))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
-    (inputs `(("qtbase" ,qtbase)))))
+    (inputs `(("qtbase" ,qtbase)))
+    (synopsis "Qt Sensors module")
+    (description "The Qt Sensors API provides access to sensor hardware via QML
+and C++ interfaces.  The Qt Sensors API also provides a motion gesture
+recognition API for devices.")))
 
 (define-public qtmultimedia
   (package (inherit qtsvg)
     (name "qtmultimedia")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -743,7 +895,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
+               "0x2f3vpax7rq0lxnncbp5b248bxdicrwn8hv4hsas2g2283s0lj9"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -751,10 +903,19 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                    "examples/multimedia/spectrum/3rdparty")
                  ;; We also prevent the spectrum example from being built.
                  (substitute* "examples/multimedia/multimedia.pro"
-                   (("spectrum") "#"))))))
+                   (("spectrum") "#"))
+                 #t))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
-       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'configure
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
+                                 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
+                                 (string-append "PREFIX=" out))))))))
+       ((#:tests? _ #f) #f)))           ; TODO: Enable the tests
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -764,12 +925,19 @@ developers using C++ or QML, a CSS & JavaScript like language.")
      `(("alsa-lib" ,alsa-lib)
        ("mesa" ,mesa)
        ("pulseaudio" ,pulseaudio)
-       ("qtbase" ,qtbase)))))
+       ("qtbase" ,qtbase)
+       ;; Gstreamer is needed for the mediaplayer plugin
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)))
+    (synopsis "Qt Multimedia module")
+    (description "The Qt Multimedia module provides set of APIs to play and
+record media, and manage a collection of media content.  It also contains a
+set of plugins for interacting with pulseaudio and GStreamer.")))
 
 (define-public qtwayland
   (package (inherit qtsvg)
     (name "qtwayland")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -778,7 +946,24 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
+               "0x4q17k23akf14i3pyllr96s8lvprk1x006wp0mi5rhk4199cx1z"))
+             (modules '((guix build utils)))
+             (snippet
+               ;; The examples try to build and cause the build to fail
+              '(begin (delete-file-recursively "examples")
+                      #t))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'check 'set-ld-library-path
+             ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
+             ;;
+             ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
+             ;; wayland platform plugin.
+             (lambda _
+               (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
+               #t))))))
     (native-inputs
      `(("glib" ,glib)
        ("perl" ,perl)
@@ -795,12 +980,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("mesa" ,mesa)
        ("mtdev" ,mtdev)
        ("qtbase" ,qtbase)
-       ("wayland" ,wayland)))))
+       ("wayland" ,wayland)))
+    (synopsis "Qt Wayland module")
+    (description "The Qt Wayland module provides the QtWayland client and
+compositor libraries.")))
 
 (define-public qtserialport
   (package (inherit qtsvg)
     (name "qtserialport")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -809,16 +997,32 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
+               "172i5cpqnk0c3m0hg08hgj15qvsyd1xvw9yf2dqicg3l10lqwg8c"))))
     (native-inputs `(("perl" ,perl)))
     (inputs
      `(("qtbase" ,qtbase)
-       ("eudev" ,eudev)))))
+       ("eudev" ,eudev)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'patch-dlopen-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/serialport/qtudev_p.h"
+               ;; Use the absolute paths for dynamically loaded libs,
+               ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
+               ;; typically is not set in guix.
+               (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
+                (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
+             #t))))))
+    (synopsis "Qt Serial Port module")
+    (description "The Qt Serial Port module provides the library for
+interacting with serial ports from within Qt.")))
 
 (define-public qtserialbus
   (package (inherit qtsvg)
     (name "qtserialbus")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -827,15 +1031,19 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj"))))
+               "1i6b7w9z30mzzi0dcmrxx1scpzpnnw2fag1igvrnzvw1jwp414ff"))))
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtserialport" ,qtserialport)))))
+       ("qtserialport" ,qtserialport)))
+    (synopsis "Qt Serial Bus module")
+    (description "The Qt Serial Bus API provides classes and functions to
+access the various industrial serial buses and protocols, such as CAN, ModBus,
+and others.")))
 
 (define-public qtwebchannel
   (package (inherit qtsvg)
     (name "qtwebchannel")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -844,17 +1052,22 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
+               "1acs0fa5rxm3cir0lydc9a8685qagf1786vkssv51wk3v9r3lc4h"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)
        ("qtwebsockets" ,qtwebsockets)))
-    (inputs `(("qtbase" ,qtbase)))))
+    (inputs `(("qtbase" ,qtbase)))
+    (synopsis "Web communication library for Qt")
+    (description "The Qt WebChannel module enables peer-to-peer communication
+between the host (QML/C++ application) and the client (HTML/JavaScript
+application).  The transport mechanism is supported out of the box by the two
+popular web engines, Qt WebKit 2 and Qt WebEngine.")))
 
 (define-public qtlocation
   (package (inherit qtsvg)
     (name "qtlocation")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -863,7 +1076,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
+               "186jzv19v674n8jmm13v5xwv211lygih5657rlvbhc1s4jq6iv9p"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -872,12 +1085,19 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("qtdeclarative" ,qtdeclarative)
        ("qtquickcontrols" ,qtquickcontrols)
        ("qtserialport" ,qtserialport)))
-    (inputs `(("qtbase" ,qtbase)))))
+    (inputs
+     `(("icu4c" ,icu4c)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("zlib" ,zlib)))
+    (synopsis "Qt Location and Positioning modules")
+    (description "The Qt Location module provides an interface for location,
+positioning and geolocation plugins.")))
 
 (define-public qttools
   (package (inherit qtsvg)
     (name "qttools")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -886,7 +1106,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
+               "11vfk6c8snsqwqj1xk53c0h2mkqr4gfa9kinp8py56x7sn15galm"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -895,12 +1115,16 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("qtdeclarative" ,qtdeclarative)))
     (inputs
      `(("mesa" ,mesa)
-       ("qtbase" ,qtbase)))))
+       ("qtbase" ,qtbase)))
+    (synopsis "Qt Tools and Designer modules")
+    (description "The Qt Tools module provides a set of applications to browse
+the documentation, translate applications, generate help files and other stuff
+that helps in Qt development.")))
 
 (define-public qtscript
   (package (inherit qtsvg)
     (name "qtscript")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -909,17 +1133,22 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
+               "0lz0iv1baah7cxrpyiqzqp4fxxf75i21qd06ha7r5d80hq3xlia0"))
+             (patches (search-patches "qtscript-disable-tests.patch"))))
     (native-inputs
      `(("perl" ,perl)
        ("qttools" ,qttools)))
     (inputs
-     `(("qtbase" ,qtbase)))))
+     `(("qtbase" ,qtbase)))
+    (synopsis "Qt Script module")
+    (description "Qt provides support for application scripting with ECMAScript.
+The following guides and references cover aspects of programming with
+ECMAScript and Qt.")))
 
 (define-public qtquickcontrols
   (package (inherit qtsvg)
     (name "qtquickcontrols")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -928,18 +1157,22 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
+               "12yrmv6afjbd1fw3r8zjdrbq5l7cy7k5bxcyiv1m97gykfh0b8hn"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Quick Controls and other Quick modules")
+    (description "The QtScript module provides classes for making Qt
+applications scriptable.  This module provides a set of extra components that
+can be used to build complete interfaces in Qt Quick.")))
 
 (define-public qtquickcontrols2
   (package (inherit qtsvg)
     (name "qtquickcontrols2")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -948,18 +1181,23 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
+               "0334ayansm743kf113rs3k9hi9qb6giscfx9xig3y1z7asisfa0m"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
+    (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
+module that provides platform integration: native dialogs, menus and menu bars,
+and tray icons.  It falls back to Qt Widgets when a native implementation is
+not available.")))
 
 (define-public qtgraphicaleffects
   (package (inherit qtsvg)
     (name "qtgraphicaleffects")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -968,15 +1206,23 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
+               "1vxq4j7cb5cya1g234rxhfb361n45gp8c70gj8pc03njswkm7xwp"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Graphical Effects module")
+    (description "The Qt Graphical Effects module provides a set of QML types
+for adding visually impressive and configurable effects to user interfaces.
+Effects are visual items that can be added to Qt Quick user interface as UI
+components.  The API consists of over 20 effects provided as separate QML
+types.  The effects cover functional areas such as blending, masking, blurring,
+coloring, and many more.")))
 
 (define-public qtdeclarative-render2d
+  ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
   (package (inherit qtsvg)
     (name "qtdeclarative-render2d")
     (version "5.7.1")
@@ -991,16 +1237,21 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
              (modules '((guix build utils)))
              (snippet
-              '(delete-file-recursively "tools/opengldummy/3rdparty"))))
+              '(begin (delete-file-recursively "tools/opengldummy/3rdparty")
+                      #t))))
     (native-inputs `())
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Declarative Render module")
+    (description "The Qt Declarative Render 2D module provides a Raster
+backend for QtQuick scene graph.")
+    (properties `((superseded . ,qtdeclarative)))))
 
 (define-public qtgamepad
   (package (inherit qtsvg)
     (name "qtgamepad")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1009,7 +1260,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv"))))
+               "1ci6aapq0i8qbzkn9xxvxn1n81z3y28yrlyzw0anqzj9qp97cl6f"))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)))
@@ -1019,12 +1270,18 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("libxrender" ,libxrender)
        ("sdl2" ,sdl2)
        ("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Gamepad module")
+    (description "The Qt Gamepad module is an add-on library that enables Qt
+applications to support the use of gamepad hardware and in some cases remote
+control equipment.  The module provides both QML and C++ interfaces.  The
+primary target audience are embedded devices with fullscreen user interfaces,
+and mobile applications targeting TV-like form factors.")))
 
 (define-public qtscxml
   (package (inherit qtsvg)
     (name "qtscxml")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1033,22 +1290,29 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx"))
+               "0x8bjp9jzib4kfn7rbricw4qr259qqsdbrz0dw39453s2m7cbv0x"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  (delete-file-recursively "tests/3rdparty")
                  ;; the scion test refers to the bundled 3rd party test code.
                  (substitute* "tests/auto/auto.pro"
-                   (("scion") "#"))))))
+                   (("scion") "#"))
+                 #t))))
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt SCXML module")
+    (description "The Qt SCXML module provides functionality to create state
+machines from SCXML files.  This includes both dynamically creating state
+machines (loading the SCXML file and instantiating states and transitions) and
+generating a C++ file that has a class implementing the state machine.  It
+also contains functionality to support data models and executable content.")))
 
 (define-public qtpurchasing
   (package (inherit qtsvg)
     (name "qtpurchasing")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1057,15 +1321,18 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n"))))
+               "08sk8vw16pa1qv36rfr9dsbzlwlv6kznfpsq8wfabhkgbfl6awqs"))))
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Purchasing module")
+    (description "The Qt Purchasing module provides and in-app API for
+purchasing goods and services.")))
 
 (define-public qtcanvas3d
   (package (inherit qtsvg)
     (name "qtcanvas3d")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1074,10 +1341,11 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8"))
+               "0agdxgk7knf6zkjdi6316y2k9zq72wcg5zn3cbhw4hzjw81qadgg"))
              (modules '((guix build utils)))
              (snippet
-              '(delete-file-recursively "examples/canvas3d/3rdparty"))))
+              '(begin (delete-file-recursively "examples/canvas3d/3rdparty")
+                      #t))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
       ;; Building the tests depends on the bundled 3rd party javascript files,
@@ -1094,12 +1362,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
     (native-inputs `())
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Canvas 3D module")
+    (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
+drawing calls from Qt Quick JavaScript.")))
 
 (define-public qtcharts
   (package (inherit qtsvg)
     (name "qtcharts")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1108,18 +1379,25 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5"))))
+               "1rykb72gr95rxd0rvbl846ys8xvyyhrms1jz7l4hlwp6zn1jkxvm"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Charts module")
+    (description "The Qt Charts module provides a set of easy to use chart
+components.  It uses the Qt Graphics View Framework, therefore charts can be
+easily integrated to modern user interfaces.  Qt Charts can be used as QWidgets,
+QGraphicsWidget, or QML types. Users can easily create impressive graphs by
+selecting one of the charts themes.")
+    (license license:gpl3)))
 
 (define-public qtdatavis3d
   (package (inherit qtsvg)
     (name "qtdatavis3d")
-    (version "5.7.1")
+    (version "5.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -1128,18 +1406,105 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1y00p0wyj5cw9c2925y537vpmmg9q3kpf7qr1s7sv67dvvf8bzqv"))))
+               "1ggwfnqf17mp5dkfr82q1qrimkb6wv3304vl8mjv1nq0zisckhjv"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtdeclarative" ,qtdeclarative)))))
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Data Visualization module")
+    (description "The Qt Data Visualization module provides a way to visualize
+data in 3D as bar, scatter, and surface graphs. It is especially useful for
+visualizing depth maps and large quantities of rapidly changing data, such as
+data received from multiple sensors. The look and feel of graphs can be
+customized by using themes or by adding custom items and labels to them.")
+    (license license:gpl3)))
+
+(define-public qtnetworkauth
+  (package (inherit qtsvg)
+    (name "qtnetworkauth")
+    (version "5.9.4")
+    (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
+               "0mqcqkp9h5bgzb3wfy239wh1c9s9zxd7mww11c0jyp56wk5balcx"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'remove-failing-test
+             (lambda _
+               ;; These tests can't find their test data.
+               (substitute* "tests/auto/auto.pro"
+                 (("oauth1 ") "# oauth1 "))
+               #t))))))
+    (inputs
+     `(("qtbase" ,qtbase)))
+    (synopsis "Qt Network Authorization module")
+    (description "The Qt Network Authorization module provides an
+implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
+
+(define-public qtremoteobjects
+  (package (inherit qtsvg)
+    (name "qtremoteobjects")
+    (version "5.9.4")
+    (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
+               "1wb50dapv0l45c0rfmpiaddvwv9na50lmd5zmm052q9d1xb15f6b"))))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))
+    (synopsis "Qt Remote Objects module")
+    (description "The Qt Remote Objects module is an @dfn{inter-process
+communication} (IPC) module developed for Qt.  The idea is to extend existing
+Qt's functionalities to enable an easy exchange of information between
+processes or computers.")))
+
+(define-public qtspeech
+  (package (inherit qtsvg)
+    (name "qtspeech")
+    (version "5.9.4")
+    (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
+               "17h8hrixxcsn7pd5iipbj2hxpp5m2dhfq3w04wkamambb49qs80x"))))
+    (inputs
+     `(("qtbase" ,qtbase)))
+    (native-inputs
+     `(("perl" ,perl)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtxmlpatterns" ,qtxmlpatterns)))
+    (synopsis "Qt Speech module")
+    (description "The Qt Speech module enables a Qt application to support
+accessibility features such as text-to-speech, which is useful for end-users
+who are visually challenged or cannot access the application for whatever
+reason.  The most common use case where text-to-speech comes in handy is when
+the end-user is driving and cannot attend the incoming messages on the phone.
+In such a scenario, the messaging application can read out the incoming
+message.")))
 
 (define-public python-sip
   (package
     (name "python-sip")
-    (version "4.18.1")
+    (version "4.19.3")
     (source
       (origin
         (method url-fetch)
@@ -1148,7 +1513,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                          "sip-" version "/sip-" version ".tar.gz"))
         (sha256
          (base32
-          "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
+          "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-wrapper)))
@@ -1202,7 +1567,7 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.7")
+    (version "5.9")
     (source
       (origin
         (method url-fetch)
@@ -1212,7 +1577,7 @@ module provides support functions to the automatically generated code.")
                          version ".tar.gz"))
         (sha256
          (base32
-          "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
+          "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
        (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
@@ -1292,17 +1657,17 @@ contain over 620 classes.")
 (define-public python-pyqt-4
   (package (inherit python-pyqt)
     (name "python-pyqt")
-    (version "4.11.4")
+    (version "4.12")
     (source
       (origin
         (method url-fetch)
         (uri
           (string-append "mirror://sourceforge/pyqt/PyQt4/"
-                         "PyQt-" version "/PyQt-x11-gpl-"
+                         "PyQt-" version "/PyQt4_gpl_x11-"
                          version ".tar.gz"))
         (sha256
          (base32
-          "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
+          "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
     (native-inputs
      `(("python-sip" ,python-sip)
        ("qt" ,qt-4)))
@@ -1344,10 +1709,114 @@ contain over 620 classes.")
            (inputs
             `(("python" ,python-2)))))
 
+(define-public qscintilla
+  (package
+    (name "qscintilla")
+    (version "2.10.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
+                                  "QScintilla-" version "/QScintilla_gpl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1l2ylsv6s3wfhyx7qr5cxgkwwwhvbrpd2k7akgm9bvbyf4h1vcql"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (chdir "Qt4Qt5")
+               (substitute* "qscintilla.pro"
+                 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
+                  (string-append out "/lib"))
+                 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
+                  (string-append out "/include"))
+                 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
+                  (string-append out "/translations"))
+                 (("\\$\\$\\[QT_INSTALL_DATA\\]")
+                  (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
+                 (("\\$\\$\\[QT_HOST_DATA\\]")
+                 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
+               (invoke "qmake")))))))
+    (native-inputs `(("qtbase" ,qtbase)))
+    (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
+    (synopsis "Qt port of the Scintilla C++ editor control")
+    (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
+editor control.  QScintilla includes features especially useful when editing
+and debugging source code.  These include support for syntax styling, error
+indicators, code completion and call tips.")
+    (license license:gpl3+)))
+
+(define-public python-qscintilla
+  (package (inherit qscintilla)
+    (name "python-qscintilla")
+    (arguments
+     `(#:configure-flags
+       (list "--pyqt=PyQt5"
+             (string-append "--pyqt-sipdir="
+                            (assoc-ref %build-inputs "python-pyqt")
+                            "/share/sip")
+             (string-append "--qsci-incdir="
+                            (assoc-ref %build-inputs "qscintilla")
+                            "/include")
+             (string-append "--qsci-libdir="
+                            (assoc-ref %build-inputs "qscintilla")
+                            "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs configure-flags #:allow-other-keys)
+             (chdir "Python")
+             (apply invoke "python3" "configure.py"
+                    configure-flags)
+             ;; Install to the right directory
+             (substitute* '("Makefile"
+                            "Qsci/Makefile")
+               (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
+                (assoc-ref outputs "out")))
+             #t)))))
+    (inputs
+     `(("qscintilla" ,qscintilla)
+       ("python" ,python)
+       ("python-pyqt" ,python-pyqt)))
+    (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
+editor control.  QScintilla includes features especially useful when editing
+and debugging source code.  These include support for syntax styling, error
+indicators, code completion and call tips.
+
+This package provides the Python bindings.")))
+
+;; PyQt only looks for modules in its own directory.  It ignores environment
+;; variables such as PYTHONPATH, so we need to build a union package to make
+;; it work.
+(define-public python-pyqt+qscintilla
+  (package (inherit python-pyqt)
+    (name "python-pyqt+qscintilla")
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     '(#:modules ((guix build union))
+       #:builder (begin
+                   (use-modules (ice-9 match)
+                                (guix build union))
+                   (match %build-inputs
+                     (((names . directories) ...)
+                      (union-build (assoc-ref %outputs "out")
+                                   directories))))))
+    (inputs
+     `(("python-pyqt" ,python-pyqt)
+       ("python-qscintilla" ,python-qscintilla)))
+    (synopsis "Union of PyQt and the Qscintilla extension")
+    (description
+     "This package contains the union of PyQt and the Qscintilla extension.")))
+
 (define-public qtkeychain
   (package
     (name "qtkeychain")
-    (version "0.7.0")
+    (version "0.8.0")
     (source
       (origin
         (method url-fetch)
@@ -1355,10 +1824,11 @@ contain over 620 classes.")
                             "archive/v" version ".tar.gz"))
         (file-name (string-append name "-" version ".tar.gz"))
         (sha256
-         (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
+         (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
     (build-system cmake-build-system)
     (native-inputs
-     `(("qttools" ,qttools)))
+     `(("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
     (inputs
      `(("qtbase" ,qtbase)))
     (arguments
@@ -1370,7 +1840,8 @@ contain over 620 classes.")
            (lambda _
              (substitute* "CMakeLists.txt"
               (("\\$\\{qt_translations_dir\\}")
-               "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
+               "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
+             #t)))))
     (home-page "https://github.com/frankosterfeld/qtkeychain")
     (synopsis "Qt API to store passwords")
     (description
@@ -1400,11 +1871,27 @@ securely.  It will not store any data unencrypted unless explicitly requested.")
      (modify-phases %standard-phases
        (replace 'configure
          (lambda* (#:key outputs #:allow-other-keys)
-           (let ((out (assoc-ref outputs "out")))
+           (let* ((out (assoc-ref outputs "out"))
+                  (docdir (string-append out "/share/doc/qwt"))
+                  (incdir (string-append out "/include/qwt"))
+                  (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
+                  (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
              (substitute* '("qwtconfig.pri")
-               (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
+               (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
+                (format #f "~a = ~a\n" x out))
+               (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
+                (format #f "~a = ~a\n" x docdir))
+               (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
+                (format #f "~a = ~a\n" x incdir))
+               (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
+                (format #f "~a = ~a\n" x pluginsdir))
+               (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
+                (format #f "~a = ~a\n" x featuresdir)))
+             (substitute* '("doc/doc.pro")
+               ;; We'll install them in the 'install-man-pages' phase.
+               (("^unix:doc\\.files.*") ""))
              (zero? (system* "qmake")))))
-       (add-after 'install 'install-documentation
+       (add-after 'install 'install-man-pages
          (lambda* (#:key outputs #:allow-other-keys)
            (let* ((out (assoc-ref outputs "out"))
                   (man (string-append out "/share/man")))
@@ -1430,19 +1917,17 @@ different kinds of sliders, and much more.")
 (define-public qtwebkit
   (package
     (name "qtwebkit")
-    (version "5.7.1")
+    (version "5.9.1")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append "http://download.qt.io/community_releases/"
-                            (version-major+minor version)
-                            "/" version "/qtwebkit-opensource-src-" version
-                            ".tar.xz"))
-        ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
-        ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
+        (uri (string-append "https://download.qt.io/official_releases/qt/"
+                            (version-major+minor version) "/" version
+                            "/submodules/" name "-opensource-src-"
+                            version ".tar.xz"))
         (sha256
          (base32
-          "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
+          "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("perl" ,perl)
@@ -1470,6 +1955,15 @@ different kinds of sliders, and much more.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'fix-qmlwebkit-plugins-rpath
+           (lambda _
+             (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
+               (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
+                "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
+             (substitute* "Source/WebKit/qt/declarative/public.pri"
+               (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
+                "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
+             #t))
          (replace 'configure
                   (lambda* (#:key outputs #:allow-other-keys)
                     (let ((out (assoc-ref outputs "out")))
@@ -1544,7 +2038,7 @@ time Web content can be enhanced with native controls.")
 (define-public dotherside
   (package
     (name "dotherside")
-    (version "0.5.2")
+    (version "0.6.3")
     (source
      (origin
        (method url-fetch)
@@ -1553,7 +2047,7 @@ time Web content can be enhanced with native controls.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
+         "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("qttools" ,qttools)))