[qt5-base] Fix build error on macOS 26 Tahoe (#48298)

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Janek Bevendorff
2025-11-17 19:00:32 +01:00
committed by GitHub
parent 5f0fbaebd9
commit 07ee15e352
6 changed files with 78 additions and 32 deletions

View File

@@ -0,0 +1,25 @@
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 61bea952b2..9ba38d9949 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -18,8 +18,7 @@ QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \
- /System/Library/Frameworks/OpenGL.framework/Headers \
- /System/Library/Frameworks/AGL.framework/Headers/
+ /System/Library/Frameworks/OpenGL.framework/Headers
QMAKE_FIX_RPATH = install_name_tool -id
@@ -30,7 +29,7 @@ QMAKE_LFLAGS_REL_RPATH =
QMAKE_REL_RPATH_BASE = @loader_path
QMAKE_LIBS_DYNLOAD =
-QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
+QMAKE_LIBS_OPENGL = -framework OpenGL
QMAKE_LIBS_THREAD =
QMAKE_INCDIR_WAYLAND =
--
2.50.1 (Apple Git-155)

View File

@@ -49,35 +49,46 @@ endif()
#########################
## Downloading Qt5-Base
qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
PATCHES
# CVE fixes from https://download.qt.io/archive/qt/5.15/
patches/CVE-2025-4211-qtbase-5.15.diff
patches/CVE-2025-5455-qtbase-5.15.patch
patches/CVE-2025-30348-qtbase-5.15.diff
set(PATCHES
# CVE fixes from https://download.qt.io/archive/qt/5.15/
patches/CVE-2025-4211-qtbase-5.15.diff
patches/CVE-2025-5455-qtbase-5.15.patch
patches/CVE-2025-30348-qtbase-5.15.diff
patches/winmain_pro.patch #Moves qtmain to manual-link
patches/windows_prf.patch #fixes the qtmain dependency due to the above move
patches/qt_app.patch #Moves the target location of qt5 host apps to always install into the host dir.
patches/xlib.patch #Patches Xlib check to actually use Pkgconfig instead of makeSpec only
patches/vulkan-windows.diff #Forces QMake to use vulkan from vcpkg instead of VULKAN_SDK system variable
patches/egl.patch #Fix egl detection logic.
patches/qtbug_96392.patch #Backport fix for QTBUG-96392
patches/mysql_plugin_include.patch #Fix include path of mysql plugin
patches/mysql-configure.patch #Fix mysql project
patches/patch-qtbase-memory_resource.diff # From https://bugreports.qt.io/browse/QTBUG-114316
#patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static).
#Be carefull since it requires definining _GDI32_ for all dependent projects due to redefinition errors in the
#the windows supplied gl.h header and the angle gl.h otherwise.
# CMake fixes
patches/Qt5BasicConfig.patch
patches/Qt5PluginTarget.patch
patches/create_cmake.patch
patches/Qt5GuiConfigExtras.patch # Patches the library search behavior for EGL since angle is not build with Qt
patches/fix_angle.patch # Failed to create OpenGL context for format QSurfaceFormat ...
patches/mingw9.patch # Fix compile with MinGW-W64 9.0.0: Redefinition of 'struct _FILE_ID_INFO'
patches/qmake-arm64.patch # Fix by Oliver Wolff to support ARM64 hosts on Windows
)
patches/winmain_pro.patch #Moves qtmain to manual-link
patches/windows_prf.patch #fixes the qtmain dependency due to the above move
patches/qt_app.patch #Moves the target location of qt5 host apps to always install into the host dir.
patches/xlib.patch #Patches Xlib check to actually use Pkgconfig instead of makeSpec only
patches/vulkan-windows.diff #Forces QMake to use vulkan from vcpkg instead of VULKAN_SDK system variable
patches/egl.patch #Fix egl detection logic.
patches/qtbug_96392.patch #Backport fix for QTBUG-96392
patches/mysql_plugin_include.patch #Fix include path of mysql plugin
patches/mysql-configure.patch #Fix mysql project
patches/patch-qtbase-memory_resource.diff # From https://bugreports.qt.io/browse/QTBUG-114316
#patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static).
#Be careful since it requires defining _GDI32_ for all dependent projects due to redefinition errors in the
#the windows supplied gl.h header and the angle gl.h otherwise.
# CMake fixes
patches/Qt5BasicConfig.patch
patches/Qt5PluginTarget.patch
patches/create_cmake.patch
patches/Qt5GuiConfigExtras.patch # Patches the library search behavior for EGL since angle is not build with Qt
patches/fix_angle.patch # Failed to create OpenGL context for format QSurfaceFormat ...
patches/mingw9.patch # Fix compile with MinGW-W64 9.0.0: Redefinition of 'struct _FILE_ID_INFO'
patches/qmake-arm64.patch # Fix by Oliver Wolff to support ARM64 hosts on Windows
)
if(VCPKG_TARGET_IS_OSX)
execute_process(COMMAND xcrun --show-sdk-version
OUTPUT_VARIABLE OSX_SDK_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${OSX_SDK_VERSION} VERSION_GREATER_EQUAL 26)
# macOS 26 Tahoe has removed AGL APIs https://bugreports.qt.io/browse/QTBUG-137687
list(APPEND PATCHES patches/macos26-opengl.patch)
endif()
endif()
qt_download_submodule(OUT_SOURCE_PATH SOURCE_PATH PATCHES ${PATCHES})
# Remove vendored dependencies to ensure they are not picked up by the build
foreach(DEPENDENCY zlib freetype harfbuzz-ng libjpeg libpng double-conversion sqlite pcre2)
@@ -321,9 +332,6 @@ elseif(VCPKG_TARGET_IS_OSX)
if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET)
set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET})
else()
execute_process(COMMAND xcrun --show-sdk-version
OUTPUT_VARIABLE OSX_SDK_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Detected OSX SDK Version: ${OSX_SDK_VERSION}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" OSX_SDK_VERSION "${OSX_SDK_VERSION}")
message(STATUS "Major.Minor OSX SDK Version: ${OSX_SDK_VERSION}")

View File

@@ -1,6 +1,7 @@
{
"name": "qt5-base",
"version": "5.15.18",
"port-version": 1,
"description": "Qt Base provides the basic non-GUI functionality required by all Qt applications.",
"homepage": "https://www.qt.io/",
"license": null,

View File

@@ -1901,6 +1901,13 @@ ppqsort[openmp](osx) = feature-fails # No openmp on osx
qt3d[animation] = options # is a requirement, see https://github.com/microsoft/vcpkg/issues/31336
qt3d[extras] = options # is a requirement, see https://github.com/microsoft/vcpkg/issues/31336
qt5-base[cups](linux) = feature-fails # requires CUPS system libs
qt5-base[icu]:arm64-osx = feature-fails
qt5-base[icu]:x64-osx = feature-fails
qt5-base[icu]:x64-windows = feature-fails
qt5-base[icu]:x64-windows-release = feature-fails
qt5-base[icu]:x64-windows-static = feature-fails
qt5-base[icu]:x64-windows-static-md = feature-fails
qt5-base[icu]:x86-windows = feature-fails
qt5-base[vulkan](osx) = feature-fails # needs MolkenVK
qt5compat[iconv](!uwp) = feature-fails # requires qtbase without icu
qtbase[cups](linux) = feature-fails # requires CUPS system libs

View File

@@ -7926,7 +7926,7 @@
},
"qt5-base": {
"baseline": "5.15.18",
"port-version": 0
"port-version": 1
},
"qt5-charts": {
"baseline": "5.15.18",

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8e81b72172f73e4e8492adbb64ba0d1e96d08baf",
"version": "5.15.18",
"port-version": 1
},
{
"git-tree": "a65fdb65044dd17fea018dc2e1190aeb078d22f5",
"version": "5.15.18",