GNU bug report logs - #65922
[qt-team PATCH 0/4] Avoid capturing python in qtbase, reinstate tests

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 13 Sep 2023 16:57:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 65922 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Andreas Enge <andreas <at> enge.fr>, 宋文武 <iyzsong <at> envs.net>
Subject: [bug#65922] [qt-team PATCH v3 1/5] gnu: qtbase: Do not capture Python (again).
Date: Sun, 17 Sep 2023 13:26:13 -0400
Fixes <https://issues.guix.gnu.org/65457>.

* gnu/packages/qt.scm (qtbase-5) [arguments]: Add #:disallowed-references
argument to guard against the problem reoccurring in the future.
Add do-not-capture-python phase.
(qtbase) [arguments]: Update do-not-capture-python phase.
---

(no changes since v1)

 gnu/packages/qt.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index b7e394d663c..a158f8114fe 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -392,7 +392,7 @@ (define-public qtbase-5
            fontconfig
            freetype
            glib
-           gtk+               ;for GTK theme support
+           gtk+                         ;for GTK theme support
            harfbuzz
            icu4c
            libinput-minimal
@@ -437,7 +437,8 @@ (define-public qtbase-5
            vulkan-headers
            ruby-2.7))
     (arguments
-     `(#:configure-flags
+     `(#:disallowed-references ,(list python)
+       #:configure-flags
        (let ((out (assoc-ref %outputs "out")))
          (list "-verbose"
                "-prefix" out
@@ -583,7 +584,16 @@ (define-public qtbase-5
                (("^\\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))))))))
+                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))))
+         (add-after 'install 'do-not-capture-python
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; For some reason, patching the file after the
+             ;; patch-source-shebangs phase doesn't work for Qt 5.
+             (substitute*
+                 (search-input-file
+                  outputs "lib/qt5/mkspecs/features/uikit/devices.py")
+               (((which "python3"))
+                "/usr/bin/env python3")))))))
     (native-search-paths
      (list (search-path-specification
             (variable "QMAKEPATH")
@@ -724,10 +734,12 @@ (define-public qtbase
                 (substitute* "src/corelib/CMakeLists.txt"
                   (("/bin/ls")
                    (search-input-file inputs "bin/ls")))))
+            (delete 'do-not-capture-python) ;move after patch-source-shebangs
             (add-after 'patch-source-shebangs 'do-not-capture-python
               (lambda _
                 (substitute* '("mkspecs/features/uikit/devices.py"
-                               "util/testrunner/qt-testrunner.py")
+                               "util/testrunner/qt-testrunner.py"
+                               "util/testrunner/sanitizer-testrunner.py")
                   (((which "python3"))
                    "/usr/bin/env python3"))))
             (replace 'configure
-- 
2.41.0





This bug report was last modified 1 year and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.