diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index c388adaca1b56b..5c463a42eda9db 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -31,6 +31,7 @@ class Qt(Package): phases = ["configure", "build", "install"] + version("5.15.10", sha256="b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca") version("5.15.9", sha256="26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f") version("5.15.8", sha256="776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9") version("5.15.7", sha256="8a71986676a3f37a198a9113acedbfd5bc5606a459b6b85816d951458adbe9a0") @@ -60,6 +61,7 @@ class Qt(Package): variant("gtk", default=False, description="Build with gtkplus.") variant("gui", default=True, description="Build the Qt GUI module and dependencies") variant("opengl", default=False, description="Build with OpenGL support.") + variant("location", default=False, when="+opengl", description="Build the Qt Location module.") variant("phonon", default=False, description="Build with phonon support.") variant("shared", default=True, description="Build shared libraries.") variant("sql", default=True, description="Build with SQL support.") @@ -67,6 +69,8 @@ class Qt(Package): variant("tools", default=True, description="Build tools, including Qt Designer.") variant("webkit", default=False, description="Build the Webkit extension") + provides("qmake") + # Patches for qt@3 patch("qt3-accept.patch", when="@3") patch("qt3-headers.patch", when="@3") @@ -134,6 +138,15 @@ class Qt(Package): working_dir="qtwebsockets", when="@5.14: %gcc@11:", ) + # patch that adds missing `#include ` in several files + # required for gcc 13 (even though the original patch was developed for gcc 10) + # (see https://gcc.gnu.org/gcc-13/porting_to.html) + patch( + "https://src.fedoraproject.org/rpms/qt5-qtlocation/raw/b6d99579de9ce5802c592b512a9f644a5e4690b9/f/qtlocation-gcc10.patch", + sha256="78c70fbd0c74031c5f0f1f5990e0b4214fc04c5073c67ce1f23863373932ec86", + working_dir="qtlocation", + when="@5.15.10 %gcc@10:", + ) # https://github.com/microsoft/vcpkg/issues/21055 patch("qt5-macos12.patch", working_dir="qtbase", when="@5.14: %apple-clang@13:") @@ -142,6 +155,9 @@ class Qt(Package): # causing qt to fail in ci. This increases that limit to 1024. patch("qt59-qtbase-qtconfig256.patch", working_dir="qtbase", when="@5.9:5") + # https://bugzilla.altlinux.org/attachment.cgi?id=13362&action=diff#a/gcc13-compilefix.patch_sec1 + patch("qt5-15-gcc13.patch", when="@5.15: %gcc@13") + conflicts("%gcc@10:", when="@5.9:5.12.6 +opengl") conflicts("%gcc@11:", when="@5.8") conflicts("%apple-clang@13:", when="@:5.13") @@ -252,8 +268,6 @@ class Qt(Package): msg="Apple Silicon requires a very new version of qt", ) - use_xcode = True - # Mapping for compilers/systems in the QT 'mkspecs' compiler_mapping = { "intel": ("icc",), @@ -711,6 +725,10 @@ def configure(self, spec, prefix): # https://wiki.qt.io/QtWayland config_args.extend(["-skip", "wayland"]) + if "~location" in spec: + if version >= Version("5.15"): + config_args.extend(["-skip", "qtlocation"]) + if "~opengl" in spec: config_args.extend(["-skip", "multimedia"]) config_args.extend(["-skip", "qt3d"]) @@ -721,9 +739,6 @@ def configure(self, spec, prefix): if version >= Version("5.14"): config_args.extend(["-skip", "qtquick3d"]) - if version >= Version("5.15"): - config_args.extend(["-skip", "qtlocation"]) - else: # v5.0: qt3d uses internal-only libassimp # v5.5: external-only libassimp