qt: make partially buildable on macos (#38990)

- drop use_xcode = True, as this would lead to an attempt install Xcode (#34064)
- don't automatically build Qt Location with +opengl, as this is
  still broken

This built sucessfully with qt@5.15.10+opengl+dbus+phonon on ventura/arm without
Xcode installed (only command line tools) - I did not check with Xcode installed.
This commit is contained in:
Martin Aumüller 2023-07-20 18:53:38 +02:00 committed by GitHub
parent 4f0020c794
commit a87ee7f427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,7 @@ class Qt(Package):
variant("gtk", default=False, description="Build with gtkplus.") variant("gtk", default=False, description="Build with gtkplus.")
variant("gui", default=True, description="Build the Qt GUI module and dependencies") variant("gui", default=True, description="Build the Qt GUI module and dependencies")
variant("opengl", default=False, description="Build with OpenGL support.") 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("phonon", default=False, description="Build with phonon support.")
variant("shared", default=True, description="Build shared libraries.") variant("shared", default=True, description="Build shared libraries.")
variant("sql", default=True, description="Build with SQL support.") variant("sql", default=True, description="Build with SQL support.")
@ -253,8 +254,6 @@ class Qt(Package):
msg="Apple Silicon requires a very new version of qt", msg="Apple Silicon requires a very new version of qt",
) )
use_xcode = True
# Mapping for compilers/systems in the QT 'mkspecs' # Mapping for compilers/systems in the QT 'mkspecs'
compiler_mapping = { compiler_mapping = {
"intel": ("icc",), "intel": ("icc",),
@ -712,6 +711,10 @@ def configure(self, spec, prefix):
# https://wiki.qt.io/QtWayland # https://wiki.qt.io/QtWayland
config_args.extend(["-skip", "wayland"]) config_args.extend(["-skip", "wayland"])
if "~location" in spec:
if version >= Version("5.15"):
config_args.extend(["-skip", "qtlocation"])
if "~opengl" in spec: if "~opengl" in spec:
config_args.extend(["-skip", "multimedia"]) config_args.extend(["-skip", "multimedia"])
config_args.extend(["-skip", "qt3d"]) config_args.extend(["-skip", "qt3d"])
@ -722,9 +725,6 @@ def configure(self, spec, prefix):
if version >= Version("5.14"): if version >= Version("5.14"):
config_args.extend(["-skip", "qtquick3d"]) config_args.extend(["-skip", "qtquick3d"])
if version >= Version("5.15"):
config_args.extend(["-skip", "qtlocation"])
else: else:
# v5.0: qt3d uses internal-only libassimp # v5.0: qt3d uses internal-only libassimp
# v5.5: external-only libassimp # v5.5: external-only libassimp