summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py47
-rw-r--r--var/spack/repos/builtin/packages/qt/qt515-quick3d-assimp.patch (renamed from var/spack/repos/builtin/packages/qt/qt514-quick3d-assimp.patch)0
2 files changed, 29 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 8bc9e920af..467413a82b 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -134,7 +134,7 @@ class Qt(Package):
patch('qt514.patch', when='@5.14')
patch('qt514-isystem.patch', when='@5.14.2')
# https://bugreports.qt.io/browse/QTBUG-84037
- patch('qt514-quick3d-assimp.patch', when='@5.14:5')
+ patch('qt515-quick3d-assimp.patch', when='@5.15:5')
# https://bugreports.qt.io/browse/QTBUG-90395
patch('https://src.fedoraproject.org/rpms/qt5-qtbase/raw/6ae41be8260f0f5403367eb01f7cd8319779674a/f/qt5-qtbase-gcc11.patch',
sha256='9378afd071ad5c0ec8f7aef48421e4b9fab02f24c856bee9c0951143941913c5',
@@ -183,7 +183,7 @@ class Qt(Package):
depends_on("libpng", when='@4:')
depends_on("dbus", when='@4:+dbus')
depends_on("gl", when='@4:+opengl')
- depends_on("assimp@5.0.0:5", when='@5.14:+opengl')
+ depends_on("assimp@5.0.0:5", when='@5.5:+opengl')
depends_on("harfbuzz", when='@5:')
depends_on("double-conversion", when='@5.7:')
@@ -510,6 +510,13 @@ class Qt(Package):
with open(conf_file, 'a') as f:
f.write("QMAKE_CXXFLAGS += -std=gnu++98\n")
+ def _use_spack_dep(spec, config_args, spack_pkg, qt_name=None):
+ pkg = spec[spack_pkg]
+ config_args.append('-system-' + (qt_name or spack_pkg))
+ if not pkg.external:
+ config_args.extend(pkg.libs.search_flags.split())
+ config_args.extend(pkg.headers.include_flags.split())
+
@property
def common_config_args(self):
spec = self.spec
@@ -527,12 +534,8 @@ class Qt(Package):
'-no-pch',
]
- def use_spack_dep(spack_pkg, qt_name=None):
- pkg = spec[spack_pkg]
- config_args.append('-system-' + (qt_name or spack_pkg))
- if not pkg.external:
- config_args.extend(pkg.libs.search_flags.split())
- config_args.extend(pkg.headers.include_flags.split())
+ use_spack_dep = lambda spack_pkg, qt_name=None: _use_spack_dep(
+ spec, config_args, spack_pkg, qt_name)
if '+gui' in spec:
use_spack_dep('freetype')
@@ -585,12 +588,6 @@ class Qt(Package):
'-no-nis',
])
- if '+opengl' in spec:
- if version >= Version('5.14'):
- use_spack_dep('assimp')
- else:
- config_args.append('-no-assimp')
-
# COMPONENTS
if '~examples' in spec:
@@ -677,6 +674,9 @@ class Qt(Package):
'' if version >= Version('5.7') else 'style')
])
+ use_spack_dep = lambda spack_pkg, qt_name=None: _use_spack_dep(
+ spec, config_args, spack_pkg, qt_name)
+
if MACOS_VERSION:
if version < Version('5.9'):
config_args.append('-no-xcb-xlib')
@@ -724,17 +724,28 @@ class Qt(Package):
if '~opengl' in spec:
config_args.extend(['-skip', 'multimedia'])
+ config_args.extend(['-skip', 'qt3d'])
+
if version >= Version('5.10'):
- config_args.extend([
- '-skip', 'webglplugin',
- '-skip', 'qt3d',
- ])
+ config_args.extend(['-skip', 'webglplugin'])
if version >= Version('5.14'):
config_args.extend(['-skip', 'qtquick3d'])
if version >= Version('5.15'):
config_args.extend(['-skip', 'qtlocation'])
+
+ # v5.0: qt3d uses internal-only libassimp
+ # v5.5: external-only libassimp
+ # v5.6: either internal or external libassimp via autodetection
+ # v5.9: user-selectable internal-vs-external via -assimp
+ # v5.14: additional qtquick3d module uses -assimp
+ # v5.15: qtquick3d switched to the -quick3d-assimp option
+ if version >= Version('5.9'):
+ use_spack_dep('assimp')
+ if version >= Version('5.15'):
+ use_spack_dep('assimp', 'quick3d-assimp')
+
elif MACOS_VERSION:
# These options are only valid if 'multimedia' is enabled, i.e.
# +opengl is selected. Force them to be off on macOS, but let other
diff --git a/var/spack/repos/builtin/packages/qt/qt514-quick3d-assimp.patch b/var/spack/repos/builtin/packages/qt/qt515-quick3d-assimp.patch
index 68f4e14c60..68f4e14c60 100644
--- a/var/spack/repos/builtin/packages/qt/qt514-quick3d-assimp.patch
+++ b/var/spack/repos/builtin/packages/qt/qt515-quick3d-assimp.patch