unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 56771@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#56771] [PATCH 12/33] gnu: Add qtdeclarative, version 6.3.1.
Date: Mon, 25 Jul 2022 19:07:42 -0400	[thread overview]
Message-ID: <20220725230803.10002-12-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20220725230803.10002-1-maxim.cournoyer@gmail.com>

* gnu/packages/qt.scm (qtdeclarative): New variable.
---
 gnu/packages/qt.scm | 128 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 128 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index ac4e125d2b..7851509513 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1058,6 +1058,134 @@ (define-public qtdeclarative-5
 developers to extend the QML language with custom types and integrate QML code
 with JavaScript and C++.")))
 
+(define-public qtdeclarative
+  (package
+    (name "qtdeclarative")
+    (version "6.3.1")
+    ;; TODO: Package 'masm' and unbundle from sources.
+    (source (origin
+              (method url-fetch)
+              (uri (qt5-urls name version))
+              (sha256
+               (base32
+                "1s268fha3650dn1lqxf8jfa07wxpw09f6p7rjyiwq3w24d0nkrq3"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-GNinja" ;about twice as fast!
+                                "-DQT_BUILD_TESTS=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'honor-cmake-install-rpath
+            ;; The build system goes out of its way to compute a runpath it
+            ;; thinks makes more sense, and fails.  Revert to the default
+            ;; behavior, which is to honor CMAKE_INSTALL_RPATH.
+            (lambda _
+              (substitute* "src/qml/Qt6QmlMacros.cmake"
+                (("set_target_properties.*PROPERTIES.*INSTALL_RPATH.*" all)
+                 (string-append "# " all)))))
+          (add-after 'unpack 'patch-qlibraryinfo-paths
+            (lambda _
+              ;; The QLibraryInfo paths are hard-coded to point to the qtbase
+              ;; installation, but all the tools used in the test suite come
+              ;; from this package.
+              (substitute* (find-files "tests" "\\.cpp$")
+                (("QLibraryInfo::path\\(QLibraryInfo::BinariesPath)")
+                 (string-append "QStringLiteral(\"" #$output "/bin\")"))
+                (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
+                 (string-append "QStringLiteral(\"" #$output
+                                "/lib/qt6/libexec\")"))
+                (("QLibraryInfo::path\\(QLibraryInfo::QmlImportsPath)")
+                 (string-append "QStringLiteral(\"" #$output
+                                "/lib/qt6/qml\")")))))
+          (replace 'build
+            (lambda* (#:key parallel-build? #:allow-other-keys)
+              (apply invoke "cmake" "--build" "."
+                     (if parallel-build?
+                         `("--parallel" ,(number->string (parallel-job-count)))
+                         '()))))
+          (delete 'check)               ;move after the install phase
+          (replace 'install
+            (lambda _
+              (invoke "cmake" "--install" ".")))
+          (add-after 'install 'check
+            (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+              (when tests?
+                ;; The tests expect to find the modules provided by this
+                ;; package; extend the environment variables needed to do so.
+                                        ;(setenv "CMAKE_PREFIX_PATH" #$output)
+                (setenv "QML2_IMPORT_PATH"
+                        (string-append #$output "/lib/qt6/qml"))
+                (setenv "QT_PLUGIN_PATH"
+                        (string-append #$output "/lib/qt6/plugins:"
+                                       (getenv "QT_PLUGIN_PATH")))
+                (setenv "QT_QPA_PLATFORM" "offscreen")
+                ;; Skip tests known to fail on GNU/Linux, in a CI context or
+                ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
+                ;; /tree/src/testlib/qtestblacklist.cpp).
+                (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
+                (setenv "HOME" "/tmp")  ;a few tests require a writable HOME
+                (invoke
+                 "ctest" "--output-on-failure"
+                 "-j" (if parallel-tests?
+                          (number->string (parallel-job-count))
+                          "1")
+                 "-E"                   ;exclude some tests by regex
+                 (string-append
+                  "("
+                  (string-join
+                   (list
+                    ;; This test is marked as flaky upstream (see:
+                    ;; https://bugreports.qt.io/browse/QTBUG-101488).
+                    "tst_qquickfiledialogimpl"
+                    ;; These tests all fail because 'test_overlappingHandles'
+                    ;; (see: https://bugreports.qt.io/browse/QTBUG-95750).
+                    "tst_basic"
+                    "tst_fusion"
+                    "tst_imagine"
+                    "tst_material"
+                    "tst_universal"
+                    ;; Fails due to using the wrong lib/qt6/qml prefix:
+                    ;; "Warning: Failed to find the following builtins:
+                    ;; builtins.qmltypes, jsroot.qmltypes (so will use
+                    ;; qrc). Import paths used:
+                    ;; /gnu/store/...-qtbase-6.3.1/lib/qt6/qml"
+                    "tst_qmltc_qprocess"
+                    ;; These test fail when running qmlimportscanner; perhaps
+                    ;; an extra CMAKE_PREFIX_PATH location is missing to
+                    ;; correctly locate the imports.
+                    "empty_qmldir"
+                    "qtquickcompiler"
+                    "cmake_tooling_imports"
+                    ;; This test seems to hangs for a long time, possibly
+                    ;; waiting for a killed process, which becomes a zombie in
+                    ;; the build container (perhaps solved after
+                    ;; fixing/applying #30948).
+                    "tst_qqmlpreview") "|")
+                  ")")))))
+          (add-after 'install 'delete-installed-tests
+            (lambda _
+              (delete-file-recursively (string-append #$output "/tests")))))))
+    (native-inputs
+     (list ninja
+           perl
+           pkg-config
+           python
+           qtshadertools
+           vulkan-headers))
+    (inputs
+     (list libxkbcommon
+           mesa
+           qtbase))
+    (home-page (package-home-page 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++.")
+    (license (package-license qtbase))))
+
 (define-public qtconnectivity
   (package (inherit qtsvg-5)
     (name "qtconnectivity")
-- 
2.36.1





  parent reply	other threads:[~2022-07-25 23:11 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 21:17 [bug#56771] [PATCH 00/33] *** Update Jami to 20220725, core Qt packages along the way Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 01/33] gnu: qtbase: Patch /bin/pwd in executable scripts Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 02/33] gnu: qtbase: Honor CMAKE_PREFIX_PATH Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 03/33] gnu: qtbase: Enable test suite Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 04/33] gnu: qtsvg: Rename variable to qtsvg-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 05/33] gnu: qtsvg-5: Fix indentation Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 06/33] gnu: Add qtsvg, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 07/33] gnu: qpwgraph: Migrate to Qt 6 and add libxkbcommon input Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 08/33] gnu: Add qtshadertools Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 09/33] gnu: qtmultimedia: Rename to qtmultimedia-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 10/33] gnu: Add qtmultimedia, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 11/33] gnu: qtdeclarative: Rename to qtdeclarative-5 Maxim Cournoyer
2022-07-25 23:07   ` Maxim Cournoyer [this message]
2022-07-25 23:07   ` [bug#56771] [PATCH 13/33] gnu: qtquickcontrols: Rename to qtquickcontrols-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 14/33] gnu: qtquickcontrols2: Rename to qtquickcontrols2-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 15/33] gnu: qtquickcontrols2: Define as obsoleted by qtdeclarative Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 16/33] gnu: qtwebsockets: Rename to qtwebsockets-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 17/33] gnu: Add qtwebsockets, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 18/33] gnu: qtwebchannel: Rename to qtwebchannel-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 19/33] gnu: Add qtwebchannel, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 20/33] gnu: qtwebengine: Rename to qtwebengine-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 21/33] gnu: Add qtwebengine, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 22/33] gnu: Add qt5compat Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 23/33] gnu: qttools: Rename to qttools-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 24/33] gnu: Add qttools, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 25/33] gnu: qtnetworkauth: Rename to qtnetworkauth-5 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 26/33] gnu: Add qtnetworkauth, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 27/33] gnu: Add qtpositioning Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 28/33] build: qt: Add qtbase argument and wrap Qt environment variables exactly Maxim Cournoyer
2022-07-25 23:07   ` [bug#56771] [PATCH 29/33] gnu: jami: Update to 20220725.1128.fd5e6c6 Maxim Cournoyer
2022-07-25 23:08   ` [bug#56771] [PATCH 30/33] gnu: libjami: Enable test agent Maxim Cournoyer
2022-07-25 23:08   ` [bug#56771] [PATCH 31/33] gnu: Remove jami-libclient Maxim Cournoyer
2022-07-25 23:08   ` [bug#56771] [PATCH 32/33] gnu: Deprecate jami-gnome for jami Maxim Cournoyer
2022-07-25 23:08   ` [bug#56771] [PATCH 33/33] gnu: jami: Update to 20220725.1128.fd5e6c6 Maxim Cournoyer
2022-07-26 16:14 ` [bug#56771] [PATCH 00/33] *** Update Jami to 20220725, core Qt packages along the way Jack Hill
2022-07-27  5:28   ` Jack Hill
2022-08-01  4:22     ` bug#56771: " Maxim Cournoyer
2022-08-01  4:39       ` [bug#56771] " Jack Hill
2022-08-01 10:54 ` Maxime Devos
2022-08-01 15:39   ` Maxim Cournoyer
2022-08-01 22:00     ` Maxime Devos
2022-08-05 12:51     ` Maxime Devos
2022-08-06  4:56       ` Maxim Cournoyer
2022-08-06 19:15         ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220725230803.10002-12-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=56771@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).