summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2021-05-29 14:53:25 -0400
committerGitHub <noreply@github.com>2021-05-29 20:53:25 +0200
commit9936182f601dbb0a6f818144d1a57e09e92e736a (patch)
tree58ba0b262d4292a2b895628656b4ec4aea743896 /var
parent6f534acbefa1ff1d0b389f72221a8dbdd87609b0 (diff)
downloadspack-9936182f601dbb0a6f818144d1a57e09e92e736a.tar.gz
spack-9936182f601dbb0a6f818144d1a57e09e92e736a.tar.bz2
spack-9936182f601dbb0a6f818144d1a57e09e92e736a.tar.xz
spack-9936182f601dbb0a6f818144d1a57e09e92e736a.zip
qt: skip multimedia when ~opengl (#23989)
* qt: skip multimedia when ~opengl On 5.9 on macOS the multimedia option causes build errors; on other platforms and versions it should probably be assumed inoperative anyway. * qt: Omit flags when disabling multimedia ``` ERROR: Unknown command line option '-no-pulseaudio'. ``` * Work around another qt@5.9 error * qt: Fix build error on darwin
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 59082fa3de..26b205f253 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -199,7 +199,7 @@ class Qt(Package):
conflicts('+framework',
msg="QT cannot be built as a framework except on macOS.")
else:
- conflicts('platform=darwin', when='@4.8.6',
+ conflicts('platform=darwin', when='@:4.8.6',
msg="QT 4 for macOS is only patched for 4.8.7")
use_xcode = True
@@ -413,6 +413,13 @@ class Qt(Package):
with open(conf_file, 'a') as f:
f.write("QMAKE_CXXFLAGS += -std=gnu++98\n")
+ @when('@5.9 platform=darwin')
+ def patch(self):
+ # 'javascriptcore' is in the include path, so its file named 'version'
+ # interferes with the standard library
+ os.unlink(join_path(self.stage.source_path,
+ 'qtscript/src/3rdparty/javascriptcore/version'))
+
@property
def common_config_args(self):
spec = self.spec
@@ -575,13 +582,14 @@ class Qt(Package):
])
if MACOS_VERSION:
- config_args.extend([
- '-no-xcb-xlib',
- '-no-pulseaudio',
- '-no-alsa',
- ])
+ if version < Version('5.9'):
+ config_args.append('-no-xcb-xlib')
if version < Version('5.12'):
config_args.append('-no-xinput2')
+ if spec.satisfies('@5.9'):
+ # Errors on bluetooth even when bluetooth is disabled...
+ # at least on apple-clang%12
+ config_args.extend(['-skip', 'connectivity'])
elif version < Version('5.15') and '+gui' in spec:
# Linux-only QT5 dependencies
config_args.append('-system-xcb')
@@ -602,6 +610,7 @@ class Qt(Package):
config_args.extend(['-skip', 'wayland'])
if '~opengl' in spec:
+ config_args.extend(['-skip', 'multimedia'])
if version >= Version('5.10'):
config_args.extend([
'-skip', 'webglplugin',
@@ -613,6 +622,14 @@ class Qt(Package):
if version >= Version('5.15'):
config_args.extend(['-skip', 'qtlocation'])
+ 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
+ # platforms decide for themselves.
+ config_args.extend([
+ '-no-pulseaudio',
+ '-no-alsa',
+ ])
configure(*config_args)