summary refs log tree commit diff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm176
1 files changed, 86 insertions, 90 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 19fcc2f37e..95618a9787 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -156,9 +156,7 @@
     (arguments
      `(#:tests? #f                      ; No target
        #:imported-modules
-       (,@%gnu-build-system-modules
-        (guix build cmake-build-system)
-        (guix build qt-build-system))
+       (,@%qt-build-system-modules)
        #:modules
        ((guix build gnu-build-system)
         ((guix build qt-build-system)
@@ -303,25 +301,24 @@ system, and the core design of Django is reused in Grantlee.")
     (name "qtbase")
     (version "5.15.2")
     (source (origin
-             (method url-fetch)
-             (uri (qt5-urls name version))
-             (sha256
-              (base32
-               "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
-             ;; Use TZDIR to avoid depending on package "tzdata".
-             (patches (search-patches "qtbase-use-TZDIR.patch"
-                                      "qtbase-moc-ignore-gcc-macro.patch"
-                                      "qtbase-absolute-runpath.patch"))
-             (modules '((guix build utils)))
-             (snippet
+              (method url-fetch)
+              (uri (qt5-urls name version))
+              (sha256
+               (base32
+                "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
+              ;; Use TZDIR to avoid depending on package "tzdata".
+              (patches (search-patches "qtbase-use-TZDIR.patch"
+                                       "qtbase-moc-ignore-gcc-macro.patch"
+                                       "qtbase-absolute-runpath.patch"))
+              (modules '((guix build utils)))
+              (snippet
                ;; corelib uses bundled harfbuzz, md4, md5, sha3
-              '(begin
-                (with-directory-excursion "src/3rdparty"
-                  (for-each delete-file-recursively
-                            (list "double-conversion" "freetype" "harfbuzz-ng"
-                                  "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
-                                  "zlib"))
-                  #t)))))
+               '(begin
+                  (with-directory-excursion "src/3rdparty"
+                    (for-each delete-file-recursively
+                              (list "double-conversion" "freetype" "harfbuzz-ng"
+                                    "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
+                                    "zlib")))))))
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
     (propagated-inputs
@@ -338,6 +335,7 @@ system, and the core design of Django is reused in Grantlee.")
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glib" ,glib)
+       ("gtk+" ,gtk+)                   ;for GTK theme support
        ("harfbuzz" ,harfbuzz)
        ("icu4c" ,icu4c)
        ("libinput" ,libinput-minimal)
@@ -382,7 +380,56 @@ system, and the core design of Django is reused in Grantlee.")
        ("vulkan-headers" ,vulkan-headers)
        ("ruby" ,ruby)))
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list "-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"
+
+               ;; Later stripped into the :debug output.
+               "-force-debug-info"
+
+               ;; These features require higher versions of Linux than the
+               ;; minimum version of the glibc.  See
+               ;; src/corelib/global/minimum-linux_p.h.  By disabling these
+               ;; features Qt5 applications can be used on the oldest
+               ;; kernels that the glibc supports, including the RHEL6
+               ;; (2.6.32) and RHEL7 (3.10) kernels.
+               "-no-feature-getentropy" ; requires Linux 3.17
+               "-no-feature-renameat2"  ; requires Linux 3.16
+
+               ;; 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.
+               "-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"
+               ;; 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-mips_dsp"
+               "-no-mips_dspr2"))
+       #:phases
        (modify-phases %standard-phases
          (add-after 'configure 'patch-bin-sh
            (lambda _
@@ -390,18 +437,18 @@ system, and the core design of Django is reused in Grantlee.")
                             "configure"
                             "mkspecs/features/qt_functions.prf"
                             "qmake/library/qmakebuiltins.cpp")
-                          (("/bin/sh") (which "sh")))
-             #t))
+               (("/bin/sh") (which "sh")))))
          (add-after 'configure 'patch-xdg-open
            (lambda _
              (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
-                          (("^.*const char \\*browsers.*$" all)
-                           (string-append "*browser = QStringLiteral(\""
-                                          (which "xdg-open")
-                                          "\"); return true; \n" all)))
-             #t))
+               (("^.*const char \\*browsers.*$" all)
+                (string-append "*browser = QStringLiteral(\""
+                               (which "xdg-open")
+                               "\"); return true; \n" all)))))
          (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
+           ;; Overridden to not pass "--enable-fast-install", which makes the
+           ;; configure process fail.
+           (lambda* (#:key outputs configure-flags #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (substitute* "configure"
                  (("/bin/pwd") (which "pwd")))
@@ -414,57 +461,9 @@ system, and the core design of Django is reused in Grantlee.")
                ;; components can be installed in different places.
                (substitute* (find-files "." ".*\\.cmake")
                  (("NO_DEFAULT_PATH") ""))
-               ;; do not pass "--enable-fast-install", which makes the
-               ;; configure process fail
-               (invoke
-                 "./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"
-
-                 ;; Later stripped into the :debug output.
-                 "-force-debug-info"
-
-                 ;; These features require higher versions of Linux than the
-                 ;; minimum version of the glibc.  See
-                 ;; src/corelib/global/minimum-linux_p.h.  By disabling these
-                 ;; features Qt5 applications can be used on the oldest
-                 ;; kernels that the glibc supports, including the RHEL6
-                 ;; (2.6.32) and RHEL7 (3.10) kernels.
-                 "-no-feature-getentropy"  ; requires Linux 3.17
-                 "-no-feature-renameat2"   ; requires Linux 3.16
-
-                 ;; 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.
-                 "-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"
-                 ;; 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-mips_dsp"
-                 "-no-mips_dspr2"))))
+               (format #t "build directory: ~s~%" (getcwd))
+               (format #t "configure flags: ~s~%" configure-flags)
+               (apply invoke "./configure" configure-flags))))
          (add-after 'install 'patch-mkspecs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -496,8 +495,7 @@ system, and the core design of Django is reused in Grantlee.")
                         '("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)))
+                 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
          (add-after 'patch-mkspecs 'patch-prl-files
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -506,8 +504,7 @@ system, and the core design of Django is reused in Grantlee.")
                ;; on context.  See <https://bugs.gnu.org/38405>
                (substitute* (find-files (string-append out "/lib") "\\.prl$")
                  (("\\$\\$\\[QT_INSTALL_LIBS\\]")
-                  (string-append out "/lib")))
-               #t)))
+                  (string-append out "/lib"))))))
          (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
@@ -519,7 +516,7 @@ system, and the core design of Django is reused in Grantlee.")
                (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))))
+                  (string-append a glibc "/lib/lib" b))))
              ;; libGL
              (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
                (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
@@ -529,8 +526,7 @@ system, and the core design of Django is reused in Grantlee.")
                (("^\\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)))))
+                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
     (native-search-paths
      (list (search-path-specification
             (variable "QMAKEPATH")
@@ -2815,7 +2811,7 @@ color-related widgets.")
 (define-public python-shiboken-2
   (package
     (name "python-shiboken-2")
-    (version "5.14.2.3")
+    (version "5.15.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.qt.io/official_releases"
@@ -2824,7 +2820,7 @@ color-related widgets.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "08lhqm0n3fjqpblcx9rshsp8g3bvf7yzbai5q99bly2wa04y6b83"))))
+                "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
     (build-system cmake-build-system)
     (inputs
      `(("clang-toolchain" ,clang-toolchain)