From 4d33a8e3f8e588cb2ef98c945b6db277ee05ff76 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 23 Feb 2024 12:51:02 +0100 Subject: [PATCH] Fix qt build with new xcode Signed-off-by: falkTX --- bootstrap-qt.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bootstrap-qt.sh b/bootstrap-qt.sh index 345c1d7..a6981ab 100755 --- a/bootstrap-qt.sh +++ b/bootstrap-qt.sh @@ -323,10 +323,10 @@ elif [ "${WIN32}" -eq 1 ]; then fi # zlib -if [ "${MACOS}" -eq 1 ]; then - qtbase_conf_args+=" -system-zlib" -else +if [ "${MACOS}" -eq 0 ] || ld -v 2>&1 | grep -q ld-classic; then qtbase_conf_args+=" -qt-zlib" +else + qtbase_conf_args+=" -system-zlib" fi # --------------------------------------------------------------------------------------------------------------------- @@ -346,13 +346,24 @@ elif [ "${MACOS}" -eq 1 ]; then elif [ "${WIN32}" -eq 1 ]; then if [ "${QT5_MVERSION}" = "5.12" ]; then patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/g++-win32.conf" 's/= -shared/= -static -shared/' - patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/win32-g++/qmake.conf" 's/= -fno-keep-inline-dllexport/= -Wno-deprecated-copy -Wno-deprecated-declarations -fno-keep-inline-dllexport/' else patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/win32-g++/qmake.conf" 's/= -shared/= -static -shared/' patch_file qtbase${qtsuffix} ${QT5_VERSION} "src/plugins/platforms/direct2d/direct2d.pro" 's/-lVersion/-lversion/' fi fi +if [ "${MACOS}" -eq 1 ] && ld -v 2>&1 | grep -q ld-classic; then + if [ "${QT5_MVERSION}" = "5.12" ]; then + patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/clang-mac.conf" 's/QMAKE_LFLAGS += -stdlib=libc++/QMAKE_LFLAGS += -Wl,-ld_classic -stdlib=libc++/' + patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/features/toolchain.prf" 's/isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS):/isEmpty(QMAKE_DEFAULT_INCDIRS):/' + fi +fi + +if [ "${QT5_MVERSION}" = "5.12" ]; then + patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/clang-mac.conf" 's/QMAKE_CXXFLAGS += -stdlib=libc++/QMAKE_CXXFLAGS += -Wno-deprecated-copy -Wno-deprecated-copy-with-user-provided-copy -stdlib=libc++/' + patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/win32-g++/qmake.conf" 's/= -fno-keep-inline-dllexport/= -Wno-deprecated-copy -Wno-deprecated-declarations -fno-keep-inline-dllexport/' +fi + build_qt_conf qtbase "${qtbase_conf_args}" if [ "${MACOS}" -eq 1 ] && [ ! -e "${PAWPAW_PREFIX}/include/qt5/QtWidgets" ]; then